[TriLUG] Networking question

Ryan Leathers ryan.leathers at globalknowledge.com
Fri Apr 2 09:47:04 EST 2004


Your default gateway will be in the same broadcast domain as your
preferred interface.  Add a static route for each private network you
want to reach making the gateway for these routes something in a
broadcast domain common to your private interface.  Since there will be
only one way to reach any destination no metric comes into play.

However, if you really want two ways to reach hosts then you need to
assign that affinity in your route statements and add the necessary
routes.

Consider this output from netstat:
I have eth1 reaching public networks, and eth0 reaching private
networks.  Note that if I had not added a route to 172.16.240.0 (route
add 172.16.240.0 gw 172.16.131.1) then the default gateway would have
been used for destination 172.16.240.X and traffic would have left eth1
failing to reach its destination. 

172.16.240.0  172.16.131.1  255.255.255.255 UGH   0 0  0 eth0
68.152.31.64  0.0.0.0       255.255.255.224 U     0 0  0 eth1
172.16.131.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       68.152.31.65  0.0.0.0         UG    0 0  0 eth1


 

On Fri, 2004-04-02 at 09:09, Stephen Hoffman wrote:
>     This is probably a simple question, but I have been unsuccessful in
> finding the solution.
> 
> History:
> One machine connected to two networks (with two network cards).  Both
> networks get to the internet, but one is connected directly to the
> internet on a T1, the other is NAT'd and shared on a seperate T1, but is
> dreadfully slow.
> 
> I want to ensure that I always default to eth0 for internet and only use
> eth1 for requests on the internal network.  I didn't think this would be
> any issue, but on occasion I notice that my request hops on the internal
> network for larger downloads at roughly 50K slower speeds.
> 
> I have been trying to set the metric on the interface to give preference
> to the faster card, but keep getting an error when I attempt to bring the
> card up passing the metric option.  I get the following:
>      SIOCSIFMETRIC: Operation not supported   (google's no help on this one)
> 
> Am I going about this the wrong way?  Is there a better way?  Would it be
> better to set the metric in the route table?  if so, how can I make it
> come up that way automatically?
> 
> Any help greatly appreciated!
> 
> Steve
-- 
Ryan Leathers <ryan.leathers at globalknowledge.com>
Global Knowledge




More information about the TriLUG mailing list