Page 2 of 2

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/02/19 11:45:55
by srinivas_pithani
TrevorH wrote:
2020/02/18 16:48:24
We also don't know if it is, for example, a 169.254 address and locally assigned. Not enough info...
Its not 169.254 , its 192.168.x.y in vlanx

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/02/19 13:13:19
by jlehtone
How about you show:

Code: Select all

nmcli
nmcli c s
nmcli -f DHCP4 c s XXX
Where XXX is the troublesome connection.

Better yet, if you could show results from both C7 and C8.

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/02/19 14:11:43
by TrevorH
You also don't say if that 192.168 ip address is in the same subnet as the ip you are expecting to get. And the suggestion of checking the leases file still stands so that you can see if the wrong DHCP server is responding more quickly than the one you are expecting. It'll also tell you the MAC address that's being used.

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/02/19 16:06:58
by srinivas_pithani
jlehtone wrote:
2020/02/19 13:13:19
How about you show:

Code: Select all

nmcli
nmcli c s
nmcli -f DHCP4 c s XXX
Where XXX is the troublesome connection.

Better yet, if you could show results from both C7 and C8.
C8 results :
[root@app-server-c8 ~]# nmcli
eno1: connected to eno1
"Broadcom NetXtreme BCM5720"
ethernet (tg3), B0:83:XX:YY:AC:95, hw, mtu 1500
ip4 default
inet4 192.168.52.aa/24 --> This is not the expected ip , I should be getting 192.168.52.bb
route4 0.0.0.0/0
route4 192.168.52.0/24
inet6 fe80::b283:feff:fed8:ac95/64
route6 ff00::/8
route6 fe80::/64

eno2: unavailable
"Broadcom NetXtreme BCM5720"
ethernet (tg3), B0:83:XX:YY:AC:96, hw, mtu 1500

lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
servers: 192.168.XXX.A 192.168.XXX.B
domains: abc.com
interface: eno1
[root@app-server-c8 ~]# nmcli c s
NAME UUID TYPE DEVICE
eno1 f176c89a-1fd6-4edd-8682-ddcfeb288a04 ethernet eno1
eno2 49febf84-52ed-4589-a0ae-7f76e852a3b0 ethernet --
name-br0 79ae92b9-6e67-4812-bd56-820c4a8cfed2 bridge --
name-slv0 83e8a926-32e7-4e37-8f7a-1ea4da94266f ethernet --
[root@app-server-c8 ~]# nmcli -f DHCP4 c s eno1
DHCP4.OPTION[1]: dhcp_lease_time = 86400
DHCP4.OPTION[2]: dhcp_rebinding_time = 75600
DHCP4.OPTION[3]: dhcp_renewal_time = 43200
DHCP4.OPTION[4]: dhcp_server_identifier = 192.168.52.1
DHCP4.OPTION[5]: domain_name = abc.com
DHCP4.OPTION[6]: domain_name_servers = 192.168.251.XXX 192.168.251.YYY
DHCP4.OPTION[7]: expiry = 1582212926
DHCP4.OPTION[8]: ip_address = 192.168.52.aa
DHCP4.OPTION[9]: ntp_servers = 192.168.52.XXX
DHCP4.OPTION[10]: requested_broadcast_address = 1
DHCP4.OPTION[11]: requested_dhcp_server_identifier = 1
DHCP4.OPTION[12]: requested_domain_name = 1
DHCP4.OPTION[13]: requested_domain_name_servers = 1
DHCP4.OPTION[14]: requested_domain_search = 1
DHCP4.OPTION[15]: requested_host_name = 1
DHCP4.OPTION[16]: requested_interface_mtu = 1
DHCP4.OPTION[17]: requested_ms_classless_static_routes = 1
DHCP4.OPTION[18]: requested_nis_domain = 1
DHCP4.OPTION[19]: requested_nis_servers = 1
DHCP4.OPTION[20]: requested_ntp_servers = 1
DHCP4.OPTION[21]: requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[22]: requested_root_path = 1
DHCP4.OPTION[23]: requested_routers = 1
DHCP4.OPTION[24]: requested_static_routes = 1
DHCP4.OPTION[25]: requested_subnet_mask = 1
DHCP4.OPTION[26]: requested_time_offset = 1
DHCP4.OPTION[27]: requested_wpad = 1
DHCP4.OPTION[28]: routers = 192.168.52.1
DHCP4.OPTION[29]: subnet_mask = 255.255.255.0
Note that I dont have any issue with DNS servers & I have created the bridge later on i.e. don't consider it to be the part of the problem .

C7 Results . This below machine isnt the same as above but these both are part of the same network but with C7 on it , has got same hardware specs, same drivers, connects to same switch port as C8 machine does ....etc
[root@app-server-c7 ~]# nmcli
em1: connected to em1
"Broadcom and subsidiaries NetXtreme BCM5720 2-port"
ethernet (tg3), B0:83:XX:YY:C9:65, hw, mtu 1500
ip4 default
inet4 192.168.52.cc/24 --> This is the expected ip
route4 0.0.0.0/0
route4 192.168.52.0/24
inet6 fe80::3b6c:215e:3780:69aa/64
route6 fe80::/64
route6 ff00::/8

em2: unavailable
"Broadcom and subsidiaries NetXtreme BCM5720 2-port"
ethernet (tg3), B0:83:XX:YY:C9:66, hw, mtu 1500

lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
servers: 192.168.XXX.A 192.168.XXX.B
domains: abc.com
interface: em1

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
[root@app-server-c7 ~]# nmcli c s
NAME UUID TYPE DEVICE
em1 2f0a5304-5bc4-443f-8e13-46787ef214b5 ethernet em1
em2 a0ac2599-4001-4c30-a489-75a7589f4cfd ethernet --

[root@app-server-c7 ~]# nmcli -f DHCP4 c s em1
DHCP4.OPTION[1]: broadcast_address = 192.168.52.255
DHCP4.OPTION[2]: dhcp_lease_time = 86400
DHCP4.OPTION[3]: dhcp_message_type = 5
DHCP4.OPTION[4]: dhcp_rebinding_time = 75600
DHCP4.OPTION[5]: dhcp_renewal_time = 43200
DHCP4.OPTION[6]: dhcp_server_identifier = 192.168.52.1
DHCP4.OPTION[7]: domain_name = abc.com
DHCP4.OPTION[8]: domain_name_servers = 192.168.XXX.A 192.168.XXX.B
DHCP4.OPTION[9]: expiry = 1582184636
DHCP4.OPTION[10]: filename = pxelinux.0
DHCP4.OPTION[11]: host_name = app-server-c7
DHCP4.OPTION[12]: ip_address = 192.168.52.cc
DHCP4.OPTION[13]: network_number = 192.168.52.0
DHCP4.OPTION[14]: next_server = 192.168.250.XXX
DHCP4.OPTION[15]: ntp_servers = 192.168.52.1
DHCP4.OPTION[16]: requested_broadcast_address = 1
DHCP4.OPTION[17]: requested_classless_static_routes = 1
DHCP4.OPTION[18]: requested_domain_name = 1
DHCP4.OPTION[19]: requested_domain_name_servers = 1
DHCP4.OPTION[20]: requested_domain_search = 1
DHCP4.OPTION[21]: requested_host_name = 1
DHCP4.OPTION[22]: requested_interface_mtu = 1
DHCP4.OPTION[23]: requested_ms_classless_static_routes = 1
DHCP4.OPTION[24]: requested_nis_domain = 1
DHCP4.OPTION[25]: requested_nis_servers = 1
DHCP4.OPTION[26]: requested_ntp_servers = 1
DHCP4.OPTION[27]: requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[28]: requested_root_path = 1
DHCP4.OPTION[29]: requested_routers = 1
DHCP4.OPTION[30]: requested_static_routes = 1
DHCP4.OPTION[31]: requested_subnet_mask = 1
DHCP4.OPTION[32]: requested_time_offset = 1
DHCP4.OPTION[33]: requested_wpad = 1
DHCP4.OPTION[34]: routers = 192.168.52.1
DHCP4.OPTION[35]: subnet_mask = 255.255.255.0

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/02/19 16:40:22
by BShT
look at your dhcp server and set static leases

"D" from dhcpd comes from dynamic, so if you don´t have static leases you can expect everything within the pool

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/03/08 18:38:24
by jaw
NetworkManager now wants to use a randomized MAC when connecting, at least for wifi. So the MAC the CentOS 8 client is using doesn't match the MAC the DHCP server is looking for, and the DHCP server treats it as a random machine rather than giving the reserved address.

I think I passed by a setting for NetworkManager to not randomize the interface's address, but I was just desperately looking for a way to tell it *not* to try to use the wifi and fill up the log with repeated connection attempts, each with a different MAC. (The machine should use its hardwired Ethernet only.)

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/03/13 08:09:27
by afewgoodman
Hi,

How about using dhclient?

BR.

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/03/13 11:22:29
by jlehtone
jaw wrote:
2020/03/08 18:38:24
(The machine should use its hardwired Ethernet only.)
First, I'm not sure whether you did hijack an old thread or not.

Each connection has autoconnect, autoconnect-priority, autoconnect-retries settings.
See man nm-settings. They should allow "don't try" and "prefer wired".


Random MAC (used only for wireless) and temporal IPv6 addresses are attempts to anonymize / "protect privacy".
They don't explain OP's issues.

Re: IP isn't automatically assigned from DHCP after CentOS8 install

Posted: 2020/03/14 12:47:28
by jaw
jlehtone wrote:
2020/03/13 11:22:29
Random MAC (used only for wireless) and temporal IPv6 addresses are attempts to anonymize / "protect privacy".
They don't explain OP's issues.
The OP says DHCP is being assigned by something with a MAC->IP mapping. When the client machine was running CentOS 8, it had
ethernet (tg3), B0:83:XX:YY:AC:95, hw, mtu 1500
and did not get its proper IP address assigned. When it was running CentOS 7, it had
ethernet (tg3), B0:83:XX:YY:C9:65, hw, mtu 1500
and did get its proper IP address assigned.

All the previous discussion was about the same hardware having the same MAC address. This is no longer the case under MAC randomization.

I understand the rationale for MAC randomization is privacy when you don't trust the people running the networks you connect to. But when you *are* the people running the network and you're trying to use the MAC for identification, randomization is counterproductive.