Subject: Re: trouble with multi-homed setup
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 01/28/2004 19:08:27
> [...pppoe0...pppoe1...]
> To make pppoe1 work I have to use some ipf magic, though:
>    pass out on pppoe0 to pppoe1 from <pppoe1's address> to any

> First, I have to "hardcode" the interface names and the address

> Then, if pppoe0 becomes unavailable traffic over pppoe1 stops as
> well.

> The intended use is for pppoe1 to serve DNS and later mail to the
> outside world while all my browsing and outbound traffic goes via
> pppoe0.

> I want to be able to continue serving DNS and mail even if pppoe0 is
> down.

This sort of thing is exactly what I created my srt pseudo-interface
for.  It selects the outgoing interface for a packet based on the
ip_src (as opposed to the ip_dst, the way normal routing does).

It is just as bad as the ipf solution when it comes to interface names
and addresses.

If I assume that

- pppoe0's address is, peer
- pppoe1's address is, peer
- you want outgoing traffic with no particular reason to choose one
  address over the other (HTTP, outgoing mail, etc) to use and
- you're not using 192.168/16 for anything

then I'd set this up with

srtconfig srt0 set 0 /32 pppoe1
srtconfig srt0 set 1 0 /0 pppoe0
ifconfig srt0 netmask up
route add default

That way your default route points out srt0.  When a packet is sent out
srt0, if the ip_src is, it is sent over pppoe1 with a next-hop
address of (the next-hop address may not matter for
point-to-point links, but it can't hurt); otherwise (0/0) it goes out
over pppoe0 to  If there's no other address handy to use as
the source address of the packet, it uses srt0's address,

I don't know how easy it would be to port the srt driver to something
relatively current.  My guess would be that it would be fairly easy for
someone who knows the current device<->kernel interface paradigms.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B