Layer 2 Switching at the Service Provider Edge
VLANs and trunking
Access ports carry a single untagged VLAN; trunk ports carry 802.1Q-tagged frames for every VLAN in their membership list. On Junos, interface-mode trunk with vlan members (explicit list or all) must agree on both ends of the link, and the native VLAN is the one sent untagged - the native VLAN ID must match on both sides.
Trap: a native VLAN mismatch does not down the link. It silently merges two different VLANs, producing duplicate MAC learning and unpredictable flooding. Likewise, an asymmetric trunk membership list blackholes traffic in one direction only.
Spanning tree
RSTP (802.1w) converges in sub-second time; MSTP (802.1s) maps groups of VLANs into instances inside a region whose name, revision and VLAN-to-instance mapping must match on every switch. Junos also supports VSTP for per-VLAN spanning tree. Root election uses lowest bridge priority (default 32768), then lowest MAC. Edge/access ports should be marked edge so they skip listening/learning, and protected with bpdu-block-on-edge, loop-protect or root-protect so a misbehaving customer device cannot hijack the root or create a loop.
Link aggregation
LAGs bundle links for capacity and resilience. LACP (802.3ad) uses active/passive modes; two passive sides never bundle, so at least one end must be active. Member links must share the same speed and duplex (link-speed), and the hashing method determines per-flow distribution - a single flow still uses one member.
Rule of thumb
Before troubleshooting a trunk, verify three things on both ends: interface mode, VLAN membership list, and native VLAN ID. Most "intermittent customer outage" tickets are one of these three.