Professional Documents
Culture Documents
Looping
Link Layer & Local Area Networks
Outline
• Introduction to Link layer services
• Error Detection and Correction Techniques
• Multiple Access Protocols
• Addressing
• Ethernet, Switches & VLAN
Introduction (Link Layer )
bridge between devices.
It uses links (connections) to move information (wires or without wires).
Data in form of frames.
responsibility of transferring data from one node to physically adjacent node over a link.
divided into two sub-layers: Logical Link Control (LLC) and Media Access Control /
Medium Access Control (MAC).
The link layer is implemented in every device.
It's also in the network adapter (or network interface card - NIC) that connects to your device.
Hardware Implementation:
Most of the link layer work happens in the hardware (network adapter)
Software Implementation:
When data is received, the software responds to interrupts, deals with errors, and passes the data up to the
network layer.
Link Layer Services (MAC layer)
Framing(variable length or fixed length): Wraps up data in a frame, add header.
Link Access : “MAC” addresses used to identify source and destination.
Reliable Delivery : If it promises reliable delivery, it ensures data reaches the other side without
mistakes, using acknowledgments.
Flow Control : regulate data flow between sender and receiver.
Error Detection & Correction : It spots and fixes mistakes.
Receiver identifies and corrects bit error(s).
Bit Rate: number of bits transmitted per unit of time, usually measured in bits per second (bps).
Example: A communication channel with a bit rate of 1000 bps can transmit 1000 bits in one second.
Baud Rate: symbol rate or modulation rate, refers to the number of signal transmit (symbols or
events) per unit of time. symbols per second. It is the number of distinct symbol changes
Example: In a communication system with a baud rate of 1000 symbols per second, each symbol can
represent multiple bits
Error Detection & Correction Technique
Parity Check
One extra bit is sent along with the original bits to make number of 1s either even in case of even parity,
or odd in case of odd parity.
Helps detect single-bit errors.
Two-Dimensional Parity:
Arrange data in a table and calculate parities for rows and columns.
Parity Checking (Even Parity): Count 1s in a frame. If count is even, frame is fine. If count is odd, something
might be wrong.
Hard for the receiver to figure out if more than one bit is wrong.
1 0 0 1 0 0 1 1 0 0 1 0 0 1 1
Two-Dimensional Parity:
Arrange data in a table and calculate parities for rows and columns.
Checksum 10010111 1
Same 0
Differ 1
Token Passing
No designated master node.
Nodes pass a special frame called a token.
Token moves in a fixed order
(e.g., Node 1 → Node 2 → ... → Node N → Node 1).
A node keeps the token only if it has frames to transmit.
If no frames, it passes the token to the next node.
Ethernet : connecting devices in a wired local area network (LAN) or wide area network.
widely used local area network (LAN) technology.
IEEE standard - Institute of Electrical and Electronics Engineers
1. Switched Ethernet / Standard Ethernet
It gives dedicated 10 Mbps bandwidth on each of its ports.
Recognizes destination addresses and forwards frames accordingly.
Use star topology
2. Fast Ethernet
Developed by IEEE Committee. Low cost, full duplex, no collision, connect two or more
station together
data transfer rate of 100 Mbps.
3. Gigabit Ethernet
Fiber optic-based technology but can use twisted or coaxial cables for shorter distances.
Support both half and full duplex, no collision
data rate to 1 Gbps.
4. Ten-gigabit Ethernet (10 Gbps)
Virtual LANs (VLANs)
creating virtual groups for computers in a network based on tasks, ignoring where they physically are.
Features:
Easy to moves, adds, and changes end stations.
manage traffic in specified groups, limiting broadcast, unicast, and multicast.
Enhances security by segmenting into distinct broadcast domains.
Components:
Switches: Logically segment connected end stations.
Routers: Facilitate VLAN communications between workgroups.
Transport Protocols: Carry VLAN traffic.
Ethernet Frame Structure:
• Preamble (8 bytes): A friendly "Hello!" , before sending the actual data. Also helps with timing.
• Destination Address (6 bytes): Tells the network where to send the info.
• Source Address (6 bytes)
• Type Field (2 bytes): Tells the network what kind of data it is (e.g., a video or a document).
• Data Field (46 to 1,500 bytes): Carries the actual data, like an email or a webpage.
• CRC (4 bytes): contains error detection information.
Bit Stuffing
Bit-oriented protocols use a bit pattern (01111110) as flags at the beginning and end of
each frame.
Bit stuffing solve the issue of flag patterns appearing in data.
If a 0 and five successive 1 bits are encountered, an extra 0 is added.
The receiver node removes the extra-added zero.
Original Bit Stream (without bit stuffing):0111111001111100101111110
After Bit Stuffing:01111110011111000101111110
Byte Stuffing
each frame starts and ends with special bytes, known as flag bytes.
Two consecutive flag bytes indicate the end of one frame and the start of the next.
An issue arises if the flag byte's bit pattern appears in the actual data
To address this problem, the sender inserts a special escape byte (ESC)
disadvantage is that byte stuffing use of 8-bit characters, limiting its compatibility with
character codes that use different sizes
Byte Stuffing - Example