Network understanding of network protocols seven seven agreements of understanding

 
 

 

 
OSI seven-layer model is simple popular understanding
 
This model learned many times, always remember. Today looked again and found a historical point of view the problem of the deduction would be more logical, easier to remember. This article does not necessarily rigorous, there may be mistakes, mainly to initiate a bad memory to help people. Overall, OSI model was developed from the ground up to the top.
 
This model introduced the very beginning is because Americans have a need for communication between two machines.
 
Requirement 1: the physical layer
 
The first problem to be solved by scientists is how communication between two hardware. DETAILED some hair is a bit stream, and the other to receive.
 
Thus, scientists have invented physical layer:
 
Main standards define the physical equipment, such as a cable interface types, the interface of the optical fiber type, transmission rate and other transmission media. Its main role is the transmission bit stream (1,0 is made into the current strength to be transmitted, the destination after conversion to 1,0, that is, we often say that the digital to analog conversion and analog to digital conversion). This layer is called the data bits.
As the data transmission medium, such as a cable, for the establishment, maintenance and removal of the physical link connection, said physical medium is substantially simply can be seen carrying data transmissions
 
Requirement 2: the data link layer
 
Now I can send the data flow through the wire, but I also want through radio waves, transmitted through other media. Then I would like to assure the transmission bit stream past is correct, there must be error correction.
Introduces the functions of the physical layer and network layer, the data link layer in between, is mainly the physical layer data encapsulated in a frame of the bit stream, the transmission frame control physical channel, including error correction, adjusting transmission rate, etc., is additionally provided to establish a data link between two entities, the management of maintenance and release
  
Thus, the invention is a data link layer:
 
Defines how to format data for transmission, and how to control access to the physical medium. This layer usually provide error detection and correction, to ensure reliable data transmission.
Here yo yo with a simple example to illustrate: + A in Shijiazhuang, Hebei, need to go to Paris, France, assuming A course of action: Automotive: Departure --- Shijiazhuang Railway Station; Train: Shijiazhuang --- Beijing; car: Beijing Railway Station --- Beijing airport; aircraft: Beijing --- Paris, France; car: Paris --- destination; it is clear from this example, A is the data, these vehicles like the data link layer, the overall route the network layer is planning to do so is not to compare with great difficulty to understand
 
Demand 3: Transport Layer
 
Now I can send the right hair bit stream data to another computer, but when I send a lot of data, it may need a long time, such as a video format, the network is interrupted many times (in fact, even with physical layer and the data link layer, the network is often interrupted, but the interruption time in milliseconds).
 
Well, I also need to ensure the accuracy when transferring large number of files. So, I want to send out the data package. Just made express, as one by one hair.
 
Thus, the first invention is a transport layer (transport layer in the OSI model, network layer in the above)
 
Such as TCP, is used to send large amounts of data, I sent out 10,000 packets, another computer will tell if I received a 10,000 package, if the package is missing three, he told me that 1001, 234,8888 packets lost, I uh. In this way, we can guarantee the other side to complete the video received.
 
E.g. UDP, it is used to send small amounts of data. I sent out 20 packets, packet loss is generally not so, I do not care how many you get. In multiplayer interactive games, and often use UDP protocol, because usually simple message, but there is a demand broadcasting. If you use TCP, the efficiency is very low, because it kept telling my hosts received 20 packets, or I get a 18 pack, and then send me two! If there are 10,000 computers at the same time we do so, but will reduce the efficiency with TCP, even if not as good as sent out by UDP, the host, you lose a few packages on the card look, well, next time you re-contracting update.
 
TCP protocol and IP protocol will bind the port, the following will introduce IP protocol.
 
Demand 4: Network Layer
 
Transport layer only solved the problem of packaging. But if I have more than one computer, how to find I want to send that stage? Or, A F to give the information, to go through the intermediate B, C, D, E, but there are many intermediate nodes as KJZY. How do I choose the best path? This is the route to do.
 
Thus, the invention is a network layer. That router, switching device having a monovalent function those addressing function implemented. This layer is defined by an IP address, IP address addressing. So generated IP protocol.
 
The main function is the physical address corresponding to a network address, and decides where to send the packet to the receiving side, the data packet provides a logical address, routing and other
  
Demand 5: Session Layer
 
Now we have to ensure that the correct computer, send the correct information after the package a. But the good level of user experience is not good? Is it every time I go to call TCP package, and then call the IP routing protocol to find their own to send? Of course not, so we want to establish an automatic send and receive packets, automatic addressing function.
 
Thus, the invention is a session layer. The role of the session layer is the communication between the establishment and management applications.
 
Demand 6: Presentation Layer
 
Now I can guarantee that the application automatically send and receive packets and routed. But I use Linux to window contract, the two systems are inconsistent grammar, just as the installation package, exe can not be used under linux, shell in the window is not directly run. So need presentation layer (presentation), to help us solve the communication problems between different grammatical systems.
 
Demand 7:
 
OK, now all the necessary conditions are ready, we can write a program android, web program to realize the demand.
 
supplement:
 
Socket:
 
This is not a protocol, but a communication model. In fact, it was originally of California, Berkeley, Institute of Software, referred to as BSD invention, mainly used between two processes of a computer communication, then it uses two computers interprocess communication. Therefore, it can be understood as a simple communication, not a high-level inter-process thing. The main thing not to do is:
 
A contract: send request packet to a port that is already bound (so we often visit this address 182.13.15.16:1235,1235 is the port); B received permits; then formally sent; send over, to tell B Break link; receive off permitted, immediately disconnect, and then send the information to have been disconnected B.
 
B received package: Binding port and IP; then in this port monitoring; received A's request, allow hair to A, and ready to receive the main thing is to clear the cache waiting to receive new data; then officially accepted; received disconnection request to allow disconnection; disconnecting the acknowledgment, continue to monitor other requests.
 
Visible, Socket fact, I / O operations. Socket not limited to network communication. In the network communication, it covers the network layer, transport layer, session layer, presentation layer, application layer - in fact, this does not need to remember is that when used Socket communication IP and port, only two to show that its use to the network layer and the transport layer; and it ignores differences more than one computer system to communicate, it relates to the presentation layer; Socket generally are based on an application, it will involve the session and application layers.
 
 
 

 

 
OSI seven-layer model is simple popular understanding
 
This model learned many times, always remember. Today looked again and found a historical point of view the problem of the deduction would be more logical, easier to remember. This article does not necessarily rigorous, there may be mistakes, mainly to initiate a bad memory to help people. Overall, OSI model was developed from the ground up to the top.
 
This model introduced the very beginning is because Americans have a need for communication between two machines.
 
Requirement 1: the physical layer
 
The first problem to be solved by scientists is how communication between two hardware. DETAILED some hair is a bit stream, and the other to receive.
 
Thus, scientists have invented physical layer:
 
Main standards define the physical equipment, such as a cable interface types, the interface of the optical fiber type, transmission rate and other transmission media. Its main role is the transmission bit stream (1,0 is made into the current strength to be transmitted, the destination after conversion to 1,0, that is, we often say that the digital to analog conversion and analog to digital conversion). This layer is called the data bits.
As the data transmission medium, such as a cable, for the establishment, maintenance and removal of the physical link connection, said physical medium is substantially simply can be seen carrying data transmissions
 
Requirement 2: the data link layer
 
Now I can send the data flow through the wire, but I also want through radio waves, transmitted through other media. Then I would like to assure the transmission bit stream past is correct, there must be error correction.
Introduces the functions of the physical layer and network layer, the data link layer in between, is mainly the physical layer data encapsulated in a frame of the bit stream, the transmission frame control physical channel, including error correction, adjusting transmission rate, etc., is additionally provided to establish a data link between two entities, the management of maintenance and release
  
Thus, the invention is a data link layer:
 
Defines how to format data for transmission, and how to control access to the physical medium. This layer usually provide error detection and correction, to ensure reliable data transmission.
Here yo yo with a simple example to illustrate: + A in Shijiazhuang, Hebei, need to go to Paris, France, assuming A course of action: Automotive: Departure --- Shijiazhuang Railway Station; Train: Shijiazhuang --- Beijing; car: Beijing Railway Station --- Beijing airport; aircraft: Beijing --- Paris, France; car: Paris --- destination; it is clear from this example, A is the data, these vehicles like the data link layer, the overall route the network layer is planning to do so is not to compare with great difficulty to understand
 
Demand 3: Transport Layer
 
Now I can send the right hair bit stream data to another computer, but when I send a lot of data, it may need a long time, such as a video format, the network is interrupted many times (in fact, even with physical layer and the data link layer, the network is often interrupted, but the interruption time in milliseconds).
 
Well, I also need to ensure the accuracy when transferring large number of files. So, I want to send out the data package. Just made express, as one by one hair.
 
Thus, the first invention is a transport layer (transport layer in the OSI model, network layer in the above)
 
Such as TCP, is used to send large amounts of data, I sent out 10,000 packets, another computer will tell if I received a 10,000 package, if the package is missing three, he told me that 1001, 234,8888 packets lost, I uh. In this way, we can guarantee the other side to complete the video received.
 
E.g. UDP, it is used to send small amounts of data. I sent out 20 packets, packet loss is generally not so, I do not care how many you get. In multiplayer interactive games, and often use UDP protocol, because usually simple message, but there is a demand broadcasting. If you use TCP, the efficiency is very low, because it kept telling my hosts received 20 packets, or I get a 18 pack, and then send me two! If there are 10,000 computers at the same time we do so, but will reduce the efficiency with TCP, even if not as good as sent out by UDP, the host, you lose a few packages on the card look, well, next time you re-contracting update.
 
TCP protocol and IP protocol will bind the port, the following will introduce IP protocol.
 
Demand 4: Network Layer
 
Transport layer only solved the problem of packaging. But if I have more than one computer, how to find I want to send that stage? Or, A F to give the information, to go through the intermediate B, C, D, E, but there are many intermediate nodes as KJZY. How do I choose the best path? This is the route to do.
 
Thus, the invention is a network layer. That router, switching device having a monovalent function those addressing function implemented. This layer is defined by an IP address, IP address addressing. So generated IP protocol.
 
The main function is the physical address corresponding to a network address, and decides where to send the packet to the receiving side, the data packet provides a logical address, routing and other
  
Demand 5: Session Layer
 
Now we have to ensure that the correct computer, send the correct information after the package a. But the good level of user experience is not good? Is it every time I go to call TCP package, and then call the IP routing protocol to find their own to send? Of course not, so we want to establish an automatic send and receive packets, automatic addressing function.
 
Thus, the invention is a session layer. The role of the session layer is the communication between the establishment and management applications.
 
Demand 6: Presentation Layer
 
Now I can guarantee that the application automatically send and receive packets and routed. But I use Linux to window contract, the two systems are inconsistent grammar, just as the installation package, exe can not be used under linux, shell in the window is not directly run. So need presentation layer (presentation), to help us solve the communication problems between different grammatical systems.
 
Demand 7:
 
OK, now all the necessary conditions are ready, we can write a program android, web program to realize the demand.
 
supplement:
 
Socket:
 
This is not a protocol, but a communication model. In fact, it was originally of California, Berkeley, Institute of Software, referred to as BSD invention, mainly used between two processes of a computer communication, then it uses two computers interprocess communication. Therefore, it can be understood as a simple communication, not a high-level inter-process thing. The main thing not to do is:
 
A contract: send request packet to a port that is already bound (so we often visit this address 182.13.15.16:1235,1235 is the port); B received permits; then formally sent; send over, to tell B Break link; receive off permitted, immediately disconnect, and then send the information to have been disconnected B.
 
B received package: Binding port and IP; then in this port monitoring; received A's request, allow hair to A, and ready to receive the main thing is to clear the cache waiting to receive new data; then officially accepted; received disconnection request to allow disconnection; disconnecting the acknowledgment, continue to monitor other requests.
 
Visible, Socket fact, I / O operations. Socket not limited to network communication. In the network communication, it covers the network layer, transport layer, session layer, presentation layer, application layer - in fact, this does not need to remember is that when used Socket communication IP and port, only two to show that its use to the network layer and the transport layer; and it ignores differences more than one computer system to communicate, it relates to the presentation layer; Socket generally are based on an application, it will involve the session and application layers.
 
 
OSI seven-layer model is simple popular understanding
 
This model learned many times, always remember. Today looked again and found a historical point of view the problem of the deduction would be more logical, easier to remember. This article does not necessarily rigorous, there may be mistakes, mainly to initiate a bad memory to help people. Overall, OSI model was developed from the ground up to the top.
 
This model introduced the very beginning is because Americans have a need for communication between two machines.
 
Requirement 1: the physical layer
 
The first problem to be solved by scientists is how communication between two hardware. DETAILED some hair is a bit stream, and the other to receive.
 
Thus, scientists have invented physical layer:
 
Main standards define the physical equipment, such as a cable interface types, the interface of the optical fiber type, transmission rate and other transmission media. Its main role is the transmission bit stream (1,0 is made into the current strength to be transmitted, the destination after conversion to 1,0, that is, we often say that the digital to analog conversion and analog to digital conversion). This layer is called the data bits.
As the data transmission medium, such as a cable, for the establishment, maintenance and removal of the physical link connection, said physical medium is substantially simply can be seen carrying data transmissions
 
Requirement 2: the data link layer
 
Now I can send the data flow through the wire, but I also want through radio waves, transmitted through other media. Then I would like to assure the transmission bit stream past is correct, there must be error correction.
Introduces the functions of the physical layer and network layer, the data link layer in between, is mainly the physical layer data encapsulated in a frame of the bit stream, the transmission frame control physical channel, including error correction, adjusting transmission rate, etc., is additionally provided to establish a data link between two entities, the management of maintenance and release
  
Thus, the invention is a data link layer:
 
Defines how to format data for transmission, and how to control access to the physical medium. This layer usually provide error detection and correction, to ensure reliable data transmission.
Here yo yo with a simple example to illustrate: + A in Shijiazhuang, Hebei, need to go to Paris, France, assuming A course of action: Automotive: Departure --- Shijiazhuang Railway Station; Train: Shijiazhuang --- Beijing; car: Beijing Railway Station --- Beijing airport; aircraft: Beijing --- Paris, France; car: Paris --- destination; it is clear from this example, A is the data, these vehicles like the data link layer, the overall route the network layer is planning to do so is not to compare with great difficulty to understand
 
Demand 3: Transport Layer
 
Now I can send the right hair bit stream data to another computer, but when I send a lot of data, it may need a long time, such as a video format, the network is interrupted many times (in fact, even with physical layer and the data link layer, the network is often interrupted, but the interruption time in milliseconds).
 
Well, I also need to ensure the accuracy when transferring large number of files. So, I want to send out the data package. Just made express, as one by one hair.
 
Thus, the first invention is a transport layer (transport layer in the OSI model, network layer in the above)
 
Such as TCP, is used to send large amounts of data, I sent out 10,000 packets, another computer will tell if I received a 10,000 package, if the package is missing three, he told me that 1001, 234,8888 packets lost, I uh. In this way, we can guarantee the other side to complete the video received.
 
E.g. UDP, it is used to send small amounts of data. I sent out 20 packets, packet loss is generally not so, I do not care how many you get. In multiplayer interactive games, and often use UDP protocol, because usually simple message, but there is a demand broadcasting. If you use TCP, the efficiency is very low, because it kept telling my hosts received 20 packets, or I get a 18 pack, and then send me two! If there are 10,000 computers at the same time we do so, but will reduce the efficiency with TCP, even if not as good as sent out by UDP, the host, you lose a few packages on the card look, well, next time you re-contracting update.
 
TCP protocol and IP protocol will bind the port, the following will introduce IP protocol.
 
Demand 4: Network Layer
 
Transport layer only solved the problem of packaging. But if I have more than one computer, how to find I want to send that stage? Or, A F to give the information, to go through the intermediate B, C, D, E, but there are many intermediate nodes as KJZY. How do I choose the best path? This is the route to do.
 
Thus, the invention is a network layer. That router, switching device having a monovalent function those addressing function implemented. This layer is defined by an IP address, IP address addressing. So generated IP protocol.
 
The main function is the physical address corresponding to a network address, and decides where to send the packet to the receiving side, the data packet provides a logical address, routing and other
  
Demand 5: Session Layer
 
Now we have to ensure that the correct computer, send the correct information after the package a. But the good level of user experience is not good? Is it every time I go to call TCP package, and then call the IP routing protocol to find their own to send? Of course not, so we want to establish an automatic send and receive packets, automatic addressing function.
 
Thus, the invention is a session layer. The role of the session layer is the communication between the establishment and management applications.
 
Demand 6: Presentation Layer
 
Now I can guarantee that the application automatically send and receive packets and routed. But I use Linux to window contract, the two systems are inconsistent grammar, just as the installation package, exe can not be used under linux, shell in the window is not directly run. So need presentation layer (presentation), to help us solve the communication problems between different grammatical systems.
 
Demand 7:
 
OK, now all the necessary conditions are ready, we can write a program android, web program to realize the demand.
 
supplement:
 
Socket:
 
This is not a protocol, but a communication model. In fact, it was originally of California, Berkeley, Institute of Software, referred to as BSD invention, mainly used between two processes of a computer communication, then it uses two computers interprocess communication. Therefore, it can be understood as a simple communication, not a high-level inter-process thing. The main thing not to do is:
 
A contract: send request packet to a port that is already bound (so we often visit this address 182.13.15.16:1235,1235 is the port); B received permits; then formally sent; send over, to tell B Break link; receive off permitted, immediately disconnect, and then send the information to have been disconnected B.
 
B received package: Binding port and IP; then in this port monitoring; received A's request, allow hair to A, and ready to receive the main thing is to clear the cache waiting to receive new data; then officially accepted; received disconnection request to allow disconnection; disconnecting the acknowledgment, continue to monitor other requests.
 
Visible, Socket fact, I / O operations. Socket not limited to network communication. In the network communication, it covers the network layer, transport layer, session layer, presentation layer, application layer - in fact, this does not need to remember is that when used Socket communication IP and port, only two to show that its use to the network layer and the transport layer; and it ignores differences more than one computer system to communicate, it relates to the presentation layer; Socket generally are based on an application, it will involve the session and application layers.
 

Guess you like

Origin www.cnblogs.com/guixie/p/11833573.html