Slackware DHCP works but cannot ping or access router setup
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.
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.
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:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.31.0.0 * 255.255.0.0 U 0 0 0 eth0
default 172.31.1.250 0.0.0.0 UG 0 0 0 eth0
myuser@mymachine:~$
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.
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.
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.