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

Re: 2 NIC, 2 Gateway



On 11 Oct 2002, 18:20:19, Crispin Wellington wrote:

> When you put gw: in your interfaces thats the *default* gateway. That
> is, the host to send it to if no route matches. Set it up something like
> this.
> 
> interface eth0:
> 210.182.232.22
> gw: 210.182.232.1
> 
> interface eth1:
> 192.168.0.12
> *no gateway*
> 
> then...
> 
> route add -net 10.1.14.0 netmask 255.255.255.0 gw 192.168.0.12 dev eth1

This is close to right.

Leave the "Internal" ethernet interface without a default gateway, and add
a route, but it should be:

route add -net 10.1.14.0 netmask 255.255.255.0 gw 192.168.0.1 

your machine (192.168.0.12) will know how to get to 192.168.0.1 since they
are on the same subnet.  The route add statement will make all traffic destined
to the 10.1.14 network go out through eth1 to 192.168.0.1.

Typically, in the "sandbox" between the corporate LANs/WAN, adn the Internet
Firewall, one uses one of the private subnets from a range that is DIFFERENT from the rest
of the LANs/WAN.  This way, your "box in the middle" can be 192.168.0.12,
and carry a static route to 10.0.0.0 netmask 255.0.0.0 and that is the ONLY
static route it needs.

The internal gateway that it uses is typically configured wtih OSPF or EIGRP,
and automagically gets all the internal routes via this routing protocol,
so it can default out to the internet firewall.  It will also advertise itself
as the gateway to the 192.168.0.0/24 LAN to all the other routers, so you
don't have to worry about static routes on individual systems to get back
to 192.168.0.12

madmac



> 
> That is "route all traffic that is destined for the 10.1.14.* network
> out interface eth1 to machine 192.168.0.12"
> 
> Change these numbers with your network details.
> 
> Make sure you have a route back to your external gateway from the other
> network, the default route will most likely suffice.
> 
> Kind Regards
> Crispin Wellington
> 
> 
> 
> 
> 


-- 
Doug MacFarlane
madmac@covad.net



Reply to: