[Xorp-users] RFC: New VLAN api for xorp.ct

Ben Greear greearb at candelatech.com
Thu Mar 3 09:15:28 PST 2011


On 03/03/2011 07:38 AM, Joe Coco wrote:
> Hello,
>
> I removed the 'set' options from the interfaces.tp and now xorp starts. When I try to configure a VLAN, I do get an error.
> I'm not sure if this is because I fouled up the range syntax in interfaces.tp, or an actual broken condition. The error is:

I plan to work on this today.  I think I'll remove the
virtual-dev section and just have each of the 3 variables
as top-level interface configurables.

Thanks,
Ben

>
> "Commit Failed
> 102 Command failed  push_config failed: Interface/Vif error on foo/foo: Failed to
> add VLAN to interface foo  reason: Unknown virtual device type:"
>
> (notice virtual device type is blank) I'm assuming the iface_type string is not being set.
>
>
> My config is:
>
> interface foo {
> 	virtual-dev {
> 		parent-ifname: "eth1"
> 		iface-type: "VLAN"
> 		vid: "200"
> 	}
> 	vif foo {
> 		address 1.1.1.1 {
> 		prefix-length: 24
> 	}
>    }
> }
>
>
> Couple of things from the interfaces.tp file.  Shouldn't the VIDve u32 not txt ?
>
> Here is what I slightly modified in interfaces.tp which allows xorp to start:
>
>       vlan {
>                  %help:  short "Configure a virtual interface";
>                  %create:        xrl "$(interfaces.targetname)/ifmgr/0.1/set_if_virtual?parent-iface:txt=$(interfaces.TID)&parent-ifname:txt=$(interface.@)&iface-type:txt$(@.iface-type)&vid:txt$(@.vid)";
>
>                  %mandatory:     $(@.parent-ifname), $(@.iface-type), $(@.vid);
>
>                  parent-ifname {
>                      %help:      short "Parent interface this virtual belongs to.";
>                      %allow-range: $(@) "eth0" "eth32" %help: "E.g, eth0";
>                      %create:;
>                  }
>                  iface-type {
>                      %help:      short "Interface-type:  VLAN.";
>                      %allow-range: $(@) "VLAN" "VLAN" %help: "Just type vlan";
>                      %create:;
>                  }
>                  vid {
>                      %help:      short "Virtual Interface Identifier:  VLAN-ID for VLANs.";
>                      %allow-range: $(@) "1" "4096" %help: "The VLAN ID";
>                      %create:;
>                  }
>              }
>
>
> -- Joe


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-users mailing list