2 Replies Latest reply: Feb 19, 2013 11:30 PM by 960874 RSS

    OVS 3.2.1: Configuring a bridge?

    960874
      I've statically configured bridging on eth0 following the example in Chapter 8.2.5. Network Bridge, of the Red Hat Enterprise Linux 6 Deployment Guide...
      [root@xen3 network-scripts]# cat ifcfg-eth0
      # Intel Corporation 82541PI Gigabit Ethernet Controller
      DEVICE=eth0
      BOOTPROTO=none
      HWADDR=00:0E:0C:81:57:8B
      ONBOOT=yes
      BRIDGE=br0
      
      [root@xen3 network-scripts]# cat ifcfg-br0 
      DEVICE=br0
      TYPE=bridge
      ONBOOT=yes
      BOOTPROTO=static
      IPADDR=192.168.0.5
      NETMASK=255.255.255.0
      NETWORK=192.168.0.0
      ...but, when I restart the host's network interfaces, the init.d script creates the bridge without configuring the IP interface and then complains:
      [root@xen3 ~]# brctl show
      bridge name     bridge id          STP enabled     interfaces
      
      [root@xen3 ~]# /etc/init.d/network restart
      Shutting down interface eth0:  bridge br0 does not exist!
                                                                 [  OK  ]
      Shutting down interface eth2:                              [  OK  ]
      Shutting down loopback interface:                          [  OK  ]
      Bringing up loopback interface:                            [  OK  ]
      Bringing up interface br0:  Device br0 does not seem to be present, delaying initialization.
                                                                 [FAILED]
      Bringing up interface eth0:                                [  OK  ]
      Bringing up interface eth2:                                [  OK  ]
      
      [root@xen3 ~]# brctl show
      bridge name     bridge id          STP enabled     interfaces
      br0          8000.000e0c81578b     no          eth0
      
      [root@xen3 ~]# ifconfig -a
      bond0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
                BROADCAST MASTER MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0 
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
      
      br0       Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0 
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
      
      eth0      Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:2012590 errors:0 dropped:76054 overruns:0 frame:0
                TX packets:129928 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:1113821773 (1.0 GiB)  TX bytes:9818937 (9.3 MiB)
      
      eth1      Link encap:Ethernet  HWaddr 00:30:48:83:7E:14  
                BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
                Interrupt:18 
      
      eth2      Link encap:Ethernet  HWaddr 00:30:48:83:7E:15  
                inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:50 errors:0 dropped:0 overruns:0 frame:0
                TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:4902 (4.7 KiB)  TX bytes:6342 (6.1 KiB)
                Interrupt:19
      
      [root@xen3 network-scripts]# ping 192.168.0.5
      connect: Network is unreachable
      Have I overlooked something in the configuration files (i.e., /etc/sysconfigu/network-scripts/ifcfg-X)?

      Eric Pretorious
      Truckee, CA
        • 1. Re: OVS 3.2.1: Configuring a bridge?
          960874
          epretorious wrote:
          Have I overlooked something in the configuration files (i.e., /etc/sysconfigu/network-scripts/ifcfg-X)?
          It would seem that the configuration is correct: If I delete the bridge and start fresh...
          [root@xen3 network-scripts]# brctl delbr br0
          
          [root@xen3 network-scripts]# brctl show
          bridge name     bridge id          STP enabled     interfaces
          
          [root@xen3 network-scripts]# /etc/init.d/network restart
          Shutting down interface eth0:  bridge br0 does not exist!
                                                                     [  OK  ]
          Shutting down interface eth2:                              [  OK  ]
          Shutting down loopback interface:                          [  OK  ]
          Bringing up loopback interface:                            [  OK  ]
          Bringing up interface br0:  Device br0 does not seem to be present, delaying initialization.
                                                                     [FAILED]
          Bringing up interface eth0:                                [  OK  ]
          Bringing up interface eth2:                                [  OK  ]
          
          [root@xen3 network-scripts]# brctl show
          bridge name     bridge id          STP enabled     interfaces
          br0          8000.000e0c81578b     no          eth0
          
          [root@xen3 network-scripts]# ifconfig 
          eth0      Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:2015317 errors:0 dropped:76054 overruns:0 frame:0
                    TX packets:129936 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:1114206970 (1.0 GiB)  TX bytes:9819445 (9.3 MiB)
          
          eth2      Link encap:Ethernet  HWaddr 00:30:48:83:7E:15  
                    inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:92 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:41060 (40.0 KiB)  TX bytes:9902 (9.6 KiB)
                    Interrupt:19 
          
          lo        Link encap:Local Loopback  
                    inet addr:127.0.0.1  Mask:255.0.0.0
                    UP LOOPBACK RUNNING  MTU:16436  Metric:1
                    RX packets:483 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:483 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:0 
                    RX bytes:89320 (87.2 KiB)  TX bytes:89320 (87.2 KiB)
          ...and then use the ifup command, the bridge is correctly created/configured:
          [root@xen3 network-scripts]# ifup br0
          
          [root@xen3 network-scripts]# ifconfig 
          br0       Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                    inet addr:192.168.0.5  Bcast:192.168.0.255  Mask:255.255.255.0
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:1 errors:0 dropped:1 overruns:0 frame:0
                    TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:0 
                    RX bytes:96 (96.0 b)  TX bytes:210 (210.0 b)
          
          eth0      Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:2015350 errors:0 dropped:76054 overruns:0 frame:0
                    TX packets:129942 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:1114210906 (1.0 GiB)  TX bytes:9819701 (9.3 MiB)
          
          eth2      Link encap:Ethernet  HWaddr 00:30:48:83:7E:15  
                    inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:165 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:134 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:80138 (78.2 KiB)  TX bytes:16624 (16.2 KiB)
                    Interrupt:19 
          
          lo        Link encap:Local Loopback  
                    inet addr:127.0.0.1  Mask:255.0.0.0
                    UP LOOPBACK RUNNING  MTU:16436  Metric:1
                    RX packets:483 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:483 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:0 
                    RX bytes:89320 (87.2 KiB)  TX bytes:89320 (87.2 KiB)
          Ideas? Suggestions?
          • 2. Re: OVS 3.2.1: Configuring a bridge?
            960874
            epretorious wrote:
            [root@xen3 network-scripts]# cat ifcfg-eth0
            # Intel Corporation 82541PI Gigabit Ethernet Controller
            DEVICE=eth0
            BOOTPROTO=none
            HWADDR=00:0E:0C:81:57:8B
            ONBOOT=yes
            BRIDGE=br0

            [root@xen3 network-scripts]# cat ifcfg-br0
            DEVICE=br0
            TYPE=bridge
            ONBOOT=yes
            BOOTPROTO=static
            IPADDR=192.168.0.5
            NETMASK=255.255.255.0
            NETWORK=192.168.0.0
            I re-installed OVS 3.2.1 today and had the opportunity to re-configure bridging. This time, however, I copied the configuration directly from Chapter 8.2.5. Network Bridge, of the Red Hat Enterprise Linux 6 Deployment Guide and pasted the text directly into the terminal:
            [root@xen3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
            # Intel Corporation 82541PI Gigabit Ethernet Controller
            DEVICE=eth0
            TYPE=Ethernet
            BOOTPROTO=none
            HWADDR=00:0E:0C:81:57:8B
            ONBOOT=yes
            BRIDGE=br0
            #IPADDR=192.168.0.5
            #NETMASK=255.255.255.0
            #NETWORK=192.168.0.0
            
            [root@xen3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-br0
            DEVICE=br0
            TYPE=Bridge
            IPADDR=192.168.0.5
            NETMASK=255.255.255.0
            ONBOOT=yes
            BOOTPROTO=static
            NM_CONTROLLED=no
            DELAY=0
            AFAICT, the only functional difference between the two set of configuration files seems to be the that the line "TYPE=Bridge" is capitalized in the new configuration but the bridge starts correctly every time now:
            [root@xen3 ~]# /etc/init.d/network restart
            Shutting down interface br0:                               [  OK  ]
            Shutting down interface bond0:                             [  OK  ]
            Shutting down interface eth0:                              [  OK  ]
            Shutting down loopback interface:                          [  OK  ]
            Bringing up loopback interface:                            [  OK  ]
            Bringing up interface bond0:  RTNETLINK answers: No such process
                                                                       [  OK  ]
            Bringing up interface eth0:                                [  OK  ]
            Bringing up interface br0:                                 [  OK  ]
            
            [root@xen3 ~]# ifconfig
            bond0     Link encap:Ethernet  HWaddr 00:30:48:83:7E:14  
                      inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
                      UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
                      RX packets:22786 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:19348 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:0 
                      RX bytes:24665086 (23.5 MiB)  TX bytes:1818714 (1.7 MiB)
            
            br0       Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                      inet addr:192.168.0.5  Bcast:192.168.0.255  Mask:255.255.255.0
                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                      RX packets:5257 errors:0 dropped:3214 overruns:0 frame:0
                      TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:0 
                      RX bytes:585946 (572.2 KiB)  TX bytes:7306 (7.1 KiB)
            
            eth0      Link encap:Ethernet  HWaddr 00:0E:0C:81:57:8B  
                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                      RX packets:107312 errors:0 dropped:913 overruns:0 frame:0
                      TX packets:20863 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000 
                      RX bytes:56135141 (53.5 MiB)  TX bytes:1692450 (1.6 MiB)
            
            eth1      Link encap:Ethernet  HWaddr 00:30:48:83:7E:14  
                      UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
                      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000 
                      RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
                      Interrupt:18 
            
            eth2      Link encap:Ethernet  HWaddr 00:30:48:83:7E:14  
                      UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
                      RX packets:22786 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:19348 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000 
                      RX bytes:24665086 (23.5 MiB)  TX bytes:1818714 (1.7 MiB)
                      Interrupt:19
            ...
            Meh.