天天看点

ryu和mysql实现控制_Ryu控制器编程开发——packet_in和packet_out简易交换机实现(一)...

[[email protected] app]# ryu-manager --verbose test1.py

loading app test1.py

loading app ryu.controller.ofp_handler

instantiating app test1.py of SimpleSwitch

instantiating app ryu.controller.ofp_handler of OFPHandler

BRICK SimpleSwitch

CONSUMES EventOFPPacketIn

BRICK ofp_event

PROVIDES EventOFPPacketIn TO {'SimpleSwitch': {'main'}}

CONSUMES EventOFPEchoReply

CONSUMES EventOFPEchoRequest

CONSUMES EventOFPErrorMsg

CONSUMES EventOFPHello

CONSUMES EventOFPPortDescStatsReply

CONSUMES EventOFPPortStatus

CONSUMES EventOFPSwitchFeatures

connected socket: address:('127.0.0.1', 52714)

hello evmove onto config modeswitch features ev version=0x1,msg_type=0x6,msg_len=0xb0,xid=0xd921f2f2,OFPSwitchFeatures(actions=4095,capabilities=199,datapath_id=1,n_buffers=0,n_tables=254,ports={65534: OFPPhyPort(port_no=65534,hw_addr='1e:55:2d:a3:e7:4c',name=b's1',config=1,state=1,curr=0,advertised=0,supported=0,peer=0), 1: OFPPhyPort(port_no=1,hw_addr='6e:b6:52:7b:f3:46',name=b's1-eth1',config=0,state=0,curr=192,advertised=0,supported=0,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='d2:ac:eb:71:c6:24',name=b's1-eth2',config=0,state=0,curr=192,advertised=0,supported=0,peer=0)})

move onto main mode

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN:2054ethernet:

eth_src= 1a:43:54:b4:96:50eth_dst=ff:ff:ff:ff:ff:ff

PACKET_OUT...

EVENT ofp_event->SimpleSwitch EventOFPPacketIn

PACKET_IN: