STP question

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
Hi

I have a home lab with a couple of Cisco 2924 XL switches that I'm
practising Spanning tree on. I've made 2 connections from each switch
to the other to provide a redundant connection and see ST in action. On
the 2924_A switch, there are also connections to my laptop and a Cisco
PIX firewall, which are labelled.

Here is the output of sh spanning-tree from both switches (omitting
unused ports for clarity)

Switch: 2924_A:

Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 00d0.ba2f.ae00
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 32768, address 0002.fdf6.f380
  Root port is 23, cost of root path is 19
  Topology change flag not set, detected flag not set, changes 10
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0

Interface Fa0/1 (port 13) in Spanning tree 1 is FORWARDING
   Port path cost 100, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 00d0.ba2f.ae00
   Designated port is 13, path cost 19
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 5558, received 0

**link to Cisco PIX Firewall**

Interface Fa0/9 (port 22) in Spanning tree 1 is FORWARDING
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 00d0.ba2f.ae00
   Designated port is 22, path cost 19
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 5506, received 0

**link to laptop**

Interface Fa0/10 (port 23) in Spanning tree 1 is FORWARDING
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   Designated port is 13, path cost 0
   Timers: message age 2, forward delay 0, hold 0
   BPDU: sent 64, received 770

**link to 2924_B**

Interface Fa0/17 (port 31) in Spanning tree 1 is BLOCKING
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   Designated port is 22, path cost 0
   Timers: message age 1, forward delay 0, hold 0
   BPDU: sent 41, received 765

**link to 2924_B**


---------------------

Switch: 2924_B

Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 0002.fdf6.f380
  Configured hello time 2, max age 20, forward delay 15
  We are the root of the spanning tree
  Topology change flag not set, detected flag not set, changes 7
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0

Interface Fa0/1 (port 13) in Spanning tree 1 is FORWARDING
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   Designated port is 13, path cost 0
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 722, received 11

**link to 2924_A**

Interface Fa0/9 (port 22) in Spanning tree 1 is FORWARDING
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   Designated port is 22, path cost 0
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 769, received 1

**link to 2924_A**

-------------------

I can see that 2924_B has become the Root Bridge because it has the
lower MAC address.

On the 2924_A switch, there are two connections to the root bridge,
fa0/10 and fa0/17. Based on the information above, it seems that fa0/10
has been placed in Forwarding because it has the lower Port ID.

I do have a couple of questions, however;

i) How is the Port path cost for an interface calculated? I know that
100Mbs is 19 and 10Mbs is 100, but what is actually measured? For
instance, for fa0/1 on the 2924_A switch, the port path cost is 100
[because the PIX inside interface is set to 10BaseT]. But is this
supposed to represent the cost from an extra imaginary cable on that
port to the root bridge?

ii) The interface number, e.g. fa0/10, and the port number (e.g. port
23), for some ports do not corelate. On fa0/10 on 2924_A, the interface
is fa0/10 but the port number is 23. Where is this port number from?

iii) All ports also have a 'Designated Port x, path cost y' in their
information. What does this represent?

Many thanks in advance.


Re: STP question

dilan.weerasinghe@gmail.com wrote:
Quoted text here. Click to load it

Can anyone help with this? Particularly question (iii)?


Re: STP question
On 28 Sep 2006 dilan.weerasinghe@gmail.com wrote:

Quoted text here. Click to load it
The old method for cost was 10**8/bandwidth; thus 10Mbps has the cost of
100 and 100Mbps has the cost of 10.  But now that higher bandwidths are
available (1 Gig & 10Gig), they use a sliding scale instead.  So 10Mbps
is 100, 100Mbps is 19...

Quoted text here. Click to load it
The port number is the ifindex for that port.  Think of it as a logical
port as oppose to the physical port like fa0/10 and so on.  SNMP uses
this ifindex.

Quoted text here. Click to load it
The path cost is the total cost to root bridge.  The Designated Port is
the port that can send the best BPDU on the segment to which it is
connected.

http://www.cisco.com/warp/public/473/146.html#roles

Doan



Re: STP question

Doan wrote:
Quoted text here. Click to load it

Thanks, makes sense, but I'm still not too sure about 3.

Looking at the switch that isn't the Root Bridge (2924_A), on the info
for each port, there is a designated port and path cost stated. For
clarity I've copied an example port info and highlighted what I'm
talking about in caps.

Interface Fa0/1 (port 13) in Spanning tree 1 is Forwarding
   Port path cost 100, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 00d0.ba2f.ae00
   DESIGNATED PORT IS 13, PATH COST 19
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 5558, received 0

For all ports (e.g. Port x) apart from those that are directly linked
to the Root Bridge by cable, the designated port is also Port x and the
path 19. E.g. For fa0/1 on 2924_A, the port ID is 13, the designated
port is 13, and the path cost is 19.

However, for the two ports on 2924_A that are directly connected to the
Root Bridge, the designated port is another port and the path cost is
0. E.g, for fa0/10 on 2924_A, the port ID is 23, but the designated
port is 13 and the path cost is 0, as below;

Interface Fa0/10 (port 23) in Spanning tree 1 is Forwarding
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   DESIGNATED PORT IS 13, PATH COST 0
   Timers: message age 2, forward delay 0, hold 0
   BPDU: sent 64, received 770

For fa0/17, it's different too.

Interface Fa0/17 (port 31) in Spanning tree 1 is Blocking
   Port path cost 19, Port priority 128
   Designated root has priority 32768, address 0002.fdf6.f380
   Designated bridge has priority 32768, address 0002.fdf6.f380
   DESIGNATED PORT IS 22, PATH COST 0
   Timers: message age 1, forward delay 0, hold 0
   BPDU: sent 41, received 765

Why is this? How is the designated port calculated and for these two
(directly connected) ports, why is the cost 0?

Fa0/1 is a trunk port (VLAN1 and 2), and all other ports in this
example are in VLAN1, if that makes a difference


Re: STP question
On 29 Sep 2006 dilan.weerasinghe@gmail.com wrote:

Quoted text here. Click to load it
This port is DESIGNATED because it is sending better BPDU than it's
neighbor (an endstation in this case).  Look at "BPDU: sent 5558, received
0".  The path cost is easy to compute since to get to the root switch
(2924B) it has to traverse the link between the two switches, which has
the port path cost of 19.

Quoted text here. Click to load it
Since the links are directly connected to the root switch, the cost is 0.
And since these port are connected to the root switch, they cannot be
Designated.  The DESIGNATED ports have to be on the other ends (the root
switch).  The DESIGNATED PORT IS 13 and DESIGNATED PORT IS 22 refer
to ifindex (port number) on the root switch.

Quoted text here. Click to load it

It doesn't matter unless you are running more than one STP instance.

Doan


Re: STP question

Doan wrote:
Quoted text here. Click to load it

Got it....thanks very much for the explanation...

Just one further question - if you are given STP information for a
port, is the designated port always the one that is sending better
BPDU's?


Re: STP question
On 30 Sep 2006 dilan.weerasinghe@gmail.com wrote:

Quoted text here. Click to load it

Yes.

Doan



Site Timeline