LinuxQuestions.org
Visit Jeremy's Blog.
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 07-09-2004, 07:03 AM   #1
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16
Lost connection to internet after a while, but able to ssh to gateway


Hi!

I'm having a strange problem with my network.

My network configuration is as follows:

I have machine working as gateway/firewall and dhcp server. I have my linux box and 2 others running winxp for the rest of the family.

This configuration has been working for months but the last few days. I keep losing connection to the internet in my linux box but the others are fine.

I'm able to ssh to my gateway and from there I can access the internet. But not from my computer. If I restart my network I get internet back to lose it again some time later. I'm not sure, but it seems to happen mostly when I'm not using the internet for a "long" period of time.

In an attempt to debug this problem, I ran

Code:
# tcpdump -i eth1
(eth1 being my internal network interface)

and I tried

Code:
# ping www.google.com
from my box. This icmp requests don't appear in the tcpdump so I looks like that packages originating from my box to the network aren't even reaching my gateway even thou I can ping my gateway and ssh to it.

Where can my problem be?
 
Old 07-09-2004, 04:28 PM   #2
MrMud
LQ Newbie
 
Registered: Apr 2004
Location: Portland, Oregon
Distribution: Slackware/Mandrake/Redhat
Posts: 21

Rep: Reputation: 15
Off the top of my head, I'd suspect networking issues on your box (heh, i know, not very helpful.)

Most likely, I suspect you pinged/sshed your gateway via IP, which works. But you pinged google by it's name, thus indicating that your DNS resolution wasn't working. I'd go down that path, and also on the box that is having troubles, verify that you still have an ip/valid gateway/valid DNS/etc. Could also be a nasty spyware that replaces your chosen DNS servers with their own.
 
Old 07-09-2004, 05:00 PM   #3
fataldata
Member
 
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101

Rep: Reputation: 15
Next time try pinging your ISP Gateway, then DNS. Also if you know the IP of say Yahoo or someone try typing that in your browser to bypass DNS, this will help eliminate DNS as part of the problem.

I'm not familiar w/ tcpdump but are your ICMP requests returned from your gateway?
 
Old 07-09-2004, 06:03 PM   #4
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Original Poster
Rep: Reputation: 16
Well, google was only an example. To be sure about hostname resolution, I pinged a computer at my university using it's ip address. It didn't work from my box but worked from my gateway. So this leaves hostname resolution out... or at least is not the only problem...


tcpdump prints (in a formated way) the headers of packets that go through a network interface.

So if I type tcpdump -i eth1 I'm telling it to dump the header of every packet coming or going through eth1. I used in on my gateway to listen eth1, my internal network card so I should be seeing icmp requests coming from my box and directed to an exterior IP address.

Those requests would then go out through eth0 but I woudn't see them because I was only dumping eth1. The responses would also come from eth0 and my gateway should send them to my box via eth1 and I should also see them.

When that strange problem happens, I don't see the requests reaching my gateway unless I'm pinging my gateway. When it happens again, I will also try pinging other IP address in my local network.

Runnig ifconfig I can see I still have the IP address I should have. How can I see if the gatewat address is set correctly? And if it isn't set correctly, why does it get unset
 
Old 07-09-2004, 06:24 PM   #5
MrMud
LQ Newbie
 
Registered: Apr 2004
Location: Portland, Oregon
Distribution: Slackware/Mandrake/Redhat
Posts: 21

Rep: Reputation: 15
route -n would tell you what your gateway is currently set to. I'd also recommend doing an arp -an on the afflicted computer so you can see the arp addressess. If you see <incomplete> where the ip of the router is, you are suffereing from a layer1 or layer2 problem.
 
Old 07-09-2004, 10:31 PM   #6
fataldata
Member
 
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101

Rep: Reputation: 15
Really wierd that the tcpdump doesn't show anything. Man you' ve got a tough one. I'll try to think of something else, but checking the GW can't hurt. Maybe try a traceroute?
As for your DHCP are there plenty of leases? If wireless, check to see someone hasen't snatched the last address.
Also maybe try a ping for a while and see if it happens when the machine is not on the internet but is actively pinging another machine on your network. If you start to have hardware problems it will be really hard to diagnose, and the ping will at least keep the NIC busy. If you have 2 NIC's try the other one just to see.
 
Old 07-11-2004, 04:38 PM   #7
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Original Poster
Rep: Reputation: 16
Well... 2 days passed and it didn't happen again!

Anyway, thanks for your help. I really learn with your comments and if it happens again, I have some more ideas to debug the problem.
 
  


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
ssh connection lost kpachopoulos Linux - General 2 11-05-2005 06:07 PM
Lost internet connection RonCum Linux - Networking 4 04-30-2005 07:53 PM
Combining 2/more ADSL/Internet connection into ONE gateway carboncopy Linux - Networking 1 01-29-2005 07:06 AM
Can't reconnect internet when connection has lost Mikessu *BSD 1 06-18-2004 06:37 PM
HELP!!! Internet connection LOST FNC Linux - Networking 9 07-12-2002 12:02 PM


All times are GMT -5. The time now is 03:30 AM.

Main Menu
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