dhcp client can't ping gateway but can ping other local hosts
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
nameserver x.x.x.x (receives the correct info from my isp)
nameserver x.x.x.x
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPRPTP=dhcp
/etc/sysconfig/network
NETWORKING=yes
ran netconfig and made sure dhcp was selected
netstat -rn
192.168.0.0 0.0.0.0 255.255.255.0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 lo
0.0.0.0 192.168.0.1 0.0.0.0 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.
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;
ifconfig
eth0 gets 192.168.0.103 broadcast is 192.168.0.255 network is 255.255.255.0
lo gets it's normal stuff.
of course the interface is up because i can ping other hosts on the lan.
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.
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 (192.168.0.1). If so, try stopping the iptables service and try to ping the Gateway from Redhat 9 box and viceversa.
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.
dhcp client can't ping gateway but can ping other local hosts
O.K.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.