Overview of Computer Network Review

Article directory

https://img-blog.csdnimg.cn/direct/5fdd814ea00940a9ab09b16c60072941.png

1. Overview of the Internet

1. Network, Internet and Internet concepts:

  • A computer network (network) consists of a number of nodes and the links connecting these nodes
  • The Internet is a network where multiple networks are connected to each other through some routers to form a network with greater coverage.
  • The Internet is interconnected by a huge number of various computer networks

2. Composition of the Internet

From the working method:

  • Edge part: consists of all hosts connected to the Internet. This part is used directly by users for communication and resource sharing.
  • Core part: It consists of a large number of networks and the routers that connect these networks. This part serves the edge part (providing connectivity and switching)

qq_pic_merged_1701862396749.jpg
"Host A and host B communicate" actually means "a program running on host A communicates with another program running on host B", so "a process on host A communicates with another program on host B" Processes communicate"referred to as communication between computers

2.1 Communication methods at the edge

(1) Client-server method (C/S)

Concept: Describe the relationship between services and services between processes
. After the communication relationship between the client and the server is established, ** communication can be two-way , **both the client and the server can send and receive
IMG_20231206_200027.jpg
client program features:

  • It is run after being called by the user and actively initiates communication to the remote server during communication. Therefore, the client program must know the address of the server program.
  • No special hardware or complex operating system required

Service program features:

  • It is a program specially designed to provide a certain service and can handle multiple remote or local service requests at the same time.
  • After the system is started, it has been running continuously, passively waiting for and accepting communication requests from customers from all over the world. Therefore there is no need to know the address of the client program
  • Generally requires powerful hardware and advanced operating system support
(2) Peer-to-peer (P2P)

Concept: It means that when two hosts communicate, they do not distinguish which one is the server requester and which one is the service provider.
Essentially, they still use the client-server method.
IMG_20231206_200014.jpg

2.2 Core part of the Internet

The router plays a special role. The router implements the key construction of packet switching. Its task is to forward the received packets.
How it works: Routers forward packets and the continuous exchange of information between routes

. For example: A and B send mail across countries, and A When sent from a certain province, the mail has to go through province A to country A------>country A to country B------>country B to state B, and B gets the mail from state, thus realizing communication. , the place where the mail passes is the core

(1) Circuit switching

During communication, a physical connection is stably allocated. It is always occupied after the communication is established, and the resources are not released until the communication ends. Circuit switching is characterized by real-time, stable, and reliable communication, but it takes up a lot of resources and the communication quality will decrease with the high load of the line.

(2) Message exchange

The entire message needs to be assembled first and the integrity of the entire message needs to be checked, and then the entire message is sent out at once. Message exchange is characterized by high transmission efficiency, but for real-time data communication that requires timely response, the real-time performance cannot be satisfied due to the long waiting time for message assembly.

(3) Packet switching

Divide digital information into equal-length data blocks, and add control information to form data packets. There is no need to predetermine a fixed communication path. The router selects the best transmission path in the network, and then sends it to the target address in order. Packet switching is characterized by high reliability, good flexibility, resource sharing, and high transmission efficiency, but it requires a large amount of control information. Moreover, the transmission delay of packet switching is higher than that of circuit switching and message switching.
IMG_20231206_203301.jpg

3. Categories of computer networks

3.1 Classification according to the scope of the network

  1. Wide Area Network (WAN): The scope is generally tens to thousands of kilometers, also called remote network
  2. Metropolitan Area Network (MAN): The scope is generally a city, and can span several sections or even the entire city (5-50km)
  3. Local Area Network (LAN): Generally connected by microcomputers or workstations through high-speed communication lines. (about 1km)
  4. Personal Area Network (PAN): A Personal Area Network is a network (about 10m) that connects electronic devices for personal use using wireless technology at a person's work place.

3.2 Classification by network users

  1. Public network: This refers to the large network built and funded by telecommunications companies
  2. Private network: This is a network built by a department to meet the needs of the unit's special business work.

4.Performance of computer network (key point)

4.1 Performance indicators

  1. Rate: refers to the data transmission rate (unit bit/s)
  2. Broadband: refers to the ability of a certain channel in the network to transmit data (unit bit/s)
  3. Throughput: Indicates the actual amount of data passing through a certain network per unit time (unit bit/s)
  4. Latency: refers to the time it takes for data to travel from one end of the network to the other (important)

(1) Transmission delay: The time required for a host or router to send a data frame
represents the time required from the first bit of data sent to the last bit of the frame to be sent.
Formula: Transmission delay = data frame Length bit) / transmission rate (bit/s)

(2) Propagation delay: Propagation delay is the time it takes for electromagnetic waves to propagate a certain distance in the channel.
Formula: Propagation delay = channel length (m) / electromagnetic wave in Channel propagation rate (m/s)

There is a difference between the propagation delay and the transmission delay: 1) The transmission delay is the transmission outside the machine; 2) The transmission delay is the transmission inside the machine.
For example: The transmission delay is the time when the bus arrives at the platform. The time it takes for all passengers to board the bus; and the propagation delay is the time it takes for the bus to travel from one stop to the next.

(3) Processing delay: It takes a certain amount of time for the host or router to process the packet when it receives it.

Total delay: sending delay + propagation delay + processing delay + queuing delay

(4) Queuing delay: After entering the router, the packet must first be queued in the input queue and wait for processing. In the same way, the output queue is also

(5) Delay-bandwidth product:
**Formula: Delay-bandwidth product (bit) = Propagation delay * Broadband**
IMG_20231209_155854.jpg
(6) Round-trip time RTT

(7) Utilization: There are channel utilization and network Utilization.
Channel utilization refers to what percentage of the time the channel is used (data passes through).
Network utilization: It is the weighted average formula of the channel utilization of the entire network
: D= D0/1-U
D0: represents Delay when the network is idle, D: current delay of the network U: network utilization

4.2 Non-sexual indicators

  1. cost
  2. quality
  3. standardization
  4. reliability
  5. Scalability and upgradeability
  6. Easy to maintain and manage

5. Computer network architecture (important)

The network architecture is the collection of layers and protocols of the computer network

5.1 Protocols and Layers

5.1.1 Network protocol

A rule, standard or convention, also referred to as a protocol, established for the exchange of data in a network.
The three basic elements of a network protocol are:

  • Syntax: the structure or format of data and control information
  • Semantics: what control information needs to be sent, what actions to complete and what responses to make
  • Synchronization: a detailed description of the sequence of events

5.1.2
IMG_20231209_122629.jpg
The role of division and layering:

  1. Each layer is independent
  2. Better flexibility
  3. structurally separable
  4. Easy to implement and maintain
  5. Can promote standardization work

5.2 Architecture with five-layer protocols

IMG_20231209_123154.jpg
Top to bottom description:

5.2.1 Application layer

The task of the application layer is to complete specific network applications through interaction between application processes.
The application layer protocol defines the rules for communication and interaction between application processes (protocols such as HTTP, SMTP, etc.) (the data unit is a message)

5.2.2 Transport layer

The task of the transport layer is to provide general data transmission services for communication between processes on two hosts,
mainly using TCP (the data unit is a message segment) and UDP (the data unit is a user datagram)

5.2.3 Network layer

The network layer is responsible for providing communication services to different hosts on the packet switching network (the data unit is a packet)

5.2.4 Data link layer

The data link layer is mainly responsible for organizing the bit stream transmitted by the physical layer into frames and providing error detection and correction to ensure reliable transmission of data (the data unit is a frame)

5.2.5 Physical layer

The main task of the physical layer is to transmit data from the sender to the receiver, transmitting bit streams (data units are bits) through the physical medium

IMG_20231209_132614.jpg

5.3 Entities, protocols, services and service access points (important)

Entity: Represents any hardware or software process that can send or receive information. In many cases, the entity is a specific software module.

Protocol: It is a set of rules that control the communication between two peer entities (or multiple entities).

Service: It is the service provided by the lower layer to the upper layer through the inter-layer interface.

Primitive: The upper layer The services provided must be exchanged with the lower layer by exchanging some commands (OSI).

Service Access Point (SAP): A place where entities from two adjacent layers in the same system interact.

Service Data Unit (SDU): OSI exchanges between layers. Data unit

Protocol data unit (PDU): OSI transfers data units (control information and user information) between peer layers

The difference between protocols and services: A protocol is a collection of communication rules between two peer entities; a service refers to the functions provided by the lower layer in a system to the upper layer. The
relationship between protocols and services: The implementation of the protocol ensures that services can be provided to the upper layer. , to implement this layer protocol, services provided by the lower layer are also needed
IMG_20231209_132739.jpg

2. Exercises

1. Briefly describe the key points of packet switching

  1. store and forward
  2. segmentation reorganization
  3. Independent routing


The most important feature of packet switching is the use of store-and-forward technology; the entire block of data to be sent is called a message. Before sending a message, first divide the longer message into smaller equal-length data segments, and add some necessary control information in front of each data segment to form a packet. A packet, also known as a "packet", is a unit of data transmitted over the Internet. It is precisely because the header of the packet contains important control information such as the destination address and source address that each packet can independently choose a transmission path in the Internet; routers are used to forward packets. Each time a packet is received, it is temporarily stored. Then check the header, search the forwarding table, find the appropriate interface to forward according to the destination address in the header, and transfer the packet to the next router. In this way, it passes through several or dozens of different routers step by step, and delivers the packet to the final destination host in a store-and-forward manner. Finally, the packet is reassembled at the destination host and restored to the original message.

2. There is a point-to-point link with a length of 20,000km. The data sending rate is 1kbit/s, and the data to be sent is 100bit. The propagation speed of data on this link is 2×10^8m/s. Assume that we can see the bits transmitted on the line, and try to draw the bits on the line that we see (draw two pictures, one when 100 bits have just been sent, and the other after 0.05s).

Test: Delay
(1) The unit of rebroadcast delay is m/ (m/s) The transmission delay is bit / (bit/s)
Propagation delay: 20000 10^3m / 2 10^8 m/s = 0.1s
Transmission delay: 100bit / 1 10^3 bit/s =0.1s
( 2) The transmission delay indicates the time required from the first bit of the data to be sent to the last bit of the frame.
The time to propagation delay ratio is 1, 20000
10^3(km) * 1=20000*10^3(km)

3. There is a point-to-point link with a length of 20,000km. The data sending rate is 1Mbit/s, and the data to be sent is 100bit. The propagation speed of data on this link is 2×10^8m/s. Assume that we can see the bits transmitted on the line, and try to draw the bits on the line that we see (draw two pictures, one when 100 bits have just been sent, and the other after 0.05s).

The difference between this question and the above question is that
the retransmission delay remains unchanged, and the transmission delay becomes 100 bit /1 Mbit/s =10^(-4)s **The

ratio of retransmission delay and transmission delay is 0.0001/0.1= 0.001 20000*10^3(km) * 0.001 =20km
0.05/0.0001=500 20km * 500 =10000km

4. There is a point-to-point link with a length of 50km. If the propagation speed of data on this link is 2×10^8m/s, what is the bandwidth of the link so that the propagation delay is as large as the transmission delay of sending a 100-byte packet? What should be the result if a 512-byte packet is sent?

Formula:
1) Delay bandwidth product (bit) = propagation delay * broadband
3) Propagation delay = channel length (m) / propagation rate of electromagnetic waves in the channel (m/s)

Propagation delay = 50km / 2*10^8 m/s =25 * 10^(-4) s
100-byte bandwidth = 100bit / 25 * 10^(-4)s, which is approximately equal to 3.2Mbit/s
512 bytes The bandwidth = 512bit / 25 * 10^(-4) s is approximately equal to 16.4 Mbit/s

5. Question

Suppose you want to transfer a 1.5MB file over the network. Assume that the packet length is 1KB and the round-trip time RTT=80ms. Before transmitting data, there is also time to establish a TCP connection. This time is 2×RTT=160ms. Try to calculate the time it takes for the receiver to receive the last bit of the file in the following situations.

(1) The data transmission rate is 10Mb/s, and data packets can be sent continuously.

(2) The data transmission rate is 10Mb/s, but after each packet is sent, you have to wait for an RTT time before sending another packet.

(3) The data sending rate is extremely fast, and the time required to send data does not need to be considered. However, it is stipulated that only 20 packets can be sent within each RTT round-trip time.

(4) The data sending rate is extremely fast, and the time required to send data does not need to be considered. However, only one packet can be sent in the first RTT round-trip time, two packets can be sent in the second RTT, and four packets can be sent in the third RTT (i.e. 2 (3-1)=2 2= 4 groups).
Analysis:
We can calculate that the amount of data that needs to be transferred is 1.5MB, that is, 1.5 * 2^20=1048576. The time to establish a TCP connection is 2×RTT=160ms, which is 0.16s.
The total transmission time is the transmission time + the time to establish the TCP connection + the propagation time of the last packet.
Regarding the propagation time of the last packet: you need to wait for an RTT time to receive the confirmation information

(1) The data transmission rate is 10Mb/s, and data packets can be sent continuously. The transmission time is 1.5*2^20 *8bit/ 10 *10^6 b/s)=1.258s. The propagation time of the last packet is 0.5×RTT=40ms, which is 0.04s. Therefore, the total time is 1.258s+0.16s+0.04s=1.458s.

(2) The data transmission rate is 10Mb/s, but after each packet is sent, you have to wait for an RTT time before sending another packet. The number of groups that need to be divided is 1.5MB/1KB=1536. Therefore, the waiting time is 1535×RTT=122.8s. The propagation time of the last packet is 0.5×RTT=40ms, which is 0.04s. Therefore, the total time is 122.8s+1.258s+0.16s+0.04s=124.258s.

(3) The data sending rate is extremely fast, and the time required to send data does not need to be considered. However, it is stipulated that only 20 packets can be sent within each RTT round-trip time. The number of groups that need to be divided is 1.5MB/1KB=1536. Therefore, 76 RTTs are required to transmit all packets. The propagation time of the last packet is 0.5×RTT=40ms, which is 0.04s. Therefore, the total time is 76×RTT+1.258s+0.16s+0.04s=6.28s.

(4) Start transmitting data after two RTTs.
After n RTTs, 1+2+4+…+2n=2^n-1 packets are sent.
If n=10, then only 2^10-1=1023 packets are sent. It can be seen that 10 RTTs are not enough.
If n=11, then only 2^11-1=2047 packets are sent. It can be seen that 11 RTTs are enough.
The propagation time of the last packet is 0.5×RTT=40ms.
In this way, taking into account the time to establish the TCP connection and the time required to transmit the last packet to the end point, the total time required now
=(2+10+0.5)×RTT=12.5× 0.08=1s.

#####Only personal opinions, please correct me

Guess you like

Origin blog.csdn.net/m0_63084496/article/details/134902089