Uploaded image for project: 'l2switch'
  1. l2switch
  2. L2SWITCH-24

Loop detection fails with parallel links

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • unspecified
    • General
    • None
    • Operating System: All
      Platform: All

    • 2129
    • High

      It seems that STP implementation does not take into account if two switches are connected with multiple links.

      The problem appears if I have a looping topology AND some switches are connected with more than one link,
      For example:

      3 switches s1, s2, s3
      2 hosts h1 <-> s1 and h2 <-> s2
      s1 <-> s2 <> s3 <-> s1
      and additionally s1 <--> s2
      (that is, s1 <==> s2, connected with 2 links)

      Attached a close-to-minimal mininet script (don't forget to change controller ip inside...)

      mininet> net show
      > h1 h1-eth0:s1-eth3
      > h2 h2-eth0:s2-eth3
      > s1 lo: s1-eth1:s2-eth1 s1-eth2:s3-eth2 s1-eth3:h1-eth0 s1-eth4:s2-eth4
      > s2 lo: s2-eth1:s1-eth1 s2-eth2:s3-eth1 s2-eth3:h2-eth0 s2-eth4:s1-eth4
      > s3 lo: s3-eth1:s2-eth2 s3-eth2:s1-eth2
      > opendaylight

      mininet> pingall
      > *** Ping: testing ping reachability
      > h1 -> h2
      > h2 -> h1
      > *** Results: 0% dropped (2/2 received)
      mininet> h1 ping h2
      > PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=7.78 ms
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=8.37 ms (DUP!)
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=14.7 ms (DUP!)
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=14.7 ms (DUP!)
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=21.4 ms (DUP!)
      > 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=21.5 ms (DUP!)

      Note! I was not able to constantly reproduce it.
      Successful case (loops are still there) would be:

      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2b00000000000005, duration=28.454s, table=0, n_packets=6, n_bytes=420, priority=0 actions=drop
      > cookie=0x2b00000000000000, duration=22.614s, table=0, n_packets=280, n_bytes=27356, priority=2,in_port=3 actions=output:2,output:1,CONTROLLER:65535
      > cookie=0x2b00000000000002, duration=22.613s, table=0, n_packets=1197860, n_bytes=57779596, priority=2,in_port=1 actions=output:3,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000001, duration=22.614s, table=0, n_packets=410894, n_bytes=28474348, priority=2,in_port=2 actions=output:3,output:1
      > cookie=0x2b00000000000005, duration=28.475s, table=0, n_packets=18, n_bytes=1134, priority=100,dl_type=0x88cc actions=CONTROLLER:65535

      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s2
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2a00000000000041, duration=13.870s, table=0, n_packets=1034824, n_bytes=44213400, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=ee:4e:fa:16:0d:a9,dl_dst=ae:a3:8c:5e:e8:45 actions=output:1
      > cookie=0x2a00000000000040, duration=13.870s, table=0, n_packets=22936, n_bytes=2247728, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=ae:a3:8c:5e:e8:45,dl_dst=ee:4e:fa:16:0d:a9 actions=output:3
      > cookie=0x2b00000000000004, duration=29.836s, table=0, n_packets=5, n_bytes=350, priority=0 actions=drop
      > cookie=0x2b00000000000004, duration=23.975s, table=0, n_packets=357, n_bytes=24822, priority=2,in_port=3 actions=output:1,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000003, duration=23.977s, table=0, n_packets=408566, n_bytes=27959148, priority=2,in_port=1 actions=output:3,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000005, duration=23.975s, table=0, n_packets=216758, n_bytes=15181740, priority=2,in_port=2 actions=output:1,output:3
      > cookie=0x2b00000000000000, duration=29.867s, table=0, n_packets=18, n_bytes=1134, priority=100,dl_type=0x88cc actions=CONTROLLER:65535

      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s3
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2b00000000000003, duration=31.751s, table=0, n_packets=2, n_bytes=140, priority=0 actions=drop
      > cookie=0x2b00000000000006, duration=25.890s, table=0, n_packets=438109, n_bytes=30252390, priority=2,in_port=1 actions=output:2
      > cookie=0x2b00000000000007, duration=25.889s, table=0, n_packets=1373825, n_bytes=65172254, priority=2,in_port=2 actions=output:1
      > cookie=0x2b00000000000004, duration=31.751s, table=0, n_packets=12, n_bytes=756, priority=100,dl_type=0x88cc actions=CONTROLLER:65535

      Unsucessfull (in sense of a bug proof, i.e. no duplicates) :

      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2a000000000006b6, duration=4.390s, table=0, n_packets=71152, n_bytes=6972896, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=5e:f5:de:16:32:31,dl_dst=16:a4:ef:d6:bf:56 actions=output:1
      > cookie=0x2a000000000006b7, duration=4.325s, table=0, n_packets=360962, n_bytes=15210692, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=16:a4:ef:d6:bf:56,dl_dst=5e:f5:de:16:32:31 actions=output:3
      > cookie=0x2b00000000000003, duration=21.695s, table=0, n_packets=9, n_bytes=574, priority=0 actions=drop
      > cookie=0x2b00000000000000, duration=15.308s, table=0, n_packets=2, n_bytes=140, priority=2,in_port=3 actions=output:2,output:1,CONTROLLER:65535
      > cookie=0x2b00000000000002, duration=15.300s, table=0, n_packets=185850, n_bytes=7805924, priority=2,in_port=1 actions=output:3,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000001, duration=15.308s, table=0, n_packets=185166, n_bytes=7777084, priority=2,in_port=2 actions=output:3,output:1
      > cookie=0x2b00000000000003, duration=21.713s, table=0, n_packets=12, n_bytes=756, priority=100,dl_type=0x88cc actions=CONTROLLER:65535

      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s2
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2a00000000001344, duration=5.707s, table=0, n_packets=11634, n_bytes=1140132, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=5e:f5:de:16:32:31,dl_dst=16:a4:ef:d6:bf:56 actions=output:3
      > cookie=0x2a00000000001345, duration=5.707s, table=0, n_packets=416636, n_bytes=17503696, idle_timeout=1800, hard_timeout=3600, priority=10,dl_src=16:a4:ef:d6:bf:56,dl_dst=5e:f5:de:16:32:31 actions=output:1
      > cookie=0x2b00000000000000, duration=22.837s, table=0, n_packets=11, n_bytes=686, priority=0 actions=drop
      > cookie=0x2b00000000000004, duration=16.438s, table=0, n_packets=1713, n_bytes=96418, priority=2,in_port=3 actions=output:1,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000003, duration=16.440s, table=0, n_packets=264048, n_bytes=13849696, priority=2,in_port=1 actions=output:3,output:2,CONTROLLER:65535
      > cookie=0x2b00000000000005, duration=16.438s, table=0, n_packets=225386, n_bytes=10031476, priority=2,in_port=2 actions=output:1,output:3
      > cookie=0x2b00000000000004, duration=22.850s, table=0, n_packets=13, n_bytes=819, priority=100,dl_type=0x88cc actions=CONTROLLER:65535
      $ sudo ovs-ofctl -O OpenFlow13 dump-flows s3
      > OFPST_FLOW reply (OF1.3) (xid=0x2):
      > cookie=0x2b00000000000005, duration=24.258s, table=0, n_packets=4, n_bytes=280, priority=0 actions=drop
      > cookie=0x2b00000000000006, duration=17.863s, table=0, n_packets=321565, n_bytes=16938362, priority=2,in_port=1 actions=output:2
      > cookie=0x2b00000000000007, duration=17.863s, table=0, n_packets=269279, n_bytes=11874982, priority=2,in_port=2 actions=output:1
      > cookie=0x2b00000000000005, duration=24.279s, table=0, n_packets=9, n_bytes=567, priority=100,dl_type=0x88cc actions=CONTROLLER:65535

      Software used:

      Open vSwitch 2.3.0 (compiled from sources)
      Mininet 2.1.0+ (from git)
      opendaylight integration, commit bbc3ccecba9e8be646e618d26e0836c727015de1 (27 sept), karaf
      feature installed: odl-l2switch-switch-ui

        1. stp-bug.py
          2 kB
        2. topo.py
          0.7 kB

            Unassigned Unassigned
            tigran.avanesov@uni.lu Tigran Avanesov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: