Comment forcer Linux à obtenir une nouvelle adresse IP du serveur DHCP?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment forcer Linux à obtenir une nouvelle adresse IP du serveur DHCP?

Message par ForumBot »

The environment is Debian, although the answer will apply to all distributions.




Source : ,)

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: Comment forcer Linux à obtenir une nouvelle adresse IP du serveur DHCP?

Message par ayi »

You can also use this command:


dhclient -r interface
dhclient interface


Where interface is the device you want to get a new address for. For instance,


dhclient -r eth0
dhclient eth0


The -r flag forces dhclient to first release any leases you have. The second command requests a new lease.


From man dhclient:


   -r     Tell  dhclient  to  release the current lease it has from the 
server. This is not required by the DHCP protocol, but some
ISPs require their clients to notify the server if they wish
to release an assigned IP address.

Répondre

Revenir à « Windows 11 »