Difference between revisions of "Neutron/OFAgent/FlowTable"
Line 55: | Line 55: | ||
** todo: local arp responder | ** todo: local arp responder | ||
− | goto(TUNNEL_OUT) | + | default goto(TUNNEL_OUT) |
* TUNNEL_OUT | * TUNNEL_OUT | ||
− | + | TYPE_GRE | |
+ | metadata=xxx,eth_dst=uuu set_tunnel(yyy),output:a // _add_fdb_flow | ||
+ | TYPE_VLAN | ||
+ | metadata=xxx,eth_dst=uuu push_vlan,set_field:present|yyy->vlan_vid,output:a | ||
− | goto(TUNNEL_OUT_FLOOD+0) | + | default goto(TUNNEL_OUT_FLOOD+0) |
* TUNNEL_OUT_FLOOD+N. (per tunnel types) | * TUNNEL_OUT_FLOOD+N. (per tunnel types) | ||
Line 68: | Line 71: | ||
"next table" might be LOCAL_OUT | "next table" might be LOCAL_OUT | ||
TYPE_GRE | TYPE_GRE | ||
− | for each networks: // | + | for each networks: // _add_fdb_flow (FLOODING_ENTRY) |
metadata=xxx, set_tunnel(yyy),output:a,b,c,goto(next table) | metadata=xxx, set_tunnel(yyy),output:a,b,c,goto(next table) | ||
TYPE_VLAN | TYPE_VLAN | ||
Line 82: | Line 85: | ||
for each known destinations: | for each known destinations: | ||
metadata=xxx,eth_dst=uuu output:i | metadata=xxx,eth_dst=uuu output:i | ||
− | goto(LOCAL_OUT_FLOOD) | + | default goto(LOCAL_OUT_FLOOD) |
* LOCAL_OUT_FLOOD | * LOCAL_OUT_FLOOD |
Revision as of 07:12, 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
default goto(TUNNEL_OUT)
- TUNNEL_OUT
TYPE_GRE metadata=xxx,eth_dst=uuu set_tunnel(yyy),output:a // _add_fdb_flow TYPE_VLAN metadata=xxx,eth_dst=uuu push_vlan,set_field:present|yyy->vlan_vid,output:a
default 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: // _add_fdb_flow (FLOODING_ENTRY) 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 default 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
- references
- similar attempts for OVS agent https://wiki.openstack.org/wiki/Ovs-flow-logic
- we use metadata instead of "internal" VLANs
- we don't want to use NX learn action
- similar attempts for OVS agent https://wiki.openstack.org/wiki/Ovs-flow-logic