homepage Welcome to WebmasterWorld Guest from 54.205.144.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
My First Linux Computer - But Network Problems
Keeps dropping local network, internet fine.
PCInk




msg:4513709
 10:26 am on Oct 30, 2012 (gmt 0)

So I have bought my first Linux computer. No Windows on it at all!

I am trying to use it as a local server. Apache is installed and some folders shared.

It works perfectly fine for somewhere between an hour and four hours but then it just stops responding.

Here is information so far:
*) Resetting the router (and only the router) will correct the problem
*) Resetting the Linux computer (and only this computer) will correct the problem
*) The Linux computer (and all others) can still connect to the internet. Apache still works on the Linux machine (localhost works fine).
*) I can't get to the computer via it's name or it's IP address
*) I've given the computer a fixed IP address but no change
*) There is no anti-virus or firewall on the Linux machine, unless Ubuntu 12.10 comes with one as standard.

This makes me think that the problem is the Linux computer. Resetting it makes it work. The router is fine with any other computers talking to each other - it is just the Linux machine stops responding.

Why would it drop the local network but not the internet connection through the same router?

How can I find out why it has stopped working?

So far, I have managed to fix every problem by searching on the internet but not this one.

 

phranque




msg:4513718
 10:47 am on Oct 30, 2012 (gmt 0)

i would try all the usual command line network debug tools and look for clues there:
ping
ifconfig
netstat -i
netstat -an
traceroute
...

(you may have to specify the paths for some of these and in some flavors of *nix the command line options may differ)

PCInk




msg:4513760
 1:22 pm on Oct 30, 2012 (gmt 0)

Thanks. I have tried some of them but don't fully understand them. Mainly because networks have not been anything I have really been involved in.

From the Linux computer, I have tried traceroute to both it's own IP address (192.168...) and a Windows computer as well.

It gives me one line on it's own IP address as if it has succeeded but when trying to traceroute the Windows IP it gives a list of stars which I guess must mean failures.

Ping works on both of them successfully!

Is this any clue as to what may be wrong?

wheel




msg:4513765
 1:43 pm on Oct 30, 2012 (gmt 0)

It's unclear what you mean when you say the linux box 'stops responding'. The linux box is live and running,you can access the internet, but you can't access apache on it from another computer? Is that correct? Something doesn't seem right, that you can access the internet but not apache, and resetting the router gives you access to apache again.

if that's the case, then first thing is open a browser on the linux box and a different windows computer, and surf to the ip address of the linux box, i.e. [198.168.nnn.nnn....]

If it doesn't respond on either machine, probably something goofy with apache.

if it works on the linux box and not the windows machine, then apache is running fine but there's something stopping things from the linux box forward. That could be the router, could be your cable, could be networking, could be a firewall.

I'd start with the firewall on the linux box. if it's an off the shelf linux firewall it probably has a gui for the firewall. Figure out how to look at that. Open everything. that's not as insecure as it sounds.

if the firewall is fine, next step is to look at networking. Not sure what could be going wrong, but from the windows box, try to ping the linux box using the ip, and try a traceroute to the linux box i.e. ping 198.168.nnn.nnn (or whatever the windows equivalent is of ping and traceroute). And then on the linux box do a 'ifconfig'. Post the results of those three things. Again, it's really odd that you can get to the internet from the box, but you're suggesting it's basically off the local network.

the other potential culprit is the router. Not sure what would be causing it, but routers can do wonky things.

And another potential culprit is the dns, but not sure that makes sense given what you've said.

phranque




msg:4513799
 2:41 pm on Oct 30, 2012 (gmt 0)

the problem is occurring when using your window computer - correct?
if so, that's where you should be checking for connection problems.
open a dos command window on the windows computer and use tracert for the IP address of the linux computer.
also try ipconfig from a dos command window.

drhowarddrfine




msg:4513830
 3:26 pm on Oct 30, 2012 (gmt 0)

Your IP address is being renewed by the router through dhcp. That's why it's dropping every so many hours.

phranque




msg:4513831
 3:33 pm on Oct 30, 2012 (gmt 0)

if it is a DHCP problem the IP address of the affected connection will probably look like 169.254.x.x when using ipconfig.

wheel




msg:4513851
 4:08 pm on Oct 30, 2012 (gmt 0)

>>>Your IP address is being renewed by the router through dhcp. That's why it's dropping every so many hours.

That's my guess as well.

Is there a setting on the router or on a linux box on how often to renew the ip lease?

PCInk




msg:4513871
 5:43 pm on Oct 30, 2012 (gmt 0)

I have made some changes. Removed the wireless card and got a Cat5 cable between the router and linux box to minimise problems. Created a different fixed ip address for the wired connection. It's been running for about 5 hours and still going - the longest yet.

DHCP is renewing since the setting in the router is 3600 seconds. It is also telling me that the wired ip address is a fixed ip - the others have renewal times listed. It has been fine since the change to wired. I have just changed back to wireless again and it also reports fixed ip address in the router settings.

Why would DHCP renewal cause the problem? It is giving the same ip address to the same machine when renewing, even without a fixed ip. Why would this confuse the network?

wheel




msg:4513894
 6:58 pm on Oct 30, 2012 (gmt 0)

If I had to guess, you likely had something wonky between the wireless and the wired connection somehow. What probably solved the issue was removing the wireless card.

The only thing DHCP would have to do with that is if somehow when the IP was renewed that the machine changed the network connection from wired to wireless or the other way. In any event, 'why' doesn't matter as long as it's fixed.

PCInk




msg:4514131
 1:17 pm on Oct 31, 2012 (gmt 0)

Thanks for all your help, I think I may have figured it out using your ping/tracert/traceroute suggestions and by asking me to log into the router settings (which I hadn't done).

Firstly, I used the wired connection but it kept dropping so it switched to wireless but had the same issue. Assuming it can't be the network card or router, I tried my phone to connect to the linux box but it wouldn't get any pages. It worked to the windows machine, so the router was still working.

Then, I changed to fixed ip addresses but kept using the wireless and it kept stopping.

Using ping commands and logging into the router answered the questions as to why.

The wireless usb stick must have a 'power-save' mode built into it, possibly intended for use with laptops. It actually switches off after some inactivity and switches back on when the computer it is connected to needs to request something from the network, staying 'alive' for a while afterwards. In its 'asleep' mode, it doesn't respond to incoming 'pings' but outgoing 'pings' work fine - since that 'awakens' it! I found this by logging into the router and looking at the ip addresses of the computers connected to it - the linux box was dropping off the list after a while.

So my first problem may have been DHCP since the wired didn't work. The problem with fixed ip addresses was the wireless product I was using. This would explain why it only worked with wired connection AND the fixed ip address combination.

Now I know the issue, it has never shown the problem with that USB stick because it has only been used on a couple of machines that always have Outlook running, picking up emails - thus keeping it from going 'asleep'.

Hopefully, this may help others who have a similar problem.

phranque




msg:4514140
 1:26 pm on Oct 31, 2012 (gmt 0)

nice work, PCInk!
i'm impressed - thanks for following up with the details.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved