On 2011-06-29, Matthew Dempsky <[email protected]> wrote:
> On Mon, Jun 20, 2011 at 12:58 PM, Russell Sutherland
><[email protected]> wrote:
>> Or is there an easier way to do this?
>
> Maybe one gif(4) tunnel and then three vlan(4)s on top of that?
You need to get the traffic into vlans somehow - I thought about
suggesting this but hadn't worked out how to do it, but thinking more
it might be possible with vether.
Referring to the original diagram:
> routerA routerB
> LAN1 fxp1 fxp1 LAN1
> \ /
> LAN2 fxp2--OpenBSD 1.2.3.4 --- WAN --- 4.3.2.1 OpenBSD fxp2 LAN2
> / fxp0 fxp0 \
> LAN3 fxp3 fxp3 LAN3
So you could have:
vether0: just configured "up" is probably enough
vlan{1,2,3}: vlandev vether0
bridge0: vether0<>gif0
bridge1: fxp1<>vlan1
bridge2: fxp2<>vlan2
bridge3: fxp3<>vlan3
gif0: tunnel between routerA<>routerB
If trying this, pay attention to MTUs and make sure that large
packets work in both directions.