Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jun 2005 08:01:05 -0500
From:      "John Brooks" <john@day-light.com>
To:        "Martin McCormick" <martin@dc.cis.okstate.edu>, <freebsd-questions@freebsd.org>
Subject:   RE: Virtual Interfaces and Subnet Masks 
Message-ID:  <NHBBKEEMKJDINKDJBJHGKEOHJGAD.john@day-light.com>
In-Reply-To: <200506241133.j5OBXaT3056044@dc.cis.okstate.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

for example:

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"

HTH

(ps - make sure your alias numbering is numerically sequential
without gaps)

--
John Brooks
john@day-light.com 

> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org
> [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Martin
> McCormick
> Sent: Friday, June 24, 2005 6:34 AM
> To: freebsd-questions@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?
> >
> >ie:
> >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
> follows:
> 
> 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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NHBBKEEMKJDINKDJBJHGKEOHJGAD.john>