kohler / click

The Click modular router: fast modular packet processing and analysis
Other
734 stars 324 forks source link

how to connect several PCs and test throughput? #473

Open Memtwo opened 3 years ago

Memtwo commented 3 years ago

I want to test throughput on multi-hop router path. My plan is using several PCs, the first one as the source, last one as the destination,those between them as the routers, connect them all and then test the throughput. Is that realizable? If it is, how to realize it? Or any other ways to realize througput testing on multi-hop path. Is there any docs I can refer to?

p4pe commented 3 years ago

Hello, you can start wuth a simple setup with three different PCs, a Source a Bridge and a Sink.

On the source, you can have a click configuration that acts as a traffic generator, in the middle you can have a simple click configuration that just forwarding the traffic, and on the sink you can count the traffic using the Counter element,

Memtwo commented 3 years ago

Hello, you can start wuth a simple setup with three different PCs, a Source a Bridge and a Sink.

On the source, you can have a click configuration that acts as a traffic generator, in the middle you can have a simple click configuration that just forwarding the traffic, and on the sink you can count the traffic using the Counter element,

Thanks! and may I ask which element or setting I need to modify?

p4pe commented 3 years ago

On the source you can use FastUDPSource element or InfinitySource to generate traffic. On the middle node you can have a simple script

FromDevice() -> Queue -> ToDevice

On the sink you can have something like this:

FromDevice(eth1, PROMISC true)-> c:: Counter -> Discard;
Script(wait 10, print c.rate, loop);

You have to enable the promiscious mode in every intefrace.

Memtwo commented 3 years ago

On the source you can use FastUDPSource element or InfinitySource to generate traffic. On the middle node you can have a simple script

FromDevice() -> Queue -> ToDevice

On the sink you can have something like this:

FromDevice(eth1, PROMISC true)-> c:: Counter -> Discard;
Script(wait 10, print c.rate, loop);

You have to enable the promiscious mode in every intefrace.

Thanks! sorry to bother you again. I am newbie to Click. I install Cilck on VM, ubuntu20.04 and I can't find the FastUDPSource element or InfinitySource. And any doc can tell me how to set the script on every node?

tbarbette commented 3 years ago

Did you compile Click with --enable-userlevel? You're probably in Kernel mode, making FastUDPSource not available. Then it's InfiniteSource, check here : https://github.com/kohler/click/wiki/Elements