-   Linux - Networking (
-   -   Slackware DHCP works but cannot ping or access router setup (

RedFox937 12-19-2007 09:47 AM

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.

bejiita 12-19-2007 10:42 AM

Three letters, DNS



furthermore try setting a static ip outside of your DHCP pool and go from there

ifconfig ethX

Amuro-Ray2020 12-19-2007 03:01 PM

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:


tsnow@mymachine:~$ route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface      *        U    0      0        0 eth0
default        UG    0      0        0 eth0

There are two entries here that allow my machine to communicate with the rest of the network. The top most entry allows my communication with the local network, while the bottom entry is my default route to access the outside world.

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

RedFox937 12-19-2007 09:33 PM

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.

RedFox937 12-19-2007 09:43 PM

After rebooting the computer, the loopback connection doesn't show in the route table anymore, in case that would change your response.

Amuro-Ray2020 12-19-2007 10:06 PM

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.

route add -net netmask gw <gateway address>
There's another way to add default gateways to the route table using the route command, but I've had issues with that one. This seems to work the best.

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.

RedFox937 12-23-2007 01:55 PM

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?

Amuro-Ray2020 12-23-2007 09:31 PM

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.

davimint 12-24-2007 10:36 PM


Could you please post the stdout for ifconfig.


It gets an address from DHCP, shown by ifconfig and the DHCP table on the router setup accesssed from a different computer.
Is this a wireless router or wired ? Does the above "accessed from a different computer" mean that you can "NOT" access the router from the machine that is giving you problems.

All times are GMT -5. The time now is 09:02 AM.