[Click] VLAN - ARP proposal

Bro, Lars lars.bro at siemens.com
Thu May 5 12:23:34 EDT 2011


Hi, list

I am developing a test system that can send traffic through our product
in different ways, and verify this traffic.

Now, our product is going to use  802.1Q VLAN tagging as well.

---------

I can see that there are already some elements available, so that one
can for example annotate packets with a
VLAN tag and then send the packets through EtherVlanEncap().

But I use ARPQuerier() for assigning the ethernet address.

One could make an element that - if the packet is an 802.1Q - removes
the 802.1Q part and stores it
in the VLAN annotation. - and the reverse - inserts the 802.1Q part
according to the packet annotation.

Such an element could be put just before ToDevice() - and if
ARPRequester were changed slightly so that the VLAN
annotation is also included in the ARP request, the ARP request would go
to the correct VLAN.

The example below shows what I mean, VLAN 2 and 7 and no VLAN:

// Input is packets to send via eth3, with or without VLAN annotation
// output is packets from eth3, with and without VLAN annotation
// (I know that VLAN annotation contains PCP, CFI and VID, so the below
is not right use of VLAN anno)
// (PaintTee could use the lower byte of TCI, that gives at least 255
possibilities)
// (otherwise, one should make a real VlanClassifier)
// (or even better, an ANNOClassifier())
{

AddressInfo (
  eth3_untagged 192.168.17.12/24,
  eth3_on_2 10.15.13.2/24,
  eth3_on_3 10.16.19.22/24, 
  eth3 00-01-02-03-04-05
);

input -> out_untagged::PaintTee(0, VLAN) -> out_vlan2::PaintTee(2, VLAN)
-> out_vlan7::PaintTee(7, VLAN) -> Discard;

to_eth3 ::VLANEncap() -> ToDevice(eth3);
queue_to_eth3::Queue() -> to_eth3;

out_untagged -> arpq_untagged::ARPQuerier(eth3_untagged)  -> to_eth3
out_wlan2 -> arpq_wlan2::ARPQuerier(eth3_on_2)  -> to_eth3;
out_wlan7 -> arpq_wlan7::ARPQuerier(eth3_on_3). -> to_eth3;

FromDevice(eth3) -> VLANDecap() -> 
in_untagged::PaintTee(0, VLAN) -> in_vlan2::PaintTee(2, VLAN) ->
in_vlan7::PaintTee(7, VLAN) -> Discard

in_untagged -> arp_untagged::Classifier(12/0806 20/0001, 12/0806 20/0002
12/0800);
in_wlan2 -> arp_wlan2::Classifier(12/0806 20/0001, 12/0806 20/0002
12/0800);
in_wlan7 -> arp_wlan7::Classifier(12/0806 20/0001, 12/0806 20/0002
12/0800);

in_untagged[0] -> ARPResponder(eth3_untagged, eth3) -> queue_to_eth3;
in_wlan2[0] -> ARPResponder(eth3_wlan2, eth3) -> queue_to_eth3;
in_wlan7[0] -> ARPResponder(eth3_wlan7, eth3) -> queue_to_eth3;

in_untagged[1] -> [1]arpq_untagged;
in_wlan2[1] -> [1]arpq_wlan2;
in_wlan7[1] -> [1]arpq_wlan7;

in_untagged[2] -> output;
in_wlan2[2] -> output;
in_wlan7[2] -> output;

}


Would you say, this is a proper solution?



I know that I could also do vconfig and create the VLAN subdevices, but
then I mix Click with Linux stuff. I think implementing in Click is the
cleanest way

Med venlig hilsen / Kind regards
Lars Bro
Test Manager

Siemens A/S
Industry Sector
Mobility Division
Islands Brygge 55
2300  Copenhagen
Denmark
Tel: +45 3388-6219
mailto:lars.bro at siemens.com
www.siemens.dk

Siemens A/S. Headquarters: Borupvang 3, 2750 Ballerup, Denmark. Tel: +45
4477 4477 CVR-no. 16 99 30 85
Important notice: This e-mail and any attachment thereof may contain
confidential and corporate proprietary information.
If you are not the intended recipient, please notify us immediately by
reply e-mail, do not disclose its contents to any person and delete this
e-mail and its attachments from your system.
Thank you.



More information about the click mailing list