[Xorp-hackers] VLANs
Robert Bays
robert at vyatta.com
Wed May 10 11:11:10 PDT 2006
Sent this out yesterday from the wrong mail account...
Robert Bays wrote:
>
>
> Kristian Larsson wrote:
>>> %create: program "vconfig add
>>> $(ethernet.@)
>>> $(@)";
>>
>> This is certainly not an elegant solution.
>> However there is no problem doing this from within
>> the fea. I've provided a very simple code example
>> of adding vlans on a Linux system, it's available
>> at
>> http://www.xorp.org/bugzilla/attachment.cgi?id=79&action=view
>
> While it may not be elegant, it seems to work. And I would argue is a
> more pure implementation than creating vlan devices in the fea (from a
> XORP point of view anyway). To date, XORP doesn't create system
> interfaces. It relies on the operating system to provide them. Enabling
> the fea to know how to create and configure the wide range of interfaces
> is probably beyond the scope of the fea, IMHO. vlans are maybe a
> borderline example, but also consider a Sangoma or Digium T1/E1
> interface. As long as XORP provides a convenient method for using
> existing system tools to create the interface and set layer 2 parameters
> before any XRLs are processed, you can add support for many interface
> types relatively easily. And that is probably the real goal. XORP need
> only know about the layer 3 characteristics of the device in order to
> utilize it.
>
> As for vlans under BSD, I think it would be fairly easy to do the same
> thing Vyatta did under Linux by replacing the 'vconfig' call with
> something like 'ifconfig $(vif.@) create; ifconfig $(vif.@) vlan
> $(vif.id) vlandev $(interface.@)'. Then reference 'interface:($vif.@)
> vif:$(vif.@)' in all subsequent XRL calls. To take it one step further,
> you could probably hide OS specifics and create a mostly generic
> template by defining a parameter in the template and just referencing it
> in the program call, much like the tftp/ftp/http mechanism that exists
> in the templates now. That parameter could be populated in the template
> at compile time.
>
> Cheers,
> Robert
>
More information about the Xorp-hackers
mailing list