[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Connecting Networks



Sure.  It is just a matter of getting the routing right.  If I
understand you correctly, you have something like this


            -----
            | L | 192.168.0.1 (eth1)
209.x.x.254 | i |
            | n | 192.168.1.1 (eth2)
            | u |
            | x |
            -----

If you do a 
route -n 
It should show the 209 network/nic as the default route.  This is where
any packet that doesn't have another destination gets sent.  Here's mine


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<dialup IP>     0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
192.168.1.0     0.0.0.0         255.255.255.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         <dialup IP>     0.0.0.0         UG    0      0        0 ppp1

Which shows that my dialup interface (modem) is my default route, while
eth0 is my 192.168.1.0 network.
You need to tell it which nic gets which packets like thus

route add -net 192.168.0.0 netmask 255.255.255.0 dev eth1
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth2
(I took these examples out of the man page for route.)

The netmask of 255.255.255.0 tells the routing code to consider the
first 3 octets as the network address, leaving the 4th octet for the
host itself.

If I understood you right, and typed this right and you get it
right...it should work great...

As Mr Lessard pointed out, the correct place to put static routes is

/etc/sysconfig/static-routes

I don't have an example of the syntax but after examining 
/etc/sysconfig/network-scripts/ifup-routes 
it looks like
eth1 -net 192.168.0.0 netmask 255.255.255.0
might be close.

YMMV :-)

------------------------------------------------------------------------
Jim Wildman, CISSP                                      jim rossberry com
614-404-1897                                     http://www.rossberry.com

On Fri, 19 Apr 2002, David Hansen Jr. wrote:

> Hey, is this even possible?  I've got 2 networks.  I've got a 206 and a 209.  
> Now, on the 209, I had more devices than IP's, so I had to use a linux box.  
> Now on the linux box, I've got 3 NIC's.  One is a real IP (209...254), one is 
> 192.168.0.1 and the other is 192.168.1.1.  Is it at all possible to be able 
> to connect to a device on the 192.168.0. network from the 206 network?  I've 
> got a 2000 machine on the 192.168.0 network that I would like to connect to 
> remotely.
> 
> Thanks,
> David





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]