- Authors

- Name
- Youngju Kim
- @fjvbn20031
This post is based on the textbook Computer Networking: A Top-Down Approach (6th Edition) by James Kurose and Keith Ross.
- 1. The Need for Protocol Layering
- 2. The Internet Protocol Stack (5-Layer Model)
- 3. Comparison with the OSI 7-Layer Model
- 4. Encapsulation
- 5. Network Security Basics
- 6. Summary
- 7. Review Questions
1. The Need for Protocol Layering
The Internet is an extremely complex system. Numerous applications, various end systems, packet switches, links, and protocols all coexist.
To manage this complexity, we use layering.
1.1 Airline Travel Analogy
Air travel can also be divided into layers:
Departure Arrival
--------- -------
Ticket purchase Baggage claim
| ^
Baggage check Baggage pickup
| ^
Boarding gate Deplaning gate
| ^
Takeoff Landing
| ^
En-route flight ----------------------> En-route flight
Each layer performs its own function and uses the services of the layer below.
1.2 Advantages of Layering
- Modularity: Internal implementation of each layer can be changed independently
- Complexity management: The entire system is divided into smaller, understandable parts
- Flexibility: Protocols at one layer can be replaced with alternatives
2. The Internet Protocol Stack (5-Layer Model)
+-------------------+
| Application Layer | Application Layer
+-------------------+
| Transport Layer | Transport Layer
+-------------------+
| Network Layer | Network Layer
+-------------------+
| Link Layer | Link Layer
+-------------------+
| Physical Layer | Physical Layer
+-------------------+
2.1 Application Layer
The layer where network applications and application-layer protocols reside.
- HTTP: Web document request and transfer
- SMTP: Email transfer
- FTP: File transfer
- DNS: Translating domain names to IP addresses
The information packet at the application layer is called a message.
2.2 Transport Layer
Delivers application-layer messages between end systems.
- TCP: Connection-oriented, reliable delivery, congestion control, flow control
- UDP: Connectionless, unreliable delivery, minimal service
The packet at the transport layer is called a segment.
TCP services:
+ Reliable data delivery (retransmission)
+ Flow control (prevents receiver overload)
+ Congestion control (prevents network overload)
UDP services:
+ Fast transmission (minimal overhead)
x No reliability guarantee
x No flow/congestion control
2.3 Network Layer
Delivers datagrams from one host to another.
- IP protocol: Defines datagram fields and addressing scheme
- Routing protocols: Determine the route from source to destination
The packet at the network layer is called a datagram.
Two core functions of the network layer:
1. Forwarding: Moving a packet to the appropriate output link
2. Routing: Determining the source-to-destination path
Since there is only one IP protocol, the network layer is often called the IP layer.
2.4 Link Layer
While the network layer determines the path from source to destination, the link layer is responsible for actually delivering datagrams from one node to the next.
- Ethernet
- WiFi (802.11)
- PPP
The packet at the link layer is called a frame.
Path: A -> R1 -> R2 -> R3 -> B
Link layer's role:
A --[Ethernet]--> R1 --[WiFi]--> R2 --[PPP]--> R3 --[Ethernet]--> B
Different link-layer protocols can be used on each segment (link).
2.5 Physical Layer
While the link layer delivers data in frame units, the physical layer moves individual bits from one node to the next.
- Deals with actual electrical signals, light signals, and wireless signals
- Protocols differ depending on the medium (copper, fiber, wireless)
3. Comparison with the OSI 7-Layer Model
The OSI (Open Systems Interconnection) model proposed by ISO consists of 7 layers.
OSI 7 Layers Internet 5 Layers
----------- -----------------
Application Layer --+
Presentation Layer --+-- Application Layer
Session Layer --+
Transport Layer ---- Transport Layer
Network Layer ---- Network Layer
Data Link Layer ---- Link Layer
Physical Layer ---- Physical Layer
Presentation Layer
- Data compression, encryption, data format conversion
- In the Internet model, handled directly by the application
Session Layer
- Synchronization of data exchange, checkpointing, recovery
- In the Internet model, handled directly by the application
In the Internet protocol stack, if presentation/session layer functions are needed, application developers implement them directly.
4. Encapsulation
4.1 The Encapsulation Process
Each layer adds its own header information to the data received from the layer above.
Application: [Message]
|
Transport: [Ht|Message] <- Segment
|
Network: [Hn|Ht|Message] <- Datagram
|
Link: [Hl|Hn|Ht|Message] <- Frame
|
Physical: 01011001010110... <- Bits
| Layer | PDU (Protocol Data Unit) | Header Added |
|---|---|---|
| Application | Message | - |
| Transport | Segment | Transport header |
| Network | Datagram | Network header |
| Link | Frame | Link header |
4.2 Complete Encapsulation Flow
Source Host Router Destination Host
+------------+ +--------------+ +------------+
| Application| | | | Application|
+------------+ | | +------------+
| Transport | | | | Transport |
+------------+ +--------------+ +------------+
| Network | | Network | | Network |
+------------+ +--------------+ +------------+
| Link | | Link | | Link |
+------------+ +--------------+ +------------+
| Physical | | Physical | | Physical |
+------------+ +--------------+ +------------+
Host: Implements all 5 layers
Router: Implements only the lower 3 layers (Network, Link, Physical)
Switch: Implements only the lower 2 layers (Link, Physical)
5. Network Security Basics
5.1 The Early Internet and Security
The early Internet was designed with the assumption that only a small number of trusted users would use it. Therefore, security was not included in the original design.
Today, network security is essential, and the following threats exist.
5.2 Major Network Security Threats
Malware
Types of malware:
+-- Virus: Infects through user interaction
+-- Worm: Automatically spreads through the network
+-- Trojan horse: Disguised as legitimate software
+-- Botnet: A network of infected computers
Denial of Service (DoS)
An attack that makes a network, host, or infrastructure unusable for legitimate users.
Three types of DoS attacks:
1. Vulnerability attack: Exploits a specific vulnerability
2. Bandwidth flooding: Saturates links with massive packets
3. Connection flooding: Creates a large number of half-open connections
DDoS (Distributed DoS): Simultaneous attacks from multiple sources
Botnet PC1 --+
Botnet PC2 --+---> Target server (overloaded)
Botnet PC3 --+
... --+
Packet Sniffing
Intercepting copies of packets passing through a shared medium.
Shared medium (WiFi, etc.):
A -------------------- B
|
+-- Sniffer (packet eavesdropper)
Receives copies of all packets
IP Spoofing
Generating packets with a forged source IP address to impersonate another user.
Attacker forges source IP:
Actual IP: 192.168.1.100
Forged IP: 10.0.0.1 (trusted host)
Server mistakenly believes the packet came from the trusted host
5.3 Key Security Principles
Core elements of network security:
+-- Confidentiality: Only sender and receiver understand content
+-- Integrity: Detecting data alteration during transmission
+-- Authentication: Verifying the identity of the other party
+-- Availability: Services are always accessible
6. Summary
Internet Protocol Stack Summary:
Layer PDU Key Protocols Role
----- --- ------------- ----
Application Message HTTP,SMTP,DNS Network applications
Transport Segment TCP, UDP End-to-end data delivery
Network Datagram IP Host-to-host routing
Link Frame Ethernet, WiFi Adjacent node delivery
Physical Bit - Physical bit transmission
Key encapsulation concepts:
- Each layer treats the upper layer's PDU as a payload and adds its own header
- On the receiving side, each layer removes its header and passes data to the upper layer (decapsulation)
7. Review Questions
Q1. What is the PDU name for each layer in the Internet 5-layer model?
| Layer | PDU |
|---|---|
| Application | Message |
| Transport | Segment |
| Network | Datagram |
| Link | Frame |
| Physical | Bit |
Q2. How many layers does a router implement?
A router implements the lower 3 layers (Physical, Link, Network). A router needs the network layer to examine IP datagram headers and make forwarding decisions, but it does not implement the transport or application layers.
Q3. What are the two layers in the OSI model that are absent from the Internet model?
The Presentation layer and the Session layer.
- Presentation layer: Handles data compression, encryption, and format conversion
- Session layer: Handles synchronization of data exchange and checkpointing
In the Internet, these functions are implemented directly by application developers when needed.