Comment forcer Linux à réacquérir une nouvelle adresse IP depuis le serveur DHCP ?
Comment forcer Linux à réacquérir une nouvelle adresse IP depuis le serveur DHCP ?
The environment is [Debian](https://en.wikipedia.org/wiki/Debian), bien que le answer will apply to tous distributions.
Re: Comment forcer Linux à réacquérir une nouvelle adresse IP depuis le serveur DHCP ?
Vous pouvez aussi use this command:
```
dhclient -r interface
dhclient interface
```
Where `interface` is le device you want to get a nouveau address for. Par exemple,
```
dhclient -r eth0
dhclient eth0
```
The `-r` flag forces `dhclient` to premier release tout leases you have. The second command requests a nouveau 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.
```
```
dhclient -r interface
dhclient interface
```
Where `interface` is le device you want to get a nouveau address for. Par exemple,
```
dhclient -r eth0
dhclient eth0
```
The `-r` flag forces `dhclient` to premier release tout leases you have. The second command requests a nouveau 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.
```