[Techtalk] interfacing ppp0 with eth0 ?
Meredydd
meredydd at everybuddy.com
Thu Jan 1 23:04:46 EST 2004
Hey there,
On Friday 02 January 2004 21:18, mic wrote:
> #lan
> auto eth1
> iface eth1 inet static
> address 10.0.0.1
> netmask 255.0.0.0
> gateway 10.0.0.1
It looks like this last line is your problem - you've set your gateway
(default route) as yourself. This doesn't *do* anything, but it means
that you already have a default route specified, which can get in the
way later.
> -su-2.05b# ping x.x.x.x
> PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
> From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
> [snip]
This is further confirmation - see, the Destination Host Unreachable
error is coming *from* yourself. An error like that normally comes from
a router.
> Jan 2 13:17:53 feral pppd[832]: not replacing default route to eth1
> [10.0.0.1]
And here we are: when your PPP connection initialises, it thinks you've
already got a default route (gateway), so it *doesn't* make you use
your ISP's gateway, which is the one you want to use if you want to get
anywhere.
As a final confirmation, you might want to try the command "route -n".
This shows your routing table, which the kernel uses to determine how
to get a packet somewhere. I'm on a LAN, so mine looks like this:
root at rhodium:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
lo
0.0.0.0 10.0.0.1 0.0.0.0 UG 1 0 0
eth0
Look at the lines with numbers on (sorry, they've been word-wrapped, I
know - you can still see what the lines are supposed to be). The first
line (starting "10.0.0.0") tells the kernel that to get to 10.x.x.x
(the home LAN), it should use interface eth0 (my network card). The
next ("127.0.0.0") tells it that to get to 127.x.x.x (loopback
addresses, the most commonly used of which is 127.0.0.1, aka
"localhost"), it should use interface "lo" (the loopback interface),
and the third - the important one, "0.0.0.0" - tells it that to get
*anywhere* (x.x.x.x), it should use 10.0.0.1 - our family router - as a
gateway, and send that data through eth0.
What I'm guessing is that the default route line (the one which starts
0.0.0.0) on your system will have your own IP address (10.0.0.1) on it,
and the interface "eth0", rather than the IP address of your ISP's
gateway, and the interface "ppp0".
Hope that helps a little bit. (One thing I'm actually considering, after
my UNIX Filesystem course finishes, which isn't too far away, is to run
something similar on networking - not to duplicate Hamster's
getting-started course, but on a more technical, "how does it *work*?",
and quite possibly "how do I program with it?" level).
Anyway, back to your specific case: Remove that "gateway" line, and I
think you should be OK. Yell if it doesn't :^)
Meredydd
More information about the Techtalk
mailing list