This chapter introduces concepts specific to switches:
Concepts:The text opens with a few comments about switches: they operate on Layer 2 of the OSI model, because they use MAC addresses (Layer 2 addresses) to decide about delivery of data. Routing protocols that provide methods to stop routing loops are not effective at this layer, so switches must use other methods to prevent switching loops. The text discusses what networks were like before switches: essentially a single collision domain, limited to one transmitting device at a time. The text offers another definition of a collision domain: "one network segment with two or more devices contending for bandwidth". The solution to this problem is to break up a collision domain into as many separate domains, with as few contending devices on each one, as possible. Bridges break network segments into separate collision domains, but the number of domains created is limited to the small number of ports on a bridge. Several devices are connected to each port, and those devices are still in a single collision domain. A switch has the virtue of establishing a separate collision domain on each of its several ports. When switches were first marketed, they were expensive, and often were used in conjunction with hubs. Remember, devices plugged into a hub are on a single collision domain. Now, switches are commonly used in place of hubs, providing multiple collision domains without the congestion of hubs. Switches can run faster than routers, in that they do not change the address data in packets they process. Remember this discussion of routers from chapter 5: Routers pass signals from one network to another. Routers use software addresses instead of hardware addresses. This makes them independent of protocols used at lower layers. Almost. Example: a transmission is sent from a station on network 1 to a station on network 50. It could pass along any number of routes. What happens is like this
Switches do not have to do any of this kind of readdressing when the data they pass does not leave their network. They simply pass data along a path that leads to the MAC address originally written for the addressee in the data link frame.
The text explains that bridges create address tables in RAM, doing so by the software they run. Switches do a similar thing, but they build their address tables with hardware circuits: application-specific integrated circuits, called ASICs. The text lists this as one of the virtues of a switch, along with related characteristics:
The text reviews bridges again, reminding us of the 80/20 rule. A network segment is properly bridged when 80% of the traffic originating on each port does not need to travel across that port. Bridges do not break up broadcast domains, they only break up collision domains, so broadcast traffic can still congest the network. Multicasts also travel across bridges and switches, adding more congestion. These types of transmissions are limited by routers, not by Layer 2 devices. The text tells us, repetitively, that switches are like bridges with many more ports. The author continues his irritating habit of needless foreshadowing: he tells us that bridges have one spanning-tree instance per bridge, but switches have many instances, but he does not explain what spanning-tree is, or why we would care. In a few pages, he will reveal all, once we have hungered enough for his knowledge. Switches perform three functions on Layer 2 that summarize their purpose:
Spanning Tree Protocol (STP) was invented by Digital Equipment Corporation (DEC). The IEEE developed a version of it called IEEE 802.1D. Cisco devices use this version of STP. STP avoids loops by building a topology model of the network, marking links to MAC addresses, and rejecting redundant links. STP uses a method called Spanning Tree Algorithm (STA) to determine which ports will be set in which state (see below). The text explains spanning tree protocol in terms of bridges. The discussion in the text wanders back and forth in terminology, so we must assume that Cisco switches act just like this kind of bridge, as far as the Spanning Tree Protocol goes. We might consider a switch to be a bridge with many more ports than usual. So, in the discussion about STP, every time the author uses the word "bridge", assume that the word "switch" can be used instead. Typically, bridges that use this protocol are called transparent or learning bridges. They have the following characteristics: A bridge is transparent to a sending device if the sending device is unaware of the bridge or unaware that the receiving device may be across a bridge. This type of bridge requires little setup: it learns which segment devices are on when they send packets through it. Transparent bridges are also called learning bridges because they learn what segments devices are on by receiving traffic from them, and they store the knowledge in a filtering database. While a transparent bridge is learning, it forwards frames to all segments except the segment they come from. Once it learns which segment a device is on, traffic to that device is only forwarded to the proper segment (unless the traffic is already on the right segment, in which case it is not forwarded at all). Bridges may connect more than two segments. Connection is made through physical ports on the bridge. The ports can be in one of five states, described below.
The intelligent part of the bridge, the part that decides whether to forward a frame to a specific segment, is called the Relay Entity. In order for a frame to be forwarded, this list of requirements must be met:
Transparent bridges store the incoming frames, check the above criteria, check the CRC for errors, and forward frames that need forwarding. Because the frame is stored and processed this way, the bridges are operating in a store-and-forward mode. There is an inevitable delay while the checks are made, referred to as the latency of the bridge. The larger the frames, the longer the latency. Now for the problem: a bridging loop. First, you need to know that redundant bridges can be put between segments, in case one breaks. In the case of switches, the various switches in a network may have redundant connections to each other, so that there are alternate paths available should a port stop working. A bridging loop can be created when packets pass endlessly from one segment to the next across the two bridges. It can also happen if the bridges generate a broadcast storm of new packets. An example: Assume two segments are connected by two bridges. A frame is generated on Segment A from workstation W1, and hits both bridges. Both bridges copy the frame, learn that W1 is on Segment A, and both forward the frame to Segment B. However, each bridge will receive the copy that the other bridge forwards to Segment B. This will cause the bridges to update their databases to show workstation W1 as being on Segment B, and they will forward each these frames back to Segment A. Then the process repeats, again and again and again. This is not good. To avoid the bridging loop problem, IEEE (Institute of Electrical and Electronics Engineers) standard 802.1d gives us the spanning tree protocol. This says that in each redundant pair of bridges, one is the designated bridge, and the other is the backup bridge. Bridges communicate with bridge protocol data units (BPDUs) to determine which is the designated bridge, and when the backup bridge must take over. The network should be diagrammed like a tree. One bridge is chosen to be the root bridge, which sends configuration messages to designated bridges. The root bridge is chosen by its bridge ID, which is an eight
byte (16 hex digits) number composed of two bytes assigned by the
administrator and all six bytes from the MAC address of the port
adapter (NIC). The portion assignable by the administrator is referred
to in the text as the priority value of that bridge. The default priority
value for all devices using Cisco STP is 32,768. This value can
be set with the command: The bridge in the tree with the lowest bridge ID number is the root bridge. Bridges elect a root bridge by sending packets to all ports proclaiming themselves to be the root bridge. If packets are received from bridges with lower IDs, each bridge will acknowledge by changing its opinion, and sending packets that identify the new candidate as the root bridge. (Note that these packets contain the address for the bridge sending the packets in one field, and the address of the bridge it believes to be the root bridge in another field.) A root bridge will continue to send BPDUs every two seconds, by the IEEE standard, even after the election is over. The text compares BPDUs to hello packets, which makes it clearer why they continue as long as the device is running. The text describes several types of switches, characterized by different behaviors that lead to different latencies. Be aware that a frame may contain over 1500 bytes:
The text describes configuring a 1900 switch and a 2950 switch. Your simulation software will allow you to experiment with both.
The text explains that you do not have to configure IP settings for a switch, but you will want to do so if you want to do any of the following:
To view the switch's IP settings use the command show ip. Set a 1900 switch's IP address: Set a 1900 switch's default gateway: To set the IP address of a 2950 switch, you must configure a VLAN interface.
Silly, isn't it? VLANs are not explained until the next chapter. The command
sequence sets the address for VLAN1 which is the default VLAN on any switch. Names for interfaces can be created with the description command. On a 1900 switch, you cannot use spaces in the descriptive names, but you can use underscores as visual separators. 2950 switches allow spaces in descriptive names. Ports on Cisco switches can be configured so that only devices with
specific MAC addresses may be plugged into those ports. Use the command When you make changes to a 1900 switch, those changes are automatically stored in NVRAM for the next boot. The text reminds us that routers do not work this way: they require us to copy the running-config file to the startup-config file if we want to save the running configuration. Like a router, a 2950 switch has running-config and startup-config
files. To copy the running configuration to the startup file, the command
is You can delete the stored configuration from a 1900 switch with the command delete nvram. If you do, the switch loses the running configuration as well, and runs with factory default settings. On a 2950 switch, the command erase startup-config will delete the stored configuration, but the switch does not lose its running configuration unless you restart it without saving. |