Date: Sat, 15 Nov 2003 13:35:52 -0600 (CST) From: Jamie <jamie@gnulife.org> To: freebsd-questions@freebsd.org Subject: Fastest way to change IP addresses Message-ID: <20031115132923.J5131-100000@floyd.gnulife.org>
next in thread | raw e-mail | index | archive | help
I want to change the IP address from 200.80.11.7 to 200.80.11.8 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 200.80.11.8 I've tried: 1) ifconfig de0 200.80.11.8 255.255.255.0 ifconfig -a then gives me: fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 200.80.11.8 netmask 0xffffff00 broadcast 200.88.11.255 ether 00:03:47:b1:d6:1c media: 10BaseT/UTP status: active But then I cannot ping the gateway, ping 200.80.11.1 5 Packets transmitted, 0 packets received 100% packet loss 2) I've tried editing /etc/rc.conf with the desired IP address. I then run: sh /etc/netstart 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? Thanks, - Jamie Greetings from Minneapolis, MN, United States "A friend is someone who lets you have total freedom to be yourself."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031115132923.J5131-100000>