On Sat, Jun 11, 2005 at 02:12:55AM -0400, Michael Erdely wrote: > Hi, Everybody, > > An admin that works with me was trying to remove an alias from an > interface and ended up causing network connectivity on the server to > cease. > > I was wondering if the following scenario was standard behavior: > $ ifconfig xl0 > xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 00:10:5a:a9:ed:be > media: Ethernet 100baseTX full-duplex > status: active > inet6 fe80::210:5aff:fea9:edbe%xl0 prefixlen 64 scopeid 0x1 > inet 192.168.25.20 netmask 0xffffff00 broadcast 192.168.25.255 > $ sudo ifconfig xl0 inet alias 192.168.25.49 \ > netmask 255.255.255.255 broadcast 192.168.25.49 > $ ifconfig xl0 > xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 00:10:5a:a9:ed:be > media: Ethernet 100baseTX full-duplex > status: active > inet6 fe80::210:5aff:fea9:edbe%xl0 prefixlen 64 scopeid 0x1 > inet 192.168.25.20 netmask 0xffffff00 broadcast 192.168.25.255 > inet 192.168.25.49 netmask 0xffffffff broadcast 192.168.25.49 > $ sudo ifconfig xl0 inet -alias 192.168.25.49 \ > netmask 255.255.255.255 broadcast 192.168.25.49 > $ ifconfig xl0 > xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 00:10:5a:a9:ed:be > media: Ethernet 100baseTX full-duplex > status: active > inet6 fe80::210:5aff:fea9:edbe%xl0 prefixlen 64 scopeid 0x1 > inet 192.168.25.20 netmask 0xffffffff broadcast 192.168.25.49 > > As you can see from the above example, the computer would no longer be > able to communicate on the network. The fix is: > $ sudo ifconfig xl0 inet alias 192.168.25.20 \ > netmask 255.255.255.0 broadcast 192.168.25.255 > $ sudo route -n delete default > $ sudo route -n add default 192.168.25.1 > > Then, network connectivity is restored. Generally, I remove aliases > with just "ifconfig xl0 inet -alias 192.168.25.49", but I think it's > reasonable for an admin to try the example above. > > So... is this expected behavior? >
Yes. -alias needs only the IP address to remove an alias. What you did is acctually: sudo ifconfig xl0 inet -alias 192.168.25.49 sudo ifconfig xl0 inet netmask 255.255.255.255 broadcast 192.168.25.49 That is how ifconfig works but hey if somebody makes a nice diff it will probably go in. For me the current behaviour is perfectly fine. -- :wq Claudio

