783
edits
Line 28: | Line 28: | ||
** Start editing firewall.py (Note that you can enter the MAC ids directly, no need to read from a .csv file as stated in the same code | ** Start editing firewall.py (Note that you can enter the MAC ids directly, no need to read from a .csv file as stated in the same code | ||
*** Write code to block h1 to h2 (Mac IDs: 00:00:00:00:00:01, 00:00:00:00:00:02) | *** Write code to block h1 to h2 (Mac IDs: 00:00:00:00:00:01, 00:00:00:00:00:02) | ||
** tip | |||
*** to send the msg to switch, use event.connection.send | |||
*** msg type is of.ofp_flow_mod() | |||
** Do the following to quickly test code | ** Do the following to quickly test code | ||
$ ./pox/pox.py --verbose forwarding.l2_learning misc.firewall | $ ./pox/pox.py --verbose forwarding.l2_learning misc.firewall | ||
$ sudo mn --topo single,3 --controller remote --mac | $ sudo mn --topo single,3 --controller remote --mac | ||
$ dpctl dump-flows tcp:127.0.0.1:6634 | $ dpctl dump-flows tcp:127.0.0.1:6634 |
edits