SUMMARY: Setting up multiple routes across different nics

From: Ed Crotty (
Date: Thu Oct 12 2000 - 22:33:28 CDT

I had a couple of responses but David Schwarze really hit it on the head
for the answer i was looking for ...

Loosely quoted and translated for summary -

Yes, you need to leave the default route in /etc/defaultrouter and add
the additional routes via the startup script.

for instance :

route add -net <network> <network gw> <metric>
route add -net 1

Thanks to everyone else that replied as well!

Original Question

If you wanted to add a default route for say, hme0, you could simply say


 ip.ip.ip.ip (of the default gateway)

 reboot the machine and everything is happy...

 if i had a system with something like :


 what would be the proper way to set a default gateway for each

 would i use /etc/gateways?

 i would assume that as long as the gateway is on the same segment, it
 would appropriately push packets down the corresponding gateways

 so, in a nutshell, what is the proper way for declaring multiple
 gateways for multiple nics in the same machine?


U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:19 CDT