[RESOLVED] - dhclient will not grab IP

Issues related to configuring your network
Post Reply
User avatar
warron.french
Posts: 538
Joined: 2014/03/27 20:21:58

[RESOLVED] - dhclient will not grab IP

Post by warron.french » 2020/01/24 04:17:21

I am running CentOS-8 inside a VM, and cannot get the VM to grab an IP address.

My CentOS-7 VM machines did not have this problem, so I altered the /etc/sysconfig/network-scripts/ifcfg-enp0s3 file to use a static assignment.

Has anyone else had this problem with Oracle VBox 6.0.14 r133895 (Qt5.6.2)?

It seems strange that DHCP Client will not work, but STATIC will.
Last edited by warron.french on 2020/02/12 04:36:02, edited 1 time in total.
Thanks,
War

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

Re: dhclient will not grab IP

Post by jlehtone » 2020/01/24 07:28:34

I'd say "apples and oranges".
One thing is that the network layers are functional; you can establish connections to other devices.
The other is that DHCP client fails to communicate with DHCP server.

It is quite possible that there are timing/timeout/dialect differences between client versions.

"Oracle VBox" is not exactly a CentOS issue. Can you there, on "host side" listen to traffic?
The DHCP requests are broadcasts. I would listen both CentOS 7's and 8's traffic, if possible,
to find the difference.

Does the client send a request? Does the server respond? Does the client accept the offer?


You "altered a file". Are you not using the NetworkManager.service? Which DHCP client do you use?

aks
Posts: 3045
Joined: 2014/09/20 11:22:14

Re: dhclient will not grab IP

Post by aks » 2020/01/24 16:58:15

I'd like for DHCP NACK on the wire (i.e.: NOT ACK).

summitflier
Posts: 13
Joined: 2020/01/22 22:16:05

Re: dhclient will not grab IP

Post by summitflier » 2020/01/24 17:42:05

First of all NetworkManager doesn't really read anything from the /etc/sysconfig/network-script/ifcfg-* files.
(there is a way to force it to).
You want to use the NetworkManager commands to create the network settings.

nmcli con add con-name enp1s0 ifname enp1s0 type ethernet ipv4.dns ipv4.method auto autoconnect yes ipv6.method ignore
nmcli dev enp1s0 connect (or disconnect)

(change enp1s0 to whatever your connection name is)

Second, where is your DHCP server? OracleVirtualBox isn't a DHCP server. It doesn't give out DHCP addresses.
You'll either have to put a DHCP server on a VM on the same subnet as your new VM, or you'll have to use a "bridged" connection
to get to the DHCP server on your HostServer network.

User avatar
warron.french
Posts: 538
Joined: 2014/03/27 20:21:58

Re: dhclient will not grab IP

Post by warron.french » 2020/01/31 19:42:31

@SummitFlier, thanks for the information.

I am used to updating those files, I didn't realize that nmcli became the required method of network configuring. I was trained on how to use it with RHEL7, but never actually used it in a professional environment. I am doing this at home now, so that's why I proceeded the same way, using the files.

I am using a bridged connection and have DHCP running off of my ASUS router. Other things do get IPs from the DHCP Server, so I will try your nmcli suggestion and see where that takes me.

Thank you.
Thanks,
War

User avatar
warron.french
Posts: 538
Joined: 2014/03/27 20:21:58

Re: [RESOLVED] - dhclient will not grab IP

Post by warron.french » 2020/02/12 04:37:12

Thanks @SummitFlier, it turns out that the entire problem I was having was related to my stupid WiFi network.

So frustrating, but at least now I know it wasn't CentOS-8.
Thanks,
War

Post Reply

Return to “CentOS 8 - Networking Support”