LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 12-19-2007, 10:47 AM   #1
RedFox937
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Rep: Reputation: 0
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.
 
Old 12-19-2007, 11:42 AM   #2
bejiita
Member
 
Registered: Feb 2004
Location: Upstate NY
Distribution: Slackware
Posts: 79

Rep: Reputation: 15
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
 
Old 12-19-2007, 04:01 PM   #3
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
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:~$ 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.

Let us know how things turn out!
 
Old 12-19-2007, 10:33 PM   #4
RedFox937
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 12-19-2007, 10:43 PM   #5
RedFox937
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Original Poster
Rep: Reputation: 0
After rebooting the computer, the loopback connection doesn't show in the route table anymore, in case that would change your response.
 
Old 12-19-2007, 11:06 PM   #6
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
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>
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.
 
Old 12-23-2007, 02:55 PM   #7
RedFox937
LQ Newbie
 
Registered: Jun 2006
Posts: 20

Original Poster
Rep: Reputation: 0
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?
 
Old 12-23-2007, 10:31 PM   #8
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
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.
 
Old 12-24-2007, 11:36 PM   #9
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
RedFox937

Could you please post the stdout for ifconfig.

Quote:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping to router works, internet doesn't max2004 Linux - Networking 11 05-26-2007 02:11 PM
Cannot ping router - DHCP not working PieSquared Linux - Networking 35 03-27-2007 11:51 PM
CentoOS router/firewall prob - local network works but router can't access Internet elementalvoid Linux - Networking 6 12-12-2006 04:39 PM
internet works,can not ping router. master Linux - Wireless Networking 1 08-30-2006 03:10 PM
Router works, but can't ping it! ar1 Linux - Networking 4 03-10-2005 04:42 PM


All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration