Network upon reboot

Issues related to configuring your network
Post Reply
linnygirl
Posts: 5
Joined: 2020/10/27 18:42:22

Network upon reboot

Post by linnygirl » 2020/10/27 18:55:10

I have setup a Centos 8 server installation to run as a virtualization hypervisor. I have a network bridge for my VMs. I have network connection out and can ping 8.8.8.8 upon each reboot, but cannot ping anything locally within my network. Each time I reboot, I must reissue the commands:
nmcli networking off
nmcli networking on
systemctl enable NetworkManager.service
systemctl start NetworkManager.service

Before I can ping to other local machines within the network / gateway, but I can ping externally to google. It is very frustrating that I cannot figure out how to enable the networking to come up automatically.

I have read point two on the Centos 7 and 8 FAQs. It says to ensure you have onboot set to yes in your /etc/sysconfig/network-scripts/ifcfg-* file.

There are 3 config files within the network scripts directory all three have the onboot set to yes.

Ifcfg-br0
Ifcfg-bridge-slave-enp4s0
ifcfg-enp4s0

This has been done along with NM_CONTROLLED=yes

User avatar
TrevorH
Forum Moderator
Posts: 29915
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network upon reboot

Post by TrevorH » 2020/10/27 19:33:46

Did you set up the bridge?

Post the contents of all of the ifcfg-* files except ifcfg-lo. Please obscure as little information as possible so for example rather than post an ip address as x.x.x.x use x.x.123.56 so we can see approximately what is what rather than having zero info to go on.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

linnygirl
Posts: 5
Joined: 2020/10/27 18:42:22

Re: Network upon reboot

Post by linnygirl » 2020/10/27 23:37:24

/etc/sysconfig/network-scripts/ifcfg-enp4s0
NM_CONTROLLED=yes
TYPE=Ethernet
NAME=enp4s0
UUID=354e2681-41d3-****-****-0510874f922c
DEVICE=enp4s0
ONBOOT=yes
BRIDGE=br0

etc/sysconfig/network-scripts/ifcfg-bridge-slave-enp4s0
NM_CONTROLLED=yes
TYPE=Ethernet
NAME=bridge-slave-enp4s0
UUID=49a4ac1a-****-****-****-43c19f253ad4
DEVICE=enp4s0
ONBOOT=yes
BRIDGE=br0

etc/sysconfig/network-scripts/ifcfg-br0
NM_CONTROLLED=yes
ONBOOT=yes
PERSISTENT_DHCLIENT=1
STP=yes
BRIDGING_OPTS=priority=32768
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
BOOT_PROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=br0
UUID=c3a2737f-****-****-****-f07b87e542cf
DEVICE=br0
DEVICE=enp4s0
BRIDGE=br0

Not sure I mentioned it, but for some reason I get connection to the internet and can ping google, just cannot ping the gateway or other local machines...

linnygirl
Posts: 5
Joined: 2020/10/27 18:42:22

Re: Network upon reboot

Post by linnygirl » 2020/10/28 00:05:49

Yes and the bridge is setup and appears to be working (but only after issuing those commands).

linnygirl
Posts: 5
Joined: 2020/10/27 18:42:22

Re: Network upon reboot

Post by linnygirl » 2020/10/28 13:27:22

Alright so I think I have it sorted, approaching the problem from a different angle proved invaluable. I used nmtui to setup the machine with a manual (static) IP.
I then had to disable networkmanager's mac address randomization for the ethernet device. Modifying /etc/NetworkManager/NetworkManager.conf to include in the [connection] section: ethernet.cloned-mac-address=permanent
Take note of the mac address and setup the pfsense with the static entry using the mac address noted. Now it works fine even on reboot.

linnygirl
Posts: 5
Joined: 2020/10/27 18:42:22

Re: Network upon reboot

Post by linnygirl » 2020/10/28 13:27:58

Thanks for the help, and hope this helps someone else.. that was quite frustrating.

Post Reply

Return to “CentOS 8 - Networking Support”