Re: Routing problem
On Mon, 2006-02-13 at 13:43, jb701@uku.co.uk wrote:
> I cannot get my linux box to act as a router, I'm hoping someone can help.
>
> My setup is sarge on a machine with 2 NICs, 192.168.1.2 and 192.168.2.1.
>
> I attach 192.168.1.2 to another machine with 2 NICs [192.168.1.1 and
> 192.168.0.6]. This is a Win2K machine, and it routes connections from the
> linux box to other machines on the 192.168.0.0/24 network.
>
> I now want to attach another machine [192.168.2.2] to 192.168.2.1. This
> machine [192.168.2.2] can ping either NIC in the linux box, but it cannot
> contact machines beyond it.
Your network looks like this:
.------. .-----------. .-----------.
| A | | B | | C |
| .2.2 +---+ .2.1 .1.2 +---+ .1.1 .0.6 +--- .0.*
`------' `-----------' `-----------'
When you attempt to send a packet from .2.2 to .1.1, how does system A
know where to send it?
Assuming such a packet reaches .1.1, how does system C know where to
send the reply?
You may need some routes. Perhaps these will allow A and C to talk.
On A# route add default gw 192.168.2.1
On C# route add -net 192.168.2.0/24 gw 192.168.1.2
You have four or more hosts on three or more network segments. I'd
strongly recommend an introductory networking course or book. With
a firm understanding of the principles there's no limit to what you
can achieve.
--Mike Bird
Reply to: