Routing selectively

Charles Swiger cswiger at
Mon Nov 10 08:49:39 PST 2003

On Nov 10, 2003, at 11:13 AM, Dimitris Xochellis wrote:
> In my local network I have two routers that provide
> internet services.
> -Can I use them both simultaneously?


> -Do I need to have a second ethernet card (And add a
> second interface to rc.conf) in order to use them
> both?

No, but it might be easier to configure a sensible network topology 
using two cards.  Otherwise, you can configure a virtual interface 
("ifconfig rl0 alias YYY")...

> -Can I configure my FreeBSD box to use the first
> router when I am sending packets to a specific
> internet subnet and the second otherwise?


> -Any relative Docs or Examples please?

Normally, one has one "default route", which tells all non-local 
traffic to go via your preferred router.  You can add additional routes 
like so:

route add -net router1
route add -net router2

There are better ways of managing routing than this, including setting 
up BGP/EGP peering with your ISPs, or some other routing protocol 
(OSPF), but this should get you started....


More information about the freebsd-questions mailing list