Cannot successfully connect Ethernet interface to bridge with NMCLI

Issues related to configuring your network
Post Reply
sawozny
Posts: 46
Joined: 2019/07/13 22:19:14

Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by sawozny » 2020/08/24 01:57:48

I’m attempting to move the IP from an Ethernet interface to a bridge. From what I’ve found, the commonly recommended process for this is to remove the IP from the Ethernet interface, create a bridge with the IP and attach the Ethernet interface to that bridge.

So, I log into the console, use nmtui to remove the IP addresses, change the IPv4 configuration to Disabled, save changes and restart network. Now the machine has no IP.

Then I create a bridge with:

Code: Select all

sudo nmcli con add con-name brExternal type bridge ifname brExternal ipv4.method manual ipv4.addresses 192.168.1.211/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8,4.2.2.1 ipv6.method ignore stp false
I get back:

Code: Select all

[351942.135252] IPv6: ADDRCONF(NETDEV_UP): brExternal: link is not ready
But I also get back:

Code: Select all

Connection 'brExternal' (62e16aad-03c0-49ee-8b9e-292b310d8398) successfully added.
So I read this as “I created your connection, but can’t bring it up because there are no interfaces attached to it.” That seems perfectly normal to me.

So here’s where things go off the rails. The next step, I understand, is to connect the interface to the bridge. I use:

Code: Select all

sudo nmcli con add type bridge-slave ifname eth0 master brExternal
And I get back:

Code: Select all

Connection 'bridge-slave-eth0' (cebc8296-61df-4ae3-8a79-4edfdfaeacbe) successfully added.
But when I bounce the network again, I get:

Code: Select all

[352207.803613] IPv6: ADDRCONF(NETDEV_UP): brExternal: link is not ready
[352208.865847] IPv6: ADDRCONF(NETDEV_UP): brExternal: link is not ready
[352208.881654] brExternal: port 1(eth0) entered blocking state
[352208.883554] brExternal: port 1(eth0) entered disabled state
[352208.890351] device eth0 entered promiscuous mode
[352208.892118] brExternal: port 1(eth0) entered blocking state
[352208.893949] brExternal: port 1(eth0) entered forwarding state
[352208.901765] IPv6: ADDRCONF(NETDEV_CHANGE): brExternal: link becomes ready
[352209.003098] device eth0 left promiscuous mode
[352209.004747] brExternal: port 1(eth0) entered disabled state
[352209.010971] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
And, no surprise based upon the screen feedback, I cannot connect to the IP from off-system. As a matter of fact, every time someone tries to contact that IP, the console reports these 2 lines:

Code: Select all

[352262.736818] ll header: 00000000: ff ff ff ff ff ff 2c 41 38 af ae 24 08 06        ......,A8..$..
[352263.735690] IPv4: martian source 192.168.1.211 from 192.168.1.228, on dev eth0
So I did a little digging around the interwebs and I found an alternate approach.

First I delete the bridge-slave with:

Code: Select all

sudo nmcli con delete bridge-slave-eth0
And I get back:

Code: Select all

Connection 'bridge-slave-eth0' (cebc8296-61df-4ae3-8a79-4edfdfaeacbe) successfully deleted.
Then I edit /etc/sysconfig/network-scripts/ifcfg-eth0 which has:

Code: Select all

NAME=eth0
ONBOOT=yes
NETBOOT="yes"
UUID=de0620e5-33a8-4719-8988-cc761ac2adfc
IPV6INIT=no
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
DNS1=192.168.1.1
And add to the bottom:

Code: Select all

BRIDGE=brExternal
I bounce the network again and now I get:

Code: Select all

[352488.963333] IPv6: ADDRCONF(NETDEV_UP): brExternal: link is not ready
[352489.160023] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[352489.833820] IPv6: ADDRCONF(NETDEV_UP): brExternal: link is not ready
[352489.851571] brExternal: port 1(eth0) entered blocking state
[352489.853951] brExternal: port 1(eth0) entered disabled state
[352489.856576] device eth0 entered promiscuous mode
[352489.858670] brExternal: port 1(eth0) entered blocking state
[352489.860845] brExternal: port 1(eth0) entered forwarding state
And the machine can be connected to over that IP, again.

So, “Yay!”, but is what I’ve done OK? The change survives a reboot, but I’m worried the next time I have to do anything with NetworkManager on that interface I’m going to lose that bridge line in the eth0 interface config file, or something else weird that will bite me in the @$$ unexpectedly...

Does anyone what I did wrong with the nmcli command? I’d like to make this process as scriptable as I can (although, technically, adding that line to the bottom of the ifcfg-eth0 file could also be scripted) but mostly I don’t like unsolved mysteries.

Anyone have any thoughts?

Thanks,

Scott

User avatar
jlehtone
Posts: 3044
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by jlehtone » 2020/08/24 11:50:45

Lets start with what you have. The things shown with:

Code: Select all

nmcli d s
nmcli c s

sawozny
Posts: 46
Joined: 2019/07/13 22:19:14

Re: Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by sawozny » 2020/08/24 18:14:28

Ah, back to basics. Always a helpful troubleshooting approach. :)

Here are the con and dev outputs with all fields in pretty format.

This is the "working" configuration with the manual interventions I don't particularly care for.

Code: Select all

======================================
  NetworkManager connection profiles
======================================
NAME        UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                   AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE      STATE      ACTIVE-PATH                                         SLAVE   FILENAME                                        
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
brExternal  6a1811d7-4e82-4970-a9e1-87196c8cf487  bridge    1598290671  Mon 24 Aug 2020 05:37:51 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/2  yes     brExternal  activated  /org/freedesktop/NetworkManager/ActiveConnection/2  --      /etc/sysconfig/network-scripts/ifcfg-brExternal 
eth0        de0620e5-33a8-4719-8988-cc761ac2adfc  ethernet  1598290671  Mon 24 Aug 2020 05:37:51 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/1  yes     eth0        activated  /org/freedesktop/NetworkManager/ActiveConnection/3  bridge  /etc/sysconfig/network-scripts/ifcfg-eth0       

===============================================================================
                          Device details (brExternal)
===============================================================================
GENERAL.DEVICE:                         brExternal
GENERAL.TYPE:                           bridge
GENERAL.NM-TYPE:                        NMDeviceBridge
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         bridge
GENERAL.DRIVER-VERSION:                 2.3
GENERAL.FIRMWARE-VERSION:               N/A
GENERAL.HWADDR:                         52:54:00:0D:3C:74
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               4 (full)
GENERAL.IP6-CONNECTIVITY:               4 (full)
GENERAL.UDI:                            /sys/devices/virtual/net/brExternal
GENERAL.IP-IFACE:                       brExternal
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     brExternal
GENERAL.CON-UUID:                       6a1811d7-4e82-4970-a9e1-87196c8cf487
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.1.211/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 425
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 425
IP4.DNS[1]:                             8.8.8.8
IP4.DNS[2]:                             4.2.2.1
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
BRIDGE.SLAVES:                          eth0
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/2
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   6a1811d7-4e82-4970-a9e1-87196c8cf487 | brExternal
-------------------------------------------------------------------------------

===============================================================================
                             Device details (eth0)
===============================================================================
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.NM-TYPE:                        NMDeviceEthernet
GENERAL.VENDOR:                         Red Hat, Inc.
GENERAL.PRODUCT:                        Virtio network device
GENERAL.DRIVER:                         virtio_net
GENERAL.DRIVER-VERSION:                 1.0.0
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         52:54:00:0D:3C:74
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               3 (limited)
GENERAL.IP6-CONNECTIVITY:               3 (limited)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:02.0/virtio0/net/eth0
GENERAL.IP-IFACE:                       eth0
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     eth0
GENERAL.CON-UUID:                       de0620e5-33a8-4719-8988-cc761ac2adfc
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/3
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
WIRED-PROPERTIES.CARRIER:               on
-------------------------------------------------------------------------------
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   de0620e5-33a8-4719-8988-cc761ac2adfc | eth0
-------------------------------------------------------------------------------

===============================================================================
                              Device details (lo)
===============================================================================
GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.NM-TYPE:                        NMDeviceGeneric
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         unknown
GENERAL.DRIVER-VERSION:                 --
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               0 (unknown)
GENERAL.IP6-CONNECTIVITY:               0 (unknown)
GENERAL.UDI:                            /sys/devices/virtual/net/lo
GENERAL.IP-IFACE:                       lo
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     no
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: --
-------------------------------------------------------------------------------

This is the configuration that doesn't work, but should.

Code: Select all

======================================
  NetworkManager connection profiles
======================================
NAME               UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                   AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE      STATE      ACTIVE-PATH                                         SLAVE   FILENAME                                               
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
brExternal         6a1811d7-4e82-4970-a9e1-87196c8cf487  bridge    1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/2  yes     brExternal  activated  /org/freedesktop/NetworkManager/ActiveConnection/7  --      /etc/sysconfig/network-scripts/ifcfg-brExternal        
eth0               de0620e5-33a8-4719-8988-cc761ac2adfc  ethernet  1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/1  yes     eth0        activated  /org/freedesktop/NetworkManager/ActiveConnection/8  --      /etc/sysconfig/network-scripts/ifcfg-eth0              
bridge-slave-eth0  12a1e9cd-2b68-4fe7-b5eb-89f0f4c08ba6  ethernet  1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/3  no      --          --         --                                                  bridge  /etc/sysconfig/network-scripts/ifcfg-bridge-slave-eth0 

===============================================================================
                          Device details (brExternal)
===============================================================================
GENERAL.DEVICE:                         brExternal
GENERAL.TYPE:                           bridge
GENERAL.NM-TYPE:                        NMDeviceBridge
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         bridge
GENERAL.DRIVER-VERSION:                 2.3
GENERAL.FIRMWARE-VERSION:               N/A
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               4 (full)
GENERAL.IP6-CONNECTIVITY:               4 (full)
GENERAL.UDI:                            /sys/devices/virtual/net/brExternal
GENERAL.IP-IFACE:                       brExternal
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     brExternal
GENERAL.CON-UUID:                       6a1811d7-4e82-4970-a9e1-87196c8cf487
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/7
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.1.211/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 425
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 425
IP4.DNS[1]:                             8.8.8.8
IP4.DNS[2]:                             4.2.2.1
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
BRIDGE.SLAVES:                          --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/2
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   6a1811d7-4e82-4970-a9e1-87196c8cf487 | brExternal
-------------------------------------------------------------------------------

===============================================================================
                             Device details (eth0)
===============================================================================
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.NM-TYPE:                        NMDeviceEthernet
GENERAL.VENDOR:                         Red Hat, Inc.
GENERAL.PRODUCT:                        Virtio network device
GENERAL.DRIVER:                         virtio_net
GENERAL.DRIVER-VERSION:                 1.0.0
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         52:54:00:0D:3C:74
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               3 (limited)
GENERAL.IP6-CONNECTIVITY:               3 (limited)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:02.0/virtio0/net/eth0
GENERAL.IP-IFACE:                       eth0
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     eth0
GENERAL.CON-UUID:                       de0620e5-33a8-4719-8988-cc761ac2adfc
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/8
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
WIRED-PROPERTIES.CARRIER:               on
-------------------------------------------------------------------------------
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1,/org/freedesktop/NetworkManager/Settings/3
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   de0620e5-33a8-4719-8988-cc761ac2adfc | eth0
CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   12a1e9cd-2b68-4fe7-b5eb-89f0f4c08ba6 | bridge-slave-eth0
-------------------------------------------------------------------------------

===============================================================================
                              Device details (lo)
===============================================================================
GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.NM-TYPE:                        NMDeviceGeneric
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         unknown
GENERAL.DRIVER-VERSION:                 --
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               0 (unknown)
GENERAL.IP6-CONNECTIVITY:               0 (unknown)
GENERAL.UDI:                            /sys/devices/virtual/net/lo
GENERAL.IP-IFACE:                       lo
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     no
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: --
-------------------------------------------------------------------------------
Doing a quick diff, here are the most noticeable things to me.

- The existence of the bridge-slave connection in the connection list that should work, but doesn't. Obviously the existence of the connection isn't a surprise (as is the lack of state or active path since it's not working). But the bridge and ethernet interface looks the same except fo their active path connection numbers which I don't really understand, but am sort of assuming will be expected to change after every network reconfiguration.
- In the working dev, brExternal has a MAC, but in the non-working dev, it does not. Not unexpected considering the difference is "working" and "not working" but a pretty clear indication the slave interface is not successfully connecting to the bridge in the non-working configuration.
- The active connection path for brExternal in the device output shows the same difference as the connection output. I feel this should be expected, but I admit that's just an educated guess.
- The real meat of the device differences shows up in the working configuration (manual edit to ifcfg-eth0) where bridge.slaves shows eth0 but not in the non-working configuration (nmcli add bridge-slave). The question is, why?
- As above, the active connection path for eth0 has changed between the working and non-working configurations.
- In the working device configuration, there is an IP6 route under eth0, but not in the non-working device. I'm not sure why this is since I set ipv6 to method "ignore" in both configurations, and I'm not sure how it could be relevant when my issue is ipv4 related, but it IS a difference, so I'm mentioning it here.
- The connections section of the working and non-working eth0 device show are different, again, not in a way I wouldn't expect. Here's the part that's different (which just looks like the additional non-working bridge-slave, but not indication WHY it's not working):

Code: Select all

Working (manually added BRIDGE line to ifcfg-eth0)
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   de0620e5-33a8-4719-8988-cc761ac2adfc | eth0

Not working (nmcli add bridge-slave command)
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1,/org/freedesktop/NetworkManager/Settings/3
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   de0620e5-33a8-4719-8988-cc761ac2adfc | eth0
CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   12a1e9cd-2b68-4fe7-b5eb-89f0f4c08ba6 | bridge-slave-eth0
So, somewhere in here is the answer, but I can't figure out where. Any thoughts?

Thanks,

Scott

User avatar
jlehtone
Posts: 3044
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by jlehtone » 2020/08/24 22:09:53

Did you try starting from scratch? I.e. remove first all existing connections (except the lo). Then create bridge and slave.

sawozny
Posts: 46
Joined: 2019/07/13 22:19:14

Re: Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by sawozny » 2020/08/25 19:10:51

OK, so that did it. I didn't want to mess around under the hood by deleting the device itself, but deleting the connection and then creating a new one connected to the existing Ethernet interface device allowed me the create a bridge-slave that successfully came up and made the machine IP accessible.

For completeness, here are the connection and device configuration output using the bridge slave method now that it works.

Code: Select all

======================================
  NetworkManager connection profiles
======================================
NAME               UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                   AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE      STATE      ACTIVE-PATH                                          SLAVE   FILENAME                                               
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
brExternal         2058fdf3-965a-499b-b22c-16b3c39a3cbf  bridge    1598380674  Tue 25 Aug 2020 06:37:54 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/5  yes     brExternal  activated  /org/freedesktop/NetworkManager/ActiveConnection/14  --      /etc/sysconfig/network-scripts/ifcfg-brExternal        
bridge-slave-eth0  34eccaa1-47e5-464f-b782-ffce9d2350bd  ethernet  1598380674  Tue 25 Aug 2020 06:37:54 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/6  yes     eth0        activated  /org/freedesktop/NetworkManager/ActiveConnection/13  bridge  /etc/sysconfig/network-scripts/ifcfg-bridge-slave-eth0 
eth0               ce529f40-9609-494f-b199-4a2034343ef8  ethernet  1598380668  Tue 25 Aug 2020 06:37:48 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/4  no      --          --         --                                                   --      /etc/sysconfig/network-scripts/ifcfg-eth0     

===============================================================================
                          Device details (brExternal)
===============================================================================
GENERAL.DEVICE:                         brExternal
GENERAL.TYPE:                           bridge
GENERAL.NM-TYPE:                        NMDeviceBridge
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         bridge
GENERAL.DRIVER-VERSION:                 2.3
GENERAL.FIRMWARE-VERSION:               N/A
GENERAL.HWADDR:                         52:54:00:0D:3C:74
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               4 (full)
GENERAL.IP6-CONNECTIVITY:               4 (full)
GENERAL.UDI:                            /sys/devices/virtual/net/brExternal
GENERAL.IP-IFACE:                       brExternal
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     brExternal
GENERAL.CON-UUID:                       2058fdf3-965a-499b-b22c-16b3c39a3cbf
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/14
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.1.211/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 425
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 425
IP4.DNS[1]:                             8.8.8.8
IP4.DNS[2]:                             4.2.2.1
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
BRIDGE.SLAVES:                          eth0
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/5
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   2058fdf3-965a-499b-b22c-16b3c39a3cbf | brExternal
-------------------------------------------------------------------------------

===============================================================================
                             Device details (eth0)
===============================================================================
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.NM-TYPE:                        NMDeviceEthernet
GENERAL.VENDOR:                         Red Hat, Inc.
GENERAL.PRODUCT:                        Virtio network device
GENERAL.DRIVER:                         virtio_net
GENERAL.DRIVER-VERSION:                 1.0.0
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         52:54:00:0D:3C:74
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               3 (limited)
GENERAL.IP6-CONNECTIVITY:               3 (limited)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:02.0/virtio0/net/eth0
GENERAL.IP-IFACE:                       eth0
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     bridge-slave-eth0
GENERAL.CON-UUID:                       34eccaa1-47e5-464f-b782-ffce9d2350bd
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/13
GENERAL.METERED:                        no (guessed)
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
WIRED-PROPERTIES.CARRIER:               on
-------------------------------------------------------------------------------
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/4,/org/freedesktop/NetworkManager/Settings/6
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   ce529f40-9609-494f-b199-4a2034343ef8 | eth0
CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   34eccaa1-47e5-464f-b782-ffce9d2350bd | bridge-slave-eth0
-------------------------------------------------------------------------------

===============================================================================
                              Device details (lo)
===============================================================================
GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.NM-TYPE:                        NMDeviceGeneric
GENERAL.VENDOR:                         --
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         unknown
GENERAL.DRIVER-VERSION:                 --
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.REASON:                         0 (No reason given)
GENERAL.IP4-CONNECTIVITY:               0 (unknown)
GENERAL.IP6-CONNECTIVITY:               0 (unknown)
GENERAL.UDI:                            /sys/devices/virtual/net/lo
GENERAL.IP-IFACE:                       lo
GENERAL.IS-SOFTWARE:                    yes
GENERAL.NM-MANAGED:                     no
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
-------------------------------------------------------------------------------
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               yes
CAPABILITIES.SRIOV:                     no
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
-------------------------------------------------------------------------------
IP6.GATEWAY:                            --
-------------------------------------------------------------------------------
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: --
-------------------------------------------------------------------------------
And here are the diffs (working on the left, not working on the right). At first glance it looks like when things didn't work, nmcli wasn't able to fully take down eth0 (shows as active in the not working connection show) to make it the bridge slave so both were left in limbo and neither one was able to do the job. But that's just an educated guess.

Code: Select all

Connection diffs

4,8c4,8
< NAME               UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                   AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE      STATE      ACTIVE-PATH                                          SLAVE   FILENAME                                               
< ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
< brExternal         2058fdf3-965a-499b-b22c-16b3c39a3cbf  bridge    1598380674  Tue 25 Aug 2020 06:37:54 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/5  yes     brExternal  activated  /org/freedesktop/NetworkManager/ActiveConnection/14  --      /etc/sysconfig/network-scripts/ifcfg-brExternal        
< bridge-slave-eth0  34eccaa1-47e5-464f-b782-ffce9d2350bd  ethernet  1598380674  Tue 25 Aug 2020 06:37:54 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/6  yes     eth0        activated  /org/freedesktop/NetworkManager/ActiveConnection/13  bridge  /etc/sysconfig/network-scripts/ifcfg-bridge-slave-eth0 
< eth0               ce529f40-9609-494f-b199-4a2034343ef8  ethernet  1598380668  Tue 25 Aug 2020 06:37:48 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/4  no      --          --         --                                                   --      /etc/sysconfig/network-scripts/ifcfg-eth0              
---
> NAME               UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                   AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE      STATE      ACTIVE-PATH                                         SLAVE   FILENAME                                               
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> brExternal         6a1811d7-4e82-4970-a9e1-87196c8cf487  bridge    1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/2  yes     brExternal  activated  /org/freedesktop/NetworkManager/ActiveConnection/7  --      /etc/sysconfig/network-scripts/ifcfg-brExternal        
> eth0               de0620e5-33a8-4719-8988-cc761ac2adfc  ethernet  1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/1  yes     eth0        activated  /org/freedesktop/NetworkManager/ActiveConnection/8  --      /etc/sysconfig/network-scripts/ifcfg-eth0              
> bridge-slave-eth0  12a1e9cd-2b68-4fe7-b5eb-89f0f4c08ba6  ethernet  1598291215  Mon 24 Aug 2020 05:46:55 PM UTC  yes          0                     no        /org/freedesktop/NetworkManager/Settings/3  no      --          --         --                                                  bridge  /etc/sysconfig/network-scripts/ifcfg-bridge-slave-eth0 


Device diffs
12c12
< GENERAL.HWADDR:                         52:54:00:0D:3C:74
---
> GENERAL.HWADDR:                         00:00:00:00:00:00
27,28c27,28
< GENERAL.CON-UUID:                       2058fdf3-965a-499b-b22c-16b3c39a3cbf
< GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/14
---
> GENERAL.CON-UUID:                       6a1811d7-4e82-4970-a9e1-87196c8cf487
> GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/7
45c45
< BRIDGE.SLAVES:                          eth0
---
> BRIDGE.SLAVES:                          --
47,48c47,48
< CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/5
< CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   2058fdf3-965a-499b-b22c-16b3c39a3cbf | brExternal
---
> CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/2
> CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   6a1811d7-4e82-4970-a9e1-87196c8cf487 | brExternal
76,78c76,78
< GENERAL.CONNECTION:                     bridge-slave-eth0
< GENERAL.CON-UUID:                       34eccaa1-47e5-464f-b782-ffce9d2350bd
< GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/13
---
> GENERAL.CONNECTION:                     eth0
> GENERAL.CON-UUID:                       de0620e5-33a8-4719-8988-cc761ac2adfc
> GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/8
92,94c92,94
< CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/4,/org/freedesktop/NetworkManager/Settings/6
< CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   ce529f40-9609-494f-b199-4a2034343ef8 | eth0
< CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   34eccaa1-47e5-464f-b782-ffce9d2350bd | bridge-slave-eth0
---
> CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/1,/org/freedesktop/NetworkManager/Settings/3
> CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   de0620e5-33a8-4719-8988-cc761ac2adfc | eth0
> CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   12a1e9cd-2b68-4fe7-b5eb-89f0f4c08ba6 | bridge-slave-eth0
Not sure why it behaved like this, but this connection was originally created and named with a kickstart file, so maybe something about kickstart created connections are incompatible with being properly managed by NetworkManager in the specific context of creating a bridge slave interface.

I'd try and duplicate to report to RH, but now that 8 is out, they seem much less interested in pursuing bugs in 7. Either way, I've got a workaround that works entirely using NetworkManager which was my initial goal.

I really appreciate the assist.

Thanks,

Scott

darthbolek
Posts: 24
Joined: 2019/03/17 11:48:21

Re: Cannot successfully connect Ethernet interface to bridge with NMCLI

Post by darthbolek » 2020/08/26 13:33:46

Here is very good guide about kernel and ovs bridges:
https://blog.christophersmart.com/2020/ ... rkmanager/

Post Reply

Return to “CentOS 7 - Networking Support”