Renew ip address for DHCP client

I had a wierd situation recently, I could get the ip address, and I could set up apt.conf and proxy correctly, but I just could not connect network, I even could ping a inner desktop, so wierd. Then suddently, I found that it responses twice when ping this ip, so it is probably that the ip is used by other people stactly already, so I need to get a new automatic ip address, here is what I did:

 

1. release your current dhclient

sudo dhclient -r

or

sudo dhclient -r eth0

r for release.

2 obtain fresh IP

sudo dhclient

or

sudo dhclient eth0

 

3  show the detail information.  

sudo dhclient -v -r eth0

or

sudo dhclient -v eth0

v for verbose

 

other option may be useful

ifdown eth0

ifup eth0

/etc/init.d/networking restart

posted @ 2019-01-23 02:10  lyan_tech  阅读(299)  评论(0编辑  收藏  举报