DHCP address keeps getting generated with netplan and bonded interface

I have a bonded interface set up with netplan. Config is as follows:

# This is the network config written by 'subiquity'
network: bonds: bond0: addresses: [192.168.65.90/18] gateway4: 192.168.64.1 interfaces: - eno1 - eno2 nameservers: addresses: [192.168.3.222,192.168.70.80] parameters: mode: active-backup primary: eno1 mii-monitor-interval: 100 ethernets: eno1: {} eno2: {} version: 2 renderer: networkd

This is how I configure any server that uses a bonded interface, but something is off with this one. It keeps grabbing a DHCP address and I can no longer ssh into the server.

I also see this many times in /var/log/syslog:

dhclient[1357]: DHCPREQUEST for 192.168.25.226 on eno1 to 192.168.3.222 port 67 (xid=0x17fa4eb1)

How do I stop this from happening? I keep having to run netplan generate and netplan apply to get the static IP back.

Every other server that has this exact config keeps its static IP. I don't know where to look to determine what is doing it.

I see this process running. Could it be related?

root@my_server:/var/log# ps -ef | grep dhclient
root 1357 1 0 Nov22 ? 00:00:02 dhclient <--- THIS ONE
root 109077 108785 0 18:24 pts/3 00:00:00 grep --color=auto dhclient
2

1 Answer

Networkd never invokes dhclient. This running dhclient process is the result of something else on your system besides your netplan config. Killing the process and checking that it does not return (including after a reboot) is the correct approach.

If it does return, you will want to check for other configuration under /etc, such as /etc/network/interfaces.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like