Priority of Arp flow
Generally, the priority of an arp group is higher than a mac group. If one flow matches arp group and mac group at the same time, even if the priority of the arp is lower than the mac, packets will be forwarded according to arp group.
Example 1
Basic configuration:
admin@PicOS-OVS$ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8 admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/1 vlan_mode=trunk tag=1-- set interface ge-1/1/1 type=pica8 admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/4 vlan_mode=trunk tag=1-- set interface ge-1/1/4 type=pica8 admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/5 vlan_mode=trunk tag=1-- set interface ge-1/1/5 type=pica8
Add flow:
admin@PicOS-OVS$ovs-ofctl add-flow br0 in_port=1,dl_dst=ff:ff:ff:ff:ff:ff,actions=5 admin@PicOS-OVS$ovs-ofctl add-flow br0 in_port=1,dl_type=0x0806,arp_op=1,actions=4
Check table:
admin@PicOS-OVS$ovs-appctl pica/dump-flows #3720 normal permanent recirc_id=0,arp,in_port=1,arp_op=1, actions:4 #3719 normal permanent recirc_id=0,in_port=1,dl_dst=ff:ff:ff:ff:ff:ff, actions:5 #3718 normal permanent priority=0,recirc_id=0, actions:drop Total 3 flows in HW. admin@PicOS-OVS$ admin@PicOS-OVS$ovs-ofctl dump-flows br0 OFPST_FLOW reply (OF1.4) (xid=0x2): cookie=0x0, duration=28.919s, table=0, n_packets=n/a, n_bytes=0, in_port=1,dl_dst=ff:ff:ff:ff:ff:ff actions=output:5 cookie=0x0, duration=15.884s, table=0, n_packets=n/a, n_bytes=0, arp,in_port=1,arp_op=1 actions=output:4 admin@PicOS-OVS$
Send arp request packets and then check table:
admin@PicOS-OVS$ovs-ofctl dump-flows br0 OFPST_FLOW reply (OF1.4) (xid=0x2): cookie=0x0, duration=62.999s, table=0, n_packets=n/a, n_bytes=0, in_port=1,dl_dst=ff:ff:ff:ff:ff:ff actions=output:5 cookie=0x0, duration=49.964s, table=0, n_packets=n/a, n_bytes=2560000, arp,in_port=1,arp_op=1 actions=output:4
From example above, if packets match files of above flows, packets will be forwarded according to arp.
Example 2
Add flow:
admin@PicOS-OVS$ovs-ofctl add-flow br0 in_port=1,priority=333,dl_dst=ff:ff:ff:ff:ff:ff,actions=5 admin@PicOS-OVS$ovs-ofctl add-flow br0 in_port=1,priority=222,dl_type=0x0806,arp_op=1,actions=4
Send arp request packets and check table:
admin@PicOS-OVS$ovs-ofctl dump-flows br0 OFPST_FLOW reply (OF1.4) (xid=0x2): cookie=0x0, duration=19.544s, table=0, n_packets=n/a, n_bytes=0, priority=333,in_port=1,dl_dst=ff:ff:ff:ff:ff:ff actions=output:5 cookie=0x0, duration=8.422s, table=0, n_packets=n/a, n_bytes=19846144, priority=222,arp,in_port=1,arp_op=1 actions=output:4 admin@PicOS-OVS$ovs-ofctl dump-flows br0 OFPST_FLOW reply (OF1.4) (xid=0x2): cookie=0x0, duration=20.931s, table=0, n_packets=n/a, n_bytes=0, priority=333,in_port=1,dl_dst=ff:ff:ff:ff:ff:ff actions=output:5 cookie=0x0, duration=9.809s, table=0, n_packets=n/a, n_bytes=26813440, priority=222,arp,in_port=1,arp_op=1 actions=output:4 admin@PicOS-OVS$
Even if arp group priority is lower than mac group, packets still are forwarded according to arp group.
Copyright © 2024 Pica8 Inc. All Rights Reserved.