LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2004, 03:00 AM   #1
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Rep: Reputation: 15
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.
 
Old 12-28-2004, 10:41 PM   #2
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Rep: Reputation: 15
Re: Redhat DHCP client always request 10.0.0.4?

Quote:
Originally posted by Chowroc
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.
i guess the default ip setting is static, not dhcp.
If use Fedora, check /etc/sysconfig/network-scripts/ifcfg-eth*.
For example, my Fedora ifcfg-eth0 using dhcp:

Code:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
 
Old 12-29-2004, 07:13 AM   #3
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
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.
 
Old 12-29-2004, 07:28 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
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
 
Old 12-29-2004, 10:39 AM   #5
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
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.
 
Old 12-29-2004, 11:18 AM   #6
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Rep: Reputation: 15
Quote:
Originally posted by Chowroc
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).
As this log, dhcpd offer correct address to the dhclient, but the client continue sending DHCPREQUEST... i guess this problem is related to dhclient side not dhcpd. Are there dhclient errors on dhclient's /var/log/messages?

Good Luck, Chowroc
 
Old 12-29-2004, 11:43 AM   #7
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
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.
 
Old 12-29-2004, 12:05 PM   #8
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Rep: Reputation: 15
Quote:
Originally posted by Chowroc
The message from the client:

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
As this dhclient log, dhclient received OFFER from dhcp server addressed 10.0.0.2. Chowroc(last post listed dhcp server) and this dhcp client exist in same network?? How about Chowroc ip address, or existence of another dhcp servers?
 
Old 12-29-2004, 12:11 PM   #9
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

post the O/P of

route -n

regards
 
Old 12-29-2004, 07:40 PM   #10
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
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.
 
Old 12-29-2004, 11:41 PM   #11
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
i forgot to ask.
what is the IPaddress of ur DHCP server??

regards
 
Old 12-30-2004, 12:40 AM   #12
kaito
LQ Newbie
 
Registered: Nov 2004
Location: japan
Distribution: plamo, fedora
Posts: 27

Rep: Reputation: 15
Oh, VMware!! Thats importantB)

Quote:
Originally posted by Chowroc
In fact, I build the client on the vmware, so I think physically they must be in same network.
i guess the VMware setting is the following. How about u?

---
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!!
 
Old 12-30-2004, 08:28 AM   #13
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
Yes, I think you are right. Thank you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 06:18 AM
DHCP client on Redhat 7.3 malfunctioning query987 Linux - Networking 10 08-20-2003 07:12 PM
*** REVERSE DHCP - Linux assumes ip according client gateway request *** domingo-br Linux - Networking 0 07-01-2003 08:53 PM
dhcp fron win 2000 with Redhat 9 client kev7045 Linux - Networking 1 06-29-2003 07:49 PM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration