2011年6月15日 星期三

dhcp issue

dhclient eth0  --> issue dhcp discover
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. 

沒有留言:

張貼留言

kgdb

--0313-- ken 不好意思 请教一下 之前你有交过我 在没有coredump的情况下 可以用gdb直接载入ko.debug, 然后dis -l register_bcache, 我记得使用方式是不是这样, 不过我现在dis -l出现错误^^" [root@...