Linux GVRP usage

GVRP is a protocol that allows automatic learning of VLANs on a network. This is relevant in centrally managed networks or in hosting backbones, where you might have hundreds of VLANs that need to be automatically managed on all to-be-connected nodes. There have been GVRP implementations for linux dating back to at least 2003, and like QinQ or RSTP support and some other important networking features they never made it past the laptop-savvy developer community. After standing in the way for years they finally let it be heard that "GVRP is being deprecated by the IEEE", kinda being proud of sitting on their asses so long that the protocol is being phased out before they manage to take up one of the implementations.

It seems in 2008/2009 there was a set of patches that made it "in", and a buxfix from 2011 clearly suggests those are included in linux-2.6.

What's missing is some extended GVRP usage documentation in the iproute2 man pages. I'll try to fill the gap with as much as I could gather.

Announcing VLANs:

So far I could only find the following commands that would create & announce a vlan.

ip link add link eth2 eth2.103 type vlan id 103 gvrp on loose_binding on
ip link set eth2.103 up

The first problem with those is, that when testing on Ubuntu Natty it's simply not working, and the manpage has no reference to GVRP.

root@egal:~# ip link add eth0.200 type vlan id 200 gvrp on loose_binding on
RTNETLINK answers: Invalid argument

It is solve-able by:

modprobe 8021q
apt-get install vlan
vconfig add eth0 200
root@egal:~# vconfig add eth0 200
Added VLAN with VID == 200 to IF -:eth0:-
root@egal:~# ip link add eth0.200 type vlan id 200 gvrp on loose_binding on
RTNETLINK answers: File exists

As you can see the first GVRP registration of a non-existant vlan still dangled there when I created the VLAN on my eth0 NIC. Creating  the VLAN is whats needed to make ip link talk GVRP, but there must be some big nasty dragons with a bug like that "File exists". Something in kernel space was actually written when it said "Invalid argument" before, otherwise I couldn't imagine how it could trip over the vlan id 200 + gvrp. To make things worse, I spend another hour looking for reasonable documentation, didn't come up with any.

So please handle with care!

Listening to VLAN announcements:

The second problem is that different from some rumors, Linux isn't the center of the universe and so a more important feature is learning about GVRP vlans becoming announced from a network neighbour. There's various daemons for this, that also didn't make it to mainstream linux.

This daemon could help you out:

http://zagrodzki.net/~sebek/gvrpcd/ 

It's already at version 1.0 and successfully used on FreeBSD for many years.

1 Comment

  1. i'll not complete this.

    Sometimes you set out to finally write missing public documentation for something, spend hours searching for information and in the end get idiot talk because you unknowingly dared to awake one of the elders.