tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: npf and source routing

>> Sounds like what srt is designed for.  (If srt has survived to the
>> version you're using, that is.)
> srt is still here.  But the documentation isn't very explicit on
> setup; how do you force outgoing packets to go through srt ?

The same way you get outgoing traffic to use any other interface.  I
typically do it by establishing a route out the srt interface,
something like

	ifconfig srt0
	route add default
	...srtconfig commands to set up srt0...

(I usually use srt0 for my default route.  Change the route add as

If I assume a setup like

	vlan0, upstream at
	vlan1, upstream at

with connections I initiate using the vlan0 address, then my first cut
would be something like

	...set up vlan0 and vlan1...
	ifconfig srt0
	route add default
	srtconfig srt0 set 0 vlan0
	srtconfig srt0 set 1 vlan1

The choice of as the srt0 address is because connections this
host initiates will, at least in my experience, use the primary address
of the interface the default route points out as their address, and I
assumed host-initiated connections should use the vlan0 address.

If vlan0 and/or vlan1 use(s) DHCP for addressing, I'd use the hooks
provided by dhclient-script to prevent DHCP from actually installing a
default route in the kernel.

I don't recall whether I ever made srt handle IPv6.

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

Home | Main Index | Thread Index | Old Index