Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
09-02-2005, 07:18 PM
|
#1
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Rep:
|
Cannot connect to Internet
I have not been able to find anything right on target on this. I run three Fedora Core 4 systems and two CentOS systems. Some of these are dual boot (XP and Linux). I have been running successfully all of them using static IP addresses. My router got some lightning in it and I bought a new router. The new one has the ability to do "lease forever" so I decided to go with dynamic IP addresses. The XP machines had no problem. The CentOS machines had no problem. But the Fedora Core 4 machines will not connect to the Internet. /sbin/ifconfig shows that all machines have a new IP address issued by the router. All /etc/hosts files have been modified to show the new IP addresses, and all Linux machines are set to use dynamic IP addressing. I am kind of out of ideas, and would appreciate any suggestions.
John
|
|
|
09-02-2005, 07:28 PM
|
#2
|
Member
Registered: Aug 2005
Location: Saint Paul, MN
Distribution: Kubuntu
Posts: 34
Rep:
|
Re: Cannot connect to Internet
Can you ping by number or not? It's important to separate TCP/IP connectivity problems and DNS problems.
route -n
What is the default gateway? Can you ping it?
cat /etc/resolv.conf
Are your DNS servers properly listed?
|
|
|
09-02-2005, 08:05 PM
|
#3
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
I can ping another machine on the LAN but cannot ping a machine outside the LAN (the message "network unreachable" appears).
/sbin/route -n gives exactly the same result on the CentOS Linux machine (which connects to the internet) and the Fedora Core 4 machine (which does not connect).
cat /etc/resolv.conf gives exactly the same result on both machines. In both cases it says:
search Belkin
nameserver 192.168.2.1
I can ping 192.168.2.1, which is the router, from either machine.
|
|
|
09-02-2005, 09:23 PM
|
#4
|
Member
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297
Rep:
|
Can you check what your router has received as its default gateway. Once you have that, try to ping it from the boxes that are and are not working.
Mike K.
|
|
|
09-02-2005, 10:22 PM
|
#5
|
Member
Registered: Aug 2005
Location: Saint Paul, MN
Distribution: Kubuntu
Posts: 34
Rep:
|
Quote:
Originally posted by moonmoth
I can ping another machine on the LAN but cannot ping a machine outside the LAN (the message "network unreachable" appears).
|
Usually when I see this kind of error on a host with static addressing it is due to an incorrect subnet mask.
Try an ifconfig eth0 and confirm that the subnet mask and broadcast address match your other boxes.
|
|
|
09-03-2005, 06:55 AM
|
#6
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
Quote:
Originally posted by mlomker
Usually when I see this kind of error on a host with static addressing it is due to an incorrect subnet mask.
Try an ifconfig eth0 and confirm that the subnet mask and broadcast address match your other boxes.
|
Well, this is dynamic addressing, not static addressing. ifconfig eth0 from two machines (one that can access the network and one that cannot access the network) show similar results.
|
|
|
09-03-2005, 07:02 AM
|
#7
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
Quote:
Originally posted by charon79m
Can you check what your router has received as its default gateway. Once you have that, try to ping it from the boxes that are and are not working.
Mike K.
|
From the boxes that are not working (all of the Fedora boxes) I just get "Network Unreachable" trying to ping beyond the router. All of the CentOS boxes can ping the Comcast server just fine. All boxes were working fine with static addressing (with the previous router) and I made the same changes to all of them. Here is what I did and maybe someone can see the error.
1. I edited eth0 to make it dynamic rather than static.
2. I did an ifconfig on each box to see what IP address had been assigned by the router (the lease period is set to forever) and changed the /etc/hosts file on each box to reflect the new IP addresses which had been dynamically assigned.
3. After that, I rebooted each machine (just to be safe) and when they came back up the CentOS boxes can access the internet through the router, but the CentOS boxes cannot -- they get "network unreachable" when I try to ping so it is not a DNS problem but a problem with getting beyond the router.
4. I tried starting up the DHCP server but that didn't make any difference.
|
|
|
09-03-2005, 07:43 AM
|
#8
|
Member
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297
Rep:
|
It sounds like the Fedora boxes are not getting the proper default gateway. Can you please post the results of route -n from both machines. Yes, I realize you said before they were ok, but I'd like to see them.
Worry not about the IP addresses listes, they are internal IPs so you're not exposing anything that could be used to attack your network.
Here is my output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
MrKnisely
|
|
|
09-03-2005, 08:13 AM
|
#9
|
Member
Registered: Aug 2005
Location: Saint Paul, MN
Distribution: Kubuntu
Posts: 34
Rep:
|
Quote:
Originally posted by moonmoth
Well, this is dynamic addressing, not static addressing. ifconfig eth0 from two machines (one that can access the network and one that cannot access the network) show similar results.
|
Posting the output of the following might help:
ifconfig eth0
route -n
Have you looked through your logs? I run Ubuntu and /var/log/daemon.log is where the dhcp client writes its status information.
If your boxes work as static but not through DHCP then one of the key items must be wrong--and the gateway and subnet mask are two of things that can keep you from getting outside of the local network.
That being said, I have a similar problem with my home network on wireless--everything looks fine but no traffic will pass. I manually run 'dhclient eth1' every 30 minutes or so and it'll work fine until the next time. The same interface works perfectly at the office and Windows clients work fine at home.
I'm going to have to replace it and might just switch to DSL while I'm at it. Moral of the story: try a different DHCP server if you can...there might be something funny about your router.
|
|
|
09-03-2005, 08:27 AM
|
#10
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
Well, the good news is that I now have it working. The bad news is that I don't know what I did. :-( I did several things, including checking cables, rebooting the router, rebooting the cable modem, going back to a static address for one system (and then back to dynamic again), burning incense, promising to be a better person, etc., etc. - - and something worked. But damned if I know what. I hate it when that happens because I won't know what to do next time! But that is the way it is. Thanks for the assistance, and I did get some good info.
Moon
|
|
|
09-03-2005, 09:43 AM
|
#11
|
Member
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297
Rep:
|
It sounded VERY MUCH to me like a default gateway issue.
You were able to ping everything on your own LAN, but nothing outside your LAN. This is exactly what the default gw is for... to tell your machine how to get out of the network.
I'd put money on that as the issue.
MrKnisely
|
|
|
09-03-2005, 09:55 AM
|
#12
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
You would probably win (if you found someone to take the bet -- not I, though). The other two Fedora machines still had the problem, but with a bit of help I fixed the situation by doing "/sbin/route add -net 0.0.0.0 gw 192.168.2.1 eth0"
|
|
|
09-03-2005, 09:38 PM
|
#13
|
Member
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297
Rep:
|
Yep! Default gateway... and the cash just comes rolling in.
It is interesting that they didn't get the proper gateway from the DHCP server. Is the DHCP server set to hand out the gateway address info?
MrKnisely
|
|
|
09-04-2005, 07:19 AM
|
#14
|
Member
Registered: Nov 2004
Location: Tallahassee, FL
Distribution: Fedora Core 15
Posts: 95
Original Poster
Rep:
|
I don't know. CentOS seems to handle it right and Fedora doesn't. At any rate, since each machine has now been assigned an IP address by the router, and since each machine will keep that address (because the lease period is forever) I just went to system settings -> network and changed everyone back to static, put in the IP addresses they had, the gateway address, the DNS addresses and everyone is happy now. :-)
|
|
|
09-04-2005, 08:58 AM
|
#15
|
Member
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297
Rep:
|
Well, that will work.
My next suggestion was to going to be to look at those files to see if your gateway had been eroniously hardcoded.
MrKnisely
|
|
|
All times are GMT -5. The time now is 10:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|