codeblock

2016年4月19日 星期二

Ryu controller - deal with openflow packets notes

- Controller receives a  packet from a switch if the switch failed to look up it's flow table
- Get incoming packet message, src mac/ip, dst mac/ip, ofproto, ... whatever you want
- Learn a switch-port-mac_address entry
- See what you want to do
  • design an action: OFPActionOutput, OFPActionSetQueue, OFPActionSetField, ...
  • design an match: OFPMatch
  • add a flow: 
    • OFPInstructionActions create instruction (input: action)
    • OFPFlowMod create flow modification request
    • datapath.send_msg to send request
  • ask switch to forward this pkt
    • OFPPacketOut to create send packet request 
    • datapath.send_msg to send request
- All classes are in ryu/ofproto/ofproto_[version]_parser.py. See more attributes or methods in this python module.



沒有留言:

張貼留言