总结
计算机之间通信需要知道彼此的地址IP地址。
数据在网络上传输时会被分成小包,称为数据包。
数据包里有元数据,比如发送和接收的IP地址,就像信封上的寄件人和收件人信息。
如何确定数据包顺序?引入TCP,TCP header包含序列号等信息,保证数据包顺序正确。
Communication Between Computers

- Communication between a client computer and a server is similar to sending mail.
- Each computer must have a unique address, known as an IP address, to send and receive data.
IP Addresses
- Definition: An IP address uniquely identifies a machine on the network.
- Format: Written in four sets of digits separated by dots (e.g., 192.168.0.1).
- 32-bit Address: IPv4 addresses are 32-bit, allowing for about 4 billion unique addresses.
- Limitation: The limitation of IPv4 is addressed by IPv6, which uses 128-bit addresses.
Data Transmission
- Internet Protocol (IP): Rules for sending data between computers.
- Packet of Data:
- Components:
- Metadata (Header): Source and destination IP addresses.
- Data Payload: Actual content being sent.
- Analogy: Envelope containing a letter; the envelope has sender and receiver addresses (metadata), and the letter is the data payload.
Transmission Control Protocol (TCP)

- Function: Ensures data packets are reassembled in the correct order.