Supermicro Enterprise Advanced SONiC v4.5.0 — 4.2 Configuring Layer 2 Interfaces and VLAN

Enterprise Advanced SONiC: Layer 2 and Layer 3 Enablement 4.2 Configuring Layer 2 Interfaces and VLAN VLANs segment network traffic into isolated broadcast domains, enabling logical separation of workloads, tenants, or traffic types across shared physical infrastructure. An access port sends and receives untagged frames from connected devices. By default, no Layer 2 VLAN or Layer 3 IP is assigned to a port interface. Supermicro Enterprise Advanced SONiC supports standard 802.1Q VLAN tagging, allowing interfaces to operate as access ports for single-VLAN connectivity or trunk ports for carrying multiple VLANs between switches and endpoints.

l To assign an interface to an access VLAN, use the switchport access Vlan vlan-id command. Leaf1(conf-if-Eth1/1)# switchport access Vlan [vlan-id] l To remove an interface from the access VLAN, use the no switchport access Vlan command. 1. Configure an interface as an access port by associating the untagged VLAN with the interface. Leaf1(config)# interface Eth1/1 Leaf1(conf-if-Eth1/1)# switchport access Vlan 100 Leaf1(conf-if-Eth1/1)# end 2. Verify that the interface is now associated with the appropriate VLAN. Leaf1# show Vlan Q:

A - Access (Untagged), T - Tagged NUM Status Q Ports Autostate Dynamic 100 Active A Eth1/1 Enable No l A trunk port sends and receives tagged frames from multiple VLANs and untagged frames from the access VLAN. By default, no trunk VLANs are assigned to a port interface. You can remove VLAN IDs from the allowed VLANs, and later add VLAN IDs to the list to allow their traffic to pass on the trunk. l To configure the allowed VLAN traffic on a trunk interface, use the switchport trunk allowed Vlan command. Leaf1(conf-if-Eth1/3)# switchport trunk allowed Vlan {vlan- list | {add | remove | except} vlan-list | none | all} 28