Re: Fastest way to change IP addresses
On Nov 15, 2003, at 11:35, Jamie wrote: 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?? That *is* the elegant way. You want a more expedient way. 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=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 200.80.11.8 netmask 0xff00 broadcast 200.88.11.255 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 200.80.11.1 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. KeS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Fastest way to change IP addresses
On Saturday 15 November 2003 02:35 pm, Jamie wrote: 1) ifconfig de0 200.80.11.8 255.255.255.0 ifconfig -a then gives me: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 200.80.11.8 netmask 0xff00 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 Works fine for me - gladiator# ifconfig fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 192.168.0.3 netmask 0xff00 broadcast 192.168.0.255 ether 00:80:29:65:e2:96 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 gladiator# ping -c 5 gatekeeper PING gatekeeper.trini0.org (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=0.350 ms 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.255 ms 64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.226 ms 64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.224 ms 64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.242 ms --- gatekeeper.trini0.org ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.224/0.259/0.350/0.047 ms gladiator# ifconfig fxp0 192.168.0.10 gladiator# ifconfig fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 192.168.0.10 netmask 0xff00 broadcast 192.168.0.255 ether 00:80:29:65:e2:96 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 gladiator# ping -c 5 gatekeeper PING gatekeeper.trini0.org (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=0.337 ms 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.225 ms 64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.249 ms 64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.224 ms 64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.224 ms --- gatekeeper.trini0.org ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.224/0.252/0.337/0.044 ms ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Fastest way to change IP addresses
On Sat, Nov 15, 2003 at 01:35:52PM -0600, Jamie wrote: 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=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 200.80.11.8 netmask 0xff00 broadcast 200.88.11.255 ether 00:03:47:b1:d6:1c media: 10BaseT/UTP status: active But then I cannot ping the gateway, Yes -- you're doing everything right in order to change the IP number. Except that you seem confused as to whether the network interface is de0 or fxp0 -- I assume that's just a flub in your e-mail, and not what you've actually done... If it isn't that, then the problem may lie within your network gear. This may have cached the MAC address belonging to your machine as associated with first IP number and is getting confused by the renumbering. If you wait for a while it should eventually sort itself out. How long you have to wait depends on a number of things including the make of routers and switches -- it could be as long as 20 minutes. One way that you might get round this problem would be to add the new address as an alias: # ifconfig de0 inet 200.80.11.8 netmask 0x alias In theory you could then go on to swap the netmasks for the two addresses, thus making the second one the primary address, and then delete the first address. Possibly with some sort of delay between each operation to let verything adjust. But no guarrantees that will work. You'll have to experiment. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: Fastest way to change IP addresses
On Sat, 15 Nov 2003, Matthew Seaman wrote: On Sat, Nov 15, 2003 at 01:35:52PM -0600, Jamie wrote: 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=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 200.80.11.8 netmask 0xff00 broadcast 200.88.11.255 ether 00:03:47:b1:d6:1c media: 10BaseT/UTP status: active But then I cannot ping the gateway, Yes -- you're doing everything right in order to change the IP number. Except that you seem confused as to whether the network interface is de0 or fxp0 -- I assume that's just a flub in your e-mail, and not what you've actually done... If it isn't that, then the problem may lie within your network gear. This may have cached the MAC address belonging to your machine as associated with first IP number and is getting confused by the renumbering. If you wait for a while it should eventually sort itself out. How long you have to wait depends on a number of things including the make of routers and switches -- it could be as long as 20 minutes. One way that you might get round this problem would be to add the new address as an alias: # ifconfig de0 inet 200.80.11.8 netmask 0x alias In theory you could then go on to swap the netmasks for the two addresses, thus making the second one the primary address, and then delete the first address. Possibly with some sort of delay between each operation to let verything adjust. But no guarrantees that will work. You'll have to experiment. Cheers, Matthew I found another machine here running a newer version of FreeBSD and tried it. It worked the way it should. The old machine was running FreeBSD 3.4, and the new machine is running 4.8. Maybe the problem has to do with software versions. And yes, that was a flub in the email. Thanks for the suggestions, - Jamie -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK Greetings from Minneapolis, MN, United States A friend is someone who lets you have total freedom to be yourself. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]