Hi,

I'm wondering if it's possible to get OpenBSD to make the NIC ports act like a layer 2 switch?


I made a quick test in VirtualBox (unfortunately I don't have any bare bones systems free to test with) and tried the following:


create two systems, one called router , the other called client


create vlans: vlan1, vlan2, vlan3


create trunk interfaces on 3x virtual NIC's: trunk0 (em0), trunk1 (em1), trunk2 (em2)


I then added the vlans to trunk0 by setting the vlandev to trunk0 in the hostname.if files.


Of course a basic router-on-a-stick method like the above works fine but if I wanted the 3 vlans to also be on the trunk1 interface in a similar way to provisioning an L2 switch how would I go about it?


I attempted to bridge trunk0 and trunk1. The result I got was that dhcp worked and the client was able to get an IPv4 address, I also had multicast traffic working when dynamically sending the client routes through OpenOSPF, as in I could see OSPFv2-hello and OSPFv2-dd packets being sent to 224.0.0.5 .

What didn't work was ICMP packets were not being seen on the router systems NIC when I tried to use the ping command and in addition the OSPF routes would not propagate either.

If I changed the virtual configuration back to trunk0 then everything worked as expected. It may just be a limitation of Vbox....?


In the meantime I have been looking at the docs:

https://www.openbsd.org/papers/bsdcan2016-switchd.pdf

https://man.openbsd.org/switch


for the switch interface but is this really what I need here?


Has anyone tried and succeeded with this kind of config?


My main reason for wanting to use something like this is that I want to add a 10GbE NIC and switch into my production router platform while still keeping the same setup going to the 1GbE switch which is running in a 4-port LACP trunk.



Of course an alternate would be to link the 1GbE switch to the 10GbE switch and do things that way, but the above would be more practical from a cabling sense.



Has anyone got any ideas?


Thanks a lot!


Kaya



Reply via email to