Decapsulation by pop actions




From version 3.2,pica8 switch support another decapsulation way.Users can use pop_vxlan/pop_l2gre/pop_gre to decapsulate the vxlan/l2gre/gre packets.If you want to use this kind of decapsulation way,you should enable npb mode first by command "ovs-vsctl enable-npb-mode true".Then need to retart the picos serviece(sudo /etc/init.d/picos restart).After the restarting,you can use this way to do some decapsulation.


Notes

1.The tunnels created on different ports/same ports must have different source ips to ensure that these tunnels can be decapsulated normally. If the ips in these tunnels are the same,then some problems will occur.
2.Multiple tunnels are created on the same port. The src mac, dst mac, and vlan of these tunnels must be the same to ensure that these tunnel encapsulations work properly. Decapsulation is not subject to this limitation.
3.Pop_gre to work with pop_l2gre and pop_vxlan at the same time, you must ensure that pop_gre flow has a lower priority than pop_l2gre|pop_vxlan.
4.The location of pop_vxlan/pop_l2gre in the flow action has no relationship and can be decapsulated normally.

5.do not match tunnel_id feature only supported on 5812.


POP_Vxlan

There are two ways including matching tunnel_id or do not match tunnel_id.The matching fields must include "in_port,dl_dst,ip,nw_src,nw_dst,tunnel_id" or "in_port,dl_dst,nw_src,nw_dst,udp,tp_dst=4789".

admin@PICOS-OVS:~$ ovs-ofctl add-flow br0 in_port=2,dl_dst=c4:39:3a:fb:be:d9,ip,nw_src=10.10.2.20,nw_dst=10.10.1.20,tunnel_id=0x112233,action=pop_vxlan,output:1



admin@PICOS-OVS:~$ ovs-ofctl add-flow br0 in_port=6,dl_dst=44:44:44:44:44:44,nw_src=255.255.255.100,nw_dst=255.255.255.200,udp,tp_dst=4789,action=pop_vxlan,output:7

Pop_l2gre

There are two ways including matching tunnel_id or do not match tunnel_id.The matching fields must include "in_port,dl_dst,ip,nw_src,nw_dst,tunnel_id" or "in_port,dl_dst,nw_src,nw_dst".

admin@PICOS-OVS:~$ovs-ofctl add-flow br0 in_port=2,dl_dst=c4:39:3a:fb:be:d9,ip,nw_src=10.10.60.10,nw_dst=10.10.61.10,tunnel_id=0x4d2,action=pop_l2gre,output:1
admin@PICOS-OVS:~$ovs-ofctl add-flow br0 in_port=6,dl_dst=66:66:66:66:66:66,ip,nw_src=20.20.20.20,nw_dst=40.40.40.40,action=pop_l2gre,output:7

Pop_gre

admin@PICOS-OVS:~$ovs-ofctl add-flow br0 in_port=2,ip,dl_vlan=1000,dl_dst=C8:0A:A9:9E:14:A5,nw_src=10.10.60.10,nw_dst=100.10.61.10,actions=pop_gre,set_field:88:88:88:44:44:44-\>dl_dst,set_field:88:88:88:33:33:33-\>dl_src,set_field:100-\>vlan_vid,output:1

Copyright © 2024 Pica8 Inc. All Rights Reserved.