Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-07-2004, 09:59 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
Question dhcp client can't ping gateway but can ping other local hosts

Weird question

RedHat9 dhcp client can't ping gateway but can ping other local hosts
error is destination unkown

Harware: d-link 704-p, laptop w/xp, pc w/win98, ultra 10 w/solaris 9 and pc w/RedHat9

dlink serves as my dhcp server.
wan ping enabled
dhcp enabled
scope is 192.168.100-120
ip of dlink is

All clients can ping each other including redhat9 box. all clients can ping the gateway except for redhat9 box!

RedHat9 box has following configuration
dhcp enabled

/etc/hosts localhost.localdomain localhost


nameserver x.x.x.x (receives the correct info from my isp)
nameserver x.x.x.x





ran netconfig and made sure dhcp was selected

netstat -rn eth0 eth0 lo eth0
(sorry the above output from command typed from memmory but thats very close i think)

I've also tried to add route to default gateway but no help
I've tried to restart network also no help
I've configured the box with a static address and still no help!!!!!
I've removed search "your domain" from etc/resolv.conf and still no help
I've set a hostname for the box and still no help
I've deleated the 169.254 entry form the route table.

Other: Boot up takes a very long time, hanging on things line ntpd, sendmail, logger etc... I've chkconfig'd those off for time being.
grub graphic complains about unable to find "local host in local domain may cause stuff to not work properly etc..." (i've cleared all dns info from gui network-device configurator and made sure dhcp was selected)
also recntly moved and swithed cable providers.

I've never seen a situation like this.

Please help
Old 10-07-2004, 10:38 AM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

do u get a ip address from ur DHCP server.
i think u must not be getting one....

O/P of
ifconfig ???

Old 10-07-2004, 10:46 AM   #3
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
dhcp client can't ping gateway but can ping other local hosts

Yes the redhat9 box does receive an ip address sorry thats whats so wierd. I got interrupted while writing my post.

from memmory;


eth0 gets broadcast is network is
lo gets it's normal stuff.
of course the interface is up because i can ping other hosts on the lan.

This is why i'm so frustrated!!
Old 10-07-2004, 10:55 AM   #4
Registered: Oct 2004
Location: Cork, Ireland
Distribution: Slackware
Posts: 46

Rep: Reputation: 15
To my understanding,

Your redhat box is communicating with the dhcp server and all other boxes on you network but you can't ping the dhcp. Have you a firewall enabled on you network? The problem could lie therein.
I don't know what config options you have on the d-link but i'm sure it has some sort of firewall or simply an allowed hosts table. Try messing with that.

Just a random thought.
Old 10-07-2004, 10:59 AM   #5
LQ Newbie
Registered: Sep 2004
Location: Chennai, TN, India
Posts: 15

Rep: Reputation: 0

1) Are you able to ping the Redhat 9 box from the Gateway ?

2) Have you set any iptable (firewall) entry to block the ping request from your gateway ( If so, try stopping the iptables service and try to ping the Gateway from Redhat 9 box and viceversa.

Old 10-07-2004, 11:09 AM   #6
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
hi folks, again the interruption and hitting the escape key coused me to start over so i missed some stuff.

I set the security level to none ie: NO FIREWALL

I checked that I was not blocking the mac address of the redhat box on the dhcp server, however if that was the case it would not receive it's ip address then. If my other clients can ping the gateway then the problem is not with the dhcp server.

I checked ip_tables -L and I am allowing ALL inbound and outbound.

for example I can ssh, telnet etc... to redhat box

HOWEVER: it was like 2:30 in the morning and i did not think to disable ip_tables alltogether.

Just tired and frustrated today!

I refuse to believe that networking is simply broken and will have to perform an installation from scratch.

thanks for the posts so far....
keep'em coming

Old 10-08-2004, 08:33 AM   #7
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Lightbulb dhcp client can't ping gateway but can ping other local hosts


Did some more checking,

I looked at var/log/messages

(from memory)

and found repeating messages about no adress in leases file and dhcpsomething not getting or receiving something.

I appologize for not posting the log file

I decided to check the d-link. For added security I had blocked access to the network by mac address. I did not put the redhat box in the access list on the dlink! The access list is supposed to prevent access to the network.

I added the mac to the list and all was fine!!!!

Now the perplexing thing is that if the dlink is supposed to prevent access to the local network, why was it still serving an ip address? more importantly why was it routing tcp/icmp packets to other local hosts on the network?
(which is why I thought the problem was at the redhat box and not the d-link dhcp server)

I'll try giving d-link a call about this, but the last time I gave them a call their tech support was embarrasing. I asked them how their product polls attached hosts for hostnames and mac addresses because i was setting up samba and they had NO ONE, not even a manager that could tell me how the d-link worked! At least their manager was knowlegeable about how dhcp worked in theory but not as it related to their product.

I appreciate the replies to my question,
I own up to being the cause of the problem here.

I hope this helps someone else.

If you want me to post the var/log/messages for exact error output I will tonight. Just reply to this thread for the request.


Old 10-08-2004, 11:54 AM   #8
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
I dunno anything about the D-link 704-p so here's my guess:

Chances are the MAC address restriction only applies to connection to/through the router, not the built-in switch. I don't think it applies to the initial DHCP request by the client either, hence you get an ip address but have error messages when it tries to renew the dhcp lease.
There is no routing involved when the hosts on your LAN communicate with each other.
So basically that means if somebody connects a PC to your LAN and is not on the MAC address control list, they'll still be able to connect to any other hosts as long as they have a valid ip address(either static or dhcp), but they won't be able to connect to the router nor access the internet through it.


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
FC4 won't ping or the internet, but will ping local computers jalsk Linux - Networking 4 11-22-2005 06:59 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
can't ping remote but can ping local hnash53 Linux - Networking 8 01-26-2004 09:24 PM
Gateway issues - can't ping certain hosts on attached network drgowans Linux - Networking 1 09-24-2003 03:59 AM
I can ping successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 05:54 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:17 PM.

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