[ovs-discuss] Downed Port Automatically Reverts to Up State

Trent Bottin trent.bottin at gmail.com
Wed Mar 16 19:31:23 UTC 2016


All,
Originally sent this under a different subject but it misrepresented the
issue and I wanted to follow-up with more specific details.  Hopefully it
will spark a discussion as I am stuck on this.

Scenario: a simple network with two ovs switches (s1 and s2) with one host
on each (named respectively)
1. start packet capture (Wireshark)
2. start pinging from h1 to h2 (sudo ip netns exec h1 ping 10.2)
3. down port s2-eth2 (sudo ovs-ofctl mod-port s2 s2-eth2 down)
4. confirm down state (sudo ovs-ofctl show s2)
5. observer port automatically reverting to UP state (n/a)
6. confirm observation (sudo ovs-ofctl show s2)
7. stop pinging (ctrl-C)
7. end scenario

Observation:
I first encountered this using OVS 2.3.2 and then upgraded to 2.5.0 to
confirm it was not a version specific issue.
I have also confirmed this behavior on multiple laptops (3) in the lab.

Any thoughts on what I may be doing wrong are appreciated.  Additional
details provided below for clarity.

Environment:
Laptop running Ubuntu 14.04
OVS v2.5

Network as defined below (executed as bash script):
echo "Creating namespaces"
ip netns add h1
ip netns add h2

echo "Create switches"
ovs-vsctl add-br s1
ovs-vsctl add-br s2

echo "Create links"
ip link add h1-eth0 type veth peer name s1-eth1
ip link add h2-eth0 type veth peer name s2-eth1
ip link add s1-eth2 type veth peer name s2-eth2

echo "Move host ports into namespaces"
ip link set h1-eth0 netns h1
ip link set h2-eth0 netns h2
ip netns exec h1 ip link show
ip netns exec h2 ip link show

echo "Connect switch ports to OVS"
ovs-vsctl add-port s1 s1-eth1
ovs-vsctl add-port s1 s1-eth2
ovs-vsctl add-port s2 s2-eth1
ovs-vsctl add-port s2 s2-eth2

echo "Configure network"
ip netns exec h1 ifconfig h1-eth0 10.1
ip netns exec h1 ifconfig lo up
ip netns exec h2 ifconfig h2-eth0 10.2
ip netns exec h1 ifconfig lo up
ifconfig s1 10.11
ifconfig s1-eth1 up
ifconfig s1-eth2 up
ifconfig s2 10.12
ifconfig s2-eth1 up
ifconfig s2-eth2 up

Terminal output for h1 show ping (start/end).  Note the start and stop
times; approx ~42 sec elapsed

user at host:~/sdnTestDev$ date
Wed Mar 16 11:28:58 PDT 2016
user at host:~/sdnTestDev$ sudo ip netns exec h1 ping 10.2
PING 10.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.63 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.233 ms

<< lines omitted for sake of brevity>>

64 bytes from 10.0.0.2: icmp_seq=36 ttl=64 time=0.254 ms
64 bytes from 10.0.0.2: icmp_seq=37 ttl=64 time=0.216 ms
^C
--- 10.2 ping statistics ---
37 packets transmitted, 22 received, 40% packet loss, time 35998ms
rtt min/avg/max/mdev = 0.091/0.247/1.630/0.305 ms
user at host:~/sdnTestDev$ date
Wed Mar 16 11:29:40 PDT 2016

Terminal out for port control confirming down and then back up state with
no additional intervention.  Yes, I know I could be using a third window
but I assuming you appreciate I am not here to waste your time.

user at host:~$ sudo date
Wed Mar 16 11:29:08 PDT 2016
user at host:~$ sudo ovs-ofctl mod-port s2 s2-eth2 down
user at host:~$ sudo ovs-ofctl show s2
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000ce2051e11741
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
 1(s2-eth1): addr:8a:be:67:ea:f5:8a
     config:     0
     state:      0
     current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 2(s2-eth2): addr:52:c6:84:5a:bb:8d
     config:     PORT_DOWN
     state:      LINK_DOWN
     current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 LOCAL(s2): addr:ce:20:51:e1:17:41
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
user at host:~$ sudo date
Wed Mar 16 11:29:29 PDT 2016
user at host:~$ sudo ovs-ofctl show s2
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000ce2051e11741
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
 1(s2-eth1): addr:8a:be:67:ea:f5:8a
     config:     0
     state:      0
     current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 2(s2-eth2): addr:52:c6:84:5a:bb:8d
     config:     0
     state:      0
     current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 LOCAL(s2): addr:ce:20:51:e1:17:41
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

Wireshark Output:  Note that ~10 sec after beginning the scenario h2 stops
replying (i.e. the link goes down and then ~15 sec later the link has been
restored.
No. Time           Source     Destination   Protocol Length Info
130 8.998387000    10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=10/2560, ttl=64 (reply in 131)
131 8.998416000    10.0.0.2   10.0.0.1      ICMP     100    Echo (ping)
reply    id=0x1b84, seq=10/2560, ttl=64 (request in 130)
132 8.998437000    10.0.0.2   10.0.0.1      ICMP     100    Echo (ping)
reply    id=0x1b84, seq=10/2560, ttl=64
133 8.998439000    10.0.0.2   10.0.0.1      ICMP     100    Echo (ping)
reply    id=0x1b84, seq=10/2560, ttl=64
134 8.998453000    10.0.0.2   10.0.0.1      ICMP     100    Echo (ping)
reply    id=0x1b84, seq=10/2560, ttl=64
135 9.998330000    10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=11/2816, ttl=64
136 10.998308000   10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=12/3072, ttl=64
137 11.998335000   10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=13/3328, ttl=64

<< lines omitted for sake of brevity>>

180 24.998271000   10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=26/6656, ttl=64
181 24.998375000   10.0.0.1   10.0.0.2      ICMP     100    Echo (ping)
request  id=0x1b84, seq=26/6656, ttl=64 (reply in 182)
182 24.998394000   10.0.0.2   10.0.0.1      ICMP     100    Echo (ping)
reply    id=0x1b84, seq=26/6656, ttl=64 (request in 181)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160316/228ad0db/attachment-0002.html>


More information about the discuss mailing list