
Figure 6-2 shows the
same PCs and cables as were in Figure
6-1, but Figure 6-2 shows a switch
instead of a hub. In fact, in real life, you can do that same thing: Simply
replace a hub with a switch, and use the same cables. The switch still uses a
twisted pair for transmission and another for receiving traffic in each cable.
It uses the same pinouts in the RJ-45 connector. The switch receives on pins 1
and 2 and transmits on pins 3 and 6, just like a hubmeaning that you need a
straight-through cable between the switch and each computer. So, the physical
details can remain the same.
The difference between switches and hubs lies in how they
choose to forward traffic. To make a forwarding
decision, a switch uses a table that lists the MAC addresses in the
network. As shown in Figure 6-2, the
table tells the switch where Barney's MAC address, 0200.2222.2222, sits in the
network. So, when the switch receives a frame whose destination is
0200.2222.2222, the switch forwards the frame out port E1and port E1 only. This
table can be called many things; in this book, I'll refer to it as either the
switching table or the MAC
address table.
You can think of the MAC address table as a road sign and the
switch as an intersection. The switch looks at the road sign and compares it to
the destination of the frame (destination MAC address). The road sign gives the
directionswhich turn, or switch port, to takeso the switch
can forward the frame appropriately.
LAN switching logic improves LAN performance in part because
the frame is not repeated to every computer that is attached to the switch.
Notice that unlike Figure 6-1, Betty and
Wilma do not receive the frame in Figure
6-2. Betty still uses CSMA/CD logic, which begins with the "Listen first,
and wait if you are currently receiving a frame" logic. However, because Betty
is not receiving a frame, if she had a frame to send to Wilma, she could indeed
send, as shown in Figure 6-3.