Fastest way to change IP addresses
kevin_stevens at pursued-with.net
Tue Nov 18 14:27:31 PST 2003
On Nov 15, 2003, at 11:35, Jamie wrote:
> I want to change the IP address from 188.8.131.52 to 184.108.40.206
> on a FreeBSD machine as quickly as possible. Despite my efforts, I can
> only get the change to work by editing rc.conf and rebooting the
> Isn't there a more elegant way??
That *is* the elegant way. You want a more expedient way.
> In order to switch to 220.127.116.11 I've tried:
> 1) ifconfig de0 18.104.22.168 255.255.255.0
> ifconfig -a then gives me:
> fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> inet 22.214.171.124 netmask 0xffffff00 broadcast 126.96.36.199
> ether 00:03:47:b1:d6:1c
> media: 10BaseT/UTP status: active
That is not the correct broadcast address for that network...
> But then I cannot ping the gateway,
> ping 188.8.131.52
> 5 Packets transmitted, 0 packets received 100% packet loss
It should work. Two thoughts:
If you've been bouncing around between addresses while testing, you may
have confused the arp cache on the gateway device, which would need to
be flushed or time out before speaking to you again.
When you make the IP change directly, it's then incumbent on you to
also make any appropriate routing updates - this is handled
automatically during boot by the rc.conf procedure. Since you're
changing addresses within the same subnet it shouldn't be a major deal
(you shouldn't be attempting to route), but it should be checked
anyway. netstat -nr.
More information about the freebsd-questions