6 Replies Latest reply: Apr 6, 2012 1:55 PM by Martin RSS

    How to elect a designated port ?


      1.jpghi,guys,I have a question about STP designated port,it is said that A port is designated if it can send the best BPDU on the segment to which it is connected. Could someone explain what dose best mean ?I know  cost is compared ,but how ?I  show you a topology,with it,which ports are designated ports ?And switch1 is root bridge,all links are gigaethernet ,cost is the same.Thank you.

        • 1. Re: How to elect a designated port ?



          I not sure whether you check this wiki site before ... but its giving a very clear view on how DP its elected.

          its help me last time while me myself also lost on this concept, hope now its help you as well.







          • 2. Re: How to elect a designated port ?

            Thank you ,buddy,it works,by the way,I saw backup port and alternate port,and confused,can you explain it ?

            • 3. Re: How to elect a designated port ?



              Refer to below link for backup port and Alternate port defination.

              keep in mind "backup port = using shared connection (HUB)" "Alternate port = using P2P connection (switch)"






              • 4. Re: How to elect a designated port ?



                The port is going to be elected if it has the lowest cost to the root bridge.  If all paths cost the same (gigethernet) then the tie will be broken by the switch with the lowest MAC address.  I.E. 1111.1111.11111 will win over 1111.1111.1112, this usually is the oldest switch between the two and may not be the one you want to win so you must manually change it.

                • 5. Re: How to elect a designated port ?

                  Thought I would add.

                  Most of the manuals and guides say that the DP will be the port that has the lowest cost to the root and if there are equal costs, then the lowest bridge id.


                  But they do not go onto how this is actually achieved.


                  All the switches blast BPDU's onto the segment every 2 seconds the BPDUs contain the accumulated root cost for the port.

                  So every port that recieves a superior BPDU on the segment will know that it is not the best and block. This will leave one switch that did not receive a superior BPDU in the forwarding state.


                  If you look at the BPDU frame format you will see that

                  Root path cost, bridge id, port id are all grouped together to make one giant 14 byte number (in order of significance). Which ever switch has the lowest binary value of this agregrate number is the winner and the DP. Each switch will block its port in response to a higher value that it has itsself.

                  • 6. Re: How to elect a designated port ?

                    Wendel Odom wrote in ICND2:


                    (3) Many switches can attach to the same Ethernet segment. The switch with the lowest administrative cost from itself to the root bridge, as compared with the other switches attached to the same segment, is placed in Forwarding State. The lowest-cost switch on each segment is called the designated bridge, and that bridge’s interface, attached to that segment, is called the designated port (DP).


                    Richard Deal wrote (CCNA, ch 14, Osborne, 2008):


                    The third step in running STP is to elect a designated port on a single switch for each segment in the network. The switch (and its port) that is chosen should have the best path to the root switch. Here are the steps taken by switches in determining which port on which switch will be chosen as the designated port for a particular LAN segment.

                    1. The connected switch on the segment with the lowest accumulated path cost to the root switch will be used.

                    2. If there is a tie in accumulated path costs between two switches, the switch with the lowest switch ID will be chosen.

                    3. If it happens that it is the same switch, but with two separate connections to the LAN segment, the switch port with the lowest priority is chosen.

                    4. If there is still a tie (the priorities of the ports on this switch are the same), the physically lowest numbered port on the switch is chosen.