Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Loose network when performing dhclient -r

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
larvel
Posts: 4
Joined: 2021-03-25 04:28

Loose network when performing dhclient -r

#1 Post by larvel »

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

#2 Post by larvel »

Repeatedly executing 'dhclient -r' on a centos 7 machine does works fine also. (The machine does not loose network as on debian 9/10)

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Loose network when performing dhclient -r

#3 Post by Head_on_a_Stick »

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
deadbang

larvel
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

#4 Post by larvel »

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:

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Loose network when performing dhclient -r

#5 Post by Head_on_a_Stick »

So you're running Debian 9 then.

What about the journal? Do you see anything there about the connections?
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Loose network when performing dhclient -r

#6 Post by p.H »

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.

larvel
Posts: 4
Joined: 2021-03-25 04:28

Re: Loose network when performing dhclient -r

#7 Post by larvel »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Loose network when performing dhclient -r

#8 Post by p.H »

I suspect that some other process (the network manager ?) renews the lease.
What starts dhclient in the first place to get the lease ?

Post Reply