Jump to: navigation, search

Difference between revisions of "Neutron/OFAgent/FlowTable"

Line 1: Line 1:
 
OpenFlow1.3 flow table for OFAgent
 
OpenFlow1.3 flow table for OFAgent
 +
 +
WIP implementation: https://github.com/yamt/neutron/tree/ofagent-merge-bridges
  
 
* requirements
 
* requirements

Revision as of 03:03, 21 April 2014

OpenFlow1.3 flow table for OFAgent

WIP implementation: https://github.com/yamt/neutron/tree/ofagent-merge-bridges

  • requirements
    • plain OpenFlow 1.3. no vendor extensions.
  • todo: VXLAN (same as GRE?)
  • legends
xxx: network id  (agent internal use)
yyy: segment id  (vlan id, gre key, ...)
a,b,c: tunnel port  (tun_br_ofports, map[net_id].tun_ofports)
i,j,k: vm port  (map[net_id].vif_ports[vif_id].ofport)
x,y,z: physical port  (int_ofports)
N: tunnel type  (0 for TYPE_GRE, 1 for TYPE_xxx, ...)
uuu: unicast l2 address
  • tables (in order)
   CHECK_IN_PORT
   CHECK_NETWORK+N
   ARP_PROXY
   TUNNEL_OUT
   TUNNEL_OUT_FLOOD+N
   LOCAL_OUT
   LOCAL_OUT_FLOOD
  • CHECK_IN_PORT
  for each vm ports:
     in_port=i, write_metadata(xxx),goto(ARP_PROXY)   // port_bound
  TYPE_GRE
  for each tunnel ports:
     in_port=a, goto(CHECK_NETWORK+N)     // setup_tunnel_port
  TYPE_VLAN
  for each physical ports:
     in_port=x, goto(CHECK_NETWORK+N)
  TYPE_FLAT
     in_port=x, goto(CHECK_NETWORK+N)
  default drop
  • CHECK_NETWORK+N. (per tunnel types) tunnel/vlan -> network
  TYPE_GRE
  for each networks:  // _provision_local_vlan_inbound_for_tunnel
     tun_id=yyy, write_metadata(xxx),goto(LOCAL_OUT)
  TYPE_VLAN
  for each networks:
     vlan_vid=present|yyy, write_metadata(xxx),pop_vlan,goto(LOCAL_OUT)
  TYPE_FLAT
     vlan_vid=none, write_metadata(xxx),pop_vlan,goto(LOCAL_OUT)
  default drop
  • ARP_PROXY
    • todo: local arp responder
  goto(TUNNEL_OUT)
  • TUNNEL_OUT
    • todo: learning and/or l2 pop
  goto(TUNNEL_OUT_FLOOD+0)
  • TUNNEL_OUT_FLOOD+N. (per tunnel types)
  network -> tunnel/vlan
  output to tunnel/physical ports
  "next table" might be LOCAL_OUT
  TYPE_GRE
  for each networks:  // _provision_local_vlan_outbound_for_tunnel
     metadata=xxx, set_tunnel(yyy),output:a,b,c,goto(next table)
  TYPE_VLAN
  for each networks:
     metadata=xxx, push_vlan:0x8100,set_field:present|yyy->vlan_vid,output:x,y,z,goto(next table)
  TYPE_FLAT
     metadata=xxx, output:x,y,z,goto(next table)
  default goto(next table)
  • LOCAL_OUT
    • todo: learning and/or l2 pop
  for each known destinations:
     metadata=xxx,eth_dst=uuu output:i
  goto(LOCAL_OUT_FLOOD)
  • LOCAL_OUT_FLOOD
    • todo: learning and/or l2 pop
  for each networks:
     metadata=xxx, output:i,j,k  // port_bound
  default drop