ifconfig -alias with duplicate netmasks work?

Li, Qing qing.li at bluecoat.com
Mon Aug 29 16:41:41 UTC 2011


Hi,

Yes, the address alias and its associated prefix installation code changed. 
Operationally it makes sense because all addresses of that same prefix go
through one route utilizing that given interface.

The side effect is you can have two separate interfaces on the same prefix,
but only a single route is installed, which is associated with the address
installed first.

The other interfaces won't be utilized for outgoing traffic unless you enable
RADIX_MPATH option in the kernel configuration.

I think the manpage needing updates, and I am partly guilty for not having time
to update the content, which does take considerable amount of time for actual 
behavior verification on different released versions.

I am now resuming work on FBSD after a long hiatus, updating the route manpage 
is on my to-do list.

--Qing


> -----Original Message-----
> From: owner-freebsd-net at freebsd.org [mailto:owner-freebsd-
> net at freebsd.org] On Behalf Of John
> Sent: Monday, August 22, 2011 4:49 PM
> To: FreeBSD Net
> Subject: ifconfig -alias with duplicate netmasks work?
> 
> Fellow Net'ers
> 
>    Debugging an nfs locking problem to a linux host, I accidently
> issued some ifconfig commands on the bsd server (9-current) and
> found that duplicate netmasks seem to work fine. For instance:
> 
> bce0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
> 	options=c01bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLA
> N_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
> 	ether d4:85:64:66:2a:14
> 	inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1
> 	inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255
> 	inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255
> 	inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255
> 	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> 	media: Ethernet autoselect (1000baseT <full-duplex>)
> 	status: active
> 
> via the commands:
> 
> ifconfig bce0 inet 10.24.99.127 netmask 0xffff0000 broadcast
> 10.24.255.255
> ifconfig bce0 inet 10.24.99.128 netmask 0xffff0000 broadcast
> 10.24.255.255 alias
> ifconfig bce0 inet 10.24.99.126 netmask 0xffff0000 broadcast
> 10.24.255.255 alias
> 
> The man page for ifconfig says one 'must' use a different netmask,
> typically 0xffffffff. However, everything still seems to work ok.
> 
> Has something changed, is the manpage wrong, am I totally missing
> something?
> 
> Thanks,
> John
> 
> man ifconfig
> 
> If the address
> is on the same subnet as the first network address for this
> interface, a non-conflicting netmask must be given.  Usually
> 0xffffffff is most appropriate.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list