So I've been playing with a FreeBSD virtual setup to test network functionality, and the routing is awesome, especially vlan subinterfaces.
Now I'm trying to make the FreeBSD machine behave as a network switch. One way to do that is to create a bridge and add all the ports to the bridge. This also trunks all VLANs as I discovered.
My two issues are:
The main reason I ask is that for a senior design project I am considering adding certain features to the FreeBSD network stack to be able to create logical switches and routers to which ports are assigned, and I'm trying to see if maybe some of the functionality I haven't figured out how to implement is already there, even if I'm unaware of it.
Thanks!
-gns
EDIT: IOW, for those who are familiar with switch configurations, I'm essentially asking if the following switch config is replicable using FreeBSD native network stack:
em0 - native vlan 4
em1 - trunk pvid vlan 4, trunk allowed vlan 40-90
em2 - trunk pvid vlan 1, trunk allowed vlan 40-90
Now I'm trying to make the FreeBSD machine behave as a network switch. One way to do that is to create a bridge and add all the ports to the bridge. This also trunks all VLANs as I discovered.
My two issues are:
- Figuring out how to only permit certain VLANs via a specific port (make a port only 'tagged' (or trunk allowed in Cisco-speak) on vlans 30-50, for example)
- Figuring out how to set a port to be 'native' (or 'untagged' in HP-speak) on a vlan. So, for example, if a packet came in without a vlan tag on em0, having FreeBSD tag that packet with vlan 5 before processing it, so it is as if the packet came in on em0.5.
The main reason I ask is that for a senior design project I am considering adding certain features to the FreeBSD network stack to be able to create logical switches and routers to which ports are assigned, and I'm trying to see if maybe some of the functionality I haven't figured out how to implement is already there, even if I'm unaware of it.
Thanks!
-gns
EDIT: IOW, for those who are familiar with switch configurations, I'm essentially asking if the following switch config is replicable using FreeBSD native network stack:
em0 - native vlan 4
em1 - trunk pvid vlan 4, trunk allowed vlan 40-90
em2 - trunk pvid vlan 1, trunk allowed vlan 40-90