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 220.127.116.11 to 18.104.22.168
> 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 22.214.171.124 I've tried:
> 1) ifconfig de0 126.96.36.199 255.255.255.0
> ifconfig -a then gives me:
> fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> inet 188.8.131.52 netmask 0xffffff00 broadcast 184.108.40.206
> 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 220.127.116.11
> 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