0

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
    Yes, as far as I know dhclient should not be running on a 20.04 system. Was your system upgraded from a previous release, like 18.04? I do not know how to disable dhclient. Nov 23 '21 at 19:18
  • It was a fresh install of 20.04. I killed the process and have not seen the problem return.......yet. Nov 23 '21 at 19:36
2

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
  • That works for me. It's been almost 2 hours and it hasn't kicked me out of my ssh session and my ifconfig is still showing my static IP. It was probably something I did. I'm just not finding it in my bash history. Thank you for the tip! Nov 23 '21 at 20:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.