Re: "ifconfig -vlandev" syntax

From: Yar Tikhiy (yar_at_comp.chem.msu.su)
Date: 09/28/05

  • Next message: Bernd Walter: "Re: "ifconfig -vlandev" syntax"
    Date: Wed, 28 Sep 2005 14:39:37 +0400
    To: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
    
    

    On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote:
    >
    > There's also the issue that the "vlan" and "vlandev" options have to be
    > specified in that order, which is counter-intuitive and undocumented.
    >
    > leeloo# ifconfig vlan14 vlandev fxp0 vlan 14
    > ifconfig: must specify both vlan tag and device
    > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0
    > leeloo#

    Agreed. I noticed this issue, too, but forgot about it later.
    Would you mind filing a PR with me in Cc so that I won't forget
    about it again? Can't promise making the order arbitrary, but
    documenting this subtlety is a must.

    > 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"

    Just use:

      ifconfig_vlan14="inet W.X.Y.Z netmask 255.255.255.0 vlan 14 vlandev fxp0"

    This is what ifconfig(8) manpage tells in the syntax section:
    the address should precede other parameters.

    -- 
    Yar
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Bernd Walter: "Re: "ifconfig -vlandev" syntax"