Re: "ifconfig -vlandev" syntax

From: Gavin Atkinson (gavin.atkinson_at_ury.york.ac.uk)
Date: 09/26/05

  • Next message: Bernd Walter: "Re: "ifconfig -vlandev" syntax"
    To: Brooks Davis <brooks@one-eyed-alien.net>
    Date: Sun, 25 Sep 2005 23:08:25 +0100
    
    

    On Sun, 2005-09-25 at 14:37 -0700, Brooks Davis wrote:
    > On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote:
    > > Hi folks,
    > >
    > > As our ifconfig(8) is growing more options for special interface
    > > types, inconsistencies sneak into their syntax. In particular,
    > > -vlandev takes a useless argument (vlan(4) cannot attach to more
    > > than one parent anyway) while, e.g., -carpdev doesn't need one.
    > > Personally, I like the latter since having to type unneeded words
    > > on the command line annoys me. Do you think that making -vlandev
    > > need no arguments in CURRENT would break many existing things?
    >
    > I agree the argument is useless. Unfortunatly, it's going to be hard to
    > deprecate the old syntax so we may need to keep it around.

    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#

    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"

    Which is less than ideal. However, fixing these issues looks to be
    non-trivial.

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

    Relevant Pages

    • Re: "ifconfig -vlandev" syntax
      ... > deprecate the old syntax so we may need to keep it around. ... ifconfig: must specify both vlan tag and device ... ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" ...
      (freebsd-current)
    • Re: vlans and cloning
      ... ifconfig vlan0 vlan 1 vlandev em0 ... root@homelynx# ifconfig vlan32 vlan 32 vlandev rl0 ...
      (freebsd-arch)
    • Re: vlans and cloning
      ... ifconfig vlan0 vlan 1 vlandev em0 ... you can still specify the name of the cloned device. ...
      (freebsd-arch)
    • Re: problem with vlan interfaces in 6-STABLE
      ... >> I have a small problem with my vlan interfaces configured from rc.conf: ... The config did not change during the update: ... > to ifconfig in RELENG_6. ... those from the parent, ...
      (freebsd-stable)
    • Re: vlans and cloning
      ... ifconfig vlan0 vlan 1 vlandev em0 ... root@homelynx# ifconfig vlan32 vlan 32 vlandev rl0 ...
      (freebsd-arch)