Re: "ifconfig -vlandev" syntax

From: Bernd Walter (ticso_at_cicely12.cicely.de)
Date: 09/26/05

  • Next message: Lourik Malan: "(no subject)"
    Date: Mon, 26 Sep 2005 00:54:33 +0200
    To: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
    
    

    On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote:
    > 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"

    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"

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

    -- 
    B.Walter                   BWCT                http://www.bwct.de
    bernd@bwct.de                                  info@bwct.de
    _______________________________________________
    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: Lourik Malan: "(no subject)"

    Relevant Pages

    • Re: "ifconfig -vlandev" syntax
      ... >> deprecate the old syntax so we may need to keep it around. ... must specify both vlan tag and device ... you can't set both the vlan and IP address information: ...
      (freebsd-current)
    • 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: "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-net)
    • Re: VLAN MTU problem in 4.9 ?
      ... Anything specific you want me to do while I'm doing the tcpdump? ... I looked at the man page for the vlan after you mentioned it... ... >>So it seems that when I specify a ping of greater then 1468 the pings stop ...
      (freebsd-net)
    • vlans and cloning
      ... I committed the revised netif cloning api so you can now specify ... I also modified the vlan code to use this ...
      (freebsd-arch)