[quagga-dev 10493] Re: Adding "encapsulation dot1q" option to interfaces

Greg Troxel gdt at ir.bbn.com
Wed May 1 13:50:39 BST 2013

Adrian Ban <bluelightning at mantech.ro> writes:

> I don't know if the BSD supports creating the VLAN via kernel netlink,
> not 100% sure. Maybe somebody with more experience in BSD programming
> can give me a hint.

netlink is a Linux-only interface.  BSD systems use the routing socket
for learning about things and ioctl for configuring.

> For example in this document:
> http://www.openbsd.org/cgi-bin/man.cgi?query=vlan&sektion=4 seems that
> the creating of vlan is done via IOCTL.
> What I'm trying to implement is with netlink/rtnellink socket in Linux
> kernel for beginning. If everything is fine I will document how to do
> the same think on the BSD.

Sure, stepwise implementation is ok.  But you will be defining
interfaces that will later have to be implemented on multiple systems,
and it's important to get them right the first time.  Otherwise behavior
may end up changing to accomodate portability, which is awkward.
Because of that, I would be not in favor of merging vlan patches until
at least Linux and BSD are supported.  (And perhaps *solaris; I'm not
clear on how they configure vlans.)

The sources for ifconfig(8) on *BSD will be pretty straightforward;
that is basically a command-line wrapper around the ioctls.

The basic paradigm is

           ifconfig vlan0 create
           ifconfig vlan0 vlan 6 vlanif tlp0

to create a vlan interface and associate it with a particular id on a
parent (physical) interface.  After that it can be treated as any other

It sounds like the Linux naming scheme may be different, and how to
reconcile all this is important to get right before implementing.

> I want to do this because by default Quagga is a routing software so
> this can be interpreted like "a routing box" not "a switching box" and
> the "encapsulation dot1q" is available only in Cisco routes.

Understood that at least people would like this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20130501/7f822776/attachment-0001.sig>

More information about the Quagga-dev mailing list