An OpenFlow controller that emulates a repeater hub.
$ git clone https://github.com/trema/repeater_hub.git
$ cd repeater_hub
$ bundle install --binstubs
Run this controller:
$ ./bin/trema run ./lib/repeater_hub.rb -c trema.conf
Send some packets from host1 to host2, and show received packet stats of host2 and host3:
$ ./bin/trema send_packets --source host1 --dest host2 --npackets 10
$ ./bin/trema show_stats host2
Packets received:
192.168.0.1 -> 192.168.0.2 = 10 packets
$ ./bin/trema show_stats host3
Packets received:
192.168.0.1 -> 192.168.0.2 = 10 packets
Enjoy!