Part of this series of articles refer to the seventh edition of “Computer Network” edited by Xie Xiren, PPT link: Yuexue Multimedia course resources platform of Publishing House of Electronics Industry (yx.51zhy.cn/mtrcsRes/ph…

This paper is participating in theNetwork protocols must be known and must be known”Essay campaign

China Internet Network Information Center (CNNIC) publishes the development of The Internet in China twice a year. www.cnnic.cn

Definition of computer network

Network: “Network” is a general term. A system that connects people or things together. There are three broad categories of networks that are familiar to everyone, namely telecommunications networks, cable networks and computer networks.

Computer network (network for short) : consists of a number of nodes and links connecting these nodes.

Internet(the Internet, or the Internet) :Is a special term, it refers to the world’s largest, open, by a number of networks connected to each other into a specific Internet, it adoptedTCP/IP protocol familyAs a rule of communication, and its predecessor is the American ARPANET.

The Composition of the Internet

The topology of the Internet, although very complex and geographically global, can be divided into the following two chunks in terms of how it works:

Edge: consists of all hosts connected to the Internet. This part is directly used by the user for communication (data, audio, or video) and resource sharing.

Core: Consists of a large number of networks and the routers that connect them. This part serves the edge part (providing connectivity and exchange).

The edge of the Internet

Consists of all hosts connected to the Internet. This part is directly used by the user for communication (data, audio, or video) and resource sharing. These hosts are also called end systems, which means “the end” (the end of the Internet). End systems can vary greatly in functionality.

Communication between end systems

That is, A process on host A communicates with another process on host B. Computer to computer communication for short. Communication modes between end systems can generally be divided into two broad categories:

Client/server mode (C/S mode) :

  • Client and server are two application processes involved in communication
  • The client-server approach describes the relationship between processes that serve and are served.
  • The client is the requester of the service and the server is the provider of the service.
  • Both service requesters and service providers use the services provided by the core part of the network.
  • The client runs when invoked by the user and proactively initiates communication to the remote server (requesting the service) when intended to communicate. Therefore, the client program must know the address of the server program, and no special hardware or very complex operating system is required.
  • A server is a program that provides a service to handle requests from multiple remote or local clients at the same time. After the system is started, it is automatically called and has been continuously running, passively waiting for and accepting communication requests from customers from all over the world. Therefore, the server program does not need to know the address of the client program and generally requires powerful hardware and advanced operating system support.

P2P mode:

  • Peer-to-peer (P2P) refers to the communication between two hosts without distinguishing which one is the service provider or the service requestor.
  • As long as both hosts are running peer-to-peer (P2P) software, they can communicate on an equal, peer-to-peer basis.
  • Both parties can download shared documents already stored on each other’s hard drives.
  • Peer-to-peer connections are still essentially client-server connections, except that each host in a peer-to-peer connection is both a client and a server.

The heart of the Internet

The core part of the network provides connectivity to a large number of hosts on the edge of the network so that any host in the edge part can communicate (that is, transmit or receive various forms of data) to other hosts. Router plays a special role in the core part of the network. Router is a key component to achieve packet switching. Its task is to forward received packets, which is the most important function of the core part of the network.

  • Packet-switching is at the heart of the Internet.

The performance of computer networks

  • Rate:The transmission rate of data, also called data rate or bit rate
    • Bit: A unit of data volume in a computer. A bit is a 1 or 0 in a binary number. The unit of the rate is bit/s, kbit/s, Mbit/s, Gbit/s, or Tbit/s. The unit is 1000. 100M Ethernet, omitting the bit/s unit, means Ethernet with a rate of 100Mbit/s.
    • Byte: A byte represents eight bits, denoted by the capital B. The “thousand” of “kilobyte” is denoted by the capital K, which is equal to 2 to the tenth power, i.e., 1024, not 1000. MB and GB are 2 to the 20th and 30th.
  • Bandwidth: The capacity of a communication line to transmit data. Indicates the highest data rate that a channel can pass in a unit of time. The unit is bit/s, or “bits per second.”
  • Throughput: Indicates the amount of data passing through a network (channel, interface) per unit of time.
  • Delay:The time it takes for data (a message or packet, or even bits) to travel from one end of a network (or link) to the other. Also known asdelayordelay. The total delay experienced by data in the network is the sum of transmission delay, propagation delay, processing delay and queuing delay.
    • Transmission delay Time required by the host or router to send a data frame, that is, the time required from the first bit of the data frame to the completion of the last bit of the frame.

    Send time delay = Data frame length ( b ) / Transmission rate ( b / s ) Transmission delay = Data frame length (b)/Transmission rate (B /s)
    • Propagation delay The time it takes for an electromagnetic wave to travel a certain distance in a channel. The propagation delay of 1000km optical fiber line is about 5ms.

    Propagation delay = Channel length ( m ) / The propagation rate of electromagnetic waves over the channel ( m / s ) Propagation delay = channel length (m)/propagation rate of electromagnetic wave in the channel (m/s)
    • Processing Delay When receiving a packet, the host or router spends a certain amount of time to process the packet, such as analyzing the header of the packet, extracting data from the packet, checking for errors, or searching for appropriate routes. This creates processing delay.
    • When queued delay packet is transmitted over network, it passes through many routers. However, packets must queue up in the input queue for processing after entering the router. After the router determines the forwarding interface, it will queue up in the output queue to wait for forwarding. This creates queuing delay. The length of queuing delay often depends on the network traffic at that time. When the network traffic is very large, queue overflow will occur, resulting in packet loss, which is equivalent to the queue delay is infinite.

  • Delay-bandwidth product: The product of propagation delay and bandwidth. Link length in bits.
  • Round-trip time RTT: The total time elapsed between the time the sender sends data and the time the sender receives an acknowledgement from the receiver (the receiver sends an acknowledgement immediately after receiving the data).
  • Efficiency:
    • Channel utilization: Channel utilization indicates how many percent of the time a channel is used (with data passing), and the utilization of a completely idle channel is zero.
    • Network utilization: The weighted average of channel utilization across the network.

The architecture of computer networks

The set of layers and protocols of a computer network is the architecture of a network. The architecture is abstract, while the implementation is concrete, the actual running computer hardware and software.

Protocol and partition hierarchy

  • Among the basic concepts of computer network, the hierarchical architecture is the most basic.
  • Rules, standards, or conventions established for the exchange of data on a network are calledNetwork protocol. Network protocols can also be referred to simply as protocols. And going further,The network protocol consists of the following three elementsComposition:
    • Syntax, the structure or format of data and control information;
    • Semantics, that is, what kind of control information needs to be sent, what kind of action needs to be completed and what kind of response needs to be made;
    • Synchronization is a detailed description of the order in which events are implemented.
  • Generally, the functions of each layer are mainly as follows:
    • Error control: Makes communication at the corresponding level with network peers more reliable
    • Flow control: make the sending end send rate not too fast, to make the receiving end in time to receive.
    • Fragment and reload: The sending end divides the sent data blocks into smaller units and restores them at the receiving end.
    • Reuse and reuse: several higher levels of the sending end reuse a lower level of connection, and then reuse at the receiving end.
    • Connection establishment and release: a logical connection is established before data exchange and released after data transfer.

Open systems Interconnection Reference model OSI/RM

  • In order to make different architectures of computer networks can be interconnected, the international organization for Standardization ISO set up a special agency to study this problem in 1977
  • The Open Systems Interconnection Reference Model (OSl/RM), or OSI, is the standard framework that connects computers worldwide.
  • As long as it complies with the OSI standard, a system can communicate with any other system located anywhere in the world that also complies with the same standard.

The TCP/IP architecture

In fact, the TCP/IP architecture used by the Internet today has sometimes evolved so that some applications can use the IP layer directly, or even the bottommost network interface layer directly.

The TCP/IP protocol can serve a wide variety of applications (so called everything over IP), and at the same time

TCP/IP also allows THE IP protocol to run over the Internet, which is made up of various networks (the so-called IP over Everything).

An architecture with five layers of protocols

  • OSI’s seven-layer protocol architecture is clear in concept and complete in theory, but it is complicated and impractical.
  • TCP/IP is a four-tier architecture: application layer, transport layer, Internet layer, and network interface layer. But the network interface layer at the bottom has no details.
  • Therefore, a compromise approach is often adopted, which combines the advantages of OSI and TCP/IP with an architecture with only five protocols.

Application Layer

The application layer is the highest level in the architecture. The task of the application layer is to complete a specific network application through the interaction between application processes. Application layer protocols define rules for communication and interaction between application processes. The process here refers to the program that is running on the host. Different application layer protocols are required for different network applications. The data unit that the application layer interacts with is called message.

Transport Layer

The transport layer is responsible for providing a common data transfer service for communication between processes on two hosts. Application processes use the service to transmit application-layer packets. By “universal”, it means that multiple applications can use the same transport layer service instead of targeting a specific network application. Because a host can run multiple processes at the same time, the transport layer has the functions of reuse and reuse. Reuse means that multiple application layer processes can simultaneously use the services of the lower transport layer. In contrast, the transport layer delivers the received information to the corresponding processes in the upper application layer.

The transport layer mainly uses the following two protocols:

  • Transmission Control Protocol (TCP) : Provides connection-oriented and reliable data Transmission services. The unit of data Transmission is segment.
  • User Datagram Protocol (UDP) — provides a connectionless, best-effort data transfer service (without guaranteeing the reliability of data transmission) in the unit of User Datagram.

Incidentally, some people like to call the transport layer the transport layer because the TCP protocol used at this layer is called the Transmission control protocol. From the point of view, transmission and transport are not very different. But layer 4 of the OSI definition uses Transport, not Transmission. There is still some difference in meaning between the two words. Therefore, the translation of transport layer is more accurate.

Network Layer

The network layer is responsible for providing communication services for different hosts on the packet-switched network. When sending data, the network layer encapsulates the packet segments or user datagrams generated by the transport layer into packets or packets for transmission. In TCP/IP architecture, packets are also called IP datagrams, or simply datagrams, because the network layer uses the IP protocol. Use “grouping” and “datagram” as synonyms. Note: Do not confuse the “user datagram UDP” at the transport layer with the “IP datagram” at the network layer. In addition, data units transmitted at any level can be expressed in general terms as “packets”.

Another task of the network layer is to select an appropriate route so that packets transmitted by the source host transport layer can find the destination host through routers in the network.

Data Link Layer

The data link layer is often referred to simply as the link layer. As we know, data transmission between two hosts is always transmitted over a section of link, which requires the use of a special link layer protocol. When transmitting data between two neighboring nodes, the data link layer assembles THE IP datagram handed over by the network layer into framing and transmits frames on the link between the two neighboring nodes. Each frame contains data and necessary control information (such as synchronization information, address information, error control, etc.).

Physical Layer

The units of data transmitted at the physical layer are bits. When the sender sends a 1(or 0), the receiver shall receive a 1(or 0) instead of a 0(or 1). Therefore, the physical layer considers how much voltage is used to represent “1” or “0” and how the receiver identifies the bits sent by the originating sender. The physical layer also determines how many pins the plug connecting the cable should have and how the pins should be connected. It is not, of course, a physical task to interpret what bits stand for. Note that some of the physical media used to transmit information, such as twisted pair, coaxial cable, optical cable, radio channel, etc., are not within the physical layer protocol but below the physical layer protocol. So some people think of the physical media below the physical layer as layer 0

Assume that application process AP1 of host 1 transmits data to application process AP2 of host 2. The AP first passes its data to layer 5 (application layer) of the local host. Layer 5 with the necessary control information H5 becomes the data unit of the next layer. The fourth layer (transport layer) receives the data unit, adds the control information H4 of this layer, and then gives it to the third layer (network layer) to become the data unit of the third layer. And so on. However, after the second layer (data link layer), the control information is divided into two parts and added to the head (H2) and tail (T2) of the data unit of this layer respectively. The first layer (physical layer) is a bit stream, so no control information is added. Note that the bitstream should be transmitted from the head.

Some of the concepts

  1. Any two of the same levels transmit data (i.e., data units plus control information) directly to each other via horizontal dashed lines. This is called the communication between peer layers
  2. The OSI reference model refers to the Data Unit transmitted between peer layers as the Protocol Data Unit (PDU) of that layer. The term is now adopted by many non-OSI standards.
  3. Layer protocols are essentially the rules for transferring data between peer layers.
  4. A Service Access Point (SAP) is a place where entities at two adjacent layers of a system interact.
  5. Service access point SAP is an abstract concept that is really just a logical interface.
  6. The OSI refers to the Unit of Data exchanged between layers as Service Data Unit (SDU).
  7. An SDU can be different from a PDU. For example, multiple SDU can be combined into one PDU, or one SDU can be divided into several PDUs
  8. An entity is any hardware or software process that can send or receive information.
  9. A protocol is a collection of rules that control the communication between two peer entities.
  10. Under the control of the protocol, communication between two peer entities enables this layer to provide services to the next layer.
  11. To implement this layer protocol, you also need to use the services provided by the lower layer.
  12. What is the difference between a protocol and a service:
    • The implementation of the protocol ensures that services can be provided up to the next level.
    • Service users in this layer see only the service and not the underlying protocol. That is, the protocol below is transparent to the service users above.
    • The protocol is “horizontal”, that is, the protocol is the rule that controls communication between peer entities
    • The service is “埀 direct”, that is, the service is provided from the lower layer to the upper layer through the layer indirect port.
    • The upper layer uses the service primitives to obtain the services provided by the lower layer.

Typical switching technology

Packet-switching is at the heart of the Internet. From the perspective of communication resource allocation, “switching” is the dynamic allocation of transmission line resources in a certain way.

Circuit switching

  • Circuit switching must be connection-oriented
  • Circuit switching is divided into three stages
    1. Establish a connection: Establish a dedicated physical channel to ensure that the communication resources required by the two parties are not occupied by other users
    2. Communication: the calling party and the called party can call each other
    3. Release the connection: Release the dedicated physical channel you just used (free all the communication resources you just used).

Packet switching

Circuit switching problems: Computer data is emergent. This results in low utilization of communication lines (often less than 10 percent or even 1 percent of the time used to transmit data) when transferring computer data.

  • Packet switching is usedStore and forwardTechnology.
    1. At the sending end, the packet is divided into shorter and fixed-length data segments.
    2. A header is added before each data segment to form a packet.
    3. Packet switching networks use “packets” as data transmission units. Each packet is sent in turn to the receiver (assuming the receiver is on the left).
    4. After receiving the packet, the receiving end strips the header and restores the packet.
    5. Finally, the received data is restored to the original packet on the receiving end.
    • The header of each packet contains control information such as the address (destination address and source address).
    • * Nodal switches in the packet switching network forward packets to the next nodal switch based on the address information received in the packet head.
    • Each group selects the transmission path independently over the Internet.
    • With this store and forward method, the final group can reach the final destination.
  • The process by which routers process packets
    1. Put the received packets into the cache first (temporary storage);
    2. Search the forwarding table to find out which port to forward to a destination address.
    3. Send the packet to the appropriate port for forward.

Message switching

The entire message is first transmitted to the adjacent node, all stored, then searched for forwarding table, forward to the next node.