el7.5 bridged ethernet and dhcp

Issues related to configuring your network
Post Reply
schotty
Posts: 19
Joined: 2014/08/22 20:31:16
Location: Milwaukee, WI
Contact:

el7.5 bridged ethernet and dhcp

Post by schotty » 2018/07/16 23:49:00

OK. I used to be able to do this on el6 and el7.0-7.2, but this fresh el7.5 system is being a pain.

I can set a static IP address on the bridge and everything works great. Tell it to go DHCP and things don't work. Nothing gets an IP address. Did something change on me? I have manually created, used cockpit, nmcli, and nm-connection-editor to do their thing, all with the same result - dhclient never gets an IP to br0.

I am not sure what I could be missing here. Is there a firewall rule that I need and somehow am having a brain fart?

Other facts:
I have turned off SELinux to remove that as the culprit; intentions to re-enable it (did a setenforce 0 for the time being; not seeing anything loggedl;not thinking this is a problem)
The DHCP daemon is local, so unsure if there even needs to be a firewalld rule
The DHCP daemon is configured to peg this NIC with a specific IP.
Non-bridged the NIC gets the IP as intended.
everything else is working great (nfs, samba, plex,kvm etc).
This is a personal home server, hopefully replacing old one, whence el7 behaves correctly.
No, I did not clone drives and plop it in. I wanted to ensure nothing was to break. I only intend to move my massive LVM pool over. When this works that is.

Here is the broken bridge config. If I plop in the relevant IP info for a static IP, things work perfectly.

Code: Select all

[andrew@shadow ~]$ cat /etc/sysconfig/network-scripts/ifcfg-br0 
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

STP=no
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="Bridge br0"
Not sure if this matters, but here it is anyway. Onboard ethernet.

Code: Select all

[andrew@shadow ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eno1 
HWADDR=1C:87:2C:76:85:82
TYPE=Ethernet
UUID=0388950a-bbe5-4f28-8c02-1e7694f89fb5
HWADDR=1c:87:2c:76:85:82
DEVICE=eno1
ONBOOT=yes
BRIDGE=br0
Thanks.
Andrew.

PS -- if need be I can provide other configs, or output of a particular command.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: el7.5 bridged ethernet and dhcp

Post by hunter86_bg » 2018/07/19 03:58:47

Are you using latest updates of CentOS 7 ?
I'm asking as I reported exactly the same bug to CentOS , which was also reported on RedHat and they fixed it recently.
Bridge devices no longer fail to obtain an IP address

Previously, bridge devices sometimes failed to obtain an IP address from the DHCP server immediately after system startup. This was caused by a race condition where the ifup-eth script did not wait for the Spanning Tree Protocol (STP) to complete its startup. This bug has been fixed by adding a delay that causes ifup-eth to wait long enough for STP to finish starting. (BZ#1380496)
Source: RHEL 7.5 release notes

schotty
Posts: 19
Joined: 2014/08/22 20:31:16
Location: Milwaukee, WI
Contact:

Re: el7.5 bridged ethernet and dhcp

Post by schotty » 2018/07/20 00:51:13

I can try another yum update this weekend, when I will have time to screw with it and not hamper some work I need to do with it. Basically the migration is done, with this being the last nagging issue.

But if this is not very recent of an update, then the answer is yes. I had as of early July 2018 the latest versions of whatever packages I have installed. This is a fresh install as of two weeks or so back. I yum updated, added a few repos (including my own, epel, and negativo), and copied configs and pysically pulled my lvm array over (yoinked disks out and popped them into new box). I have also rebooted a good number of times, so I know I am using whatever the latest kernel I have installed is.

If you know what package(s) I need to look at, I can verify. Even if this isnt the case, its nice to know that for sure, if you get my drift :D

Thanks for getting back to me, any and all help from you is greatly appreciated.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: el7.5 bridged ethernet and dhcp

Post by hunter86_bg » 2018/07/20 03:56:50

Just a side question (most probably unrelated) - why eno1 has 2 MAC definitions ?
Also, are you using NetworkManager.service ?
Hqve you tried with 'stp=yes' ?

schotty
Posts: 19
Joined: 2014/08/22 20:31:16
Location: Milwaukee, WI
Contact:

Re: el7.5 bridged ethernet and dhcp

Post by schotty » 2018/07/21 14:01:16

hunter86_bg wrote:
2018/07/20 03:56:50
Just a side question (most probably unrelated) - why eno1 has 2 MAC definitions ?
Also, are you using NetworkManager.service ?
Hqve you tried with 'stp=yes' ?
1) Good catch, will fix. Even if harmless. Clean configs.....
2) Yep.
3) I had tried it at times, but disabled it during my troubleshooting. That was enabled by default (and runs perfectly fine on my other EL7/Fedora installations) when adding the connection, and dare I say, from ANY of the automated methods available (nm-connection-editor, GNOME networking, nm-cli). Frankly I was hoping to find something that would start getting things functional or change the broken behavior. Since you reported the bug, I think you can see my frustration looking at a working system next to me, and a broken "new", "fresh" install in front of me. I figured it had to be mental retardation somewhere on my end, or a regression/bug. Likely the former.

Later today, I will have the time to update and revert my configs to a DHCP config (with one MAC and STP :D ) and see if that does the trick. If worse comes to worse, I think I may be able to try a reinstall of the initscripts package and see what if that is useful.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: el7.5 bridged ethernet and dhcp

Post by hunter86_bg » 2018/07/21 18:44:12

I would recommend you to try creating the slave and the bridge via nmtui/nmcli interface and check if it works. And if it works, compare the NM-generated configs with yours.
Should be something like this (no access to machine, so everything is based on memory):
nmcli con add con-name br0 ifname br0 type bridge connection.autoconnect yes
nmcli con add con-name eno1 ifname eno1 type bridge-slave master br0 connection.autoconnect yes

Post Reply