dhclient -r eth0 --> issue dhcp release
somehow testvm-1 can issue dhcp release and release ip addr successfully,
but in testvm-5 can't issue dhcp release to dhcp server.
sol:
The dhclient '-r' release lease option seems to work only if the dhclient process that got the lease being released is not running, or is run outside of the /sbin/ifup network scripts - ie. doing: # ifdown eth0 # ifconfig eth0 up # dhclient eth0 # dhclient -r eth0 works fine for me. But if you do: # ifup eth0 # dhclient -r eth0 This will not work; the dhclient process started by 'ifup' is still around because the 'dhclient -r' process cannot find its pid file, which is /var/run/dhclient-eth0.pid, and will reacquire the lease when it expires. You can get around this by doing: # dhclient -pf /var/run/dhclient-eth0.pid -r but this is a pain.
Q2.
After dhcpd restart, dhcpd didn't test whether the entry(ip+mac) reside in dhcpd.leases which is not released yet is alive.
沒有留言:
張貼留言