[Xorp-users] VLAN support in XORP

Pavlin Radoslavov pavlin at icir.org
Wed Sep 26 02:01:07 PDT 2007


All,

The first-cut VLAN support is now committed in the CVS tree.

Below is some high-level information about the current configuration
mechanism. Nothing is final so here is your chance to suggest
improvements or alternative solutions.

Currently, the configuration looks like:

interfaces {
    interface fxp0 {
        vif vlan10 {
            vlan {
                vlan-id: 10
            }
            address 10.10.10.10 {
                ...
            }
            ...
        }
    }
}
	
I.e., the "vlan {}" block inside the "vif {}" block is used to
identify the vif as a VLAN and to apply the VLAN-specific
configuration. For now the VLAN-specific configuration is only the
VLAN ID.

The topic what the VLAN configuration should look like has been
discussed in the past. E.g., see the long "Some thoughts" thread
from November 2005:

http://mailman.icsi.berkeley.edu/pipermail/xorp-hackers/2005-November/thread.html

However, at the end it didn't seem there was a concensus what the
final solution should look like.

To add yet another possible solution, my personal preference and
my original intention was to use configuration like the following:

interfaces {
    interface fxp0 {
        vlan vlan10 {
            vlan-id: 10
            address 10.10.10.10 {
                ...
            }
            ...
        }
    }
}

In both cases the protocols' configuration will remain same as is
now and won't need any changes:

protocols {
    rip {
        interface fxp0 {
            vif vlan10 {
                ...
            }
        }
        ...
    }
}

I don't want to go into details comparing those two solutions (or
some of the solutions proposed in the November 2005 thread), because
this can become a very long subject.
At the end I agreed with Atanu to start with the first solution
for the simple reason that the delta to the interfaces.tp is much
smaller so it is obvious what needs to be moved around if at the end
we decide to change it to something else.

Each solution has some pros and cons so I think at the end we should
choose something that is practical and works reasonably well instead
of beating the subject to death.

In term of VLAN naming, the situation is the following.
In FreeBSD (and I believe in other BSDs as well, but I haven't
double-checked it yet), the vlan name has to be "vlan%d". However,
the integer after "vlan" doesn't need to match the VLAN ID. E.g.,
vlan10 could have VLAN ID of, say, 20.

In Linux the naming scheme can be programmed in advance using
ioctl(SET_VLAN_NAME_TYPE_CMD). The choices are names like:
 (a) vlan0005
 (b) eth1.0005
 (c) vlan5
 (d) eth0.5

Unlike FreeBSD, in Linux the integer value at the end of the name
must match the VLAN ID.
I believe (d) is the default naming scheme (where eth0 is the parent
interface).
However, for consistency with BSD and for naming clarity, currently
the FEA explicitly selects (c) as the naming scheme. Therefore the
sample configuration in the beginning of this email should work for
both BSD and Linux (except that in Linux "fxp0" needs to be replaced
with the parent interface name, say, "eth0").

If someone has suggestions or preferences what the configuration
should look like now is the time to speak.
The same applies for the choice of the naming scheme in Linux.

Thanks,
Pavlin

P.S. Currently the protocols haven't been tested yet whether they
need any fixes to use the VLAN vifs.

P.P.S. Special thanks to Ben Greear for the Linux VLAN
implementation in the kernel :)



More information about the Xorp-users mailing list