Linux setting network from static to dhcp client
if you want to setting eth0 to dhcp client , you can use this command:
sudo dhclient eth0
if you get the message: File exists, or something like that..
sudo dhclient eth0
if you get the message: File exists, or something like that..
Basically what happens is that dhclient adds a route to the routing table.
It tries this while the route is already in the table.
Check
ip route
for a route which was added by the dhcp server.
For having the lease renewed do
sudo dhclient -r
if thats not enough you can remove all leases by removing the file and getting a new lease
sudo rm /var/lib/dhcp/dhclient.leases; sudo dhclient eth0
Depending on your exact setup this might be an issue with having to type your password twice, so watch out for that.
留言
張貼留言