MERAprojects / ops-build

Other
0 stars 0 forks source link

Traffic storm is visible on blocked by STP link #29

Open alrukav opened 7 years ago

alrukav commented 7 years ago

Problem Description:

Traffic storm is visible on blocked by STP link.

OpenSwitch version:

Version OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-meraswitch/devel/master-20170209151505-dev)

Test Topology:

screenshot from 2017-02-10 06 11 38

Steps to reproduce the problem:

  1. Configure DUTs and PCs as in attached file.
  2. Check STP topology on all DUTs:
switch1(config-if)# do sh spanning-tree 
MST0
  Spanning tree status: Enabled
  Root ID    Priority   : 16384               
             MAC-Address: 70:72:cf:d6:80:fc   
             This bridge is the root
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

  Bridge ID  Priority  : 16384               
             MAC-Address: 70:72:cf:d6:80:fc   
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

Port         Role           State      Cost    Priority   Type
------------ -------------- ---------- ------- ---------- ----------
eth1         Designated     Forwarding 20000   128        point_to_point
eth2         Designated     Forwarding 20000   128        point_to_point
eth3         Designated     Forwarding 20000   128        point_to_point

switch2(config-if)# do sh spanning-tree 
MST0
  Spanning tree status: Enabled
  Root ID    Priority   : 16384               
             MAC-Address: 70:72:cf:d6:80:fc   
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

  Bridge ID  Priority  : 32768               
             MAC-Address: 70:72:cf:dc:8d:11   
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

Port         Role           State      Cost    Priority   Type
------------ -------------- ---------- ------- ---------- ----------
eth1         Root           Forwarding 20000   128        point_to_point
eth2         Alternate      Blocking   20000   128        point_to_point
eth3         Designated     Forwarding 20000   128        point_to_point

switch3(config-if)# do sh spanning-tree 
MST0
  Spanning tree status: Enabled
  Root ID    Priority   : 16384               
             MAC-Address: 70:72:cf:d6:80:fc   
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

  Bridge ID  Priority  : 32768               
             MAC-Address: 70:72:cf:21:d9:b6   
             Hello time(in seconds):2  Max Age(in seconds):20  Forward Delay(in seconds):15

Port         Role           State      Cost    Priority   Type
------------ -------------- ---------- ------- ---------- ----------
eth1         Root           Forwarding 20000   128        point_to_point
eth2         Designated     Forwarding 20000   128        point_to_point
  1. Try to send ping from PC1 to PC2. - NOK: ping is absent.
PC1> ping 10.0.0.2 -c 1
host (10.0.0.2) not reachable
  1. For more info about storm please see attached capture files (in both files the same capture).

STP_storm.txt STP_storm_issue.zip

lyubov-popova commented 7 years ago

In ops-switchd-container-plugin, STP is implemented using Linux bridge (bridge-sim):

root@switch:~# ip netns exec swns ip link
...
4: bridge-sim: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 70:72:cf:6b:31:a8 brd ff:ff:ff:ff:ff:ff
...
80: 1@if2: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge-sim state UP mode DEFAULT group default qlen 1000
    link/ether 70:72:cf:6b:31:a8 brd ff:ff:ff:ff:ff:ff link-netnsid 0

With this configuration STP is not working properly (storm is observed). VLANs are not working also (https://github.com/MERAprojects/ops-build/issues/17).

Instead of using linux bridge, it is possible to enable STP on OpenVswitch. It can be done with following command: /opt/openvswitch/bin/ovs-vsctl set bridge bridge_normal stp_enable=true I have tried to do it, but faced with a problem with port recreation on OpenVswitch in configuration with 3 DUTs - this should be investigated. Traffic storm is not observed in this case, but due to deletion/creation, ports are constantly changing their STP state listerning-learning and traffic is lost.

OpenVswitch is used in ops-switchd-container-plugin as HW simulation. On real HW (e.g., ops-switchd-opennsl-plugin), ASIC plugin is responsible for MAC learning, STP... So, ASIC plugin should be implemented in ops-switchd-container-plugin. This implementation should fix issue https://github.com/MERAprojects/ops-build/issues/29 and https://github.com/MERAprojects/ops-build/issues/16