osi five protocols are: physical link layer, a data link layer, network layer, transport layer and application layer
A physical connection layer
The predetermined characteristics of the transmission medium, provide enough bandwidth to transmit an electrical signal (binary data)
Second, the data link layer (data channel)
Data Link: establishing communication links and communication links dismantling process when each communication. The main purpose is to ensure the correct transmission of data.
The computer may be connected to the switch, the switch composed of the LAN, the LAN transmission provided with a full parallel data.
Ethernet protocols:
1, the predetermined groupings of binary data.
2, stipulates that all computers must have a network card.
PS: The computer will be engraved with a unique serial number on the card at the factory, is the mac address, is a string of 12 hexadecimal digits.
Third, the network layer
Solutions over a plurality of terminals, the data link any two terminals connected together.
IP protocol:
It provides any Internet-connected computer must have an IP address.
Fourth, the transport layer
Port Protocol
port:
One is used to uniquely identify the application on the computer
PS: In fact, communication between computers is communication between applications on your computer
Port range: 0 to 65535
0 ~ 1024 is the operating system needs to use the port number
We recommend using port numbers after 8000
Common port numbers:
MySQL:3306
Redis: 6379
Django:8000
flask:5000
IP + port: one of the only applications on a computer connected to the Internet to identify.
V. Application Layer
HTTP protocol: Hypertext Transfer Protocol
FTP protocol
TCP protocol:
Streaming protocol, reliable protocol
Feedback mechanism: each time you send data must wait until the recovery of memory data clear, otherwise they will be sent once from time to time within a certain time.
Three-way handshake, waving four
UDP protocol:
Datagram Protocol
No need to establish a bi-directional data transmission channel less secure
Send data directly out of memory, not preserved