Subject: Re: multihoming for SOHO lan
To: None <>
From: Wolfgang Rupprecht <>
List: current-users
Date: 03/24/1999 09:39:02 (Paul Newhouse) writes:
> Wolfgang Rupprecht <> wrote:
> >   pass out log quick on de0 to de1:mygateway from 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. ;-))
>    quick
> 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

> 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.

>        +----------------+     +------+
> ---DSL connection---------|ne1          ex0|-----| W98  |
>                           | router/switch  |     +------+
> 						  |   gateway      |------others
>         0/32              |  NetBSD box    |     +------+
> --cable connection--------|ne0          de1|-----|NetBSD|
>                           +----------------+     +------+

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
runtime hooks.

       Wolfgang Rupprecht <>
DGPS signals via the Internet