Date: Mon, 9 Jul 2001 09:20:06 -0700 (PDT) From: Peter Pentchev <roam@orbitel.bg> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask Message-ID: <200107091620.f69GK6k90637@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/28833; it has been noted by GNATS. From: Peter Pentchev <roam@orbitel.bg> To: Mark Blackman <mark.blackman@netscalibur.co.uk> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask Date: Mon, 9 Jul 2001 19:19:14 +0300 On Mon, Jul 09, 2001 at 09:00:05AM -0700, Mark Blackman wrote: > you're right, the correct behaviour is that the netmask change must be allied > to a specific address as aliases are very common. > > Although, generally most aliases are have netmask of 255.255.255.255 and > so the new netmask is logically applied to the "first". Yep, but there's still the case of more than one non-alias IP address.. > The fundamental problem is that changing the netmask loses the default > route if you use an address as well as .. using an address causes the default > route to go away. > > I just think its a violation of POLA that changing the netmask only > causes your default route to disappear > > I posted a related message on freebsd-net. Unfortunately, I am not on -net :( Causing the default route to disappear is a side effect of a change that was very much needed indeed - namely, that all routes associated with an interface should disappear once that interface is brought down. (Strictly speaking, this is more of 'all routes associated with an IP address of a non-alias interface' or some such, but you get the drift..) This is really important in the case of dynamically-configurable and oft-changing networks on, say, a laptop. If you bring down an interface address, and then bring up a new one, many programs expect setting a default route via the new net to 'just work', without having to replace an existing default route; many programs even complain if there is an existing default route, and leave it there, leaving the laptop in a kind of unusable state - with a default gateway on the old network, unreachable from the present one. > If you feel its semantically inappropriate to get away without > using an address then fine, but this did work in the past and so > there is some POLA violation. Yes, this is a POLA violation, but I prefer to think of it as a fix for a problem that has annoyed quite a lot of people. Maybe there could be a better solution, like adding an 'ifconfig change'.. but then again, no - when you change an interface address's netmask, you actually delete a route for the old network, and add a route to the new one. Keeping all the routes which have addresses on the old network as gateways, and whose gateway addresses are still reachable via the new network, and removing all others, might require a bit more work. G'luck, Peter -- If I were you, who would be reading this sentence? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107091620.f69GK6k90637>