Fastest way to change IP addresses
jamie at gnulife.org
Sat Nov 15 11:35:42 PST 2003
I want to change the IP address from 22.214.171.124 to 126.96.36.199
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 machine.
Isn't there a more elegant way?? The man page for ifconfig seems to cover
changing IP ALIASES, but not the primary IP of an interface.
In order to switch to 188.8.131.52 I've tried:
1) ifconfig de0 184.108.40.206 255.255.255.0
ifconfig -a then gives me:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 220.127.116.11 netmask 0xffffff00 broadcast 18.104.22.168
media: 10BaseT/UTP status: active
But then I cannot ping the gateway,
5 Packets transmitted, 0 packets received 100% packet loss
2) I've tried editing /etc/rc.conf with the desired IP address. I
It gives me the same output listed in (1), but I still cannot ping the
gateway. The only way I can change the IP address is to make the change in
/etc/rc.conf and reboot the whole machine. Then it works just fine.
I would have to think there has GOT to be a better way.
Am I doing something wrong somewhere, or is it just a requirement that
you need to restart?
Greetings from Minneapolis, MN, United States
"A friend is someone who lets you have total freedom to be yourself."
More information about the freebsd-questions