Redhat DHCP client always request 10.0.0.4?
I configured a dhcpd, authorized from 192.168.0.22 to 192.168.0.127. Then another Linux client was configured to boot using DHCP by "netconfig", but every time it booted, I found it always request 10.0.0.4 and use this ip automatically at last. Even though I deleted /var/lib/dhcp/dhcpd.leases has no effect.
I can't get the authorized IP address until I run dhclient manually. What wrong? How to solve this problem? thanks. |
Re: Redhat DHCP client always request 10.0.0.4?
Quote:
If use Fedora, check /etc/sysconfig/network-scripts/ifcfg-eth*. For example, my Fedora ifcfg-eth0 using dhcp: Code:
DEVICE=eth0 |
That's just my /etc/sysconfig/network-scripts/ifcfg-eth0!
Even I add: DHCP_PROG=/sbin/dhclient has no effect. I read this method from the documentation of BLFS. |
well is 10.0.0.4 listed in dhcp leases? on boot of the client, is there an acknowledged dhcp request for 10.0.0.4 on the dhcp server? if neither of these occurs, then it's still looking like a very static assignment
|
At fist, the log of the server(/var/log/message):
Dec 29 23:37:05 Chowroc dhcpd: DHCPDISCOVER from 00:0c:29:af:01:2c via eth0 Dec 29 23:37:06 Chowroc dhcpd: DHCPREQUEST for 10.0.0.4 (10.0.0.2) from 00:0c:29:af:01:2c via eth0: ignored (not authoritative). Dec 29 23:37:06 Chowroc dhcpd: DHCPOFFER on 192.168.0.124 to 00:0c:29:af:01:2c via eth0 Dec 29 23:37:06 Chowroc dhcpd: DHCPREQUEST for 10.0.0.4 (10.0.0.2) from 00:0c:29:af:01:2c via eth0: ignored (not authoritative). Then, only remove /var/lib/dhcp/dhclient.lease or add "DHCP_PROG" to /etc/sysconfig/network-scripts/ifcfg-eth0 has no effect. Only when I have done both, I get the right address: Dec 29 23:42:30 Chowroc dhcpd: DHCPDISCOVER from 00:0c:29:af:01:2c via eth0 Dec 29 23:42:31 Chowroc dhcpd: DHCPOFFER on 192.168.0.124 to 00:0c:29:af:01:2c via eth0 Dec 29 23:42:31 Chowroc dhcpd: DHCPREQUEST for 192.168.0.124 (192.168.0.11) from 00:0c:29:af:01:2c via eth0 Dec 29 23:42:31 Chowroc dhcpd: DHCPACK on 192.168.0.124 to 00:0c:29:af:01:2c via eth0 Dec 29 23:42:31 Chowroc dhcpd: DHCPREQUEST for 192.168.0.124 (192.168.0.11) from 00:0c:29:af:01:2c via eth0 Dec 29 23:42:31 Chowroc dhcpd: DHCPACK on 192.168.0.124 to 00:0c:29:af:01:2c via eth0 but I don't know why? thanks. |
Quote:
Good Luck, Chowroc;) |
The message from the client:
Dec 30 00:45:54 LD ifup: Dec 30 00:45:54 LD ifup: Determining IP information for eth0... Dec 30 00:46:02 LD dhclient: DHCPNAK from 10.0.0.2 <30>Dec 30 00:46:02 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 Dec 30 00:46:02 LD dhclient: DHCPOFFER from 10.0.0.2 <30>Dec 30 00:46:02 dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 Dec 30 00:46:02 LD dhclient: dhclient.c(1216): non-null pointer Dec 30 00:46:03 LD ifup: done. And I found that the result of the client is not constant, sometimes be 192.168.0.x, but sometimes be 10.0.0.4. thank you. |
Quote:
|
hi there
post the O/P of route -n regards |
The IP of the host Chowroc is: 192.168.0.11.
This the route table of the client after boot: 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0 and the server: 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo In fact, I build the client on the vmware, so I think physically they must be in same network. thank you. |
i forgot to ask.
what is the IPaddress of ur DHCP server?? regards |
Oh, VMware!! Thats importantB)
Quote:
--- Host OS: Linux Host(Chowroc dhcp server) Guest OS: Linux Host(dhcp client) In this case, Guest OS is in host-only network(vmnet1) --- i think VMware DHCP Daemon for vmnet1 replied to dhcp client instead of Chowroc dhcp server, but u need to the fact because i dont know ur VMware detail network:( If my guess is correct, please re-try to reboot dhcp client after stopping VMware DHCP Daemon. And, i suggest that physically network and host-only(vmnet1) is divided subnet; for example, physically network is 192.168.0.0/24, and host-only(vmnet1) is 192.168.10.0/24. Thats better;) Good luck!! |
Yes, I think you are right. Thank you very much.
|
All times are GMT -5. The time now is 01:53 PM. |