Multiple vxlan output port


From 4.1.0, ovs support multiple vxlan output port in flow, such as “in_port=1,actions=output:4097,output:4098. You must use this command ovs-vsctl set-port-default-flood true to use this function.

Note:the multiple vxlan tunnels’ vnid must the same, but the egress ports can be different or the same, both are ok.


Example

step1,enable default flood and restart picos service first.

admin@PICOS-OVS:~$ ovs-vsctl set-port-default-flood true
 Please reboot for the change to take effect!
admin@PICOS-OVS:~$ sudo /etc/init.d/picos restart

step2,create two vxlan tunnels

admin@PICOS-OVS:~$ ovs-vsctl add-port br0 vxlan1 -- set interface vxlan1 type=pica8_vxlan options:remote_ip=10.10.10.2 options:local_ip=10.10.10.1 options:vlan=1 options:vnid=1122867 options:udp_dst_port=4789 options:src_mac=C8:0A:A9:04:49:1A options:dst_mac=C8:0A:A9:9E:14:A5 options:egress_port=te-1/1/18

admin@PICOS-OVS:~$ ovs-vsctl add-port br0 vxlan2 -- set interface vxlan2 type=pica8_vxlan options:remote_ip=20.20.20.2 options:local_ip=20.20.20.1 options:vlan=10 options:vnid=1122867 options:udp_dst_port=4789 options:src_mac=66:66:66:66:66:66 options:dst_mac=88:88:88:88:88:88 options:egress_port=te-1/1/18

step3,add flow

admin@PICOS-OVS:~$ ovs-ofctl add-flow br0 in_port=17,actions=output:4097,output:4098

admin@PICOS-OVS:~$ ovs-ofctl add-flow br0 in_port=4097,actions=17

admin@PICOS-OVS:~$ ovs-ofctl add-flow br0 in_port=4098,actions=17

step4,send packets to port 17,then check the vxlan packets of port 18,port 18 should transmit two kinds of vxlan ports.

te-1/1/17 receive packets:

Te-1/1/18:One kind is like this:

Te-1/1/18:the other kind like this:

step5,Send above two kinds of vxlan packets to te-1/1/18,then te-1/1/17 will transmit the decapsulated packets.

te-1/1/17 transmit packets like this:


Copyright © 2024 Pica8 Inc. All Rights Reserved.