Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2001 09:00:05 -0700 (PDT)
From:      "Mark Blackman" <mark.blackman@netscalibur.co.uk>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask 
Message-ID:  <200107091600.f69G05L85617@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: "Mark Blackman" <mark.blackman@netscalibur.co.uk>
To: Peter Pentchev <roam@orbitel.bg>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask 
Date: Mon, 09 Jul 2001 16:50:56 +0100

 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".
 
 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.
 
 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.
 
 - Mark
 
 POLA --> principle of least astonishment.
 
 > On Mon, Jul 09, 2001 at 06:39:50PM +0300, Peter Pentchev wrote:
 > > On Mon, Jul 09, 2001 at 08:16:15AM -0700, Mark Blackman wrote:
 > > > 
 > > > >Number:         28833
 > > > >Category:       bin
 > > > >Synopsis:       ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the ne
 > tmask
 > > > >Environment:
 > > > System: FreeBSD amoeba.ch.dircon.net 4.3-STABLE FreeBSD 4.3-STABLE #1: Th
 > u May 24 13:03:35 BST 2001 root@admi
 > > > n4.dircon.net:/usr/obj/usr/src/sys/AMOEBA i386
 > > > >Description:
 > > > "ifconfig ep0 netmask 255.255.240.0" has no effect on the netmask for ep0
 > > > 
 > > > This did work in FreeBSD-4.2 RELEASE. I suspect this is connnected with i
 > fconfig changes, but I couldn't track it down. It looked like it shouldn't wo
 > rk in 4.2 either, but it does. 
 > > 
 > > It works for me, if I also specify the IP address to change the netmask for
 > .
 > > Consider a case where there are multiple IP addresses on a single interface
 > ;
 > > ifconfig should probably spit out an error instead of doing nothing, but
 > > it should most definitely not change the netmask on *all* addresses, and
 > > I guess it was considered unsafe to make it just change the netmask on
 > > the first address.
 > 
 > Ah; I actually see that you already knew that - 'only way to change
 > netmask is via address setting as well'.  Well, once again, I don't
 > think it would be safe to change just the netmask on the first address,
 > or on all of them.  Think aliases - several IP addresses on the same
 > network on the same NIC; or think subnets - several logical networks
 > on the same physical network, and a machine on more than one of
 > the logical nets.
 > 
 > Though I guess ifconfig(8) could somehow error out, instead of failing
 > silently.  I'll look into this.
 > 
 > G'luck,
 > Peter
 > 
 > -- 
 > I am the meaning of 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?200107091600.f69G05L85617>