Subject: Re: multihoming for SOHO lan
To: None <email@example.com>
From: Wolfgang Rupprecht <firstname.lastname@example.org>
Date: 03/24/1999 09:39:02
email@example.com (Paul Newhouse) writes:
> Wolfgang Rupprecht <firstname.lastname@example.org> wrote:
> > pass out log quick on de0 to de1:mygateway from 126.96.36.199/32 to any
> Wow! It would have taken me a long time to come up with that based on the
> manpage and the examples.
I must admit, it took me a while too. I had actually started hacking
my kernel and rtalloc() and friends to understand an optional source
address constraint, but that turned out to be real work. (and I've
developed an aversion to real work. ;-))
> If a match then don't check any more rules. So I should put this after
> any other de0 rules?
> pass out on de0
> This would be the cable modem port, where I really want it to go.
> to de1:mygateway
These two explanations are interchanged.
The "pass out on de0" breaks down to: "pass" and "out" "on de0".
pass: put this packet in the "good" bin. Mark for further "good"
out: only apply this rule to outgoing packets.
on de0: only apply this rule to packets going to "de0"
to de1:mygateway: re-route this packet to "mygateway" using
interface "de1". In effect force a particular interface/MAC-addr
selection without going through the routing table.
> This would be where it was going. The default route on de1 and the
> default routes gateway address? The man page says:
> "dup-to" interfacename[":" ipaddr]
> I take it the "dup-" isn't necessary or in this case is wrong? Is the man page
> not quite right?
Correct. You don't want to duplicate this. You want to rip it out of
the queue and hand-route it.
> from 188.8.131.52/32
> This is the DHCP assigned address for the cable modem port?
Apply this rule to a packet with this source address address.
> to any
> Meaning I'm responding to some arbitrary originator.
Apply this rule to a packet with "any" destination address.
> 184.108.40.206/29 +----------------+ +------+
> ---DSL connection---------|ne1 ex0|-----| W98 | 220.127.116.11/29
> | router/switch | +------+ 172.16.89.44/24
> | gateway |------others
> 0/32 | NetBSD box | +------+
> --cable connection--------|ne0 de1|-----|NetBSD| 18.104.22.168/29
> +----------------+ +------+ 172.16.89.46/24
This setup will work just fine. You'll need two hand-routing rules,
one for each of ne1 and ne0.
The dhcp on ne0 is an interesting twist. A simple sed/perl hack to
/etc/ipf.conf and an "ipf -F a -f /etc/ipf.conf" at new-lease time
should do the trick. The current dhclient has sported all sorts of
Wolfgang Rupprecht <email@example.com>
DGPS signals via the Internet http://www.wsrcc.com/wolfgang/gps/dgps-ip.html