Multi-action in crossflow mode
From version 4.1.1,pica8 switch support multi-action in crossflow mode. Before supporting this ,there is a issue. When the host forward the packet to others, first packet is forwarded to SDN Controller. This is caused “ONE” packet loss every time when the host forward the packet, and without OF rule, the SDN Controller can not update the device information (IP/MAC).That is why we want to support when the packet is forwarded to PicOS, the action should be supported both “go to Controller” and “Normal” at the same time
Command
ovs-ofctl add-flow br0 in_port=5,actions=normal,controller
Example
prerequisites
xorplus configurations:
admin@Xorplus# show|display set set interface gigabit-ethernet ge-1/1/5 crossflow enable true set interface gigabit-ethernet ge-1/1/5 family ethernet-switching port-mode "trunk" set interface gigabit-ethernet ge-1/1/5 family ethernet-switching vlan members 200 set interface gigabit-ethernet ge-1/1/6 crossflow enable true set interface gigabit-ethernet ge-1/1/6 family ethernet-switching port-mode "trunk" set interface gigabit-ethernet ge-1/1/6 family ethernet-switching vlan members 200 set interface gigabit-ethernet ge-1/1/7 crossflow enable true set interface gigabit-ethernet ge-1/1/7 family ethernet-switching port-mode "trunk" set interface gigabit-ethernet ge-1/1/7 family ethernet-switching vlan members 200 set protocols spanning-tree enable false set system log-level "trace" set vlans vlan-id 200 set xovs enable true set xovs special-packets-options sequence 123 match destination-mac-address 22:22:22:22:22:22 set xovs special-packets-options sequence 123 match ether-type 2048 set xovs special-packets-options sequence 123 handler "both"
ovs configurations:
ovs-vsctl set-controller br0 tcp:10.10.51.42:6633 ovs-vsctl add-port br0 ge-1/1/5 -- set interface ge-1/1/5 type=crossflow ovs-vsctl add-port br0 ge-1/1/6 -- set interface ge-1/1/6 type=crossflow ovs-vsctl add-port br0 ge-1/1/7 -- set interface ge-1/1/7 type=crossflow
start controller
ryu-manager ….py
add flow with normal and controller
step1,configurations are the same with prerequisites
step2,add flow
ovs-ofctl add-flow br0 in_port=5,actions=normal,controller
step3:send packets
send ip packets with dst mac 22:22:22:22:22:22,type is 0x0800,vlan is 200,src ip 1.1.1.200,dst ip is 5.5.5.200 to ge-1/1/5.
Result:ge-1/1/6 and ge-1/1/7 will transmit packets.And the packets are sending to cpu(500pps). Packet-in packets’ data is the same with the original packets from ge-1/1/5
Copyright © 2024 Pica8 Inc. All Rights Reserved.