Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enable/Disable symmetric hash in lag interface


 

Code Block
ovs-vsctl set-symmetric-hash lag true
ovs-vsctl set-symmetric-hash lag false

Except enable lag symmetric hash in glocal, user also need configure advance field in lag interface.

Code Block
ovs-vsctl -- set Interface ae1 options:hash-mapping=advance

Configure IP addresses symmetrically in lag advance hash mapping fields.

Code Block
ovs-vsctl set-lag-advance-hash-mapping-fields nw_dst nw_src
Configure IP addresses and L4 port numbers symmetrically in lag advance hash mapping fields.
Code Block
ovs-vsctl set-lag-advance-hash-mapping-fields nw_dst nw_src port_src port_dst

 


Enable/Disable symmetric has in ecmp interface


 

Code Block
ovs-vsctl set-symmetric-hash ecmp true
ovs-vsctl set-symmetric-hash ecmp false
 


Configure IP addresses symmetrically in l3 ecmp hash fields.

Code Block
ovs-vsctl set-l3-ecmp-hash-fields nw_src nw_dst
 


Configure IP addresses and L4 port numbers symmetrically in l3 ecmp hash fields.
Code Block
ovs-vsctl set-l3-ecmp-hash-fields nw_src nw_dst port_src port_dst

 


Example

 1. Configure

symmetic

symmetric in lag interface.


Code Block
1, Add bridge and ports.
ovs-vsctl add-br br0
ovs-vsctl add-port br0 te-1/1/1 vlan_mode=trunk tag=1
ovs-vsctl add-port br0 te-1/1/2 vlan_mode=trunk tag=1
ovs-vsctl add-port br0 te-1/1/3 vlan_mode=trunk tag=1
ovs-vsctl add-port br0 ae1 vlan_mode=trunk tag=1 -- set interface ae1 type=pica8_lag options:members=te-1/1/2,te-1/1/3
 
2, Configure advance hash mapping field and apply to ae1.
ovs-vsctl -- set Interface ae1 options:hash-mapping=advance
ovs-vsctl set-lag-advance-hash-mapping-fields nw_dst nw_src port_src port_dst


3, Enable lag symmetric.
ovs-vsctl set-symmetric-hash lag true
 
4, Add flow entry.
ovs-ofctl add-flow br0 in_port=1,actions=output:1025

 


 2. Configure

symmetic

symmetric in ecmp interface.

Code Block
1, Add bridge and ports.
ovs-vsctl add-br br0
ovs-vsctl add-port br0 te-1/1/1 vlan_mode=trunk tag=1
ovs-vsctl add-port br0 te-1/1/2 vlan_mode=trunk tag=1
ovs-vsctl add-port br0 te-1/1/3 vlan_mode=trunk tag=1
 
2, Configure ecmp group.
ovs-vsctl set-group-ranges ecmp-select-groups=1-10000
 
3, Configure l3 ecmp hash field.
ovs-vsctl set-l3-ecmp-hash-fields nw_src nw_dst port_src port_dst
 
4, Enable ecmp symmetric.
ovs-vsctl set-symmetric-hash ecmp true
 
5, add group and flow.
ovs-ofctl add-group br0 group_id=1,type=select,bucket=set_field:00:00:00:11:11:11-\>eth_src,set_field:00:00:00:22:22:22-\>eth_dst,output:2,bucket=set_field:00:00:00:33:33:33-\>eth_src,set_field:00:00:00:44:44:44-\>eth_dst,output:3
ovs-ofctl add-flow br0 in_port=1,actions=group:1