Reply

DHCP Assigned IP Address changes on Server Reboot

[ Edited ]
New Member
Posts: 3
4350     1

I'll continue to search the forums, but I am hoping somebody can shed some light on what I'm seeing.

 

Infoblox Version: 8.4.4-386831

 

I recently created a new network segment, enabled it for DHCP, setup my DHCP Range, setup DDNS, and restarted the services.  My host gets an IP address just fine and it even sets the DDNS.  However, if I reboot the server (as I just did for a kernel update), the IP address changes.  The MAC is still the same in both instances, but the host was shifted down to the next available IP address in the range as opposed to reusing the same IP address.  Am I missing something in my configuration somewhere?  Or is this expected behavior? How do I prevent it from making an IP change on reboot without having to go into Infoblox everytime I set up a server?  Keep in mind, the vast majority of people spinning up these resources don't necessarily have access to Infoblox (at least that it the use case we are going after).

 

The old IP addresses still show the host name, but they are showing "Used" in the STATUS column under IPAM (though that seems to be case for all the entire DHCP Range) and "Free" in the LEASE STATE column.  The FINGERPRINT column shows "no match" for the active lease.  The MAC ADDRESS and DHCP CLIENT IDENTIFIER columns show the same information for all of the previous leases.  I suppose I shouldn't fret over all that information, but it seems to be that it is clutter that would best disappear when no longer needed.  The Data Management -> DHCP -> Leases tab shows a ton of entries that are no longer relevant.

 

This is a new thing for us; DHCP with Infoblox.  

 

Thanks

 

James

Re: DHCP Assigned IP Address changes on Server Reboot

New Member
Posts: 3
4350     1

I am adding additional information to the original request.

 

Operating System is Ubuntu 20.04.  It's a physical server because we are experimenting with LACP port channelling.  The OS is using systemd-networkd to get the DHCP Addresses.  I've continued to do research and apparently, the default is to use the machine-id as the unique identifier to DHCP as opposed to the MAC Address.  However, updating the netplan yaml file to use

 

dhcp-identifer: mac

 

does NOT seem to work.  I have rebooted multiple times and while I did get the same IP address once, after a third reboot, the IP changed again.  I'm including the contents for the netplan yaml file I am using on Ubuntu 20.04.  

 

# This is the network config written by 'subiquity'
network:
  bonds:
    bond0:
      interfaces:
      - ens1f0
      - ens1f1
      parameters:
        lacp-rate: fast
        mode: 802.3ad
        transmit-hash-policy: layer2+3
      dhcp4: yes
      dhcp6: yes
      dhcp-identifier: mac
  ethernets:
    ens1f0: {}
    ens1f1: {}
  version: 2

 

 

Re: DHCP Assigned IP Address changes on Server Reboot

[ Edited ]
New Member
Posts: 3
4350     1

Here is the log output (after turning on debug) for DHCP and systemd-networkd.  If you look closely, you can see the IP address changes from 10.166.81.241 to 10.166.81.240.  I wish the debug would provide more information than it does.  

 

$ journalctl | grep -Ei 'dhcp'

Feb 03 17:23:10 ubuntu2004 systemd-networkd[1102]: bond0: Acquiring DHCPv4 lease
Feb 03 17:23:10 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0x47a0f77b): STARTED on ifindex 10
Feb 03 17:23:10 ubuntu2004 systemd-networkd[1102]: Event source dhcp4-receive-message (type io) returned error, disabling: Resource temporarily unavailable
Feb 03 17:23:14 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0x47a0f77b): DISCOVER
Feb 03 17:23:14 ubuntu2004 systemd-networkd[1102]: bond0: Acquiring DHCPv4 lease
Feb 03 17:23:14 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): STARTED on ifindex 10
Feb 03 17:23:14 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): DISCOVER
Feb 03 17:23:19 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): DISCOVER
Feb 03 17:23:24 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): DISCOVER
Feb 03 17:23:31 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): DISCOVER
Feb 03 17:23:47 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): DISCOVER
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): OFFER
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): REQUEST (requesting)
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): received message was not an ACK, ignoring
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): ACK
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): lease expires in 59min 59s
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): T2 expires in 52min 30s
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): T1 expires in 29min 59s
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: DHCPv4 address 10.166.81.241/24 via 10.166.81.1
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: DHCP: No routes received from DHCP server: No data available
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: Configuring route: dst: 10.166.81.1/32, src: n/a, gw: n/a, prefsrc: 10.166.81.241, scope: link, table: main, proto: dhcp, type: unicast
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: Configuring route: dst: n/a, src: n/a, gw: 10.166.81.1, prefsrc: 10.166.81.241, scope: global, table: main, proto: dhcp, type: unicast
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: Received remembered route: dst: 10.166.81.1/32, src: n/a, gw: n/a, prefsrc: 10.166.81.241, scope: link, table: main, proto: dhcp, type: unicast
Feb 03 17:23:48 ubuntu2004 systemd-networkd[1102]: bond0: Received remembered route: dst: n/a, src: n/a, gw: 10.166.81.1, prefsrc: 10.166.81.241, scope: global, table: main, proto: dhcp, type: unicast
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): STOPPED
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0xb9572e93): RELEASE
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: bond0: DHCP lease lost
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: bond0: Removing route: dst: 10.166.81.1/32, src: n/a, gw: n/a, prefsrc: 10.166.81.241, scope: link, table: main, proto: dhcp, type: unicast
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: bond0: Removing route: dst: n/a, src: n/a, gw: 10.166.81.1, prefsrc: 10.166.81.241, scope: global, table: main, proto: dhcp, type: unicast
Feb 03 17:40:21 ubuntu2004 systemd-networkd[1102]: DHCP CLIENT (0x0): FREE
Feb 03 17:43:02 ubuntu2004 audit[1061]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1061 comm="apparmor_parser"
Feb 03 17:43:02 ubuntu2004 audit[1061]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=1061 comm="apparmor_parser"
Feb 03 17:43:02 ubuntu2004 kernel: audit: type=1400 audit(1612374182.972:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1061 comm="apparmor_parser"
Feb 03 17:43:04 ubuntu2004 systemd-networkd[1099]: bond0: Acquiring DHCPv4 lease
Feb 03 17:43:04 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0x42933833): STARTED on ifindex 10
Feb 03 17:43:04 ubuntu2004 systemd-networkd[1099]: Event source dhcp4-receive-message (type io) returned error, disabling: Resource temporarily unavailable
Feb 03 17:43:08 ubuntu2004 systemd-networkd[1099]: bond0: Acquiring DHCPv4 lease
Feb 03 17:43:08 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): STARTED on ifindex 10
Feb 03 17:43:08 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): DISCOVER
Feb 03 17:43:11 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): DISCOVER
Feb 03 17:43:16 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): DISCOVER
Feb 03 17:43:24 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): DISCOVER
Feb 03 17:43:40 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): DISCOVER
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): OFFER
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): REQUEST (requesting)
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): received message was not an ACK, ignoring
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): ACK
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): lease expires in 59min 59s
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): T2 expires in 52min 29s
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: DHCP CLIENT (0xe460c1cc): T1 expires in 29min 59s
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: DHCPv4 address 10.166.81.240/24 via 10.166.81.1
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: DHCP: No routes received from DHCP server: No data available
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: Configuring route: dst: 10.166.81.1/32, src: n/a, gw: n/a, prefsrc: 10.166.81.240, scope: link, table: main, proto: dhcp, type: unicast
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: Configuring route: dst: n/a, src: n/a, gw: 10.166.81.1, prefsrc: 10.166.81.240, scope: global, table: main, proto: dhcp, type: unicast
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: Received remembered route: dst: 10.166.81.1/32, src: n/a, gw: n/a, prefsrc: 10.166.81.240, scope: link, table: main, proto: dhcp, type: unicast
Feb 03 17:43:41 ubuntu2004 systemd-networkd[1099]: bond0: Received remembered route: dst: n/a, src: n/a, gw: 10.166.81.1, prefsrc: 10.166.81.240, scope: global, table: main, proto: dhcp, type: unicast

Re: DHCP Assigned IP Address changes on Server Reboot

Techie
Posts: 10
4350     1

So this could happen because your server is sending a DHCPDISCOVER and not a DHCPREQUEST when it reboots. A possible way to resolve this is to create a Fixed IPv4 address on Infoblox, in the range you want the server to be. You would then add the MAC address of that server to the fixed IP record and it would get the same IP all the time - as long as it's MAC address does not change.

Re: DHCP Assigned IP Address changes on Server Reboot

New Member
Posts: 1
4350     1

Hi, did you ever sort this out?

We are running into the same issues with ubuntu 20.04 and only workaround sofar is to set "critical: true" for the interface in netplan to make networkd stop doing the DHCPRELEASE when the service stops.

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You