Geni Working Setup Details

parent 14db5ec4
Ryu:
apt-get install python-dev
apt-get install python-pip
apt-get install build-essential
apt-get install libxml2-dev libxslt-dev
git clone git://github.com/osrg/ryu.git
cd ryu
python ./setup.py install
PYTHONPATH=. ./bin/ryu-manager ryu/app/simple_switch.py
emulab OF setup:
apt-get update
apt-get install openvswitch-datapath-source bridge-utils
module-assistant auto-install openvswitch-datapath
apt-get install openvswitch-brcompat openvswitch-common
apt-get install curl traceroute
edit /etc/default/openvswitch-switch #BRCOMPAT=yes
#do this for each interface with new br-int(name)
ovs-vsctl add-br br-int
ovs-vsctl add-port br-int eth2
ifconfig eth2 0
ifconfig br-int 10.10.1.2 netmask 255.255.255.0
route add -net 10.10.1.0 netmask 255.255.255.0 dev br-int
ovs-vsctl set-controller br-int(controller connected name) tcp:<<controller ip>>:6633
Dump flows: (from the switch)
ovs-dpctl dump-flows br-int
RYU Controller LOGS PC1:
root@pc-1:~/ryu/ryu# PYTHONPATH=. ./bin/ryu-manager --verbose ryu/app/simple_switch.py
loading app ryu/app/simple_switch.py
loading app ryu.controller.ofp_handler
instantiating app ryu.controller.ofp_handler of OFPHandler
instantiating app ryu/app/simple_switch.py of SimpleSwitch
BRICK SimpleSwitch
CONSUMES EventOFPPacketIn
CONSUMES EventOFPPortStatus
BRICK ofp_event
PROVIDES EventOFPPacketIn TO {'SimpleSwitch': set(['main'])}
PROVIDES EventOFPPortStatus TO {'SimpleSwitch': set(['main'])}
CONSUMES EventOFPPortDescStatsReply
CONSUMES EventOFPErrorMsg
CONSUMES EventOFPEchoRequest
CONSUMES EventOFPHello
CONSUMES EventOFPSwitchFeatures
connected socket:<eventlet.greenio.GreenSocket object at 0x19827d0> address:('10.10.3.2', 60178)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x1982b50>
move onto config mode
switch features ev version: 0x1 msg_type 0x6 xid 0x9a1b6254 OFPSwitchFeatures(actions=4095,capabilities=199,datapath_id=17779080882,n_buffers=256,n_tables=255,ports={1: OFPPhyPort(port_no=1,hw_addr='00:04:23:b7:3e:b2',name='eth2',config=0,state=0,curr=136,advertised=128,supported=687,peer=0), 65534: OFPPhyPort(port_no=65534,hw_addr='00:04:23:b7:3e:b2',name='br-int',config=0,state=0,curr=0,advertised=0,supported=0,peer=0)})
move onto main mode
connected socket:<eventlet.greenio.GreenSocket object at 0x1982890> address:('10.10.2.2', 57908)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x1982fd0>
move onto config mode
switch features ev version: 0x1 msg_type 0x6 xid 0x645235a8 OFPSwitchFeatures(actions=4095,capabilities=199,datapath_id=17779081922,n_buffers=256,n_tables=255,ports={1: OFPPhyPort(port_no=1,hw_addr='00:04:23:b7:42:c2',name='eth2',config=0,state=0,curr=136,advertised=128,supported=687,peer=0), 65534: OFPPhyPort(port_no=65534,hw_addr='00:04:23:b7:42:c2',name='br-int',config=0,state=0,curr=0,advertised=0,supported=0,peer=0)})
move onto main mode
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779080882 00:23:20:8c:c3:e7 ff:ff:ff:ff:ff:ff 65534
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779081922 00:23:20:e8:4b:bf ff:ff:ff:ff:ff:ff 65534
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779080882 00:04:23:b7:42:c3 ff:ff:ff:ff:ff:ff 1
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779080882 00:04:23:b7:3e:b2 00:04:23:b7:42:c3 65534
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779080882 00:04:23:b7:42:c3 00:04:23:b7:3e:b2 1
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779081922 00:04:23:b7:13:1c 00:04:23:b7:42:c2 1
EVENT ofp_event->SimpleSwitch EventOFPPacketIn
packet in 17779081922 00:04:23:b7:42:c2 00:04:23:b7:13:1c 65534
=============================================================================
Switch PC:
root@pc:~# ovs-dpctl dump-flows br-int2
root@pc:~# ovs-dpctl dump-flows br-int
in_port(0),eth(src=00:04:23:b7:42:c2,dst=00:04:23:b7:13:1c),eth_type(0x0800),ipv4(src=10.10.2.2,dst=10.10.2.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=57908,dst=6633), packets:165, bytes:11874, used:4.770s, actions:1
in_port(1),eth(src=00:04:23:b7:13:1c,dst=00:04:23:b7:42:c2),eth_type(0x0800),ipv4(src=10.10.2.1,dst=10.10.2.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=6633,dst=57908), packets:84, bytes:6332, used:4.770s, actions:0
root@pc:~# netstat | grep 6633
tcp 0 0 PC-lan1:57908 PC-1-lan1:6633 ESTABLISHED
root@pc:~#
=============================================================================
Switch PC-1:
root@pc-0:/etc/default# netstat | grep 6633
tcp 0 0 PC-0-lan2:60178 PC-1-lan2:6633 ESTABLISHED
root@pc-0:/etc/default# ifconfig | less
root@pc-0:/etc/default# ovs-dpctl dump-flows br-int
root@pc-0:/etc/default# ovs-dpctl dump-flows br-int2
in_port(0),eth(src=00:04:23:b7:3e:b3,dst=00:04:23:b7:13:1d),eth_type(0x0800),ipv4(src=10.10.3.2,dst=10.10.3.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=60178,dst=6633), packets:162, bytes:11742, used:2.970s, actions:1
in_port(1),eth(src=00:04:23:b7:13:1d,dst=00:04:23:b7:3e:b3),eth_type(0x0800),ipv4(src=10.10.3.1,dst=10.10.3.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=6633,dst=60178), packets:83, bytes:6346, used:2.970s, actions:0
root@pc-0:/etc/default#
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment