CSC 303
CSC 303
Transmits raw bit streams over a physical medium (cables, fiber optics,
wireless).
Examples: Ethernet cables, USB, and radio frequencies.
2. Layer 2: Data Link Layer
Provides node-to-node data transfer and error detection/correction.
1. Application Layer
2. Transport Layer
3. Internet Layer
4. Network Access Layer
1. Application Layer
3.Network Layer
1. Application Layer:
o The data is created by the application (e.g., a message, file, or
request).
o This data is passed to the Transport Layer.
2. Transport Layer:
o The Transport Layer (e.g., TCP or UDP) adds a header to the
data. This header contains information like the source and
destination port numbers, sequence numbers, and error-
checking codes.
o The resulting unit is called a segment (TCP) or datagram
(UDP).
3. Network Layer:
o The Network Layer (IP) adds its own header, which includes
the source and destination IP addresses.
o The resulting unit is called a packet.
4. Data Link Layer:
oThe Data Link Layer (e.g., Ethernet or Wi-Fi) encapsulates
the packet into a frame by adding a header and possibly a
trailer.
o The header includes the source and destination MAC
addresses, while the trailer may include error-detection data
(e.g., CRC).
5. Physical Layer:
o Finally, the frame is converted into bits (0s and 1s) and
transmitted as electrical signals, light pulses, or radio waves
over the physical medium.
1. Physical Layer:
o The Physical Layer receives the raw bits and converts them
into a frame. This frame is passed to the Data Link Layer.
2. Data Link Layer:
o The Data Link Layer verifies the frame (using the trailer) and
removes the Data Link Layer header and trailer.
o The remaining packet is passed to the Network Layer.
3. Network Layer:
o The Network Layer checks the IP header (validates the
destination IP) and removes it.
Encapsulation happens when data is prepared to be sent over the network. It involves wrapping
the data with protocol-specific headers (and sometimes footers) as it moves down the layers of
the TCP/IP model.
1. Application Layer:
o The data is created by the application (e.g., a message, file, or request).
o This data is passed to the Transport Layer.
2. Transport Layer:
o The Transport Layer (e.g., TCP or UDP) adds a header to the data. This header
contains information like the source and destination port numbers, sequence
numbers, and error-checking codes.
o The resulting unit is called a segment (TCP) or datagram (UDP).
3. Network Layer:
o The Network Layer (IP) adds its own header, which includes the source and
destination IP addresses.
o The resulting unit is called a packet.
4. Data Link Layer:
o The Data Link Layer (e.g., Ethernet or Wi-Fi) encapsulates the packet into a
frame by adding a header and possibly a trailer.
o The header includes the source and destination MAC addresses, while the trailer
may include error-detection data (e.g., CRC).
5. Physical Layer:
o Finally, the frame is converted into bits (0s and 1s) and transmitted as electrical
signals, light pulses, or radio waves over the physical medium.
Decapsulation is the reverse process that occurs at the receiving end. The additional headers (and
trailer) are removed layer by layer as the data travels up the TCP/IP model.
1. Physical Layer:
o The Physical Layer receives the raw bits and converts them into a frame. This
frame is passed to the Data Link Layer.
2. Data Link Layer:
o The Data Link Layer verifies the frame (using the trailer) and removes the Data
Link Layer header and trailer.
o The remaining packet is passed to the Network Layer.
3. Network Layer:
o The Network Layer checks the IP header (validates the destination IP) and
removes it.
o The remaining segment/datagram is passed to the Transport Layer.
4. Transport Layer:
o The Transport Layer checks the header (e.g., port numbers and sequence
numbers), removes it, and passes the payload (data) to the Application Layer.
5. Application Layer:
o The Application Layer processes the data, making it available to the user or
application.
Visual Representation
scss
CopyEdit
Encapsulation (Sender) Decapsulation (Receiver)
--------------------- ------------------------
Application Layer -> [Data] <- Application Layer
Transport Layer -> [Header + Data] <- Transport Layer
Network Layer -> [Header + Segment] <- Network Layer
Data Link Layer -> [Header + Packet] <- Data Link Layer
Physical Layer -> [Bits] <- Physical Layer
Encapsulation and decapsulation ensure the data flows smoothly between devices, enabling
reliable communication across a network.
4. Transport Layer:
o The Transport Layer checks the header (e.g., port numbers
and sequence numbers), removes it, and passes the payload
(data) to the Application Layer.
5. Application Layer:
o The Application Layer processes the data, making it available
to the user or application.
Summary of Units at Each Layer
Visual Representation
scss
CopyEdit
Encapsulation (Sender) Decapsulation (Receiver)
--------------------- ------------------------
Application Layer -> [Data] <- Application Layer
Transport Layer -> [Header + Data] <- Transport Layer
Network Layer -> [Header + Segment] <- Network Layer
Data Link Layer -> [Header + Packet] <- Data Link Layer
Physical Layer -> [Bits] <- Physical Layer