Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Sep 2005 14:32:41 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        Bernd Walter <ticso@cicely12.cicely.de>
Cc:        freebsd-net@freebsd.org, freebsd-current@freebsd.org, Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Subject:   Re: "ifconfig -vlandev" syntax
Message-ID:  <20050928103241.GC86457@comp.chem.msu.su>
In-Reply-To: <20050925225432.GH552@cicely12.cicely.de>
References:  <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> <20050925225432.GH552@cicely12.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 26, 2005 at 12:54:33AM +0200, Bernd Walter wrote:
> On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote:
> > 
> > Also, you can't set both the vlan and IP address information:
> > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0
> > ifconfig: inet: bad value
> > 
> > As a result of this, the only way to create vlans from rc.conf seems to
> > be in two stages, by renaming the interface:
> > 
> > cloned_interfaces="vlan14"
> > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename"
> > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0"
> 
> The follwing always worked for me, no need to rename:
> cloned_interfaces="vlan1"
> ifconfig_vlan1="inet 1.2.3.4/29 vlan 1 vlandev fxp0"

Indeed, the address assignment arguments should precede other
parameters to ifconfig(8).  I think this is evident from the syntax
shown on the manpage.

> What doesn't work is this:
> ifconfig_vlan1_alias0="1.2.3.4/32"
> I had to configure them by a selfdone script.

Adding aliases on vlanX this way has been working for me.  Could
you check if prepending the "inet" keyword before the address changes
anything?  I prefer to specify address family explicitly in my
rc.conf files.  E.g.:

	ifconfig_vlan1_alias0="inet 1.2.3.4/32"

-- 
Yar



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