
Layer 2 (Data Link)
Layer 2, also known as the Data Link layer, is part of the OSI model in computer networking. It acts as a bridge between the physical hardware (like cables and switches) and higher layers that manage data communication. Its main job is to ensure reliable transmission of data frames between directly connected devices, handling error detection and correction. It also manages how devices share the same medium, preventing collisions. Essentially, Layer 2 organizes and controls the way data packets are packaged, sent, and received across local networks, enabling seamless communication within the same network segment.