使用
#dhclient eth0 只需要这一个指令即可,eth?根据实际情况填写不同的数字。
备注:
Linux Force DHCP client (dhclient) to renew ip address
Linux renew ip command
$ sudo dhclient -r //release ip 释放IP
$ sudo dhclient //获取IP
Now obtain fresh IP:
$ sudo dhclient
There is no need to restart network service. Above command should work with any Linux distro such as RHEL,
# ifdown eth0
# ifup eth0
# /etc/init.d/network restart
OR
# /etc/init.d/networking restart