15 Seven Network Protocol

problem

Network protocol outlined seven

answer

Seven-layer network protocol from bottom to top as follows:

  • Physical Layer: This layer is the data transmission network communication medium, constitute a cable to connect different nodes of the device, the transmission medium using a data link layer provides the physical connection, is responsible for processing data and monitor data transmission error rate, so that the data stream transparent transmission.

  • The data link layer: a service provided on the basis of the physical layer, communication is established between data link connection entity, to transmit a "frame" in units of packets, and using the error control and flow control method, an error that the Physical line becomes error-free data link.

  • Network layer: data transmission between the nodes is created by a logical link, by routing the packet through subnetworks algorithm selects the most appropriate route, and congestion control and network interconnection functions. IP protocol belongs to this layer.
    On IP in the sense there is: (1) ip bottom is 32-bit binary number; (2) In order to better represent a divided every 8 bits become four parts; easy to remember further binary to decimal (3) in order to distinguish network address and host address is divided into a, B, C, D, E class address, where ABC is our common address, the address is a multicast class D, E class laboratory address, (4) NAT appears to help slow the available depletion of IP address space, it can be converted into a local area network address outside the network address (5) URL easier to remember than IP, but still need the underlying IP, so with DNS name resolution.

  • Transport Layer: provides reliable end-user service, handling packet errors, packet ordering, and other key transport issues. The details of the underlying transport layer shields to the high-level data communications. Thus, it is critical computer communication architecture layer. TCP, UDP belong to this layer.
    TCP three-way handshake:
    first handshake: connection is established, the client sends syn packets (syn = j) to the server, and enters SYN_SEND state, waiting for the server to confirm;
    the SYN: synchronization sequence number (Synchronize Sequence Numbers)
    second handshake: syn server receives the packet, must confirm the customer SYN (ack = j + 1) , while themselves sends a SYN packet (syn = k), i.e., SYN + ACK packet, then the server enters a state SYN_RECV;
    third handshake: client receives the SYN + ACK packet to the server, the server sends an acknowledgment packet ACK (ack = k + 1) , this packet is sent, the client and server into the ESTABLISHED state, complete the three-way handshake.
    Three-way handshake .gif
    the TCP four wave:
    first wave: a need to disconnect the data transfer is complete, the application process a TCP connection release its emitted segment (FIN = 1, number seq = u), and then stops sending data, the initiative to close the TCP connection into the FIN-WAIT-1 status, waiting for confirmation of B.
    The second wave: B receives a connection release segment section after a confirmation message (ACK = 1, an acknowledgment number ack = u + 1, number seq = v), B into the CLOSE-WAIT state waiting off, then a TCP half-closed, a to B connection release. A and B after the acknowledgment is received, the process proceeds FIN-WAIT-2 state, waiting for the connection release message sent by B segment.
    The third wave: When the B data transmission is completed, B sends a connection release segment (FIN = 1, ACK = 1 , number seq = w, confirmation number ack = u + 1), B into the LAST-ACK (final confirmation ) state, waiting for the a final confirmation.
    The fourth wave: A receives a connection release message segment B after this period a confirmation message (ACK = 1, seq = u + 1, ack = w + 1), A enters the TIME-WAIT (waiting time )status. TCP is not relieved after this time, the elapsed time required to wait for a timer to set the time 2MSL, A CLOSE before entering the state
    Four waving .gif

  • Session Layer: responsible for maintaining the transport connection between the two expanded nodes, so as to ensure uninterrupted transmission point, management and data exchange functions.

  • Presentation Layer: The method for processing the information represented by two communication exchange system, including a data format conversion, data encryption and decryption, data compression and recovery.

  • Application Layer: provides many services for applications, such as file servers, database servers, e-mail and other network software services. http, pop, smtp belong to this layer.

In the actual presentation, session layer, presentation layer, application layer referred to as the application layer, the protocol will be reduced to five seven protocol. By the physical layer to the application layer, the higher up, the data unit data, the less effective, the more content management.
Seven agreements diagrams, from the CSDN. Rain fly

Guess you like

Origin www.cnblogs.com/alichengxuyuan/p/12605845.html