[Click] what's the difference between toDevice and toDevice.u?

Zhaohui Wang zwange at gmu.edu
Wed Nov 5 19:10:25 EST 2008


 

 

Hi all

 

I am a click newbie, I am now using click for a project.

 

 

I have a linux box with 2 ether interfaces, with different subnets.

I want do a bridge, or say, tunnel ,between this 2 interfaces, 

That is, any  packets received from veth103 should be forwarded to vf0 , and vice versa, like linux ether device pairs.

 

Here is my draft code,

 

FromDevice(veth103)

->Strip(14) 

->EtherEncap(0x0800, vf0:eth,ff:ff:ff:ff:ff:ff)

-> out::Queue(2000)

->ToDevice(vf0);

 

FromDevice(vf0)

  ->Strip(14)

->EtherEncap(0x0800, veth103:eth,ff:ff:ff:ff:ff:ff)    

  ->ToDevice(veth103);

 

The code CAN be run in user-level click by command   click br.click .

This confuse me becase the wiki said toDevice is linuxmodule.

 

 

The problem with this code is, it build a loop between veth103 and vf0, so any single packet will ping-pong between these 2 interfaces.

 

How can I let veth103 only receive it and pass it to user-level application but not forwarded back to vf0 again and vice versa?

 

Any element to use? ToDevice.u or toHost? 

 

 

 

Best Regards

Zhao Wang

 



More information about the click mailing list