1. OSI Seven-Layer Model
Core Idea: Layering and Encapsulation
·Layering: The complex communication process is divided into multiple smaller, more specialized layers. Each layer utilizes the services provided by the layer below and provides services to the layer above.
·Encapsulation: When sending data, the data moves from the upper layer to the lower layer, with each layer adding a header to the data, and sometimes a trailer as well. This process is akin to writing a letter, sequentially placing it into paper, an envelope, and a package.
·Decapsulation: When receiving data, the process is reversed, moving from the lower layer to the upper layer, stripping off headers layer by layer, reading the information, and finally delivering the original data to the application.
|
Layer |
Name |
Function Description |
Protocols/Standards |
Data Unit |
Relation to Network Card/Operations |
|
7 |
Application Layer |
Provides network service interfaces for applications. The layer where users directly interact. |
HTTP, HTTPS, FTP, DNS, SMTP |
Data Stream |
The layer where applications like browsers and email clients operate. Operations focus on application performance monitoring. |
|
6 |
Presentation Layer |
Responsible for data translation, encryption/decryption, and compression. Ensures that the application layer can read data from another host’s application layer. |
SSL/TLS, JPEG, MPEG |
Data Stream |
Encryption and decryption occur here when you access HTTPS websites. |
|
5 |
Session Layer |
Responsible for establishing, managing, and terminating sessions. Distinguishes communication streams of different applications. |
NetBIOS, RPC |
Data Stream |
Maintains the continuity of a network connection (e.g., video conferencing). |
|
4 |
Transport Layer |
Provides reliable or unreliable end-to-end transmission. Responsible for flow control and error checking. |
TCP, UDP |
Segment |
The core layer for operations! • ping/traceroute diagnostics • netstat to view connections • iperf3 to test TCP/UDP performance |
|
3 |
Network Layer |
Responsible for logical addressing and routing. Sends packets from one network to another. |
IP, ICMP, Routers |
Packet |
The core layer for operations! • IP address planning • Router/Layer 3 switch configuration • Using tracert to analyze paths |
|
2 |
Data Link Layer |
Responsible for physical addressing and medium access. Encapsulates packets into frames for transmission within the same local area network. |
Ethernet, VLAN, Switches, MAC Addresses |
Frame |
The core layer for network cards! • MAC address is the physical identity of the network card • VLAN, NIC Teaming operate at this layer • Switches operate at this layer • Wireshark captures and analyzes frame structure |
|
1 |
Physical Layer |
Defines physical standards. Responsible for transmitting raw bit streams over physical media. |
RJ-45, Fiber Optics, Coaxial Cables, Hubs |
Bit |
The core layer for network cards! • Network card interfaces (RJ-45, SFP+) • Network cables, fiber optics |
2. Comparison of the TCP/IP Four-Layer Model and the OSI Seven-Layer Model
Core Idea: End-to-End Principle
|
TCP/IP Layer |
Function Description |
Corresponding OSI Layer |
Core Protocols |
Data Unit |
Relation to Network Card/Operations |
|
4. Application Layer |
Provides specific application services to users. It defines data formats and dialogue control. |
Application Layer, Presentation Layer, Session Layer |
HTTP, HTTPS, DNS, FTP, SMTP, SSH |
Data Stream |
Operations focus: • Web services (Nginx/Apache) • Domain name resolution (DNS) • Application performance monitoring |
|
3. Transport Layer |
Provides end-to-end communication for applications on two hosts. Responsible for data segmentation, port addressing, flow control, and reliability. |
Transport Layer |
TCP, UDP |
Segment |
The core layer for operations! • netstat -tulnp to view port listening and connections • iperf3 to test TCP/UDP performance and bandwidth • Firewall policies (based on ports) |
|
2. Network Layer |
Responsible for logical addressing and routing packets across networks (from source host to destination host). |
Network Layer |
IP, ICMP, ARP, Routers |
Packet |
The core layer for operations! • IP address planning and allocation • Routing table configuration and troubleshooting • ping (ICMP) / traceroute diagnostics • arp -a to view MAC address mappings |
|
1. Network Interface Layer |
Responsible for data frame transmission within the same local network. Handles interactions with physical media. |
Data Link Layer, Physical Layer |
Ethernet, 802.11 (Wi-Fi), Switches, Network Cards |
Frame |
The core layer for network cards! • Network card drivers, MAC addresses • VLAN, NIC Teaming • Switch configuration • Network cables, fiber optics, signals |