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

Adrian Ban bluelightning at mantech.ro
Wed May 1 13:32:31 BST 2013


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

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.

Best regards,

On 5/1/2013 2:51 PM, Greg Troxel wrote:
> Adrian Ban <bluelightning at mantech.ro> writes:
>> For the part of netlink/rtnetlink I can handle it (already found what
>> I need and also the parameters I need to set in the netlink message,
>> inspired from iproute, to be send to the kernel).
>> But before I send the message to the kernel I need to make some sanity
>> checks before the "encapsulation dot1q <1-4094>" command to be send.
>> So this is what I want to do:
>> 1. check the interface name to be in a format like this: eth0.243
>> 2. extract the real interface from the interface name: eth0
>> 3. check if the dot1q parameter is in the range 1-4094 (already done it)
>> 4. check if the specific dot1q vlan id is already token by another
>> subinterface of the same interface
>> 5. send the message to the kernel to create the subinterface with the
>> name and the specific vlan id
>> 6. zebra should check automatically that a new interface is up and it
>> should install all needed stuff (hope this is the flow from what I
>> could get form the quagga sources).
> If this is part of quagga it should support all the operating systems
> and kernel communication methods.  Have you looked at the BSD routing
> socket?

More information about the Quagga-dev mailing list