Juniper JunOS VLAN & Layer 2 Switching
VLAN configuration with IRB (Integrated Routing and Bridging) interfaces, access/trunk switchports, and RSTP for Juniper EX series switches.
What is it?
Juniper EX switches use a different VLAN model than Cisco. VLANs are defined globally under 'set vlans' and referenced by name on interfaces. Layer 3 routing for a VLAN uses IRB (Integrated Routing and Bridging) interfaces — equivalent to Cisco SVI (interface vlan X). JunOS uses 'family ethernet-switching' on access/trunk ports instead of Cisco's 'switchport' commands. RSTP (Rapid Spanning Tree) is enabled by default on EX switches — edge ports (equivalent to portfast) are configured per-interface.
When to use
- ·Building L2 access layer with multiple VLANs on Juniper EX switches
- ·Inter-VLAN routing on EX series using IRB interfaces
- ·Replacing a Cisco Catalyst deployment with Juniper EX — same concepts, different syntax
When NOT to use
- ·QFX series in data center fabric mode — use VXLAN/EVPN instead of traditional VLANs for large-scale DC deployments
How it compares
Prerequisites
- →JunOS version that supports 'family ethernet-switching' — EX series running 15.1 or later recommended
- →VLAN IDs agreed across all switches before configuration
- →IRB interfaces needed for each VLAN that requires L3 gateway
Config Generator
Verification commands
show vlansShow all configured VLANs and their member interfaces
ExpectedLists VLANs with VLAN ID, member interfaces, and IRB interface if L3 is enabled
show interfaces irb.XVerify IRB interface is up and has the correct IP
ExpectedShows 'Physical link is Up', IP address, and MAC address
show spanning-tree interfaceVerify STP state on all interfaces
ExpectedAccess ports should show 'Edge' state. Uplinks should show 'Root' or 'Designated'.
Debug commands
show ethernet-switching tableShow MAC address table for all VLANs
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
CCNA 200-301 Official Cert Guide Library
Wendell Odom · Cisco Press · VLANs, trunk ports, DTP, VTP, inter-VLAN routing
CCNP Enterprise Core ENCOR 350-401 Official Cert Guide
Brad Edgeworth et al. · Cisco Press · Advanced switching — STP, RSTP, MST, PVST+