-
Notifications
You must be signed in to change notification settings - Fork 5
SDN Test Setup
-
Run mul
sudo ./mulThis is the mul debug console
-
Log into MUL CLI
telnet localhost 7000 -
[MUL CLI documentation] (https://github.com/openmul/openmul/blob/master/docs/openmul-CLI_GUIDE-basic.pdf)
-
Run mininet
sudo mn --controller=remote --topo single,2 -
[Mininet CLI documentation] (http://mininet.org/walkthrough/#part-3-mininet-command-line-interface-cli-commands)
-
Run wireshark and capture lo0 interface
sudo wireshark -
Some useful commands:
-
Mininet - network with 1 switch and 2 hosts
sudo mn --controller=remote --topo single,2 -v debug --mac -
Mininet - network with a host per switch (2 switches, 2 hosts)
sudo mn --controller=remote --topo linear,2 -v debug --mac -
Mininet - check for operation, ping
xterm h1 h2 s1 h1 ping h2 h1 ifconfig -
Manually install flows using dpctl
$ dpctl add-flow tcp:127.0.0.1:6634 in_port=1,actions=output:2 $ dpctl add-flow tcp:127.0.0.1:6634 in_port=2,actions=output:1This does not test the controller. However, adding 2 flows to test ping is useful for baseline testing.
-
Check flows on the switch with dpctl
dpctl dump-flows tcp:127.0.0.1:66346634 is passive listen port for s1. s2, s3 etc use 6635, 6636 and so on
-
Mul - Controller configuration mode
>enable #configure terminal (config)# -
Mul - Setup flows on a wildcard (0.0.0.0/0) or a specific host ip from mul-main config mode. An example:
(config)#of-flow add switch 0x1 dip 0.0.0.0/0 sip 10.0.0.1/32 proto * tos * dport * sport * smac * dmac * eth-type * vid * vlan-pcp * in-port * (config-flow-action)# action-add output 2 (config-flow-action)# write (config-flow-action)# commitThe switch DP-id is available in 'show of-switch all'
ubuntu# show of-switch all Switch-DP-id | State | Peer | Ports ----------------------------------------------------------------------------- 0x00000000003d connected 127.0.0.1:34824 0 0x00000000003e connected 127.0.0.1:34825 0 0x000000000001 registered 127.0.0.1:34794 3The port number in 'action-add' command is available in 'show of-switch 0x1 detail'.
ubuntu# show of-switch 0x1 detail ----------------------------------------------------------------------------- Datapath-id : 0x1 OFP-Version : 0x1 Buffers : 256 Tables : 255 Actions : 0xfff Capabilities: 0xc7(FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP) Num Ports : 3 ----------------------------------------------------------------------------- Port info ----------------------------------------------------------------------------- 1 s1-eth1 0a:2e:f0:ba:a2:b8 PORT_UP 2 s1-eth2 46:4c:a4:b8:eb:cd PORT_UP 65534 s1 16:69:e4:8e:b0:4f PORT_DOWN ----------------------------------------------------------------------------- -
Mul - View the flow on the switch
show of-flow switch <dp-id>
|< < Prev Page| |---------------------------|