OSI seven-layer model and TCP / IP protocol suite introduced

A, OSI model of understanding

• International Organization for Standardization (International Standard Organization, ISO) promulgated the OSI (Open System Interconnection, OSI) reference model in 1984

• OSI reference model is an open architecture, which provides the network is divided into seven layers, from bottom to top are: a physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer

image

· Function of each layer as follows:

1. Physical Layer

    The main function is to establish, maintain, is physically disconnected.

    Using a transmission medium provides the physical connection to the data link layer, transparent transmission bit stream. Masked possible specific differences in physical transmission media and devices.

     Common physical-layer device: card, an optical fiber, RJ-45 connector (Category 5 cable used), a hub (HUB)

2. Data Link Layer

    The main function is to establish a logical connection, hardware address addressing, error checking and other functions.

    On the basis of the bit stream on the physical layer, through error control, flow control method, so that an error becomes a physical line error-free data link, ie the network layer provides a reliable method of transmitting data over a physical medium.

    Specific work: receiving a bit stream from the physical layer (bit stream) in the form of data transmitted by the network layer error control method; the same, the data will come from the upper, encapsulated into a data frame is forwarded to the physical layer; and further It is responsible for processing information acknowledgment frames sent back to the receiving end, in order to provide reliable data transmission.

     Common data link layer: a switch

3. Network Layer

    Its main function is the logical address of the addressing, routing implemented between different networks.

    The main tasks are: data link layer in this layer is converted into data packets, then the path selection, the segment combination, order, into / out routing control and the like, the information is transmitted from one network device to another network device .

    In general, the data link layer is to solve the communication between the node (local area network) in the same network, and the network layer is mainly to solve the communication between different subnetworks.

   Common network layer device: router

4. Transport Layer

    The main function is to define the port number of the protocol data transmission, as well as flow control and error checking

    To tasks are: to provide a reliable end-user errors and flow control to ensure the correct transmission of packets

The session layer

    The main function is to create, manage, suspend the session.

    Communication and data exchange between the two organizations and coordination sessions with management.

    When the session is established, the user must provide remote address they want to connect.


6. Presentation layer

    The main function is representation of data, security, compression

    Commands and data from the application layer interprets the various grammatical meaning given appropriate, and transmitted to the session layer according to a certain format.

    The main function of the user information is a problem, such as encoding, encryption and decryption of data format conversion, and the like.

7. Application Layer

    The main function is to provide network services to the end-user interface.

    The application layer is the interface between the computer user, as well as various applications and networks, whose function is to provide services directly to the user, the user wishes to complete a variety of work done on the network.

    Services and application layer protocol to provide users with: file transfer services (FTP), remote login services (ssh), network management services and so on. The above-described various network services and protocols implemented by different application programs of the layer.

    The main function of the application layer is as follows:

       1) The user interface: the application layer and the network user, and a direct interface between applications and the network, enabling the user to contact the interactive network.

       2) to achieve a variety of services: the layer having a variety of applications and can be done to achieve a variety of services requested by the user.

Second, the relationship between the OSI and TCP / IP

    TCP / IP protocol model (Transmission Control Protocol / Internet Protocol), consists of a series of network protocols constitute the foundation of the Internet is the Internet's core protocols, through 20 years of development has become more mature, and is widely used in local area networks and wide area networks, It has become an international standard.

    TCP / IP protocol suite is a combination of a plurality of protocols on different levels of a set, the protocol uses a hierarchical structure of four layers, each layer protocol call its lower layer provided to complete their needs, and OSI seven-layer model, respectively.

    Although commonly referred to as the protocol suite TCP / IP, but TCP and IP is just one of only two protocols (another name for the protocol suite is the Internet protocol suite (Internet Protocol Suite))



Third, the process of data encapsulation and decapsulation

Data Format:

TCP data information: TCP header + the actual data (TCP header including source and destination host port number, sequence number, acknowledgment number, and the like check word)

IP packets: IP + TCP header data information (IP header including source and destination host IP address, type, survival, etc.)

Data frame: a data packet header + IP + end of frame (header including source and destination hosts and the MAC address type of the preliminary frame check word is the end)

Data encapsulation and decapsulation : Package: data to be transmitted over the network, layer by layer from the top down transmission, if a host wants to transmit data to other host, a first data attached to a particular protocol header, this process is called ----- package. Decapsulation: reverse process of the above

When data is to encapsulate the process when TCP / IP transport protocol as shown below:

image

Fourth, the communication process of two devices

    A device communicating with another device, access to the application layer provides services (e.g. FTP File Transfer Service), transport layer port numbers and selects protocol (ftp port 21) according to the service, the data into the network layer data packet, the data link layer is converted into a data frame, the physical layer by the conversion into bit stream data transfer between the communication media.

    At the same through a switch from the bit stream data acquired decapsulated MAC header, destination address is found in the encapsulating data, transmitted to the next device.

    Through the router, the IP header on the row addressing, logical address routing header.

image

Guess you like

Origin www.cnblogs.com/feng0919/p/11202604.html