Talk:HOTITutorial2010

From OpenFlow Wiki

Jump to: navigation, search
openflow@openflowvm:~$ sudo mn --topo single,3 --mac --switch ovsk --controller remote
*** Adding controller
*** Creating network
*** Adding hosts:
h2 h3 h4
*** Adding switches:
s1
*** Adding links:
(s1, h2) (s1, h3) (s1, h4)
*** Configuring hosts
h2 h3 h4
*** Starting controller
*** Starting 1 switches
s1
*** Starting CLI:
mininet>
mininet> dpctl show tcp:127.0.0.1:6634
*** s1 ------------------------------------------------------------------------
dpctl: 'show' command takes at most 1 arguments
mininet>
mininet> dpctl show
*** s1 ------------------------------------------------------------------------
features_reply (xid=0x46acc8f9): ver:0x1, dpid:1
n_tables:2, n_buffers:256
features: capabilities:0x87, actions:0xfff
 1(s1-eth1): addr:fe:7c:fc:2c:4e:6e, config: 0, state:0
     current:    10GB-FD COPPER
 2(s1-eth2): addr:fa:dc:c0:a3:fa:25, config: 0, state:0
    current:    10GB-FD COPPER
 3(s1-eth3): addr:6e:fe:69:fa:b7:4a, config: 0, state:0
     current:    10GB-FD COPPER
 LOCAL(dp0): addr:00:23:20:a9:7b:fe, config: 0x1, state:0x1
get_config_reply (xid=0xd5ba9927): miss_send_len=0
mininet>
mininet> dpctl dump-flows
*** s1 ------------------------------------------------------------------------
stats_reply (xid=0xae968b4a): flags=none type=1(flow)
mininet>
mininet> dpctl dump-flows tcp:127.0.0.1:6634
*** s1 ------------------------------------------------------------------------
dpctl: field tcp:127.0.0.1:6634 missing value
mininet>
mininet> dpctl add-flow tcp:127.0.0.1:6634 in_port=1,actions=output:2
*** s1 ------------------------------------------------------------------------
dpctl: 'add-flow' command takes at most 2 arguments
mininet>

Comment: Currently, Mininet console does not allow you to run all the dpctl commands. To fully utilize dpctl command, use SSH terminal. Or specify switch name in front, e.g.,

 mininet> s1 dpctl add-flow tcp:127.0.0.1:6634 in_port=1,actions=output:2
 mininet> s1 dpctl dump-flows tcp:127.0.0.1:6634
 stats_reply (xid=0x623ead81): flags=none type=1(flow)
 cookie=0, duration_sec=0s, duration_nsec=881000000s, table_id=1, priority=32768, n_packets=0, 
 n_bytes=0, idle_timeout=60,hard_timeout=0,in_port=1,actions=output:2