-   Linux - Networking (
-   -   dhcp client can't ping gateway but can ping other local hosts (

dirty_forks 10-07-2004 09:59 AM

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

masand 10-07-2004 10:38 AM

hi there

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

O/P of
ifconfig ???


dirty_forks 10-07-2004 10:46 AM

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!!

recursv 10-07-2004 10:55 AM

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.

harish_neo 10-07-2004 10:59 AM


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.

Hari :)

dirty_forks 10-07-2004 11:09 AM

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


dirty_forks 10-08-2004 08:33 AM

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.



Demonbane 10-08-2004 11:54 AM

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.

All times are GMT -5. The time now is 04:52 AM.