Virtual Interfaces and Subnet Masks
john at day-light.com
Fri Jun 24 13:01:02 GMT 2005
it's my understanding that when you add an alias to an interface
AND that alias is within the same network as the main address on
the interface that it should be set with a /32 bit netmask.
ifconfig_fxp0="inet 192.168.1.1 netmask 255.255.255.0"
ifconfig_fxp0_alias0="inet 192.168.1.7 netmask 255.255.255.255"
IF the address is in a DIFFERENT network then the netmask
should reflect that network.
ifconfig_fxp0_alias1="inet 10.1.1.10 netmask 255.255.255.0"
(ps - make sure your alias numbering is numerically sequential
john at day-light.com
> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> [mailto:owner-freebsd-questions at freebsd.org]On Behalf Of Martin
> Sent: Friday, June 24, 2005 6:34 AM
> To: freebsd-questions at freebsd.org
> Subject: Re: Virtual Interfaces and Subnet Masks
> "Daniel Marsh" writes:
> >Why don't you just setup an IP alias for the fxp0 interface?
> >ifconfig_fxp0_alias0="inet 192.168.1.7"
> Thank you. that both validates some of what I did, but raises
> new questions. Originally, I tried to bring up a second Ethernet card
> which is on the system in question and which I thought we would use if
> we ever had to. This had worked once before when the dead system we
> were replacing was on a different network and I just assumed it would
> work on the same network. Big mistake!
> After discovering the hard way about conflicting instances of
> the same subnetmask and getting a bit nervous because we were still
> down on the interface we needed most, I tried bringing up fxp1 as
> ifconfig fxp1 192.168.1.1
> This worked, but I soon realized that ifconfig gave it a default mask of
> 255.255.255.0 which is wrong for that network.
> I then tried the alias for fxp0 exactly as you indicated and
> got it but the packets going out still had a 255.255.255.0 mask. I
> ended up, somehow, with that bad mask on both the primary interface
> and the alias after trying to start over with ifconfig.
> if config -alias
> ifconfig fxp0 inet 192.168.1.50 netmask 255.255.252.0
> ifconfig fxp0 alias 192.168.1.1
> I thought of bringing fxp0 down first but was doing all of this
> remotely from home and was concerned that I'd loose the system
> completely and it would be some minutes before one of us could
> physically go there and take control.
> We or at least I don't do this very thing nearly often enough
> because things under FreeBSD and Linux just don't break that often and
> it is difficult to duplicate every possible permutation of trouble
> meaning that sometimes, one gets nasty surprises.
> While not laughing at what happened too hard, can you think of
> how I ended up with the bad mask that wouldn't go away? Many thanks.
> Martin McCormick WB5AGZ Stillwater, OK
> OSU Information Technology Division Network Operations Group
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions