This article explains the spanning tree port cost on aggregated interfaces.
In general, aggregated Ethernet (AE) interface that contains 1GE physical interfaces have port cost 10000 (remember that port cost for 1GE interface is 20000). AE interface that contains 10GE physical interfaces have port cost 1000 (remember that port cost for 10GE interface is 2000). This means that on ELS (EX4600, QFX5100, EX4300) devices 802.1t standard is implemented. This standard suggests not to change Spanning Tree Protocol (STP) cost for AE interfaces when there is a change in the number of physical interfaces that belongs to this AE interface. This is to prevent topology change in that case. On Legacy devices, (EX4500, EX4200) STP port cost depends on the number of physical interfaces in AE bundle. For example, AE interface made of one 10G port has STP cost 2000, and AE made of four 10G ports has STP cost 500, and so on. TEST RESULTS on QFX5100, EX4600, and EX4300 devices (ELS): This behavior was tested with Junos 15.1R4.6
root@R2-R3# run show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ae8 128:11 128:13 32768.44f477b0f1c2 10000 FWD ROOT ae11 128:14 128:13 32768.ec13db825802 10000 BLK ALT {master:0}[edit] root@R2-R3# run show interfaces terse | match ae ge-0/0/1.0 up up aenet --> ae11.0 ge-0/0/3.0 up up aenet --> ae11.0 ge-0/0/93.0 up up aenet --> ae8.0 ge-0/0/95.0 up up aenet --> ae8.0 ae8 up up ae8.0 up up eth-switch ae11 up up ae11.0 up up eth-switch
When one of the child interface from ae8 is disabled, the path cost remains same.
root@R2-R3# set interfaces ge-0/0/95 disable {master:0}[edit] root@R2-R3# commit configuration check succeeds commit complete
root@R2-R3# run show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ae8 128:11 128:13 32768.44f477b0f1c2 10000 FWD ROOT <-- Cost did not change ae11 128:14 128:13 32768.ec13db825802 10000 BLK ALT root@R2-R3# run show spanning-tree interface detail Spanning tree interface parameters for instance 0 Interface name : ae8 Port identifier : 128.11 Designated port ID : 128.13 Port cost : 10000 Port state : Forwarding Designated bridge ID : 32768.44:f4:77:b0:f1:c2 Port role : Root Link type : Pt-Pt/NONEDGE Boundary port : NA Interface name : ae11 Port identifier : 128.14 Designated port ID : 128.13 Port cost : 10000 Port state : Blocking Designated bridge ID : 32768.ec:13:db:82:58:02 Port role : Alternate Link type : Pt-Pt/NONEDGE Boundary port : NA
TEST RESULTS on EX4200, EX4500, and EX2200 devices (Legacy): This behavior was tested with Junos 15.1R5.5
root@R2-R3# run show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ae0.0 128:1 128:2 32768.78fe3dd31501 10000 BLK ALT ae1.0 128:2 128:2 32768.001f12370941 10000 FWD ROOT {master:0}[edit] root@R2-R3# run show interfaces terse | match ae ge-0/0/0.0 up up aenet --> ae0.0 ge-0/0/1.0 up up aenet --> ae0.0 ge-0/0/2.0 up up aenet --> ae1.0 ge-0/0/3.0 up up aenet --> ae1.0 ae0 up up ae0.0 up up eth-switch ae1 up up ae1.0 up up eth-switch
When one of the child interface from ae1 is disabled, notice that the port cost for ae1 is changed.
root@R2-R3# set interfaces ge-0/0/2 disable {master:0}[edit] root@R2-R3# commit configuration check succeeds commit complete {master:0}[edit] root@R2-R3# run show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ae0.0 128:1 128:2 32768.78fe3dd31501 10000 BLK ALT ae1.0 128:2 128:2 32768.001f12370941 20000 FWD ROOT <-- Cost got changed {master:0}[edit] root@R2-R3# run show interfaces terse ge-0/0/2 Interface Admin Link Proto Local Remote ge-0/0/2 down down ge-0/0/2.0 up down aenet --> ae1.0 root@R2-R3# run show spanning-tree interface detail Spanning tree interface parameters for instance 0 Interface name : ae0.0 Port identifier : 128.1 Designated port ID : 128.2 Port cost : 10000 Port state : Blocking Designated bridge ID : 32768.78:fe:3d:d3:15:01 Port role : Alternate Link type : Pt-Pt/NONEDGE Boundary port : NA Edge delay while expiry count : 1 Rcvd info while expiry count : 0 Interface name : ae1.0 Port identifier : 128.2 Designated port ID : 128.2 Port cost : 20000 Port state : Forwarding Designated bridge ID : 32768.00:1f:12:37:09:41 Port role : Root Link type : Pt-Pt/NONEDGE Boundary port : NA Edge delay while expiry count : 0 Rcvd info while expiry count : 0