|  | 3.3 | Basics of Data Flow Through LANs
| 3.3.3 | Packet flow through Layer 2 devices
It is important to remember that packets are contained inside frames, so to understand how packets travel on Layer 2 devices, you will work with the packets encapsulated form, the frame. Just remember that anything that happens to the frame also happens to the packet. The Figure shows that certain devices operate at Layers 1 and 2. NICs, bridges, and switches involve the use of Data-Link (MAC) address information to direct frames, which means they are referred to as Layer 2 devices. NICs are where the unique MAC address resides. The MAC address is used to create the frame. Bridges work by examining the MAC address of incoming frames. If the frame is local (with a MAC address on the same network segment as the incoming port of the bridge), then the frame is not forwarded across the bridge. If the frame is non-local (with a MAC address not on the incoming port of the bridge), then it is forwarded to the next network segment. Because all of this decision-making by the bridge circuits is done based on MAC addresses, the bridge is shown in the diagram as taking in a frame, removing the frame, examining the MAC address, and then sending or not sending the frame on, as the situation requires. You will not study the details of switching until Semester 3, but for now, consider a switch to be a hub with individual ports that act like bridges. The switch takes a data frame, reads the frame, examines the Layer 2 MAC addresses, and forwards the frames (switches them) to the appropriate ports. So to understand how packets flow in Layer 2 devices, we must look at how the frames are used.
| Web Links
| Encapsulation
| Packets
| Data Encapsulation
| Encapsulation Slide
| Encapsulation of PDUs