Re: Routing table question
"David H. Silber" <dhs@orbits.com> writes:
> > I'm reading "TCP/IP Administration" by O'Reily, and have a question on
> > the routing table on my Debian box. It's quite simple:
> >
> > Kernel IP routing table
> > Destination Gateway Genmask Flags MSS Window irtt Iface
> > 209.226.71.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> > 0.0.0.0 209.226.71.1 0.0.0.0 UG 0 0 0 eth1
> >
> > I have 2 nics in my computer. eth0 is connected to
> > another computer (local net), and has IP 192.168.1.2, and another one
> > is connected to the internet with DHCP.
> >
> > My question is: why is the local network bound to default gateway?
> > Shouldn't 192.168.1.0 be bound to 192.168.1.2?
>
> The default is for addresses whose routes are not specified by the
> routing table. Packets destined for any computer with an IP in the
> 192.168.1.0 network will be sent out eth0. Everything else will go
> out the (default) eth1.
David, thanks for your reply.
I still don't understand something. Doesn't the line:
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
mean "send everything addressed to IP's 192.168.1.* through default
gateway"? But this way the kernel will be sending communications for
192.168.1.1 through 209.226.71.1. So I must be wrong in translating
the line above...
--
Arcady Genkin
"... without money one gets nothing in this world, not even a certificate
of eternal blessedness in the other world..." (S. Kierkegaard)
Reply to: