How to – Spanning Tree Protocol (STP) between Cisco and Juniper Switches

This post is to list the compatible Spanning Tree Protocol (STP) configuration between Cisco Catalyst switches and Juniper EX/QFX switches. The honest opinion here is to use EtherChannel/Aggagated Ethernet (LACP) wherever you can to avoid layer 2 network loops.

Environment/Default Configuration

Cisco Catalyst switch uses its own Rapid-PVST (Per VLAN Spanning Tree) protocol by default

ICTFellaSW01#sh run | i span
spanning-tree mode rapid-pvst
spanning-tree extend system-id
 spanning-tree portfast

Juniper EX switch uses Rapid Spanning Tree Protocol (RSTP), which is the default of almost all other vendors except Cisco. However, Juniper does have the compatible STP protocol to work with Cisco: VSTP

ictfella@ICTFellaSW02# show protocols | display set | match stp 
set protocols rstp interface ge-0/0/1
set protocols rstp interface ge-0/0/2
set protocols rstp interface ge-0/0/3
set protocols rstp interface ge-0/0/4
set protocols rstp interface ge-0/0/5
set protocols rstp interface ge-0/0/6
set protocols rstp interface ge-0/0/7
set protocols rstp interface ge-0/0/8
set protocols rstp interface ge-0/0/9
set protocols rstp interface ge-0/0/10
set protocols rstp interface ge-0/0/11
set protocols rstp interface ge-0/0/12
set protocols rstp interface ge-0/0/13
set protocols rstp interface ge-0/0/14
set protocols rstp interface ge-0/0/15
set protocols rstp interface ge-0/0/16
set protocols rstp interface ge-0/0/17
set protocols rstp interface ge-0/0/18
set protocols rstp interface ge-0/0/19
set protocols rstp interface ge-0/0/20
set protocols rstp interface ge-0/0/21
set protocols rstp interface ge-0/0/22
set protocols rstp interface ge-0/0/23
set protocols rstp interface ge-0/2/0
set protocols rstp interface xe-0/2/0
set protocols rstp interface ge-0/2/1
set protocols rstp interface xe-0/2/1
set protocols rstp interface ge-0/2/2
set protocols rstp interface xe-0/2/2
set protocols rstp interface ge-0/2/3
set protocols rstp interface xe-0/2/3

Compatible/interoperable Config between Cisco and Juniper

Cisco side:

Priority setting is optional depending on where you place your root bridge, here we use 8192.

conf t

spanning-tree mode rapid-pvst
spanning-tree vlan 2,4 priority 8192

end
wr

Juniper side:

let’s assume ge-2/0/2 is connected to Cisco switch, here we enable both RSTP and VSTP on interface ge-2/0/2, the priority is lower here so this switch will act as root bridge on VLAN 2 and 4.

set protocols rstp interface ge-2/0/2
set protocols vstp interface ge-2/0/2

set protocols vstp vlan 2 bridge-priority 4k
set protocols vstp vlan 4 bridge-priority 4k

Check Spanning Tree:


show spanning-tree bridge (IOS)
show spanning-tree summary (IOS)
show spanning-tree interface vlan 2 (IOS)


show spanning-tree bridge (JUNOS)
show spanning-tree interface (JUNOS)

Useful link

https://kb.juniper.net/InfoCenter/index?page=content&id=KB18291

Leave a Comment

Your email address will not be published. Required fields are marked *