Subject: Re: /sbin/ifup
To: Michael Richardson <firstname.lastname@example.org>
From: Greg Troxel <email@example.com>
Date: 07/30/2003 12:23:48
Michael Richardson <firstname.lastname@example.org> writes:
> I think that "ifconfig XXX delete" is enough to remove all of the IP
> addresses. True?
No, this removes only one address, and only an IPV4 address (in
delete Remove the network address specified. This would be used
if you incorrectly specified an alias, or it was no
longer needed. If you have incorrectly set an NS address
having the side effect of specifying the host portion,
removing all NS addresses will allow you to respecify the
host portion. delete does not work for IPv6 addresses.
Use -alias with explicit IPv6 address instead.
Splitting the ifconfig step and the rest makes a lot of sense to me as
well; I have often adjusted e.g. ifconfig.de0 and wanted to
'/etc/rc.d/network reload' to rerun ifconfig.
This is hard, because a lot of programs don't deal well with interface
configurations changing out from under them. 'Reload' (as opposed to
just redoing start) would be difficult, since the config files would
have to be parsed and compared to the running config, and then the
changes effected. One could delete down to bare link-local addresses
and build up, but this will cause a lot more thrashing of programs
that track addresses.
Greg Troxel <email@example.com>