Loose network when performing dhclient -r

Kernels & Hardware, configuring network, installing services

Loose network when performing dhclient -r

Postby larvel » 2021-03-25 05:27

When first performing 'dhclient -r' the debian 9/10 machine will renew the lease.
If 'dhclient -r' is attempted twice, then the machine looses network.

Killing dhclient, and then starting it again seems to fix the network.

When performing the same on a ubuntu machine, dhclient renews the lease perfectly every time.

Question; is this the expected behavior, misonfiguration on my side or a bug?
larvel
 
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

Postby larvel » 2021-03-25 07:44

Repeatedly executing 'dhclient -r' on a centos 7 machine does works fine also. (The machine does not loose network as on debian 9/10)
larvel
 
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

Postby Head_on_a_Stick » 2021-03-25 17:47

Is there anything printed to the journal when the connection is lost?

larvel wrote:debian 9/10 machine

What does that mean? Can we see
Code: Select all
cat /etc/debian_version
uname -a
apt policy
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Loose network when performing dhclient -r

Postby larvel » 2021-03-26 10:36

root@d2:~# cat /etc/debian_version
9.13
root@d2:~# uname -a
Linux d2 4.9.0-15-amd64 #1 SMP Debian 4.9.258-1 (2021-03-08) x86_64 GNU/Linux
root@d2:~# apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://ftp.uio.no/debian stretch-updates/main amd64 Packages
release o=Debian,a=oldstable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin ftp.uio.no
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
release v=9,o=Debian,a=oldstable,n=stretch,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://ftp.uio.no/debian stretch/main amd64 Packages
release v=9.13,o=Debian,a=oldstable,n=stretch,l=Debian,c=main,b=amd64
origin ftp.uio.no
Pinned packages:
larvel
 
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

Postby Head_on_a_Stick » 2021-03-26 17:35

So you're running Debian 9 then.

What about the journal? Do you see anything there about the connections?
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Loose network when performing dhclient -r

Postby p.H » 2021-03-27 17:24

According to the dhclient(8) man page, -r means release the lease and stop the DHCP client, not renew the lease. Loosing IP connectivity when doing so is normal behaviour to me.
p.H
 
Posts: 1739
Joined: 2017-09-17 07:12

Re: Loose network when performing dhclient -r

Postby larvel » 2021-04-07 06:25

I have been testing this on debian 9 and 10, and also a ubuntu machine.

Debien 9, 10: dhclient -r renews the lease one time. If run twice, the machine loose network.
Ubuntu: dhclient -r renews the IP every time.
larvel
 
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

Postby p.H » 2021-04-07 06:39

I suspect that some other process (the network manager ?) renews the lease.
What starts dhclient in the first place to get the lease ?
p.H
 
Posts: 1739
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable