![]() |
Slackware DHCP works but cannot ping or access router setup
I recently set up a computer with Slackware to run as a small web server. I have installed Slackware on this computer before with no problems, but this time it cannot access the network fully. It gets an address from DHCP, shown by ifconfig and the DHCP table on the router setup accesssed from a different computer. However, I cannot ping any of the other computers or the router and the internet cannot connect. I am relatively new to Linux, but I have worked with Slackware for a few months. Any tips would be greatly appreciated.
|
Three letters, DNS
check /etc/hosts /etc/resolv.conf /etc/nsswitch.conf furthermore try setting a static ip outside of your DHCP pool and go from there ifconfig ethX xxx.xxx.xx.x |
Route issue
DNS might be an issue, but it's unlikely. There's a deeper problem here.
If you're pinging by IP address, which I assume you are, DNS queries don't result in failed pings. You're going to want to check your route table to make sure that your computer knows where to send things. Here's an example of what this should look like: Code:
tsnow@mymachine:~$ routeI have seen issues on certain versions of Linux when using the lightweight DHCP servers on routers where the route table entries are not made correctly in certain situations. As per bejiita's suggestion to check DNS, you'll want to do this too. There's a strong possibility that this wasn't pulled correctly from DHCP as well. Let us know how things turn out! |
I looked at the route table and everything looked like it should work correctly. It had the local network and the internet shown, along with the loopback connection. When I tried viewing /etc/hosts it said access denied or something similar, even though I was logged in as root. Maybe I was just trying to access it incorrectly.
|
After rebooting the computer, the loopback connection doesn't show in the route table anymore, in case that would change your response.
|
Routing suggestion
At this point, I'd try editing the route table by hand using the route command. When I was using Fedora Core 4 on someone's machine, DHCP would pull a valid address, but for some reason, their machine couldn't ping anything. Deleting and re-adding their default routes made everything work again.
Though, when you're adding the gateway address, try this. Code:
route add -net 0.0.0.0 netmask 0.0.0.0 gw <gateway address>Also, try pinging the address that the DHCP server assigned to your machine, just to see what happens. If it doesn't respond, then there might be bigger problems. |
I tried the route command, but it did not fix it. I have another linux system running with no trouble, so I compared both the ifconfig result and the route result and the only difference I could find was the computer that works shows on the fourth line (just below the inet6 address) UP BROADCAST NOTRAILERS RUNNING MULTICAST and the one that has trouble does not show "running". Is that simple to fix, or is that just what we have already been trying to fix?
|
Wireshark
It might be useful for you to grab a copy of wireshark from a working computer, and put it on this slackware box. If you could find out exactly what's happening when you try and send data out, there might be some obvious indications in packet failures.
Otherwise I'm not entirely sure what's going wrong. |
RedFox937
Could you please post the stdout for ifconfig. Quote:
|
| All times are GMT -5. The time now is 07:37 PM. |