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

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

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

Message par Clippy »

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




Source : ,)

ayi
Site Admin
Messages : 9242
Inscription : mer. 22 avr. 2026, 17:21

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 »