The computer network is defined as a collection of autonomous computer systems interconnected in a way that can share resources, mainly showing that multiple independent "autonomous computers" distributed in different geographical locations follow the common network protocol to realize the sharing of computer resources. Simply speaking, it is a collection of computer equipment which is connected directly or indirectly by two or more computers through the transmission medium, network equipment and software, and uses the corresponding network communication protocol for network communication.
First, the network protocol
Network protocol: Each node of the computer network must abide by the pre-agreed rules to exchange data and control information, these rules define the format and timing of the exchanged data precisely, and the rules, conventions and standards for the exchange of network data are called network protocols.
1. There are 3 elements of network protocol:
Syntax: The format, coding, and signal-to-power equality involving data and control information.
Semantics: involves control information for coordination and error handling.
Timing: involves speed matching and sequencing.
The advantages of hierarchy of network system: Each layer is independent, flexible, structurally separated, easy to realize and maintain and can promote standardization work.
Second, osi/rm seven-layer Reference Model
There are seven levels in Osi/rm, from low to high in order: Physical layer, Data link layer, network layer, transport layer, Session layer, presentation layer, application layer.
1, seven layer model
(1) Physical layer (bit stream)
The physical layer specifies the mechanical, electrical characteristics and interfaces of the physical transmission medium, providing a bit-stream transmission between adjacent devices, which uses physical communication media to provide a physical connection to the previous data link layer, transparently transmitting the bitstream through physical connections. The so-called transparent transmission refers to the actual circuit after the transmission of the bit stream does not change, any combination of bit streams can be transmitted on this circuit, the physical layer does not know the meaning of bits. The main equipment of physical layer: Repeater, hub.
(2) Data link layer (frame)
The data link layer turns the original unreliable physical layer connection into the error-free data channel, and is responsible for transmitting the frame-based data without error on the line between two adjacent nodes, each frame includes certain data and necessary control information, and notifies the sender to resend when the receiving point receives the data error. Until this frame arrives at the receiving node without error. The data link layer is the link that makes the actual link that is likely to go wrong into something that the network layer looks good. The main functions of Data Link layer: the establishment and release of data link connection, the data unit constituting data link, the Division of Data Link connection, frame delimitation and synchronization, flow control and error detection and recovery. The Data Link layer protocol includes: SDLC, HDLC, PPP, STP, Frame Relay, and so on. Main equipment Two layer switch, Network Bridge.
(3) Network layer (group)
Divide data into a certain length of grouping, responsible for routing (communication subnet to the target path) selection, mainly to solve the data transmission Unit packet in the communication subnet routing, congestion control and multiple network interconnection problems, usually provide the datagram service and virtual circuit services. The network layer has the following main functions: Routing and relaying, activation and termination of network connections, multiplexing of network connections, error detection and recovery, sequencing, flow control, and service selection. Network layer protocol representatives include: IP, IPX, OSPF, etc., the main device: router.
(4) Transmission layer (message)
The task of the transport layer is to make the best use of network resources based on the characteristics of the communication subnet and to establish a transport connection between the session layer of the two-terminal system in a reliable and economical manner, transparently transmitting the message. The transport layer provides a reliable end-to-end service to the layer, so that the session layer does not know the details of the data communication below the transport layer, the transport layer exists only in the end system (host), and the transmission layer is no longer the issue of information transmission. The main functions of the transport layer are as follows: Image transfer address to network address, multiplexing and segmentation, error control and recovery, segmentation and reassembly, block and partition, establishment and release of transmission connection, serial number and flow control. The Transport Layer protocol includes: TCP, UDP, SPX, and so on.
(5) Session level
The session layer does not participate in the specific data transmission, but it manages it, is the thinnest layer, is often omitted. Main functions: The mapping of Session connection to transport connection, data transfer, session connection recovery and release, negotiation of session parameters, selection of appropriate QoS, activity management;
(6) Presentation layer
The presentation layer provides end-to-end information transfer, which handles the syntactic representation of user information between OSI systems. Key features include: Data syntax translation, data encryption and data compression, syntax representation, and connection management.
(7) Application layer
is the highest level of OSI/RM, is a direct user-oriented layer, is the interface between the computer network and the end user. This includes protocols such as FTP (20/21), SMTP (25), POP (110), and so on.
2. OSI/RM Working principle
In the whole communication network, the network layer is generally divided into three layers below the communication subnet, is responsible for the network communication platform to establish a network connection, and the session layer, the presentation layer, the application layer three layers called the resource subnet, responsible for the specific data communication tasks. In Osi/rm, the layers are isolated through the boundary of the service access point (SAP), and all requests are passed from one layer to another through the service access point, each of which is based on a layer of standards and activities below it, and each layer provides services for its previous layer, The next level of implementation of the service details is masked on the previous layer. In other words, the functions of each layer are implemented independently. The lower layer provides service to the upper layer through the service access point (SAP), the Protocol synchronization unit of the same level transfer.
The transmitting end of the OSI/RM data communication is transmitted from top to bottom, while the data at the receiving end is bottom transmitted, which is also the basic communication flow of OSI.
Through the OSI layer, information can be transferred from a computer's software application to another application. The application on computer A wants to send information to Computer B's application, and the application in computer a needs to send the information to its application tier (layer seventh), then add the information to the presentation layer (layer sixth), and the presentation layer forwards the data to the session layer (layer fifth), and so on. Until the physical layer (first layer). At the physical level, the data is placed in the physical network medium and sent to Computer B. The physical layer of computer B receives data from the physical medium and then sends the information up to the Data link layer (the second layer), and the data link layer is forwarded to the network layer, continuing until the information reaches the application layer of computer B. Finally, the application layer of Computer B transmits the information to the receiving end of the application, thus completing the communication process.
The service access point of the Data Link Layer LLC (Link Control sublayer).
The service access point for the network layer is the IP datagram.
The service access point for the transport layer is the port number.
Second, the TCP/IP protocol architecture
The Internet network architecture is based on the TCP/IP protocol, the TCP protocol provides end-to-end communication and control functions for the application, and the IP protocol provides a unified interconnection platform for various communication subnets or LANs. The TCP/IP protocol reference model is four levels high to Low: the application layer (application layer), the Transport layer (Transport layer), the Internetwork Interconnect layer (Internet layer, also known as the Internet tier), and the network access layer Access layer, also known as the host to the network layer).
(1) Network access layer: provide the sending and receiving of IP datagram, the protocol adopted by this layer is the protocol inherent in each communication subnet. Ethernet, Token Ring, Frame Relay, and ATM.
(2) Internetwork Interconnect Layer: To provide packet transmission between computers, the main functions include packet generation of high-level data, packet assembly of the underlying datagram, and routing, flow control, congestion, etc., the IP protocol provides a unified address format and IP datagram format to eliminate the differences of each communication subnet, thus providing a transparent channel for the information sender and receiver. Protocols such as IP, ICMP, IGMP, ARP, Rarp, and so on.
(3) Transport layer: provide communication between applications, including the format of the flow of information and provide reliable transmission, the Transport layer protocol is mainly the Transmission Control protocol TCP and User Datagram Protocol UDP,TCP protocol provides a reliable connection-oriented byte stream transmission; The UDP protocol provides non-connected unreliable packet transmissions.
(4) Application layer: provides commonly used applications.
TCP : pop3:110,http:80,ftp:21, 20,smtp:25,telnet:23.
UDP : dhcp:67/68,tftp:69,snmp:161, 162,dns:53.
Third, the LAN system structure
The LAN architecture defines only the lower two layers in the ISO model, divided into physical and data link layers, where the data link layer is divided into two sub-layers, media access control (media access Control,mac), and Logical link controls (Logical Link Control , LLC) child layer.
(1) Physical layer
It mainly deals with the bit stream transmitted on the physical circuit, realizes the transmission, reception and synchronization of the Bitstream, establishes, maintains and revokes the physical connection, deals with the mechanical, electrical and process characteristics, and serves the data link layer. The physical layer specifies the signal, encoding, transmission medium, transmission rate, and electrical and functional characteristics used.
(2) Media access Control (MAC) sub-layer
MAC The sub-layer is the lower part of the Data Link layer (DLL) in the local area network, it provides the control mode of MAC address addressing and media access (that is, data receiving and sending), that is, to deal with the contention problem of the shared communication medium in the local area network .
(3) Logical link Control (LLC) sublayer
Provides high-level support that masks specific media and access control methods, providing end-to-end error control and flow control for end systems connected to the LAN.
This article from the "Rote Home" blog, declined to reprint!
Computer network Architecture