Data Link Layer Summary PDF

Summary

This document provides a summary of the Data Link Layer, a crucial layer in networking. It explains key concepts such as encapsulation, media access, error detection (using FCS), and logical link control (LLC). The document also covers the Ethernet frame structure and MAC addresses. The summary is well formatted and includes detailed information.

Full Transcript

Short version : **Purpose of the Data Link Layer** 1. **Encapsulation**: Accepts Layer 3 packets (IPv4/IPv6) and encapsulates them into Layer 2 frames with MAC addresses. 2. **Media Access**: Controls how data is placed on and received from the physical media (Layer 1). 3. **Error Det...

Short version : **Purpose of the Data Link Layer** 1. **Encapsulation**: Accepts Layer 3 packets (IPv4/IPv6) and encapsulates them into Layer 2 frames with MAC addresses. 2. **Media Access**: Controls how data is placed on and received from the physical media (Layer 1). 3. **Error Detection**: Detects and rejects corrupted frames using **Frame Check Sequence (FCS)**. 4. **NIC-to-NIC Communication**: Facilitates communication within the same network segment. **Sublayers of the Data Link Layer** 1. **Logical Link Control (LLC)**: - Interfaces between Layer 3 and hardware (Layer 1). - Adds control information to deliver packets. 2. **Media Access Control (MAC)**: - Controls access to the media. - Responsible for **data encapsulation**, addressing, and error detection. **Ethernet Frame Structure** - **Header**: Contains Source and Destination MAC addresses. - **Data**: The payload (encapsulated Layer 3 packet). - **Trailer**: Includes **FCS** for error detection using **Cyclic Redundancy Check (CRC)**. **MAC Address** - **Unicast**: One-to-one communication. - **Broadcast**: One-to-all (FF-FF-FF-FF-FF-FF). - **Multicast**: One-to-many. **Switch Learning**: Switches build a **MAC address table** by learning Source MAC addresses and associated ports. **Packet Forwarding Modes**: - **Unicast**: Sent directly to the destination MAC address. - **Broadcast**: Sent to all devices in the VLAN (except the sender). **Address Resolution Protocol (ARP)** - Resolves IPv4 addresses to MAC addresses. - **ARP Request**: Broadcast frame to determine a device\'s MAC address. - **ARP Table**: Maps IPv4 addresses to MAC addresses. **Flow Control & Error Control** - **Flow Control**: Prevents overwhelming the receiver. Methods: 1. **Stop-and-Wait** 2. **Sliding Window** - **Error Detection**: Uses **FCS** to identify corrupted frames. **Summary** The **Data Link Layer** ensures reliable communication between nodes by: - Encapsulating packets into frames. - Adding MAC addresses for local delivery. - Managing access to media. - Detecting errors. **Key Components**: Ethernet frames, MAC addressing, ARP, flow control, and error handling. Longer and detailed version : Here is a more detailed yet organized and easy-to-learn summary of the **Data Link Layer** based on Cisco networking concepts **Purpose of the Data Link Layer** The **Data Link Layer** (Layer 2) is responsible for communication between devices over the same physical network (local segment). It prepares data for transmission and provides access to the physical media. It performs the following key functions: 1. **Encapsulation**: Accepts Layer 3 packets (e.g., IPv4/IPv6) and encapsulates them into **Layer 2 frames**. 2. **Media Access Control**: Controls how data is placed onto and received from the physical medium. 3. **Frame Exchange**: Transfers frames between nodes (devices) on the network. 4. **Error Detection**: Identifies and rejects corrupted frames using **Frame Check Sequence (FCS)** with **Cyclic Redundancy Check (CRC)**. 5. **Flow Control**: Ensures a fast sender does not overwhelm a slow receiver. 6. **Line Discipline**: Manages which device sends data and when it can send. **Key Concepts and Components** **Data Link Layer Sublayers (IEEE 802)** The Data Link Layer is divided into two sublayers: 1. **Logical Link Control (LLC)**: - Interfaces between the Layer 3 network protocol and the Layer 2 hardware. - Adds Layer 2 control information for error control and delivery. - Supports IPv4 and IPv6 packets. 2. **Media Access Control (MAC)**: - Responsible for **data encapsulation** and **media access control**. - **Encapsulation**: Adds MAC addresses (Source and Destination) and error detection information. - Controls access to the shared media (wired or wireless). **Ethernet Frame Structure** A Layer 2 frame consists of the following fields: 1. **Header** - **Preamble**: Synchronizes sending and receiving devices. - **Destination MAC Address**: Identifies where the frame is going. - **Source MAC Address**: Identifies the originating NIC. - **Type/Length Field**: Identifies the encapsulated Layer 3 protocol (e.g., IPv4, IPv6). 2. **Data** - The payload contains the encapsulated Layer 3 packet. 3. **Trailer** - **Frame Check Sequence (FCS)**: Ensures data integrity by detecting errors using **Cyclic Redundancy Check (CRC)**. **MAC Address** A **MAC address** (Media Access Control address): - A 48-bit (6-byte) physical address written in **hexadecimal** format. - It uniquely identifies a device\'s NIC (Network Interface Card). - Assigned at the factory and stored in the device's hardware. **Types of MAC Addresses**: 1. **Unicast**: Frame sent to a specific device. 2. **Broadcast**: Frame sent to all devices on the local network (FF-FF-FF-FF-FF-FF). 3. **Multicast**: Frame sent to a specific group of devices. **Switch Learning and Forwarding (MAC Address Table)** Switches learn and forward frames based on the **MAC address table**: 1. **Learning**: - When a frame enters a switch, the switch examines the **Source MAC Address** and port number. - If the MAC address is not in the table, it is added along with the port number. 2. **Forwarding**: - If the **Destination MAC Address** is known, the switch forwards the frame to the correct port (Unicast). - If unknown or for **Broadcast/Multicast**, the frame is flooded to all ports except the sender's port. 3. **MAC Table Aging**: Entries remain in the table for a default of **5 minutes** before being refreshed or removed. **Flow Control** Flow control manages the rate of data transmission to prevent frame loss: 1. **Stop-and-Wait**: - The sender sends one frame and waits for an acknowledgment (ACK) before sending the next. 2. **Sliding Window**: - Allows the sender to send multiple frames before requiring an ACK. This improves efficiency. **Error Detection** Errors occur when bits are corrupted during transmission due to noise. The Data Link Layer uses **Error Detection Codes**: 1. **Frame Check Sequence (FCS)**: A trailer field that uses **Cyclic Redundancy Check (CRC)** to detect errors in a frame. 2. **Parity Bit**: Simple error detection method for identifying single-bit errors. **Line Discipline** Ensures proper coordination between devices: - **ENQ/ACK (Enquiry/Acknowledgement)**: - The sender transmits an **ENQ (enquiry)** frame to check if the receiver is ready. - The receiver responds with **ACK (positive)** or **NACK (negative)** acknowledgment. - **Poll/Select**: The sender polls devices to determine who should send data next. **Address Resolution Protocol (ARP)** ARP resolves IPv4 addresses to MAC addresses: 1. **ARP Request**: Broadcast frame (FF-FF-FF-FF-FF-FF) sent to determine the MAC address for a known IPv4 address. 2. **ARP Reply**: The destination device responds with its MAC address. 3. **ARP Table**: Stores mappings of IPv4 addresses to MAC addresses in memory. **Transmission Types at Layer 2** 1. **Unicast**: Frame sent to a single destination MAC address. 2. **Broadcast**: Frame sent to all devices on the local network (FF-FF-FF-FF-FF-FF). 3. **Multicast**: Frame sent to a specific group of devices. **Logical and Physical Topologies** 1. **Physical Topology**: - Shows the physical layout of devices and connections. Examples: star, bus, ring. 2. **Logical Topology**: - Represents how data flows between devices (virtual connections). It depends on MAC addressing and IP schemes. **Data Link Layer PDU: Frame** The **Protocol Data Unit (PDU)** at the Data Link Layer is a **Frame**. - Frames contain control information for addressing, error detection, and delivery. **Summary** The **Data Link Layer** ensures reliable communication between devices on the same network segment by: 1. **Encapsulating Layer 3 packets** into Layer 2 frames. 2. Adding MAC addressing (Source/Destination). 3. Managing media access control. 4. Performing error detection (FCS/CRC). 5. Resolving IPv4-to-MAC mapping using **ARP**. **Key Components**: - MAC Address, Ethernet Frames, Switch Learning (MAC Table), Flow Control, Error Detection, and ARP. By providing these services, the Data Link Layer enables smooth communication between nodes within the same network. **Abbreviation** **Full Form** ------------------ --------------------------------------------------- **LLC** Logical Link Control **MAC** Media Access Control **FCS** Frame Check Sequence **CRC** Cyclic Redundancy Check **PDU** Protocol Data Unit **NIC** Network Interface Card **ARP** Address Resolution Protocol **ENQ** Enquiry **ACK** Acknowledgment **NACK** Negative Acknowledgment **EOT** End of Transmission **IEEE** Institute of Electrical and Electronics Engineers **ITU** International Telecommunication Union **ISO** International Organization for Standardization **ANSI** American National Standards Institute **VLAN** Virtual Local Area Network **LAN** Local Area Network **WAN** Wide Area Network **WPAN** Wireless Personal Area Network **WLAN** Wireless Local Area Network **IP** Internet Protocol **IPv4** Internet Protocol Version 4 **IPv6** Internet Protocol Version 6 **ND** Neighbor Discovery

Use Quizgecko on...
Browser
Browser