Subject: Re: question about ipf "fastroute"
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 02/13/2003 16:39:34
> I want to do source address based routing for some particular IPs.

I have a pseudo-interface driver that does exactly this:

[Truly-Delicious - root] 75> netstat -rn -f inet | egrep srt0
default             UGS         3   468844   1500  srt0         UH          1        0   1500  srt0

My default route points out an srt interface.  The interface is
configured as

[Truly-Delicious - root] 76> ifconfig srt0
srt0: flags=11<UP,POINTOPOINT> mtu 1500
	inet --> netmask 0xffffffff

[Truly-Delicious - root] 77> srtconfig srt0
0: /32 rl0
1: /32 ppp0

The srtconfig output indicates that packets whose source address is are sent out rl0 with next-hop address; those
whose source address is go out ppp0 with next-hop address  (This is actually outdated; the next-hop address for ppp0
should be different.  The only reason this works is that ppp0 ignores
the next-hop address.)  Packets with other source addresses are
silently dropped; that machine should not be sending packets with any
other source addresses down its default route.

> But, how do I do this with an ethernet?

Install sys/dev/pseudo/if_srt* from my patch tree? :)

This assumes it's IPv4.  I haven't yet taught it about IPv6.

/~\ 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