Provided by Colasoft Co., Ltd.

STP ( Spanning Tree Protocol )

Home > Protocols > STP Update: 2005-12-06 14:36:02    I have words to say about this protocol
On this page
SUMMARY
Protocol : Spanning Tree Protocol
Protocol suite : DECnet
Layer : Network Layer
Related protocols : IEEE 802.1D,
802.3,
802.1Q
DESCRIPTION
STP (Spanning Tree Protocol) a link management protocol that is part of the IEEE 802.1 standard for media access control bridges. Using the spanning tree algorithm, STP provides path redundancy while preventing undesirable loops in a network that are created by multiple active paths between stations. Loops occur when there are alternate routes between hosts. To establish path redundancy, STP creates a tree that spans all of the switches in an extended network, forcing redundant paths into a standby, or blocked, state. STP allows only one active path at a time between any two network devices (this prevents the loops) but establishes the redundant links as a backup if the initial link should fail.

STP is a bridge/switch protocol that uses the Spanning Tree Algorithm (STA) to avoid or eliminate loops on a layer 2 network. The STA enables a learning bridge or switch to dynamically work around loops in a network's topology. These loops are created by the network itself. If the devices that connect the network segments are all configured to forward, they will continuously forward frames into an endless network loop. Get enough loops going and a frame will not reach its destination.

Multiple active paths between stations cause loops in the network. If a loop exists in the network topology, the potential exists for duplication of messages. When loops occur, some switches see stations appear on both sides of the switch. This condition confuses the forwarding algorithm and allows duplicate frames to be forwarded.

To provide path redundancy, Spanning-Tree Protocol defines a tree that spans all switches in an extended network. Spanning-Tree Protocol forces certain redundant data paths into a standby (blocked) state. If one network segment in the Spanning-Tree Protocol becomes unreachable, or if Spanning-Tree Protocol costs change, the spanning-tree algorithm reconfigures the spanning-tree topology and reestablishes the link by activating the standby path.

Spanning-Tree Protocol operation is transparent to end stations, which are unaware whether they are connected to a single LAN segment or a switched LAN of multiple segments.


Protocol Structure

STP: Spanning Tree Protocol in IEEE 802.1DThe Bridge Protocol Data Units (BPDUs).
Protocol ID (2)Version (1)Type (1)Flags (1)Rood ID (8)Root Path (4)
Sender BID (8)Port ID (2)M-Age (2)Max Age (2)Hello (2)FD (2 Bytes)

  • Protocol ID - Always 0.

  • Version - Always 0.

  • Type - Determines which of the two BPDU formats this frame contains (Configuration BPDU or TCN BPDU).

  • Flags - Used to handle changes in the active topology and is covered in the next section on Topology Change Notifications.

  • Root BID - Contains the Bridge ID of the Root Bridge. After convergence, all Configuration BPDUs in the bridged network should contain the same value for this field (for a single VLAN). NetXRay breaks out the two BID subfields: Bridge Priority and bridge MAC address.

  • Root Path Cost - The cumulative cost of all links leading to the Root Bridge.

  • Sender BID - The BID of the bridge that created the current BPDU. This field is the same for all BPDUs sent by a single switch (for a single VLAN), but it differs between switches.

  • Port ID - Contains a unique value for every port. Port 1/1 contains the value 0x8001, whereas Port 1/2 contains 0x8002.

  • Message Age - Records the time since the Root Bridge originally generated the information that the current BPDU is derived from.

  • Max Age - Maximum time that a BPDU is saved. Also influences the bridge table aging timer during the Topology Change Notification process (discussed later).

  • Hello Time - Time between periodic Configuration BPDUs.

  • Forward Delay - The time spent in the Listening and Learning states. Also influences timers during the Topology Change Notification process (discussed later)



Spanning-Tree Protocol Port States
Propagation delays can occur when protocol information is passed through a switched LAN. As a result, topology changes can take place at different times and at different places in a switched network. When a switch port transitions directly from non-participation in the stable topology to the forwarding state, it can create temporary data loops. Ports must wait for new topology information to propagate through the switched LAN before starting to forward frames. They must also allow the frame lifetime to expire for frames that have been forwarded using the old topology.

The following figure illustrates how a port moves through the five states.



Each port on a switch using Spanning-Tree Protocol exists in one of the following five states:
  • Blocking State
    A port in the blocking state does not participate in frame forwarding. After initialization, a BPDU is sent to each port in the switch. A switch initially assumes it is the root until it exchanges BPDUs with other switches. This exchange establishes which switch in the network is really the root. If only one switch resides in the network, no exchange occurs, the forward delay timer expires, and the ports move to the listening state. A switch always enters the blocking state following switch initialization.

    A port in the blocking state performs as follows:

    • Discards frames received from the attached segment.

    • Discards frames switched from another port for forwarding.

    • Does not incorporate station location into its address database. (There is no learning at this point, so there is no address database update.)

    • Receives BPDUs and directs them to the system module.

    • Does not transmit BPDUs received from the system module.

    • Receives and responds to network management messages.


  • Listening State
    The listening state is the first transitional state a port enters after the blocking state, when Spanning-Tree Protocol determines that the port should participate in frame forwarding. Learning is disabled in the listening state.

    A port in the listening state performs as follows:

    • Discards frames received from the attached segment.

    • Discards frames switched from another port for forwarding.

    • Does not incorporate station location into its address database. (There is no learning at this point, so there is no address database update.)

    • Receives BPDUs and directs them to the system module.

    • Processes BPDUs received from the system module.

    • Receives and responds to network management messages.


  • Learning State
    A port in the learning state is preparing to participate in frame forwarding. This is the second transitional state through which a port moves in anticipation of frame forwarding. The port enters the learning state from the listening state through the operation of Spanning-Tree Protocol.

    A port in the learning state performs as follows:
    • Discards frames received from the attached segment.

    • Discards frames switched from another port for forwarding.

    • Incorporates station location into its address database.

    • Receives BPDUs and directs them to the system module.

    • Receives, processes, and transmits BPDUs received from the system module.

    • Receives and responds to network management messages.


  • Forwarding State
    A port in the forwarding state forwards frames. The port enters the forwarding state from the learning state through the operation of Spanning-Tree Protocol.

    A port in the forwarding state performs as follows:

    • Forwards frames received from the attached segment.

    • Forwards frames switched from another port for forwarding.

    • Incorporates station location information into its address database.

    • Receives BPDUs and directs them to the system module.

    • Processes BPDUs received from the system module.

    • Receives and responds to network management messages.


  • Disabled State
    A port in the disabled state does not participate in frame forwarding or the operation of Spanning-Tree Protocol. A port in the disabled state is virtually nonoperational.

    A disabled port performs as follows:

    • Discards frames received from the attached segment.

    • Discards frames switched from another port for forwarding.

    • Does not incorporate station location into its address database. (There is no learning, so there is no address database update.)

    • Receives BPDUs, but does not direct them to the system module.

    • Does not receive BPDUs for transmission from the system module.

    • Receives and responds to network management messages.


When the spanning-tree algorithm determines that a port should be placed in the forwarding state, the following occurs:
  • The port is put into the listening state while it waits for protocol information that suggests it should go to the blocking state.

  • The port waits for the expiration of a protocol timer that moves the port to the learning state.

  • In the learning state, the port continues to block frame forwarding as it learns station location information for the forwarding database.

  • The expiration of a protocol timer moves the port to the forwarding state, where both learning and forwarding are enabled.


Top of Page

EXAMPLES

Top of Page


PROTOCOL RELATIONS
Parent layer
Child layer
Ethernet 802.2
STP
Top of Page

GLOSSARY
Access
(v.)
*To use. For example, programs can access memory , which means they read data from or write data to main memory. A user can access files, directories, computers, or peripheral devices.
*More specifically, access often means to read data from or write data to a mass storage device. The time it takes to locate a single byte of information on a mass-storage device is called the access time.
*To visit a Web site.

(n.)
*The act of reading data from or writing data to a storage device.
*A privilege to use computer information in some manner. For example, a user might be granted read access to a file, meaning that the user can read the file but cannot modify or delete it. Most operating systems have several different types of access privileges that can be granted or denied to specific users or groups of users.
*When capitalized as Access, short for Microsoft Access.

Algorithm
Algorithm is a formula or set of steps for solving a particular problem. To be an algorithm, a set of rules must be unambiguous and have a clear stopping point. Algorithms can be expressed in any language, from natural languages like English or French to programming languages like FORTRAN.

We use algorithms every day. For example, a recipe for baking a cake is an algorithm. Most programs, with the exception of some artificial intelligence applications, consist of algorithms. Inventing elegant algorithms -- algorithms that are simple and require the fewest steps possible -- is one of the principal challenges in programming.

Data
* Distinct pieces of information, usually formatted in a special way. All software is divided into two general categories: data and programs. Programs are collections of instructions for manipulating data. Data can exist in a variety of forms -- as numbers or text on pieces of paper, as bits and bytes stored in electronic memory, or as facts stored in a person's mind. Strictly speaking, data is the plural of datum, a single piece of information. In practice, however, people use data as both the singular and plural form of the word.

* The term data is often used to distinguish binary machine-readable information from textual human-readable information. For example, some applications make a distinction between data files (files that contain binary data) and text files (files that contain ASCII data).

* In database management systems, data files are the files that store the database information, whereas other files, such as index files and data dictionaries, store administrative information, known as metadata.

Host
Host is a computer system that is accessed by a user working at a remote location. Typically, the term is used when there are two computer systems connected by modems and telephone lines. The system that contains the data is called the host, while the computer at which the user sits is called the remote terminal.

Host can refer to a computer that is connected to a TCP/IP network, including the Internet. Each host has a unique IP address.

Host can refer to provide the infrastructure for a computer service too. For example, there are many companies that host Web servers. This means that they provide the hardware, software, and communications lines required by the server, but the content on the server may be controlled by someone else.

IEEE 802.1
IEEE 802.1 is a working group of the IEEE. It is concerned with
*802 LAN/MAN architecture
*internetworking among 802 LANs, MANs and other wide area networks,
*802 Link Security,
*802 overall network management, and
*protocol layers above the MAC & LLC layers.

LAN
Local-area network (LAN) is a computer network that spans a relatively small area. Most LANs are confined to a single building or group of buildings. However, one LAN can be connected to other LANs over any distance via telephone lines and radio waves. A system of LANs connected in this way is called a wide-area network (WAN).

Most LANs connect workstations and personal computers. Each node (individual computer ) in a LAN has its own CPU with which it executes programs, but it also is able to access data and devices anywhere on the LAN. This means that many users can share expensive devices, such as laser printers, as well as data. Users can also use the LAN to communicate with each other, by sending e-mail or engaging in chat sessions.

Loop
Loop is a request that arrives at a proxy, is forwarded, and later arrives back at the same proxy. When it arrives the second time, its Request-URI is identical to the first time, and other header fields that affect proxy operation are unchanged, so that the proxy would make the same processing decision on the request it made the first time. Looped requests are errors, and the procedures for detecting them and handling them are described by the protocol.

Network
Network is a group of two or more computer systems linked together. There are many types of computer networks, including:
LANs (local-area networks), WANs (wide-area networks), CANs (campus-area networks), MANs (metropolitan-area networks) and HANs (home-area networks).

In addition to these types, the following characteristics are also used to categorize different types of networks: Topology, protocol and architecture.

Path
The route taken by the SCTP packets sent by one SCTP endpoint to a specific destination transport address of its peer SCTP endpoint. Sending to different destination transport addresses does not necessarily guarantee getting separate paths.

Port
Port is an interface on a computer to which you can connect a device. Personal computers have various types of ports. Internally, there are several ports for connecting disk drives, display screens, and keyboards. Externally, personal computers have ports for connecting modems, printers, mice, and other peripheral devices.

Almost all personal computers come with a serial RS-232C port or RS-422 port for connecting a modem or mouse and a parallel port for connecting a printer. On PCs, the parallel port is a Centronics interface that uses a 25-pin connector. SCSI (Small Computer System Interface) ports support higher transmission speeds than do conventional ports and enable you to attach up to seven devices to the same port.

STP
The Spanning Tree Protocol (STP) prevents the formation of logical looping in the network. It is implemented by the 802.1d MAC Bridge Management Protocol, to provide information on bridge topology.

Switch
In networks, switch is a device that filters and forwards packets between LAN segments. Switches operate at the data link layer (layer 2) and sometimes the network layer (layer 3) of the OSI Reference Model and therefore support any packet protocol.

Topology
The shape of a local-area network (LAN) or other communications system. Topologies are either physical or logical. There are four principal topologies used in LANs:
*Bus topology: All devices are connected to a central cable, called the bus or backbone. Bus networks are relatively inexpensive and easy to install for small networks. Ethernet systems use a bus topology.

*Ring topology : All devices are connected to one another in the shape of a closed loop, so that each device is connected directly to two other devices, one on either side of it. Ring topologies are relatively expensive and difficult to install, but they offer high bandwidth and can span large distances.

*Star topology: All devices are connected to a central hub. Star networks are relatively easy to install and manage, but bottlenecks can occur because all data must pass through the hub.

*Tree topology: A tree topology combines characteristics of linear bus and star topologies. It consists of groups of star-configured workstations connected to a linear bus backbone cable.

These topologies can also be mixed. For example, a bus-star network consists of a high-bandwidth bus, called the backbone, which connects a collections of slower-bandwidth star segments.

Tree structure
Tree structure is a type of data structure in which each element is attached to one or more elements directly beneath it. The connections between elements are called branches. Trees are often called inverted trees because they are normally drawn with the root at the top.

Top of Page

REFERENCES


Top of Page

OTHER PROTOCOLS OF TCP/IP SUITE
AARP   RRP   RTP Video   RTP Audio   RTP   COPS   Gopher   HSRP   ICP   MPLS   IEEE 802.2   CIP   FTP - Data   FTP - Ctrl   IMAPS   IP Fragment   LDAPS   PUP   MSSQL   RSH   SQL   POP3s   RTELNET   RSVP   STP   VLAN   MSN   H.323   MSRDP   HTTPS   WINS   LPD   GTP   ICMPv6   POP   TELNET   H.225   VRRP   PIM   RARP   SAP   OSPF   RLOGIN   SCTP   SIP   RTCP   PPPoE   Mobile IP   IMAP3   WhoIs   SLP   NCP   PPTP   MGCP   LDAP   L2TP   Kerberos   IPv6   GRE   Ethernet SNAP   AFP   CIFS   IEEE 802.3   Finger   NBDGM   NetBEUI   NBSSN   ESP   EIGRP   EGP   DHCP   CGMP   CDP   BOOTP   AH   NBNS   EthernetII   ICQ   PPP   ARP   RIP   IPX   IGRP   IGMP   SSH   RPC   NetBIOS   TFTP   SNMP   SNA   SMB   RADIUS   NTP   NNTP   UDP   TCP   BGP   DNS   SOCKS   IMAP   RTSP   NFS   ICMP   IP   FTP   Telnet   POP3   SMTP   HTTP  
Search RFCs:

Advanced Search
Search Glossary:
Exact search
Fuzzy search


All Protocols
Submit a Request

Recommend an Article

 Layer 7 Application Layer
  AFP
  BOOTP
  CIFS
  CIP
  COPS
  DHCP
  DNS
  Finger
  FTP
  FTP - Ctrl
  FTP - Data
  Gopher
  HSRP
  HTTP
  HTTPS
  ICP
  ICQ
  IMAP
  IMAP3
  IMAPS
  Kerberos
  LPD
  MGCP
  MSN
  MSRDP
  MSSQL
  NCP
  NFS
  NNTP
  NTP
  POP
  POP3
  POP3s
  RADIUS
  RLOGIN
  RRP
  RSH
  RTCP
  RTELNET
  RTP
  RTP Audio
  RTP Video
  RTSP
  SAP
  SIP
  SLP
  SMB
  SMTP
  SNA
  SNMP
  SOCKS
  SSH
  Telnet
  TELNET
  TFTP
  WhoIs
  WINS
 Layer 6 Presentation Layer
  NBNS
  NBSSN
  NCP
  NetBIOS
 Layer 5 Session Layer
  LDAP
  LDAPS
  NCP
  NetBEUI
  RPC
 Layer 4 Transport Layer
  H.225
  H.323
  NBDGM
  NetBEUI
  PUP
  SCTP
  TCP
  UDP
 Layer 3 Network Layer
  AARP
  AH
  BGP
  EGP
  EIGRP
  ESP
  GRE
  GTP
  ICMP
  ICMPv6
  IGMP
  IGRP
  IP
  IP Fragment
  IPv6
  IPX
  Mobile IP
  MPLS
  OSPF
  PIM
  PPPoE
  RIP
  RSVP
  STP
  VRRP
 Layer 2 Data Link Layer
  ARP
  CDP
  CGMP
  Ethernet SNAP
  EthernetII
  IEEE 802.2
  IEEE 802.3
  L2TP
  PPP
  PPTP
  RARP
  SQL
  VLAN
 Layer 1 Physical Layer
© 2006 - 2007 Colasoft Co., Ltd. All rights reserved.