pub enum PortMode {
Access {
vlan: u16,
},
Trunk {
allowed: VlanSet,
native: Option<u16>,
},
}Expand description
How a port treats VLAN tags on the way in and on the way out.
The default is PortMode::transparent: every VLAN passes and tags are
left exactly as they arrived, which is how the switch behaves before any
port is configured.
Variants§
Access
An edge port belonging to a single VLAN.
Frames arriving untagged are treated as belonging to vlan; a frame
tagged with vlan is also accepted, and any other tag is dropped as
misconfiguration. Frames leaving are always untagged, so the station
behind the port never sees 802.1Q at all.
Trunk
An uplink carrying several VLANs, tagged.
A frame arriving tagged is accepted if its VLAN is in allowed.
A frame arriving untagged belongs to native, if set, and is dropped
otherwise. On the way out, frames are tagged, except those on the
native VLAN which leave untagged.