Netforge.ai Docs
Open the app →

Layer 2

Relevant for:Professional ServicesEnterprise / NetOps
Where to find itCanvasSelect a switchL2 tab

VLANs#

Define VLANs once per device (or push them from a bound template). Each VLAN can be marked for an SVI. Validation warns when a VLAN is allowed on a trunk but not defined on the far end.

Spanning tree#

Choose the mode (Rapid-PVST or MST) and the device's role. Marking a switch as root renders a low priority for every VLAN; edge-port defaults and BPDU Guard harden access ports.

Why
Explicitly pinning the STP root prevents the classic failure where a newly-installed access switch with a lower MAC silently becomes root and traffic hairpins through a closet. Validation checks that exactly one root is claimed per VLAN domain.

Port-channels#

Bundle interfaces with LACP (active/passive) or static mode, as Layer 2 (access/trunk) or Layer 3 (routed with its own IP). On Nexus pairs, marking a bundle as the peer-link makes the two switches a vPC domain, and dual-homed downstream bundles validate as vPCs.

Each bundle also takes the full set of interface options — MTU, speed, negotiation, load-interval, bandwidth, admin state, inbound/outbound ACLs (chosen from the ACLs defined in Features), and STP edge/PortFast on L2 access bundles. A device-wide load-balance method sets the EtherChannel hash (per-vendor: src-dst-ip renders source-dest-ip on NX-OS, and Arista folds single-field hashes into its nearest src-dst equivalent, with a note). Encapsulation is 802.1Q on every supported platform, so there is no encapsulation option.

vlan 10
 name USERS
vlan 20
 name VOICE
!
spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
!
interface Port-channel1
 switchport mode trunk
 switchport trunk allowed vlan 10,20

SVIs#

Give a VLAN a Layer-3 interface with an address, optional VRF, DHCP ip helper-addressentries, and first-hop redundancy (HSRP/VRRP) with an auto-assign helper that numbers groups and virtual IPs consistently across a distribution pair.