1. General introduction
Including seven layers, as shown below:
ps: Routers, switches and other devices will only pass through the following three layers, while the communication between two hosts will pass through the seventh layer.
For ease of understanding, let’s make a simple analogy to the process in the figure above: it can be seen as I want to write a letter to a friend, and send it from the post office to the friend’s hand.
- And the letter we wrote on paper is the initial data, nothing else is attached at this time. Then we might need to put it in an envelope, put a lacquer stamp to seal the envelope, put a stamp on it, and write a zip code. These parts are equivalent to
从应用层到物理层的打包
- And how does the post office deliver letters? It may be shipped by ship or by air, which can be seen here
中继系统的通信
. - Finally, the envelope arrived in the hands of her friend. She opened the package layer by layer and saw the letter.
How to explain end-to-end and point-to-point?
End-to-end is, for a friend, she doesn't need to pay attention to how the letter is delivered, for her the most direct is "I sent her a letter", from one end to the other.
Point- to-point is not difficult to understand, that is, each relay system can be regarded as a point.
2. Functions and protocols of each layer and transmission units
Floor | Function | protocol | transfer unit |
---|---|---|---|
physical layer | 1. Define interface characteristics 2. Define transmission rate 3. Define transmission mode (simplex, duplex, half-duplex) 4. Bit encoding 5. Bit synchronization | RS-449, X.21 (just understand) | bits |
data link layer | 1. Framing 2. Error control 3. Flow control 4. Controlling access to shared new arrivals | SDLC, HDLC, PPP, STP, Frame Relay, etc. | frame |
Network layer | 1. Routing (finding the best path) 2. Flow control 3. Congestion control 4. Error control | IP | Datagram |
transport layer | 1. Reliable transmission, unreliable transmission 2. Flow control 3. Error control 4. Multiplexing and demultiplexing | TCP、UDP | segment (TCP) or user datagram (UDP) |
session layer | 1. Establish, manage, and terminate sessions between processes | ADSP, ASP (just understand) | |
presentation layer | 1. Data format change2. Data encryption and decryption3. Data compression and recovery | ASCII, JPEG (just understand) | |
application layer | 1. The interface between the user and the network 2. Provides access to the OSI reference model environment for specific types of network applications | FTP for transfers, SMTP for email, HTTP for the World Wide Web |