Bridges usually connect two linear network segments (with one port for each segment). Switches, on the other hand, can connect devices together (with one port for each device). Because most bridges have been replaced by switches, this section focuses on switches.
Switches forward packets based on the destination media access control (MAC) address. Switches learn where devices are located when the devices initially communicate on a network. Switches then put this address information in a table.
When forwarding a packet, switches do not change the packet's contents (such as the network address or the MAC address). In a basic switched environment, all the devices are on the same network.
Like hubs, switches forward all broadcast packets and multicast packets to all ports. After all, these packets are addressed to a group or set of devices.
Switches also forward packets that are addressed to unknown MAC addresses to all active ports. If a MAC address is unknown, switches assume that they have not yet learned about that MAC address. When the intended recipient replies to the packet, switches learn where the MAC address is located.
Switches typically forward packets quickly because they do not make the more complex forwarding decisions that routers make. Although switches are fast, they have do have some inherent disadvantages. For example, consider how a switch would handle the following:
Part of a network is Token Ring, and the other part of the network is Ethernet.
All devices are communicating with one host or port.
A broadcast storm occurs.
A device sends a fragment.
A switched network contains a loop.
Network traffic must be separated into groupings.
A station sends packets to an invalid address.
Unfortunately, these issues can create problems for basic switches. If you must address one of these issues on your company's network, you must purchase a switch with advanced features, such as the following:
Translational switching
Fat pipes
Broadcast throttling
Fragment-free switching
Spanning tree protocol for loop resolution
Virtual LANs (VLANs)
Conversely, switches aren’t used to create internetworks (they do not break up broadcast
domains by default); they’re employed to add functionality to a network LAN. The main
purpose of a switch is to make a LAN work better—to optimize its performance—providing
more bandwidth for the LAN’s users. And switches don’t forward packets to other networks
as routers do. Instead, they only “switch” frames from one port to another within the
switched network.
By default, switches break up collision domains. This is an Ethernet term used to describe
a network scenario wherein one particular device sends a packet on a network segment, forc-
ing every other device on that same segment to pay attention to it. At the same time, a different
device tries to transmit, leading to a collision, after which both devices must retransmit, one
at a time. Not very efficient! This situation is typically found in a hub environment where each
host segment connects to a hub that represents only one collision domain and only one broad-
cast domain. By contrast, each and every port on a switch represents its own collision domain.
NOTE:
Switches create separate collision domains but a single broadcast domain.
Routers provide a separate broadcast domain for each interface.