Open vSwitch Problems

Issues related to configuring your network
Post Reply
epretorious
Posts: 43
Joined: 2005/06/13 20:06:38
Location: Reno, NV
Contact:

Open vSwitch Problems

Post by epretorious » 2015/07/03 01:31:50

Hello, All:

I've installed Open vSwitch 2.3.2 using the instructions provided by ArtemIT in the blog post "CentOS 7 – Installing Openvswitch 2.3.1 LTS":

Code: Select all

[root@xen-2 ~]# yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool
adduser ovs

[root@xen-2 ~]# su - ovs
mkdir -p ~/rpmbuild/SOURCES
wget http://openvswitch.org/releases/openvswitch-2.3.2.tar.gz
cp openvswitch-2.3.2.tar.gz ~/rpmbuild/SOURCES/
tar xfz openvswitch-2.3.2.tar.gz
sed 's/openvswitch-kmod, //g' openvswitch-2.3.2/rhel/openvswitch.spec > openvswitch_no_kmod.spec
rpmbuild -bb --nocheck ./openvswitch_no_kmod.spec
exit

[root@xen-2 ~]# yum -y localinstall /home/ovs/rpmbuild/RPMS/x86_64/openvswitch-2.3.2-1.x86_64.rpm
[root@xen-2 ~]# for x in openvswitch ; do chkconfig  $x on ; done
[root@xen-2 ~]# for x in openvswitch; do chkconfig --list $x ; done
service openvswitch start
I've created three bridges ('EXT', 'MGT', & 'SAN'):

Code: Select all

[root@xen-2 ~]# ovs-vsctl add-br SAN
[root@xen-2 ~]# ovs-vsctl add-br MGT
[root@xen-2 ~]# ovs-vsctl add-br EXT
I've connected the bonded interface 'bond2' to the EXT bridge:

Code: Select all

[root@xen-2 ~]# ifconfig bond2 0 && ovs-vsctl --may-exist add-port EXT bond2
[root@xen-2 ~]# /sbin/ifconfig EXT XXX.YYY.237.64/24
[root@xen-2 ~]# /sbin/route add default gw XXX.YYY.237.1
[root@xen-2 ~]# ovs-vsctl show
0dfeba4c-bcae-4773-8bd9-582a9ebbd01a
    Bridge SAN
        Port SAN
            Interface SAN
                type: internal
    Bridge EXT
        Port "bond2"
            Interface "bond2"
        Port EXT
            Interface EXT
                type: internal
    Bridge MGT
        Port MGT
            Interface MGT
                type: internal
    ovs_version: "2.3.2"
Everything works well until I reboot them system. (e.g., `service network restart` is successful) After a reboot, however, the system's public interface (i.e., the EXT bridge) is unreachable until I remove and re-attach the bonded interface:

Code: Select all

[root@xen-2 ~]# ovs-vsctl del-port EXT bond2 && ovs-vsctl --may-exist add-port EXT bond2
AFAICT, the bridge was correctly created and configured during startup:

Code: Select all

[root@xen-2 ~]# ifconfig bond2
bond2     Link encap:Ethernet  HWaddr 00:1F:29:69:6E:F0
          inet6 addr: fe80::21f:29ff:fe69:6ef0/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:47052 errors:0 dropped:23525 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3071322 (2.9 MiB)  TX bytes:492 (492.0 b)

[root@xen-2 ~]# ifconfig EXT
EXT       Link encap:Ethernet  HWaddr 8E:8F:C8:81:15:40
          inet addr:XXX.YYY.237.65  Bcast:XXX.YYY.237.255  Mask:255.255.255.0
          inet6 addr: fe80::8c8f:c8ff:fe81:1540/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:7032 (6.8 KiB)
[root@xen-2 ~]# ovs-vsctl show
0dfeba4c-bcae-4773-8bd9-582a9ebbd01a
    Bridge SAN
        Port SAN
            Interface SAN
                type: internal
    Bridge EXT
        Port "bond2"
            Interface "bond2"
        Port EXT
            Interface EXT
                type: internal
    Bridge MGT
        Port MGT
            Interface MGT
                type: internal
    ovs_version: "2.3.2"
However, I'm not able to connect with the host via the public interface:

Code: Select all

eric@eric-x1:~$ ping -c3 XXX.YYY.237.65
PING XXX.YYY.237.65 (216.218.237.65) 56(84) bytes of data.

--- XXX.YYY.237.65 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2016ms
...but I am able to connect via a private interface using the internal, back-channel interface.

What might be causing this?

epretorious
Posts: 43
Joined: 2005/06/13 20:06:38
Location: Reno, NV
Contact:

Re: Open vSwitch Problems

Post by epretorious » 2015/07/03 20:47:11

Here's an example of what I'm talking about:

Immediately after a reboot, the 'EXT' bridge is configured and the 'bond2' interface attached to the 'EXT' bridge...

Code: Select all

[root@xen-2 ~]# ovs-vsctl show
0dfeba4c-bcae-4773-8bd9-582a9ebbd01a
    Bridge SAN
        Port SAN
            Interface SAN
                type: internal
    Bridge EXT
        Port "bond2"
            Interface "bond2"
        Port EXT
            Interface EXT
                type: internal
    Bridge MGT
        Port MGT
            Interface MGT
                type: internal
    ovs_version: "2.3.2"
...and the interfaces appear to be configured correctly...

Code: Select all

[root@xen-2 ~]# ifconfig bond2
bond2     Link encap:Ethernet  HWaddr 00:1F:29:69:6E:F0  
          inet6 addr: fe80::21f:29ff:fe69:6ef0/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:17565 errors:0 dropped:8790 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1160304 (1.1 MiB)  TX bytes:492 (492.0 b)

[root@xen-2 ~]# ifconfig EXT
EXT       Link encap:Ethernet  HWaddr 8E:8F:C8:81:15:40  
          inet addr:XXX.YYY.237.65  Bcast:XXX.YYY.237.255  Mask:255.255.255.0
          inet6 addr: fe80::8c8f:c8ff:fe81:1540/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:4092 (3.9 KiB)

[root@xen-2 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         XXX.YYY.237.1   0.0.0.0         UG    0      0        0 EXT
...
172.16.0.0      0.0.0.0         255.255.255.224 U     0      0        0 bond0
172.16.0.32     0.0.0.0         255.255.255.240 U     0      0        0 bond1
XXX.YYY.237.0   0.0.0.0         255.255.255.0   U     0      0        0 EXT
...but the host is unable to ping the gateway...

Code: Select all

[root@xen-2 ~]# ping -c3 XXX.YYY.237.1
PING XXX.YYY.237.1 (XXX.YYY.237.1) 56(84) bytes of data.
From XXX.YYY.237.65 icmp_seq=1 Destination Host Unreachable
From XXX.YYY.237.65 icmp_seq=2 Destination Host Unreachable
From XXX.YYY.237.65 icmp_seq=3 Destination Host Unreachable

--- XXX.YYY.237.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2937ms
pipe 3
...until the bond2 interface is detached and re-attached to the EXT bridge:

Code: Select all

[root@xen-2 ~]# ovs-vsctl del-port EXT bond2 && ovs-vsctl --may-exist add-port EXT bond2

[root@xen-2 ~]# ping -c3 XXX.YYY.237.1
PING XXX.YYY.237.1 (XXX.YYY.237.1) 56(84) bytes of data.
64 bytes from XXX.YYY.237.1: icmp_seq=1 ttl=64 time=56.7 ms
64 bytes from XXX.YYY.237.1: icmp_seq=2 ttl=64 time=48.8 ms
64 bytes from XXX.YYY.237.1: icmp_seq=3 ttl=64 time=47.6 ms

--- XXX.YYY.237.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2049ms
rtt min/avg/max/mdev = 47.650/51.073/56.724/4.033 ms
Ideas, Anybody?

Post Reply