[ale] Internet Connection

Joseph A Knapka jknapka at earthlink.net
Tue Mar 12 09:37:27 EST 2002


"ChangingLINKS.com" wrote:
> 
> What is a "default route" How can I fix the problem of "not having a default
> route?"

The route table tells your computer how to reach various
IP addresses. Basically, a route table entry says: "To
reach this (group of) IP address(es) X, send a message
to machine Y, which will then forward it to the proper
destination." The "default" route is the machine to which
all messages for otherwise-unknown destinations are sent.
Normally, that would be the machine that sits between your
ISP and your local network: your machine says,
"ah, here's a packet for mindspring.com. Do I know
how to reach mindspring.com? (Looks at route table, sees
no entry for mindspring.com). Nope. OK, I'll send it
to my default router, he'll figure out what to do with
it."

If you have a dialup connection, your default router
will be the machine you're dialed in to. If you have
DSL or cable, then your default router will either
be the machine at the upstream end of the cable (if
your machine is connected directly to the cable/DSL
connection); or, if you have a local-area-network set
up, the default route for every machine on your LAN
will be whatever machine (call it "myrouter") is
directly connected to the DSL/cable link, and
"myrouter's" default router will be the machine
at the upstream end of the cable/DSL link.

In Linux's "netstat" output, the default route is
the one with a "destination" of 0.0.0.0. You have
a default route, but it appears to be wrong.

2. [root at tb10 root]# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.123.254 0.0.0.0         255.255.255.255 UH       40 0          0
eth0
0.0.0.0         192.168.123.254 0.0.0.0         UG       40 0          0
eth0

Basically, these two route entries tell us that
your machine's IP address is set to 192.168.123.254,
and furthermore that 192.168.123.254 is your default
route. That can't possibly be right.

It appears from other information you've supplied
that your machine should be getting its IP address
from your ISP, but that apparently is not happening.
My guess is that sometime during the installfest,
someone changed your machine to have a static
IP address for some reason, and forgot to change
it back. I can't help you do that in the "correct"
way (it varies by Linux distribution), but you
might try this from the command line:

~ root: ifconfig eth0 down

and then one of the following:

~ root: dhcpcd eth0

or

~ root: dhclient eth0

Then try to ping something out in the world.

"dhclient" and "dhcpcd" are two programs that
acquire dynamic IP addresses; you ought to have
one or the other installed (unless you have
"pump" instead, another dynamic-configuration
client which I know nothing about, but
"pump eth0" might be worth a try in that case).
If you're running a RedHat-ish distro, there's
a magic network configuration GUI tool that
you can use to change the characteristics of
your Ethernet interface, but I can't remember
what it's called. In any case, you would
want to enable the "DHCP" option for eth0.

Cheers,

-- Joe
"I should like to close this book by sticking out any part of my neck
 which is not yet exposed, and making a few predictions about how the
 problem of quantum gravity will in the end be solved."
 --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list