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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

A few weeks ago, my Ubuntu machine (Hardy Heron) suddenly stopped connecting to the internet. I usually run it headless, and it was still fine connecting to other machines on my LAN (in either direction), but I can't ping out or run any other 'net stuff. I even tried pinging by IP address instead of name.

I did notice that my eth0 (I only have one NIC in the machine) had mysteriously changed to eth1, but I fixed the /etc/networking/interfaces file and the udev rules and now it's back to eth0. Still gets LAN but no internet. I've done ifup/ifdown a few times, even restarted more than once.

I could always try another NIC, but I thought I'd see if anyone had any hardware suggestions first.

Anyone run into this before? Have any suggestions, or links to suggestions, or ideas what to Google for?

If you can connect via LAN, this suggests that the network connection its self is OK. The network interface its self doesn't know or care where the packets came from.

I'm thinking that there could be a firewall issue (packets from your router are getting discarded) or a routing issue (your Ubuntu box doesn't know where to send packets to reach the outside world).

Since you didn't say anything about changing any firewall rules, let's start with the routing issues.

give the output from '/sbin/ifconfig' and '/sbin/route'

There's also the outside possibility that you're not connecting to the network that you think you are, e.g. you have an ad-hoc wireless connection between some box on your lan and the ubuntu box, and even though you think you're connected via cat5 between Ubuntu and router, you're not (extremely unlikely that you'd do that by accident, but it's a logical possibility).

Is there a problem with "router", maybe? Should that have an IP? IIRC, router is in my hosts file. How about that 192.168.0.0 on the first line?

thanks all,

Yeah, I'll need to see the line in your hosts file where router is specified. Assuming that router is, say, 192.168.0.1, I think that part of the the routing table is OK.

"192.168.0.0" means "The whole 192.168.0.x subnet".

I believe that the problem is in the second line:

Code:

link-local * 255.255.0.0 U 1000 0 0 eth0

Here's a post on another mailing list which discusses link-local addresses:

Quote:

Link-local is a method of automatically obtaining an IP address for peer computers, without using dhcp. It's currently available on Windows and
Macs. There is a specific address range reserved for this. One
condition of using these addresses, is that they're not to be routed to
the internet, which gives me concern about the lines included in the
quote above. Assuming you're connected with a "real" IP, you've got
both that address and the link-local, on the same NIC.

My understanding, is that Linux isn't quite there yet, regarding using
link-local.

If you've ever plugged a Windows box into a network where DHCP isn't working, and gotten a '169.x.x.x' IP address, that IP address is the link-local address for that interface. This means that if you were to hook a crossover cable between two Windows boxes, they should be able to talk to each other, without needing to set anything else up... but this probably isn't the right thing to have sitting in your routing table.

I thnk that

Code:

/sbin/route del link-local

should take care of this.

Caveat: I haven't ever played with the routes on my own linux boxen (never had to). Might want to get a second opinion on this before you go changing routing tables. To paraphriase JRR Tolkein: "Do not meddle in the affairs of routing-tables, for they are subtle and quick to deny network access".

If so, that's a problem. Is your router doing any sort of packet filtering? And/or do you have it set up to only allow traffic from e.g. certain MAC addresses? (That is not uncommon for wireless networks.)

If so, that's a problem. Is your router doing any sort of packet filtering? And/or do you have it set up to only allow traffic from e.g. certain MAC addresses? (That is not uncommon for wireless networks.)

I think you are my hero! This does not make sense to me, but I had my router (a D-Link DI-624) set to give my Linux box a static IP. I shut that off, and bang! I'm online again.

I was experiencing the same symptoms on a Raspberry Pi 2 running Ubuntu Mate. This thread led me to the solution. Since my situation was slightly different, I am adding this comment which might help someone else googling for the same symptom.

Mine was a different problem in the area of ARP binding on my router, but I saw it because I was looking there. The RPi's MAC address was not being mentioned, but some other device was bound twice to 2 different IP addresses. I suspect one of those was the one that had been assigned the RPi. I deleted both fixed IP bindings and the RPi could see the WAN again.

So what? I came across the thread because I googled "ubuntu lan no wan". Even today, others with the same problem may also wind up here. Their reason for the failure may be more similar to mine than that of the OP. Thus my comment could possibly help such a person. I saw no point in starting a new thread for my own problem which I had already solved.