home *** CD-ROM | disk | FTP | other *** search
/ Sybex Virtual Trainer CCNP Switching / Sybex_Virtual_Trainer_CCNP_Switching.iso / ccnp2711 / media / content / 2711c04.xml < prev    next >
Encoding:
Text File  |  2001-03-28  |  47.0 KB  |  524 lines

  1. <CHAPTER ID="4"><TITLE>Layer 2 Switching and the Spanning Tree Protocol (STP)</TITLE>
  2.  
  3. <CHAPTEROBJECTIVEBLOCK><CHAPTEROBJECTIVETITLE>The CCNP exam objectives covered in this chapter include the following:</CHAPTEROBJECTIVETITLE>
  4. <CHAPTEROBJECTIVE>Layer 2 LAN switching</CHAPTEROBJECTIVE>
  5. <CHAPTEROBJECTIVE>The three distinct functions of layer 2 switching: address filtering, forward/filter decision, and loop avoidance</CHAPTEROBJECTIVE>
  6. <CHAPTEROBJECTIVE>The Spanning Tree Protocol</CHAPTEROBJECTIVE>
  7. <CHAPTEROBJECTIVE>Configuring the Spanning Tree Protocol</CHAPTEROBJECTIVE>
  8. <CHAPTEROBJECTIVE>Determining the root bridge</CHAPTEROBJECTIVE></CHAPTEROBJECTIVEBLOCK>
  9. <PARA><DROPCAP>I</DROPCAP>n this chapter, we'll explore the three distinct functions of layer 2 switching: address filtering, forward/filter decision, and loop avoidance. We will probe the issue of loop avoidance in depth and discuss how the Spanning Tree Protocol (STP) works to stop network loops from occurring on your layer 2 network. </PARA>
  10. <PARA>It is very important to have a clear understanding of the Spanning Tree Protocol. This chapter will continue the discussion of layer 2 switching started in <NOBR REF="1">Chapter 1</NOBR>. We'll discuss how network loops occur in a layer 2 network and then provide an introduction to STP, the different components of STP, and how to configure STP on layer 2 switched networks. By the end of this chapter, you will know how to use the STP to stop network loops, broadcast storms, and multiple frame copies. In <NOBR REF="5">Chapter 5</NOBR>, we'll continue discussing STP and provide the more complex and advanced configurations used with it. </PARA>
  11. <PARA>It is typical these days to create a network with redundant links. This provides consistent network availability when a network outage occurs on one link. However, loop avoidance is needed, and STP provides this function. It is possible to load-balance over the redundant links as well; we'll cover load-balancing in <NOBR REF="5">Chapter 5</NOBR>.</PARA>
  12.  
  13. <SECTION ID="4.1"><TITLE>Layer 2 LAN Switching</TITLE>
  14. <PARA><DROPCAP>Y</DROPCAP>ou can think of layer 2 switches as bridges with more ports. Remember from <NOBR REF="1">Chapter 1</NOBR> that <KEYTERM>layer 2 switching</KEYTERM> is hardware based, which means it uses the <KEYTERM>Media Access Control (MAC) address</KEYTERM> from the hosts' network interface cards (NICs) to filter the network. You should also remember how switches use <KEYTERM>Application-Specific Integrated Circuits (ASICs)</KEYTERM> to build and maintain filter tables. </PARA>
  15. <PARA>However, as shown in Table 4.1, there are some differences between bridges and switches that you should be aware of:</PARA>
  16. <LIST MARK="bullet">
  17. <LISTITEM><PARA>Bridges are considered software based, and switches are hardware based because they use an ASIC's chip to help make filtering decisions. </PARA></LISTITEM>
  18. <LISTITEM><PARA>Bridges can have only one spanning-tree instance per bridge, and switches can have many. (Spanning tree is covered later in this chapter.)</PARA></LISTITEM>
  19. <LISTITEM><PARA>Bridges can have only up to 16 ports, whereas a switch can have  hundreds. </PARA></LISTITEM>
  20. </LIST>
  21. <TABLE NUM="4.1" TABLEENTRYNUM="3">
  22. <TABLETITLE>Comparison of Bridges and Switches</TABLETITLE>
  23. <TABLEHEAD>
  24. <TABLEROW>
  25. <TABLEENTRY><PARA> </PARA></TABLEENTRY>
  26. <TABLEENTRY><PARA>Bridges</PARA></TABLEENTRY>
  27. <TABLEENTRY><PARA>Switches</PARA></TABLEENTRY>
  28. </TABLEROW>
  29. </TABLEHEAD>
  30. <TABLEBODY>
  31. <TABLEROW>
  32. <TABLEENTRY><PARA>Filtering</PARA></TABLEENTRY>
  33. <TABLEENTRY><PARA>Software based</PARA></TABLEENTRY>
  34. <TABLEENTRY><PARA>Hardware based</PARA></TABLEENTRY>
  35. </TABLEROW>
  36. <TABLEROW>
  37. <TABLEENTRY><PARA>Spanning tree numbers</PARA></TABLEENTRY>
  38. <TABLEENTRY><PARA>One spanning tree instance</PARA></TABLEENTRY>
  39. <TABLEENTRY><PARA>Many spanning tree instances</PARA></TABLEENTRY>
  40. </TABLEROW>
  41. <TABLEROW>
  42. <TABLEENTRY><PARA>Ports</PARA></TABLEENTRY>
  43. <TABLEENTRY><PARA>16 ports maximum</PARA></TABLEENTRY>
  44. <TABLEENTRY><PARA>Hundreds of ports available</PARA></TABLEENTRY>
  45. </TABLEROW>
  46. </TABLEBODY>
  47. </TABLE>
  48. <PARA>You probably won't go out and buy a bridge, but it's important to understand how bridges are designed and maintained because layer 2 switches function in a similar fashion.</PARA>
  49.  
  50. <SECTION ID="4.1.1" POS="1"><TITLE>Three Switch Functions at Layer 2</TITLE>
  51. <PARA>There are three distinct functions of layer 2 switching:</PARA>
  52. <RUNINBLOCK><RUNINHEAD>Address learning</RUNINHEAD>
  53. <RUNINPARA>Layer 2 switches and bridges remember the source hardware address of each frame received on an interface and enter it into a MAC database. </RUNINPARA></RUNINBLOCK>
  54. <RUNINBLOCK><RUNINHEAD>Forward/filter decision</RUNINHEAD>
  55. <RUNINPARA>When a frame is received on an interface, the switch looks at the destination hardware address and looks up the exit interface in the MAC database. </RUNINPARA></RUNINBLOCK>
  56. <RUNINBLOCK><RUNINHEAD>Loop avoidance</RUNINHEAD>
  57. <RUNINPARA>If multiple connections between switches are created for redundancy, network loops can occur. STP is used to stop network loops and allow redundancy. </RUNINPARA></RUNINBLOCK>
  58. <PARA>These functions of the layer 2 switch-address learning, forward and filtering decisions, and loop avoidance-are discussed in detail in the following sections.</PARA>
  59.  
  60. <SECTION ID="4.1.1.1"><TITLE>Address Learning</TITLE>
  61. <!-- <PARA>The layer 2 switch is responsible for address learning. When a switch is powered on, the MAC filtering table is empty. When a device transmits and a frame is received on an interface, the switch takes the source address and places it in the MAC filter table. It remembers what interface the device is located on. The switch has no choice but to flood the network with this frame because it has no idea where the destination device is located.</PARA>
  62. <PARA>If a device answers and sends a frame back, then the switch will take the source address from that frame, place the MAC address in the database, and associate this address with the interface on which the frame was received. Because the switch now has two MAC addresses in the filtering table, the devices can now make a point-to-point connection and the frames will be forwarded only between the two devices. This is what makes layer 2 switches better than hubs. In a hub network, all frames are forwarded out all ports every time. </PARA>
  63. <PARA>Figure 4.1 shows the procedures for building a MAC database. </PARA> -->
  64. <SLUG NUM="4.1">Figure 4.1: How switches learn hosts' locations            [f0401.eps]</SLUG>
  65. <!-- <PARA>In the figure, there are four hosts attached to a switch. The switch has nothing in the MAC address table when it is powered on. The figure shows the switch's MAC filter table after each device has communicated with the switch. The following steps show how the table is propagated: </PARA>
  66. <LIST MARK="number">
  67. <LISTITEM><PARA>Station 1 sends a frame to station 3. Station 1 has a MAC address of 0000.8c01.1111. Station 3 has a MAC address of 0000.8c01.2222. </PARA></LISTITEM>
  68. <LISTITEM><PARA>The switch receives the frame on Ethernet interface 0/0 and places the source address in the MAC address table. </PARA></LISTITEM>
  69. <LISTITEM><PARA>Because the destination address is not in the MAC database, the frame is forwarded out all interfaces. </PARA></LISTITEM>
  70. <LISTITEM><PARA>Station 3 receives the frame and responds to station 1. The switch receives this frame on interface E0/2 and places the source hardware address in the MAC database. </PARA></LISTITEM>
  71. <LISTITEM><PARA>Station 1 and station 3 can now make a point-to-point connection and only the two devices will receive the frames. Stations 2 and 4 will not see the frames. </PARA></LISTITEM>
  72. </LIST>
  73. <PARA>If the two devices do not communicate with the switch again within a certain time limit, the switch will flush the entries from the database to keep the database as current as possible. </PARA> -->
  74. </SECTION>
  75.  
  76. <SECTION ID="4.1.1.2"><TITLE>Forward/Filter Decision</TITLE>
  77. <PARA>The layer 2 switch also uses the MAC filter table to both forward and filter frames received on the switch. When a frame arrives at a switch interface, the destination hardware address is compared to the forward/filter MAC database. If the destination hardware address is known and listed in the database, the frame is sent out only on the correct exit interface. The switch does not transmit the frame out of any interface except for the destination interface. This preserves bandwidth on the other network segments. This is called frame filtering. </PARA>
  78. <PARA>If the destination hardware address is not listed in the MAC database, the frame is broadcasted out all active interfaces except the interface on which the frame was received. If a device answers the broadcast, the MAC database is updated with the device location (interface). </PARA>
  79.  
  80. <SECTION ID="4.1.1.2.1"><TITLE>Broadcast and Multicast Frames</TITLE>
  81. <PARA>Remember that layer 2 switches forward all <KEYTERM>broadcasts</KEYTERM> by default. The forwarding/filtering decision is not used in a broadcast situation because broadcast and multicast frames do not have a destination hardware address specified. The source address will always be the hardware address of the device transmitting the frame, and the destination address either will be all 1s (broadcast), or it will be a combination of the network or subnet address specified and all 1s for the host address (multicast). For example, a broadcast and multicast in binary would be as shown in Table 4.2.</PARA>
  82. <TABLE NUM="4.2" TABLEENTRYNUM="3">
  83. <TABLETITLE>Broadcast and Multicast Example</TABLETITLE>
  84. <TABLEHEAD>
  85. <TABLEROW>
  86. <TABLEENTRY><PARA> </PARA></TABLEENTRY>
  87. <TABLEENTRY><PARA>Binary</PARA></TABLEENTRY>
  88. <TABLEENTRY><PARA>Decimal</PARA></TABLEENTRY>
  89. </TABLEROW>
  90. </TABLEHEAD>
  91. <TABLEBODY>
  92. <TABLEROW>
  93. <TABLEENTRY><PARA>Broadcast</PARA></TABLEENTRY>
  94. <TABLEENTRY><PARA>11111111.11111111.11111111.11111111</PARA></TABLEENTRY>
  95. <TABLEENTRY><PARA>255.255.255.255</PARA></TABLEENTRY>
  96. </TABLEROW>
  97. <TABLEROW>
  98. <TABLEENTRY><PARA>Multicast</PARA></TABLEENTRY>
  99. <TABLEENTRY><PARA>10101100.00010000.11111111.11111111</PARA></TABLEENTRY>
  100. <TABLEENTRY><PARA>172.16.255.255</PARA></TABLEENTRY>
  101. </TABLEROW>
  102. </TABLEBODY>
  103. </TABLE>
  104. <NOTE>Even though we have given you an example of a multicast address, the term <EMPHASIS FORMAT="italic">multicast</EMPHASIS> is most commonly used with regard to multicasting groups using the class D IP address space.</NOTE>
  105. <PARA>Notice that the broadcast is all 1s and the multicast is not. They are both a type of broadcast, except that multicasts send the frame to only a certain network or subnet and all hosts within that network or subnet, whereas a broadcast of all 1s sends the frame to all networks and all hosts. </PARA>
  106. <PARA>When a switch receives these types of frames, the frames are then quickly flooded out all active ports of the switch by default. To have broadcasts and multicasts forwarded out only a limited amount of administratively assigned ports, you create virtual LANs (VLANs), which were discussed in <NOBR REF="3">Chapter 3</NOBR>.</PARA>
  107. </SECTION>
  108. </SECTION>
  109.  
  110. <SECTION ID="4.1.1.3"><TITLE>Loop Avoidance</TITLE>
  111. <!-- <PARA>Finally, the layer 2 switch is responsible for <KEYTERM>loop avoidance</KEYTERM>. It's a good idea to use redundant links between switches. They help stop complete network failures if one link fails. Even though redundant links are extremely helpful, they cause more problems than they solve. In the following sections, we'll discuss some of the most serious problems:</PARA>
  112. <LIST MARK="bullet">
  113. <LISTITEM><PARA>Broadcast storms</PARA></LISTITEM>
  114. <LISTITEM><PARA>Multiple frame copies</PARA></LISTITEM>
  115. <LISTITEM><PARA>Multiple loops</PARA></LISTITEM>
  116. </LIST> -->
  117.  
  118. <!-- <SECTION ID="4.1.1.3.1"><TITLE>Broadcast Storms</TITLE>
  119. <PARA>If no loop avoidance schemes are put in place, the switches will flood broadcasts endlessly throughout the internetwork. This is sometimes referred to as a broadcast storm. Figure 4.2 shows how a broadcast may be propagated throughout the network. </PARA> -->
  120. <SLUG NUM="4.2">Figure 4.2: Broadcast storms    [f0402.eps]</SLUG>
  121. <!-- </SECTION> -->
  122.  
  123. <!-- <SECTION ID="4.1.1.3.2"><TITLE>Multiple Frame Copies</TITLE>
  124. <PARA>Another problem is that a device can receive multiple copies of the same frame because the frame can arrive from different segments at the same time. Figure 4.3 shows how multiple frames can arrive from multiple segments simultaneously. </PARA> -->
  125. <!-- <SLUG NUM="4.3">Figure 4.3: Multiple frame copies    [f0403.eps]</SLUG> -->
  126. <!-- <PARA>The MAC address filter table will be confused about where a device is located because the switch can receive the frame from more than one link. It is possible that the switch can't forward a frame because it is constantly updating the MAC filter table with source hardware address locations. This is called thrashing the MAC table. </PARA>
  127. </SECTION>
  128.  
  129. <SECTION ID="4.1.1.3.3"><TITLE>Multiple Loops</TITLE>
  130. <PARA>One of the biggest problems is multiple loops generating throughout an internetwork. This means that loops can occur within other loops. If a broadcast storm were to then occur, the network would not be able to perform packet switching. </PARA>
  131. <PARA>To solve these three problems, the Spanning Tree Protocol was developed. </PARA>
  132. </SECTION> -->
  133. </SECTION>
  134. </SECTION>
  135. </SECTION>
  136.  
  137. <SECTION ID="4.2"><TITLE>Spanning Tree Operation</TITLE>
  138. <PARA><DROPCAP>I</DROPCAP>n layer 3 devices, which are typically routers, the routing protocols are responsible for making sure routing loops do not occur in the network. What is used to make sure network loops do not occur in layer 2 switched networks? This is the job of the <KEYTERM>Spanning Tree Protocol (STP)</KEYTERM>.</PARA>
  139. <PARA>Digital Equipment Corporation (DEC), which was purchased and is now called Compaq, was the original creator of STP. The IEEE then created its version of STP called 802.1d. By default, all Cisco switches run the IEEE 802.1d version of STP, which is not compatible with the DEC version.</PARA>
  140. <PARA>The big picture is that STP stops network loops from occurring on your layer 2 network (bridges or switches). STP is constantly monitoring the network to find all links and make sure loops do not occur by shutting down redundant links. </PARA>
  141. <PARA>The Spanning Tree Protocol executes an algorithm called the spanning-tree algorithm. This algorithm chooses a reference point in the network and calculates the redundant paths to that reference point. After it finds all the links in the network, the spanning-tree algorithm chooses one path on which to forward frames and shuts down the other redundant links to stop any network loops from occurring in the network. It does this by electing a root bridge that will decide on the network topology. </PARA>
  142. <!-- <PARA>There can be only one <KEYTERM>root bridge</KEYTERM> in any given network. The root bridge ports are called designated ports, and designated ports operate in what is called forwarding state. Forwarding state ports send and receive traffic. </PARA>
  143. <PARA>If you have other switches in your network, as shown in Figure 4.4, they are called nonroot bridges. However, the port that has the lowest cost to the root bridge is called a root port and sends and receives traffic. The cost is determined by the bandwidth of a link. </PARA> -->
  144. <SLUG NUM="4.4">Figure 4.4: Spanning tree operations        [f0404.eps]</SLUG>
  145. <!-- <PARA>Ports that are determined to have the lowest-cost path to the root bridge are called the <KEYTERM>designated ports</KEYTERM>. The other port or ports on the bridge are considered <KEYTERM>nondesignated ports</KEYTERM> and will not send or receive traffic. This is called blocking mode. </PARA> -->
  146.  
  147. <SECTION ID="4.2.1" POS="1"><TITLE>Selecting the Root Bridge</TITLE>
  148. <PARA>Switches or bridges running STP exchange information with what are called <KEYTERM>Bridge Protocol Data Units (BPDUs)</KEYTERM>. BPDUs are used to send configuration messages using multicast frames. The bridge ID of each device is sent to other devices using BPDUs. </PARA>
  149. <PARA>The <KEYTERM>bridge ID</KEYTERM> is used to determine the root bridge in the network and to determine the root port. The bridge ID is 8 bytes long and includes the priority and the MAC address of the device. The priority on all devices running the IEEE STP version is 32768 by default. </PARA>
  150. <PARA>To determine the root bridge, combine the priority of the bridge and the MAC address. If two switches or bridges have the same priority value, then the MAC address is used to determine which has the lowest ID. </PARA>
  151. <PARA>For example, if two switches, A and B, both use the default priority of 32768, the MAC address will be used. If switch A's MAC address is 0000.0c00.1111.1111 and switch B's MAC address is 0000.0c00.2222.2222, switch A would become the root bridge. </PARA>
  152. <PARA>The network analyzer output below shows a BPDU broadcasted on a network. BPDUs are sent out every two seconds by default. That may seem like a lot of overhead, but remember that this is only a layer 2 frame, with no layer 3 information in the packet: </PARA>
  153. <CODESNIPPET><CODELINE>  Flags:        0x80<EMPHASIS FORMAT="italic">  802.3</EMPHASIS></CODELINE>
  154. <CODELINE>  Status:       0x00</CODELINE>
  155. <CODELINE>  Packet Length:64</CODELINE>
  156. <CODELINE>  Timestamp:    19:33:18.726314 02/28/2000</CODELINE>
  157. <CODELINE><EMPHASIS FORMAT="bold">802.3 Header</EMPHASIS></CODELINE>
  158. <CODELINE><EMPHASIS FORMAT="bold">  Destination:</EMPHASIS>  01:80:c2:00:00:00</CODELINE>
  159. <CODELINE><EMPHASIS FORMAT="bold">  Source:</EMPHASIS>       00:b0:64:75:6b:c3</CODELINE>
  160. <CODELINE><EMPHASIS FORMAT="bold">  LLC Length:</EMPHASIS>   38</CODELINE>
  161. <CODELINE><EMPHASIS FORMAT="bold">802.2 Logical Link Control (LLC) Header</EMPHASIS></CODELINE>
  162. <CODELINE><EMPHASIS FORMAT="bold">  Dest. SAP:</EMPHASIS>    0x42  802.1 Bridge Spanning Tree</CODELINE>
  163. <CODELINE><EMPHASIS FORMAT="bold">  Source SAP:</EMPHASIS>   0x42  802.1 Bridge Spanning Tree</CODELINE>
  164. <CODELINE><EMPHASIS FORMAT="bold">  Command:</EMPHASIS>      0x03  Unnumbered Information</CODELINE>
  165. <CODELINE><EMPHASIS FORMAT="bold">802.1 - Bridge Spanning Tree</EMPHASIS></CODELINE>
  166. <CODELINE><EMPHASIS FORMAT="bold">  Protocol Identifier:</EMPHASIS>  0</CODELINE>
  167. <CODELINE><EMPHASIS FORMAT="bold">  Protocol Version ID:</EMPHASIS>  0</CODELINE>
  168. <CODELINE><EMPHASIS FORMAT="bold">  Message Type:</EMPHASIS>         0  Configuration Message</CODELINE>
  169. <CODELINE><EMPHASIS FORMAT="bold">  Flags:</EMPHASIS>                %00000000</CODELINE>
  170. <CODELINE><EMPHASIS FORMAT="bold">  Root Priority/ID:</EMPHASIS>     0x8000  /  00:b0:64:75:6b:c0</CODELINE>
  171. <CODELINE><EMPHASIS FORMAT="bold">  Cost Of Path To Root:</EMPHASIS> 0x00000000  (0)</CODELINE>
  172. <CODELINE><EMPHASIS FORMAT="bold">  Bridge Priority/ID:</EMPHASIS>   0x8000  / 00:b0:64:75:6b:c0</CODELINE>
  173. <CODELINE><EMPHASIS FORMAT="bold">  Port Priority/ID:</EMPHASIS>     0x80  /  0x03</CODELINE>
  174. <CODELINE><EMPHASIS FORMAT="bold">  Message Age:</EMPHASIS>                        0/256 seconds     (exactly 0seconds)</CODELINE>
  175. <CODELINE><EMPHASIS FORMAT="bold">  Maximum Age:</EMPHASIS>                        5120/256     seconds <EMPHASIS FORMAT="bold">(exactly 20seconds)</EMPHASIS></CODELINE>
  176. <CODELINE><EMPHASIS FORMAT="bold">  Hello Time:</EMPHASIS>                        512/256 seconds     <EMPHASIS FORMAT="bold">(exactly 2seconds)</EMPHASIS></CODELINE>
  177. <CODELINE><EMPHASIS FORMAT="bold">  Forward Delay:</EMPHASIS>                        3840/256     seconds <EMPHASIS FORMAT="bold">(exactly 15seconds)</EMPHASIS></CODELINE>
  178. <CODELINE>Extra bytes (Padding):  </CODELINE>
  179. <CODELINE>  ........              00 00 00 00 00 00 00 00 </CODELINE>
  180. <CODELINE><EMPHASIS FORMAT="bold">Frame Check Sequence:</EMPHASIS>  0x2e006400</CODELINE></CODESNIPPET>
  181. <PARA>Notice the cost of path to root. It is zero because this switch is actually the root bridge. We'll discuss path costs in more detail in the next section, "Selecting the Designated Port." </PARA>
  182. <PARA>The network analyzer output above also shows the BPDU timers, which are used to prevent bridging loops because the timers determine how long it will take the spanning tree to converge after a failure. </PARA>
  183. <PARA>BPDUs are susceptible to propagation delays, which happen because of packet length, switch processing, bandwidth, and utilization problems. This can create an unstable network because temporary loops might occur in the network when BPDUs are not received on time to the remote switches in the network. The STP uses timers to force ports to wait for the correct topology information. </PARA>
  184. <PARA>As you can see in the output, the hello time is exactly 2 seconds, the maximum age is exactly 20 seconds, and the forward delay is exactly 15 seconds. </PARA>
  185. </SECTION>
  186.  
  187. <SECTION ID="4.2.2"><TITLE>Selecting the Designated Port</TITLE>
  188. <PARA>After you have selected the root bridge, all switches must become buddies with the root bridge. Each switch listens to BPDU on all active ports, and if more than one BPDU is received, the switch knows it has a redundant link to the root bridge. The switch has to determine which port will become the root port and which port will be put into blocking state. </PARA>
  189. <PARA>To determine the port that will be used to communicate with the root bridge, the path cost is determined. The STP cost is an accumulated total path cost based on the bandwidth of the links. Table 4.3 shows the typical costs associated with the different Ethernet networks. </PARA>
  190. <TABLE NUM="4.3" TABLEENTRYNUM="3">
  191. <TABLETITLE>STP Link Cost</TABLETITLE>
  192. <TABLEHEAD>
  193. <TABLEROW>
  194. <TABLEENTRY><PARA>Speed</PARA></TABLEENTRY>
  195. <TABLEENTRY><PARA>New IEEE Cost</PARA></TABLEENTRY>
  196. <TABLEENTRY><PARA> Original IEEE Cost</PARA></TABLEENTRY>
  197. </TABLEROW>
  198. </TABLEHEAD>
  199. <TABLEBODY>
  200. <TABLEROW>
  201. <TABLEENTRY><PARA>10Gbps</PARA></TABLEENTRY>
  202. <TABLEENTRY><PARA>2</PARA></TABLEENTRY>
  203. <TABLEENTRY><PARA>1</PARA></TABLEENTRY>
  204. </TABLEROW>
  205. <TABLEROW>
  206. <TABLEENTRY><PARA>1Gbps</PARA></TABLEENTRY>
  207. <TABLEENTRY><PARA>4</PARA></TABLEENTRY>
  208. <TABLEENTRY><PARA>1</PARA></TABLEENTRY>
  209. </TABLEROW>
  210. <TABLEROW>
  211. <TABLEENTRY><PARA>100Mbps</PARA></TABLEENTRY>
  212. <TABLEENTRY><PARA>19</PARA></TABLEENTRY>
  213. <TABLEENTRY><PARA>10</PARA></TABLEENTRY>
  214. </TABLEROW>
  215. <TABLEROW>
  216. <TABLEENTRY><PARA>10Mbps</PARA></TABLEENTRY>
  217. <TABLEENTRY><PARA>100</PARA></TABLEENTRY>
  218. <TABLEENTRY><PARA>100</PARA></TABLEENTRY>
  219. </TABLEROW>
  220. </TABLEBODY>
  221. </TABLE>
  222. <PARA>The IEEE 802.1d specification has recently been revised to handle the new higher-speed links, hence the different costs shown in Table 4.3.</PARA>
  223. <PARA>Once the cost is determined for all links to the root bridge, the switch will decide which port has the lowest cost. The lowest cost port is put into forwarding, and the other ports are placed in blocking mode. If there are equal-cost paths, the port with the lowest port ID will be put into the forwarding state. </PARA>
  224. </SECTION>
  225.  
  226. <SECTION ID="4.2.3"><TITLE>Spanning Tree Port States</TITLE>
  227. <!-- <PARA>The ports on a bridge or switch running the STP can transition through four different states:</PARA>
  228. <RUNINBLOCK><RUNINHEAD>Blocking</RUNINHEAD>
  229. <RUNINPARA>Won't forward frames; listens to BPDU. All ports are in blocking state by default when the switch is powered on. </RUNINPARA></RUNINBLOCK>
  230. <RUNINBLOCK><RUNINHEAD>Listening</RUNINHEAD>
  231. <RUNINPARA>Listens to BPDUs to make sure no loops occur on the network before passing data frames. </RUNINPARA></RUNINBLOCK>
  232. <RUNINBLOCK><RUNINHEAD>Learning</RUNINHEAD>
  233. <RUNINPARA>Learns MAC addresses and builds a filter table, but does not forward frames. </RUNINPARA></RUNINBLOCK>
  234. <RUNINBLOCK><RUNINHEAD>Forwarding</RUNINHEAD>
  235. <RUNINPARA>Bridge port is able to send and receive data. A port will never be placed in forwarding state unless there are no redundant links or the port determines that it has the best path to the root bridge. </RUNINPARA></RUNINBLOCK>
  236. <PARA>An administrator can put a port in disabled state, or if a failure with the port occurs, the switch will put it into disabled state. </PARA>
  237. <PARA>Typically, switch ports are in either blocking or forwarding state. A forwarding port is a port that has been determined to have the lowest cost to the root bridge. However, if the network has a topology change because of a failed link, or the administrator adds a new switch to the network, the ports on a switch will be in listening and learning states. </PARA>
  238. <PARA>Blocking ports are used to prevent network loops. Once a switch determines the best path to the root bridge, all other ports will be in blocking state. Blocked ports will still receive BPDUs.</PARA>
  239. <PARA>If a switch determines that a blocked port should now be the designated port, it will go to listening state. It will check all BPDUs heard to make sure that it won't create a loop once the port goes to forwarding state. </PARA>
  240. <PARA>Figure 4.5 shows the default STP timers and their operation within STP.</PARA> -->
  241. <SLUG NUM="4.5">Figure 4.5: STP default timers    [f0405.eps]</SLUG>
  242. <!-- <PARA>Notice the time from blocking to forwarding. Blocking to listening is  20 seconds. Listening to learning is another 15 seconds. Learning to forwarding is 15 seconds, for a total of 50 seconds. However, the switch could go to disabled if the port is administratively shut down or the port has a failure.</PARA> -->
  243.  
  244. <SECTION ID="4.2.3.1"><TITLE>Convergence</TITLE>
  245. <PARA>Convergence occurs when bridges and switches have transitioned to either the forwarding or blocking state. No data is forwarded during this time. Convergence is important in making sure that all devices have the same database.</PARA>
  246. <PARA>The problem with convergence is the time it takes for all devices to update. Before data can start to be forwarded, all devices must be updated. The time it usually takes to go from blocking to forwarding state is 50 seconds. Changing the default STP timers is not recommended, but the timers can be adjusted if they need to be. The time it takes to transition a port from the listening state to the learning state or from the learning state to the forwarding state is called the forward delay. </PARA>
  247. </SECTION>
  248. </SECTION>
  249.  
  250. <SECTION ID="4.2.4"><TITLE>Spanning Tree Example</TITLE>
  251. <!-- <PARA>In Figure 4.6, the three switches all have the same priority of 32768. However, notice the MAC address of each switch. By looking at the priority and MAC addresses of each switch, you should be able to determine the root bridge. </PARA> -->
  252. <SLUG NUM="4.6">Figure 4.6: Spanning tree example    [f0406.eps]</SLUG>
  253. <!-- <PARA>Because 1900A has the lowest MAC address and all three switches use the default priority, 1900A will be the root bridge. </PARA>
  254. <PARA>To determine the root ports on switches 1900B and 1900C, you need to look at the cost of the link connecting the switches. Because the connection from both switches to the root switch is from port 0 using a 100Mbps link, that has the best cost and both switches' root port will then be port 0.</PARA>
  255. <PARA>Use the bridge ID to determine the designated ports on the switches. The root bridge always has all ports as designated. However, because both 1900B and 1900C have the same cost to the root bridge, the designated port will be on switch 1900B because it has the lowest bridge ID. Because 1900B has been determined to have the designated port, switch 1900C will put port 1 in blocking state to stop any network loop from occurring. </PARA> -->
  256. </SECTION>
  257. </SECTION>
  258.  
  259. <SECTION ID="4.3"><TITLE>LAN Switch Types</TITLE>
  260. <!-- <PARA><DROPCAP>L</DROPCAP>AN switching is used to forward or filter frames based on their hardware destination. However, there are three different methods in which frames can be forwarded or filtered. Each method has its advantages and disadvantages, and by understanding the different LAN switch methods available, you can make smart switching decisions. </PARA>
  261. <PARA>There are three switching modes:</PARA>
  262. <RUNINBLOCK><RUNINHEAD>Store-and-forward</RUNINHEAD>
  263. <RUNINPARA>With the <KEYTERM>store-and-forward</KEYTERM> mode, the complete data frame is received on the switch's buffer, a cyclic redundancy check (CRC) is run, and then the destination address is looked up in the MAC filter table.</RUNINPARA></RUNINBLOCK>
  264. <RUNINBLOCK><RUNINHEAD>Cut-through</RUNINHEAD>
  265. <RUNINPARA>With the <KEYTERM>cut-through</KEYTERM> mode, the switch waits for only the destination hardware address to be received and then looks up the destination address in the MAC filter table.</RUNINPARA></RUNINBLOCK>
  266. <RUNINBLOCK><RUNINHEAD>FragmentFree</RUNINHEAD>
  267. <RUNINPARA><KEYTERM>FragmentFree</KEYTERM> is the default mode for the Catalyst 1900 switch; it is sometimes referred to as modified cut-through. Checks the first 64 bytes of a frame for fragmentation (because of possible collisions) before forwarding the frame.</RUNINPARA></RUNINBLOCK> -->
  268. <SLUG NONUM="a1"/>
  269. <PARA>Figure 4.7 shows the different points where the switching mode takes place in the frame. The different switching modes are discussed in detail in the following sections.</PARA>
  270. <SLUG NUM="4.7">Figure 4.7: Different switching modes within a frame                [f0407.eps]</SLUG>
  271.  
  272. <SECTION ID="4.3.1" POS="1"><TITLE>Store-and-Forward</TITLE>
  273. <PARA>Store-and-forward switching is one of three primary types of LAN switching. With the store-and-forward switching method, the LAN switch copies the entire frame onto its onboard buffers and computes the cyclic redundancy check (CRC). Because it copies the entire frame, latency through the switch varies with frame length.</PARA>
  274. <PARA>The frame is discarded if it contains a CRC error, if it's too short (less than 64 bytes including the CRC), or if it's too long (more than 1,518 bytes including the CRC). If the frame doesn't contain any errors, the LAN switch looks up the destination hardware address in its forwarding or switching table and determines the outgoing interface. It then forwards the frame toward its destination. This is the mode used by the Catalyst 5000 series switches, and it cannot be modified on the switch. </PARA>
  275. </SECTION>
  276.  
  277. <SECTION ID="4.3.2"><TITLE>Cut-Through (Real Time)</TITLE>
  278. <PARA>Cut-through switching is the other main type of LAN switching. With this method, the LAN switch copies only the destination address (the first 6 bytes following the preamble) onto its onboard buffers. It then looks up the hardware destination address in the MAC switching table, determines the outgoing interface, and forwards the frame toward its destination. A cut-through switch provides reduced latency because it begins to forward the frame as soon as it reads the destination address and determines the outgoing interface.</PARA>
  279. <PARA>Some switches can be configured to perform cut-through switching on a per-port basis until a user-defined error threshold is reached. At that point, they automatically change over to store-and-forward mode so they will stop forwarding the errors. When the error rate on the port falls below the threshold, the port automatically changes back to cut-through mode.</PARA>
  280. </SECTION>
  281.  
  282. <SECTION ID="4.3.3"><TITLE>FragmentFree (Modified Cut-Through)</TITLE>
  283. <PARA>FragmentFree is a modified form of cut-through switching in which the switch waits for the collision window (64 bytes) to pass before forwarding. If a packet has an error, it almost always occurs within the first 64 bytes. FragmentFree mode provides better error checking than the cut-through mode, with practically no increase in latency. This is the default switching method for the 1900 switches. </PARA>
  284. </SECTION>
  285. </SECTION>
  286.  
  287. <SECTION ID="4.4"><TITLE>Configuring Spanning Tree</TITLE>
  288. <PARA><DROPCAP>T</DROPCAP>he configuration of spanning tree is pretty simple unless you want to change your timers or add multiple spanning tree instances; then it can get complex. The timers and more advanced configurations are covered in <NOBR REF="5">Chapter 5</NOBR>. </PARA>
  289. <PARA>STP is enabled on all Cisco switches by default. However, you may want to change your spanning tree configuration to have many spanning tree instances. This means that each VLAN can be its own spanning tree. This is known as Per-VLAN spanning tree.</PARA>
  290. <PARA>To enable or disable spanning tree on a set-based switch, use the <INLINECODE>set spantree [parameter]</INLINECODE> command. This is performed on a VLAN-by-VLAN basis rather than a port-by-port configuration: </PARA>
  291. <CODESNIPPET><CODELINE>Todd5000> (enable) <EMPHASIS FORMAT="bold">set spantree disable 1-1005</EMPHASIS></CODELINE>
  292. <CODELINE>Spantrees 1-1005 disabled.</CODELINE>
  293. <CODELINE></CODELINE>
  294. <CODELINE>Todd5000> (enable) set spantree enable 1-1005</CODELINE>
  295. <CODELINE>Spantrees 1-1005 enabled.</CODELINE></CODESNIPPET>
  296. <PARA>The above configuration shows the disabling of spanning tree on an individual VLAN basis. To enable spanning tree on an individual VLAN basis, use <INLINECODE>set spantree enable [VLAN(s)]</INLINECODE>. Cisco recommends that you do not disable spanning tree on a switch, particularly on uplinks where a loop can occur. </PARA>
  297. <NOTE>On a chassis with a Supervisor Engine III or III F with a NFFC or NFFC II, you cannot enable spanning tree on a per-VLAN basis. You must enable spanning tree on every VLAN using the <INLINECODE>set spantree enable all</INLINECODE> command.</NOTE>
  298. <PARA>To enable or disable spanning tree on a Cisco IOS-based switch, use the <INLINECODE>spantree</INLINECODE> command or the <INLINECODE>no spantree</INLINECODE> command. The configuration below shows how to enable and disable spanning tree on a 1900 switch: </PARA>
  299. <CODESNIPPET><CODELINE>1900A#<EMPHASIS FORMAT="bold">config t</EMPHASIS>              </CODELINE>
  300. <CODELINE>Enter configuration commands, one per line.  End with CNTL/Z                                                            </CODELINE>
  301. <CODELINE>1900A(config)#<EMPHASIS FORMAT="bold">spantree ?</EMPHASIS>                        </CODELINE>
  302. <CODELINE>  &lt;1-1005>  ISL VLAN index                          </CODELINE>
  303. <CODELINE> </CODELINE>
  304. <CODELINE>1900A(config)#<EMPHASIS FORMAT="bold">no spantree 1</EMPHASIS>                           </CODELINE>
  305. <CODELINE>1900A#<EMPHASIS FORMAT="bold">sh span 1</EMPHASIS>               </CODELINE>
  306. <CODELINE>Error: STP is not enabled for VLAN 1                                    </CODELINE>
  307. <CODELINE></CODELINE>
  308. <CODELINE>1900A#<EMPHASIS FORMAT="bold">config t</EMPHASIS>              </CODELINE>
  309. <CODELINE>Enter configuration commands, one per line.  End with CNTL/Z                                                            </CODELINE>
  310. <CODELINE>1900A(config)#<EMPHASIS FORMAT="bold">span 1</EMPHASIS>                    </CODELINE>
  311. <CODELINE>1900A#<EMPHASIS FORMAT="bold">sh span 1</EMPHASIS>               </CODELINE>
  312. <CODELINE>VLAN1 is executing the IEEE compatible Spanning Tree Protocol</CODELINE>
  313. <CODELINE>   Bridge Identifier has priority 32768, address 0030.80CC.7B40</CODELINE>
  314. <CODELINE>   Configured hello time 2, max age 20, forward delay 15</CODELINE>
  315. <CODELINE>   Current root has priority 32768, address 0030.80CC.7B40</CODELINE>
  316. <CODELINE>   Root port is N/A, cost of root path is 0</CODELINE>
  317. <CODELINE>   Topology change flag not set, detected flag not set</CODELINE>
  318. <CODELINE>   Topology changes 0, last topology change occurred 0d00h00m00s ago</CODELINE>
  319. <CODELINE>   Times:  hold 1, topology change 8960</CODELINE>
  320. <CODELINE>           hello 2, max age 20, forward delay 15</CODELINE>
  321. <CODELINE>   Timers: hello 2, topology change 35, notification 2</CODELINE>
  322. <CODELINE>Port Ethernet 0/1 of VLAN1 is Forwarding</CODELINE>
  323. <CODELINE>   [output cut]</CODELINE></CODESNIPPET>
  324. <PARACONTINUED>Notice in the above output that the <INLINECODE>no spantree 1</INLINECODE> command turned off spanning tree for VLAN 1. Typing <INLINECODE>spantree 1</INLINECODE> (span 1 for short) turned the Spanning Tree Protocol back on for VLAN 1. The <INLINECODE>show spantree 1</INLINECODE> command displays the STP information for VLAN 1. Notice that the bridge ID, MAC address, and timers are displayed. </PARACONTINUED>
  325. <!-- <PARA>To see the spanning tree configuration and whether it is active on a  Catalyst 5000 set-based switch, use the <INLINECODE>show spantree</INLINECODE> command as  shown here:</PARA> -->
  326.  
  327. <!-- <PARA>By default, the <INLINECODE>show spantree</INLINECODE> command provides information about VLAN 1. You can gather spanning tree information about other VLANs by using the <INLINECODE>show spantree [vlan #]</INLINECODE> command.</PARA>
  328. <PARA>The<INLINECODE> show spantree</INLINECODE> command will provide you with the following information:</PARA>
  329. <RUNINBLOCK><RUNINHEAD>Designated Root</RUNINHEAD>
  330. <RUNINPARA>The MAC address of the root bridge.</RUNINPARA></RUNINBLOCK>
  331. <RUNINBLOCK><RUNINHEAD>Designated Root Priority</RUNINHEAD>
  332. <RUNINPARA>The priority of the root bridge. All bridges have a default of 32768. </RUNINPARA></RUNINBLOCK>
  333. <RUNINBLOCK><RUNINHEAD>Designated Root Cost</RUNINHEAD>
  334. <RUNINPARA>The cost of the shortest path to the root bridge.</RUNINPARA></RUNINBLOCK>
  335. <RUNINBLOCK><RUNINHEAD>Designated Root Port</RUNINHEAD>
  336. <RUNINPARA>The port that is chosen as the lowest cost to the root bridge. </RUNINPARA></RUNINBLOCK>
  337. <RUNINBLOCK><RUNINHEAD>Root Timers</RUNINHEAD>
  338. <RUNINPARA>The timers received from the root bridge.</RUNINPARA></RUNINBLOCK>
  339. <RUNINBLOCK><RUNINHEAD>Bridge ID MAC Address</RUNINHEAD>
  340. <RUNINPARA>This bridge's ID. This plus the Bridge Priority make up the Bridge ID.</RUNINPARA></RUNINBLOCK>
  341. <RUNINBLOCK><RUNINHEAD>Bridge ID Priority</RUNINHEAD>
  342. <RUNINPARA>The priority set; the bridge output above is using the default of 32768.</RUNINPARA></RUNINBLOCK>
  343. <RUNINBLOCK><RUNINHEAD>Bridge Timers</RUNINHEAD>
  344. <RUNINPARA>The timers used by this bridge.</RUNINPARA></RUNINBLOCK>
  345. <RUNINBLOCK><RUNINHEAD>Ports in the Spanning Tree</RUNINHEAD>
  346. <RUNINPARA>Not all available ports are displayed in the output above. However, this field does show all ports participating in this spanning tree. It also shows whether they are forwarding or not. </RUNINPARA></RUNINBLOCK> -->
  347. <SLUG NONUM="a2"/>
  348. </SECTION>
  349.  
  350. <SECTION ID="4.5"><TITLE>Summary</TITLE>
  351. <PARA><DROPCAP>T</DROPCAP>his chapter covered layer 2 switching. You learned how redundant links can be used to provide redundancy in a network but also how they can cause problems. </PARA>
  352. <PARA>The Spanning Tree Protocol was discussed at length, including how it can be used to stop network loops, broadcast storms, and multiple frame copies. </PARA>
  353. <PARA>We discussed STP configuration and showed you some examples. However, we showed you only how to turn spanning tree off and on. In <NOBR REF="5">Chapter 5</NOBR>, we'll show you how to use STP to create complex configurations on the switch.  </PARA>
  354.  
  355. <SECTION ID="4.5.1" POS="1"><TITLE>Key Terms</TITLE>
  356. <PARA>Before you take the exam, be sure you're familiar with the following terms:</PARA>
  357. <TABULARDATA>
  358. <TABULARBODY>
  359. <TABULARROW>
  360. <TABULARENTRY><KEYTERM REF="4.1">Application-Specific Integrated Circuits (ASICs)</KEYTERM></TABULARENTRY>
  361. <TABULARENTRY><KEYTERM REF="4.1">layer 2 switching</KEYTERM></TABULARENTRY>
  362. </TABULARROW>
  363. <TABULARROW>
  364. <TABULARENTRY><KEYTERM REF="4.2.1">bridge ID</KEYTERM></TABULARENTRY>
  365. <TABULARENTRY><KEYTERM REF="4.1.1.3">loop avoidance</KEYTERM></TABULARENTRY>
  366. </TABULARROW>
  367. <TABULARROW>
  368. <TABULARENTRY><KEYTERM REF="4.2.1">Bridge Protocol Data Units (BPDUs)</KEYTERM></TABULARENTRY>
  369. <TABULARENTRY><KEYTERM REF="4.1">Media Access Control (MAC) address</KEYTERM></TABULARENTRY>
  370. </TABULARROW>
  371. <TABULARROW>
  372. <TABULARENTRY><KEYTERM REF="4.1.1.2.1">broadcasts</KEYTERM></TABULARENTRY>
  373. <TABULARENTRY><KEYTERM REF="4.2">nondesignated ports</KEYTERM></TABULARENTRY>
  374. </TABULARROW>
  375. <TABULARROW>
  376. <TABULARENTRY><KEYTERM REF="4.3">cut-through</KEYTERM></TABULARENTRY>
  377. <TABULARENTRY><KEYTERM REF="4.2">root bridge</KEYTERM></TABULARENTRY>
  378. </TABULARROW>
  379. <TABULARROW>
  380. <TABULARENTRY><KEYTERM REF="4.2">designated ports</KEYTERM></TABULARENTRY>
  381. <TABULARENTRY><KEYTERM REF="4.2">Spanning Tree Protocol (STP)</KEYTERM></TABULARENTRY>
  382. </TABULARROW>
  383. <TABULARROW>
  384. <TABULARENTRY><KEYTERM REF="4.3">FragmentFree</KEYTERM></TABULARENTRY>
  385. <TABULARENTRY><KEYTERM REF="4.3">store-and-forward</KEYTERM></TABULARENTRY>
  386. </TABULARROW>
  387. </TABULARBODY>
  388. </TABULARDATA>
  389. </SECTION>
  390.  
  391. <SECTION ID="4.5.2"><TITLE>Commands Used in This Chapter</TITLE>
  392. <TABULARDATA>
  393. <TABULARBODY>
  394. <TABULARROW>
  395. <TABULARENTRY><EMPHASIS FORMAT="bold">Access Layer Switch Commands (1900 Switch in This Course)</EMPHASIS></TABULARENTRY>
  396. <TABULARENTRY><EMPHASIS FORMAT="bold">Meaning</EMPHASIS></TABULARENTRY>
  397. </TABULARROW>
  398. <TABULARROW>
  399. <TABULARENTRY><INLINECODE>spantree</INLINECODE></TABULARENTRY>
  400. <TABULARENTRY>Turns on spanning tree for a VLAN </TABULARENTRY>
  401. </TABULARROW>
  402. <TABULARROW>
  403. <TABULARENTRY><INLINECODE>no spantree</INLINECODE></TABULARENTRY>
  404. <TABULARENTRY>Turns off spanning tree for a VLAN</TABULARENTRY>
  405. </TABULARROW>
  406. <TABULARROW>
  407. <TABULARENTRY><INLINECODE>show spantree</INLINECODE></TABULARENTRY>
  408. <TABULARENTRY>Used to view spanning tree information on a VLAN</TABULARENTRY>
  409. </TABULARROW>
  410. <TABULARROW>
  411. <TABULARENTRY></TABULARENTRY>
  412. <TABULARENTRY></TABULARENTRY>
  413. </TABULARROW>
  414. <TABULARROW>
  415. <TABULARENTRY><EMPHASIS FORMAT="bold">Distribution Layer Switch Commands (5000 Switch in  This Course)</EMPHASIS></TABULARENTRY>
  416. <TABULARENTRY><EMPHASIS FORMAT="bold">Meaning</EMPHASIS></TABULARENTRY>
  417. </TABULARROW>
  418. <TABULARROW>
  419. <TABULARENTRY><INLINECODE>set spantree</INLINECODE></TABULARENTRY>
  420. <TABULARENTRY>Turns spanning tree off or on for a VLAN </TABULARENTRY>
  421. </TABULARROW>
  422. <TABULARROW>
  423. <TABULARENTRY><INLINECODE>show spantree</INLINECODE></TABULARENTRY>
  424. <TABULARENTRY>Used to view spanning tree information on a VLAN</TABULARENTRY>
  425. </TABULARROW>
  426. </TABULARBODY>
  427. </TABULARDATA>
  428. </SECTION>
  429. </SECTION>
  430.  
  431. <TESTSECTION ID="4.6"><TITLE>Written Lab</TITLE>
  432. <!-- <PARA>Write out the answers to the following questions. </PARA>
  433. <TESTDATA>
  434. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What command will show you whether a port is in forwarding mode?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  435. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What command would you use to disable spanning tree for VLAN 5 on a set-based switch?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  436. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What command will enable spanning tree for VLAN 6 on a 1900 switch?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  437. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What is a switch's priority by default?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  438. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What is used to determine a bridge ID?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  439. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What is the hello time of BPDU?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  440. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What is the amount of time it would take a switch port to go from blocking state to forwarding state?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  441. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What are the four states of a bridge port?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  442. <TESTBLOCK><QUESTIONBLOCK><QUESTION>What are the two parameters used to determine which port will be forwarding data and which ports will be blocking on a switch with redundant links?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
  443. <TESTBLOCK><QUESTIONBLOCK><QUESTION>True/False: A bridge must forward all broadcasts out all ports except for the port that initially received the broadcast. </QUESTION></QUESTIONBLOCK></TESTBLOCK>
  444. </TESTDATA> -->
  445. <SLUG NONUM="w1"/>
  446. </TESTSECTION>
  447.  
  448. <TESTSECTION ID="4.7"><TITLE>Answers to Written Lab</TITLE>
  449. <TESTDATA>
  450. <TESTBLOCK><ANSWERBLOCK><ANSWER><INLINECODE>show spantree</INLINECODE>. This command will display the spanning tree information of a VLAN and all the ports' participation in STP. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  451. <TESTBLOCK><ANSWERBLOCK><ANSWER><INLINECODE>set spantree disable 5</INLINECODE>. The <INLINECODE>set spantree</INLINECODE> command is used to enable or disable spanning tree for a VLAN.</ANSWER></ANSWERBLOCK></TESTBLOCK>
  452. <TESTBLOCK><ANSWERBLOCK><ANSWER><INLINECODE>spantree 6</INLINECODE>. This command is used to turn on spanning tree for a VLAN. You can disable STP for an interface with the <INLINECODE>no spantree</INLINECODE> command. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  453. <TESTBLOCK><ANSWERBLOCK><ANSWER>32768. This is the default priority on all switches and bridges. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  454. <TESTBLOCK><ANSWERBLOCK><ANSWER>Bridge priority and then MAC address. If the priorities of the switches are set the same, the MAC address would be used to determine the bridge ID. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  455. <TESTBLOCK><ANSWERBLOCK><ANSWER>Two seconds. Every two seconds, BPDUs are sent out all forwarding ports. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  456. <TESTBLOCK><ANSWERBLOCK><ANSWER>Fifty seconds. From blocking to listening is 20 seconds. From listening to learning is 15 seconds, and from learning to forwarding is another 15 seconds. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  457. <TESTBLOCK><ANSWERBLOCK><ANSWER>Blocking, listening, learning, forwarding. Each state is used to stop network loops from occurring on redundant links. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  458. <TESTBLOCK><ANSWERBLOCK><ANSWER>The path cost and port ID are used to determine the designated port and nondesignated ports. </ANSWER></ANSWERBLOCK></TESTBLOCK>
  459. <TESTBLOCK><ANSWERBLOCK><ANSWER>True. Bridges forward all frames that are received and are broadcasts or are not in the filter table.</ANSWER></ANSWERBLOCK></TESTBLOCK>
  460. </TESTDATA>
  461. </TESTSECTION>
  462.  
  463. <FIGCOL>
  464.     <FIG NUM="4.1">
  465.         <ILL>
  466.             <FLASH SRC="graphics/animations/sb0401a600x350.swf" WIDTH="600" HEIGHT="350" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  467.         </ILL>
  468.         <P>How switches learn hosts' locations</P>
  469.     </FIG>
  470.     <FIG NUM="4.2">
  471.         <ILL>
  472.             <FLASH SRC="graphics/animations/sb0402a600x350.swf" WIDTH="600" HEIGHT="350" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  473.         </ILL>
  474.         <P>Broadcast storms</P>
  475.     </FIG>
  476.     <FIG NUM="4.3">
  477.         <ILL>
  478.             <FLASH SRC="graphics/static/2711c04/f0403_400x240.swf" WIDTH="400" HEIGHT="240" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  479.         </ILL>
  480.         <P>Multiple frame copies</P>
  481.     </FIG>
  482.     <FIG NUM="4.4">
  483.         <ILL>
  484.             <FLASH SRC="graphics/animations/sb0404a600x290.swf" WIDTH="600" HEIGHT="290" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  485.         </ILL>
  486.         <P>Spanning tree operations</P>
  487.     </FIG>
  488.     <FIG NUM="4.5">
  489.         <ILL>
  490.             <FLASH SRC="graphics/animations/sb0405a600x400.swf" WIDTH="600" HEIGHT="400" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  491.         </ILL>
  492.         <P>STP default timers</P>
  493.     </FIG>
  494.     <FIG NUM="4.6">
  495.         <ILL>
  496.             <FLASH SRC="graphics/animations/sb0406a600x310.swf" WIDTH="600" HEIGHT="310" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  497.         </ILL>
  498.         <P>Spanning tree example</P>
  499.     </FIG>
  500.     <FIG NUM="4.7">
  501.         <ILL>
  502.             <FLASH SRC="graphics/static/2711c04/f0407_535x160.swf" WIDTH="535" HEIGHT="160" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  503.         </ILL>
  504.         <P>Different switching modes within a frame</P>
  505.     </FIG>
  506.     <FIG NONUM="a1">
  507.         <ILL>
  508.             <FLASH SRC="graphics/animations/sb0407a600x280.swf" WIDTH="600" HEIGHT="280" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  509.         </ILL>
  510.     </FIG>
  511.     <FIG NONUM="a2">
  512.         <ILL>
  513.             <FLASH SRC="graphics/animations/sb0408a600x400.swf" WIDTH="600" HEIGHT="400" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  514.         </ILL>
  515.     </FIG>
  516.     
  517.     <FIG NONUM="w1">
  518.         <ILL MODE="wlab">
  519.             <FLASH SRC="graphics/writtenlabs/lab11_04.swf" WIDTH="580" HEIGHT="380" LOOP="FALSE" MENU="FALSE" QUALITY="HIGH" BGCOLOR="#FFFFFF" />
  520.         </ILL>
  521.     </FIG>
  522. </FIGCOL>
  523. </CHAPTER>
  524.