Link-layer Switches

Link-layer Switches

As illustrated in Figure 1, modern Ethernet LANs use a star topology, with each node connecting to a central switch. Up until this point, we have been unclear about what a switch actually does and how it works. The role of the switch is to receive incoming link-layer frames and forward them onto outgoing links; we'll study this forwarding function in detail shortly. The switch itself is transparent to the nodes; that is, a node addresses a frame to another node (rather than addressing the frame to the switch) and happily sends the frame into the LAN, unaware that a switch will be receiving the frame and forwarding it to other nodes. The rate at which frames arrive to any one of the switch's output interfaces may temporarily exceed the link capacity of that interface. To accommodate this problem, switch output interfaces have buffers, in much the same way that router output interfaces have buffers for datagrams. Let's now examine how switches operate.

An institutional network using a combination of hubs

Forwarding and Filtering


Filtering is the switch function that determines whether a frame should be forwarded to some interface or should just be dropped. Forwarding is the switch function that determines the interfaces to which a frame should be directed, and then moves the frame to those interfaces. Switch filtering and forwarding are done with a switch table. The switch table includes entries for some, but not necessarily all, of the nodes on a LAN. An entry in the switch table contains (1) the MAC address of a node, (2) the switch interface that leads toward the node, and (3) the time at which the entry for the node was placed in the table. An example switch table for the uppermost switch in Figure 1 is shown in Figure 2. Although this description of frame forwarding may sound similar to our discussion of datagram forwarding in "The Network Layer", we'll see shortly that there are important differences. One important difference is that switches forward packets based on MAC address rather than on IP addresses. We will also see that a switch table is constructed in a very different manner from a router's forwarding table.

Portion of a switch table for the uppermost switch in Figure 1

To understand how switch filtering and forwarding works, suppose a frame with destination address DD-DD-DD-DD-DD-DD arrives at the switch on interface x. The switch indexes its table with the MAC address DD-DD-DD-DD-DD-DD, There are three possible cases:

● There is no entry in the table for DD-DD-DD-DD-DD-DD. In this case, the switch forwards copies of the frame to the output buffers preceding all interfaces except for inerface x. In other words, if there is no entry for the destination address, the switch broadcasts the frame.

● There is an entry in the table, associating DD-DD-DD-DD-DD-DD with interface x. In this case, the frame is coming from a LAN segment that contains adapter DD-DD-DD-DD-DD-DD. There being no need to forward the frame to any of the other interfaces, the switch performs the filtering function by discarding the frame.

● There is an entry in the table, associating DD-DD-DD-DD-DD-DD with interface y≠x. In this case, the frame needs to be forwarded to the LAN segment attached to interface y. The switch performs its forwarding function by putting the frame in an output buffer that precedes interface y.

Let's walk through these rules for the uppermost switch in Figure 1 and its switch table in Figure 2. Suppose that a frame with destination address 62-FE-F7-11-89-A3 arrives at the switch from interface 1. The switch examines its table and sees that the destination is on the LAN segment  connected to interface 1 (that is, Electrical Engineering). This means that the frame has already been broadcast on the LAN segment that contains the destination. The switch therefore filters (that is, discards) the frame. Now suppose a frame with the same destination address arrives from interface 2. The switch again examines its table and sees that the destination is in the direction of interface 1; it therefore forwards the frame to the output buffer preceding interface 1. It should be clear from this example that as long as the switch table is complete and accurate, the switch forwards frames towards destinations without any broadcasting

In this sense, a switch is "smarter" than a hub. But how does this switch table get configured in the first place? Are there link-layer equivalents to network-layer routing protocols? Or must an overworked manager manually configure the switch table?


Tags

star topology, buffers, switch table, forwarding table

Copy Right

The contents available on this website are copyrighted by TechPlus unless otherwise indicated. All rights are reserved by TechPlus, and content may not be reproduced, published, or transferred in any form or by any means, except with the prior written permission of TechPlus.