0% found this document useful (0 votes)
23 views18 pages

01 Framing-1

The Data Link Layer facilitates communication between network interface cards, encapsulating Layer 3 packets into Layer 2 frames and performing error detection. It consists of two sublayers: the LLC sublayer for protocol identification and the MAC sublayer for data encapsulation and media access control. The layer also defines framing methods, including byte and bit stuffing, and specifies Ethernet frame structure and addressing for effective data transmission.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views18 pages

01 Framing-1

The Data Link Layer facilitates communication between network interface cards, encapsulating Layer 3 packets into Layer 2 frames and performing error detection. It consists of two sublayers: the LLC sublayer for protocol identification and the MAC sublayer for data encapsulation and media access control. The layer also defines framing methods, including byte and bit stuffing, and specifies Ethernet frame structure and addressing for effective data transmission.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Data Link Layer

Unit 2

02/05/2025
Purpose of the Data Link Layer​

The Data Link Layer​


• The Data Link layer is responsible for communications
between end-device network interface cards.​
• Itallows upper layer protocols to access the physical layer
media and encapsulates Layer 3 packets (IPv4 and IPv6) into
Layer 2 Frames.​
• It also performs error detection and rejects corrupts frames.​

02/05/2025
Purpose of the Data Link Layer​

The Data Link Layer​Duties

02/05/2025
Purpose of the Data Link Layer

Position of Data Link Layer

02/05/2025
​ Data Link Sublayers
Ethernet Frames

The 802 LAN/MAN standards,


including Ethernet, use two
separate sublayers of the data
link layer to operate:

• LLC Sublayer: (IEEE 802.2)


Places information in the
frame to identify which
network layer protocol is
used for the frame.

• MAC Sublayer: (IEEE


802.3, 802.11, or 802.15)
Responsible for data
encapsulation and media
access control, and provides
data link layer addressing.
Computer Networks 02/05/2025
​Data Link Frame
The Frame​

Data is encapsulated by the data link layer with a header


and a trailer to form a frame.

A data link frame has three parts:​
•Header​
•Data​
•Trailer​

The fields of the header and trailer vary according to data


link layer protocol.​

​ he amount of control information carried with in the frame


T
varies according
Computer Networks
to access control information and logical 02/05/2025
topology.​
Data Link Frame ​
​Frame Fields

Field​ Description​
Frame Start and Stop​ Identifies beginning and end of frame​
Addressing​ Indicates source and destination nodes​
Type​ Identifies encapsulated Layer 3 protocol​
Control​ Identifies flow control services ​
Data​ Contains the frame payload​
Error Detection​ Used for determine transmission errors​

02/05/2025
Data Link Frame
​Layer 2 Addresses​
•Also referred to as a physical address.​
•Contained in the frame header.​
•Used only for local delivery of a frame on
the link.​
•Updated by each device that forwards the
frame.

Computer Networks
02/05/2025
Data Link Layer
​FRAMING

The data link layer needs to pack bits into frames, so


that each frame is distinguishable from another. Our
postal system practices a type of framing.

The simple act of inserting a letter into an envelope


separates one piece of information from another; the
envelope serves as the delimiter. ​

Fixed-Size Framing:– no boundaries for frames, size


used as the delimeter

Variable-Size Framing:– define begining and end of


frame, character oriented or bit oriented approach
Computer Networks 02/05/2025
Data Link Layer
​ FRAMING

Character-oriented
protocol: In a
character-oriented
protocol, data to be
carried are 8- bit
characters from a
coding system such as
ASCII . The header, A frame in a character-oriented protocol
which normally carries
the source and To separate one frame from the next, an
destination addresses 8-bit (1-byte) flag is added at the
and other control beginning and the end of a frame.
information, and the The flag, composed of protocol-
trailer, which carries dependent special characters, signals the
error detection or start or end of a frame. Figure shows the
error correction format of a frame in a character-oriented
02/05/2025
Computer Networks
protocol
Data Link Layer
​ FRAMING

Bit-oriented protocol: In a bit-oriented protocol, the data section of a


frame is a sequence of bits to be interpreted by the upper layer as text,
graphic, audio, video, and so on. However, in addition to headers (and
possible trailers), we still need a delimiter to separate one frame from the
other.

Most protocols use a special 8-bit pattern flag 01111110 as the delimiter
to define the beginning and the end of the frame, as shown in Figure.

A frame in a bit-oriented protocol


Computer Networks 02/05/2025
Data Link Layer
​FRAMING

Byte stuffing and unstuffing


(Used in Character-oriented protocols)

Byte stuffing is the process of adding 1 extra byte


whenever there is a flag or escape character in the text.

Computer Networks 02/05/2025


Data Link Layer
​FRAMING
Framing : Byte Stuffing

(a) A frame delimited by flag bytes.


(b) Four examples of byte sequences before and after
stuffing.
Computer Networks 02/05/2025
Data Link Layer
​FRAMING

Bit stuffing and unstuffing


(Used in Bit-Oriented Protocols)

Bit stuffing is the process of adding one extra 0


whenever five consecutive 1s follow a 0 in the data, so
that the receiver does not mistake the pattern
0111110 for a flag.

A frame in a bit-oriented protocol


Computer Networks 02/05/2025
Data Link Layer
​FRAMING: Bit stuffing and unstuffing

Computer Networks 02/05/2025


​ Ethernet Frame Fields
Ethernet Frames

• The minimum Ethernet frame size is 64 bytes and the maximum is


1518 bytes. The preamble field is not included when describing
the size of the frame.
• Any frame less than 64 bytes in length is considered a “collision
fragment” or “runt frame” and is automatically discarded. Frames
with more than 1500 bytes of data are considered “jumbo” or
“baby giant frames”.
• If the size of a transmitted frame is less than the minimum, or
greater than the maximum, the receiving device drops the frame.
Dropped frames are likely to be the result of collisions or other
unwanted signals. They are considered invalid. Jumbo frames are
usually supported by most Fast Ethernet and Gigabit Ethernet
switches and NICs.

Computer Networks 02/05/2025


​ Ethernet Frame Fields
Ethernet Frames

The MAC sublayer is responsible for data


encapsulation and accessing the media.

Data Encapsulation
IEEE 802.3 data encapsulation includes the
following:
1. Ethernet frame - This is the internal structure of the
Ethernet frame.
2. Ethernet Addressing - The Ethernet frame includes
both a source and destination MAC address to deliver the
Ethernet frame from Ethernet NIC to Ethernet NIC on the
same LAN.
02/05/2025
3. Ethernet Error detection - The Ethernet frame includes
Computer Networks
​ MAC Sublayer
Ethernet Frames

Media Access
• The IEEE 802.3 MAC sublayer includes the specifications
for different Ethernet communications standards over
various types of media including copper and fiber.
• Legacy Ethernet using a bus topology or hubs, is a shared,
half-duplex medium. Ethernet over a half-duplex medium
uses a contention-based access method, carrier sense
multiple access/collision detection (CSMA/CD).
• Ethernet LANs of today use switches that operate in full-
duplex. Full-duplex communications with Ethernet
switches do not require access control through CSMA/CD

Computer Networks 02/05/2025

You might also like