Computer Network (Xie Xiren-Eighth Edition) Complete Solutions to Chapter 1 Exercises

Preface: The blogger is still a beginner, if the answer to the exercises is wrong, please correct me in the comment area, thank you~

1-01. What services can a computer network provide to users?

1) Connectivity: Internet users, regardless of the distance, can exchange various information conveniently and economically, as if these users are connected to each other.

2) Resource sharing: it can be information sharing, software sharing, hardware sharing, etc.

 1-02. Try to briefly describe the main points of packet switching?

Packet switching: Store and forward technology is mainly used. Divide a whole message into data segments of equal length, and add some necessary control information in front of each segment to form a "group". Each group is independent on the network. For transmission, the router is responsible for forwarding these packets, and after multiple forwarding, deliver them to the destination host.

advantage:

shortcoming:

1) Packets need to be queued for storage and forwarding at each router, which causes a certain delay.

2) Packet switching does not guarantee various resources required for communication by establishing a connection like circuit switching, so it cannot ensure end-to-end bandwidth during communication, and may cause congestion when the traffic is large.

3) Because each packet must carry control information, it also causes certain overhead, and the entire packet switching network also needs a special management and control mechanism.

1-03. Try to compare the advantages and disadvantages of circuit switching, message switching and packet switching from multiple aspects?

1) Circuit switching: The bit stream of the entire message is continuously transmitted from the source point to the end point, as if it is transmitted in a pipeline. Circuit switching must go through three steps of "establishing connection", "talking" and "releasing connection". During a call, the two users in the call always occupy end-to-end communication resources.

advantage:

① The communication line is exclusively used by both parties in the call, so the data can be directly transmitted and the propagation delay is small.

② The two parties transmit data in the order in which they are sent, and there is no order problem.

③ It is suitable for transmitting both analog signals and digital signals.

④ Once the physical path of the communication parties is connected, the two parties can communicate at any time, with strong real-time performance.

shortcoming:

① Circuit switching takes a relatively long time to establish a physical path.

② After the two parties establish a connection, the communication resources are monopolized by the two parties. Even if they do not communicate, they cannot be used by other users, and the channel utilization rate is very low.

③ In circuit switching, the data is direct, and it is difficult for terminals of different types, specifications, and speeds to communicate, and it is also difficult to control errors during the communication process.

2) Message exchange: adopt store-and-forward technology, but use the transmission of the entire message. The entire message is transmitted to the adjacent node first, and then it is stored in the forwarding table and forwarded to the next node.

advantage:

① There is no need to establish a physical path, and communication can be carried out at any time

② Due to the store-and-forward technology adopted:

a. Code checking and data retransmission mechanisms can be set in message exchange, and switching nodes can also select forwarding paths according to network conditions, so when a path fails, another path can be selected for data transmission, which improves transmission reliability.

b. It is easy to implement code conversion and rate matching in store-and-forward, and the two communicating parties may not be available at the same time, which facilitates communication between computers of different types, specifications and speeds.

c. Provide multi-destination services, that is, a message can be sent to multiple destination addresses at the same time, which is difficult for circuit switching.

d. The priority of data transmission can be set, so that the message with higher priority is converted first.

③ The communication parties do not occupy a communication line fixedly, but partly occupy the physical path at different times, thus greatly improving the utilization rate of the communication line.

shortcoming:

① Message exchange is only applicable to digital signals.

② Since the message has to go through the process of storage and forwarding at the switching node, it causes a forwarding delay (receiving messages, queuing, processing messages, etc.), and, when the network traffic is larger, the resulting delay bigger. Therefore, the real-time performance of message exchange is poor, and it is not suitable for transmitting real-time or interactive service data.

③ Since there is no limit to the length of the message, and each node in the middle has to store and forward a complete message, when the output line is not idle, it is willing to store several complete messages for forwarding, requiring each node in the network have larger buffers.

  In order to reduce the cost and reduce the capacity of the node buffer memory, sometimes the packets waiting to be forwarded are stored on the disk, which further increases the transmission delay.

3) Packet switching: store-and-forward technology is still used, but unlike message switching, packet switching divides a complete message into several fixed-length short packets, and then adds control information in front of each packet. These packets are then forwarded independently on the network, therefore, packet switching has the following advantages and disadvantages in addition to the advantages of packet switching:

advantage:

① It speeds up the transmission of data in the network, because the packets are transmitted independently one by one, so that the storage operation of the latter packet and the forwarding operation of the previous packet can be carried out concurrently. This pipelined transmission method reduces the transmission time of the message delay.

     In addition, the buffer required to transmit a packet is much smaller than the buffer required to transmit a message, so the probability of waiting for transmission due to insufficient buffer and the waiting time must be much less.

② Simplified storage management. Because the length of the packet is fixed, the size of the corresponding buffer is also fixed, and the management of the memory in the switching node is usually simplified as the management of the buffer, which is relatively easy.

③ It reduces the probability of error and the amount of retransmitted data. Because the packet is shorter, the probability of error will be reduced, and the amount of data retransmitted each time will be greatly reduced, which not only improves the reliability, but also reduces the transmission delay.

④ Due to the short size of the packet, it is more suitable for the priority strategy, and it is convenient to transmit some urgent data in time. For the sudden communication between computers, packet switching is obviously more suitable.

shortcoming:

① Although the propagation delay is less than that of message exchange, there is still a propagation delay and requires nodes to process data more strongly.

② Control information must be added to each packet, which increases the amount of transmitted data, reduces communication efficiency to a certain extent, increases processing time, complicates control, and increases processing delay.

③ When the datagram service is used for packet switching, there may be out-of-sequence, repetition, and packet loss. When the packets arrive at the destination node, the packets must be sorted according to the header information; if the virtual circuit service is used, the out-of-sequence problem is avoided, but A circuit must have three processes: call establishment, data transmission, and virtual circuit release.

1-04. Why is it said that the Internet is the biggest change in the field of storing and exchanging information since the invention of printing?

Integrating other communication networks, it plays a central role in the process of informatization, providing the best connectivity and information sharing, and providing real-time interactive capabilities in various media forms for the first time.

1-05. What are the stages of Internet infrastructure development? Please indicate the main characteristics of these stages?

The basic structure of the Internet has generally experienced three stages of evolution. However, these three stages are not completely separated in terms of time, but partially overlap, because the evolution of the network is gradual, rather than a sudden change at a certain date.

The first stage: It is the process of developing from a single network ARPANET to the Internet.

The second stage: the Internet with a three-level structure (backbone network, regional network, enterprise network or campus network) has been established.

The third stage: gradually formed the Internet with multi-level ISP structure on a global scale.

1-06. Briefly describe the stages of Internet standard formulation?

Formal standards for the Internet go through the following three stages:

1) Internet Draft (Internet Draft) - the validity period of the Internet Draft is only six months, and it cannot be regarded as an RFC document at this stage.

2) Proposed Standard (Proposed Standard) - from this stage it is called an RFC document (RFC ("Request for Comments"), all RFC documents can be downloaded from the Internet, and can also be commented on, all Internet standards are RFC documents, but very few RFC documents can become Internet standards).

3) Internet Standard (Internet Standard) - If after a long-term test, it is proved that a proposed standard can become an Internet standard, it will be assigned a standard number, and an Internet standard can be associated with multiple RFC documents.

1-07. What is the important difference in meaning between the English names internet and Internet that start with lowercase and uppercase?

Internet: Translated as "Internet", it is a general term that generally refers to a computer network formed by interconnecting multiple computer networks. The communication protocol (that is, the communication rule) between these networks can be selected arbitrarily, and the TCP/IP protocol does not necessarily have to be used.

Internet: Translated as "Internet" and "Internet", it is a special term, referring to the world's largest, open, and specific Internet connected by many networks. It uses the TCP/IP protocol family as the communication rule , and its predecessor is ARPANET in the United States.

1-08. What are the types of computer networks? What are the characteristics of each type of network?

According to the scope of the network:

1) Wide Area Network (WAN): The range of action is generally tens to thousands of kilometers, so it is sometimes called "remote network". The WAN is the core part of the Internet.

2) Metropolitan area network (MAN): The scope of action is generally a city, which can span several blocks or even the entire city, generally 5 to 50 kilometers. At present, many metropolitan area networks also use Ethernet technology.

3) Local area network (LAN): the scope of action is generally an enterprise or a school, about 1 km. In the early stage of the development of the local area network, a school or enterprise often only had one local area network, but now the local area network is very extensive, and most schools or enterprises are used for Many interconnected local area networks (such networks are often called campus networks or enterprise networks)

4) Personal area network (PAN): The scope of action is about 10 meters. The personal area network is a network that connects electronic devices (such as laptops, etc.) that belong to individuals with wireless technology in the place where individuals work.

By network users:

1) Public network: refers to a large-scale network funded and built by a telecommunications company (state-owned or private). "Public" means that all people who are willing to pay fees according to the telecommunications company's regulations can use this network, so it is also called a public network.

2) Private network: refers to the network built by a certain department to meet the needs of the unit's special business work. This network does not provide services to people outside the organization. For example: military, railway, bank, electric power and other systems all have private networks.

The network used to connect users to the Internet: this network is the access network (AN). The access network is a special network that connects users and the Internet through various access network technologies. The network owned by the ISP is actually an access network. net.

1-09. What is the main difference between the backbone network and the local access network in the computer network?

Backbone network: provide long-distance coverage, high-speed transmission, and router-optimized communication.

Local network: It mainly supports retail access, and the speed is low.

1-10. Try to compare circuit switching and packet switching under the following conditions: the total number of messages to be transmitted is x (bit). A total of k segments of links are passed from the source point to the destination point, the propagation delay of each link is d(s), and the data rate is b(bit/s). The establishment time of the circuit in circuit switching is s(s). In packet switching, the packet length p (bit), the header that must be added to each packet is very short, and the impact on the packet transmission delay may not be considered in this question. In addition, the queuing waiting time of each node is negligible. Question: Under what conditions, the delay of packet switching is smaller than that of circuit switching? (Hint: Draw a sketch to observe how many nodes there are in the k-segment link)

Circuit Switching: Total Delay = Connection Establishment Delay + Send Delay + Propagation Delay = s + x/b + k*d

Packet switching: total delay = send delay + store-and-forward delay + propagation delay = x/b + (k-1)*p/b + k*d where (k-1)*p/b is k Store-and-forward latency on segment links

To make the delay of packet switching shorter than that of circuit switching, s>(k-1)*p/b must be satisfied, that is, the connection establishment delay of circuit switching is greater than the store-and-forward delay of packet switching.

1-11. In the packet-switched network of the above question, let the packet length and packet length be x and (p+h) (bit) respectively, where p is the length of the data part of the packet, and h is the length of each packet The added header length has nothing to do with the size of p. The two ends of the communication pass through a total of k segments of links. The data rate of the link is b(bit/s), but the propagation delay and node time are negligible. If the total time delay is to be minimized, what is the length p of the data part of the packet? (Hint, refer to the packet-switching part of Figure 1-11 to see which parts make up the total delay.)?

Total delay = send delay + store-and-forward delay = (p+h)*(x/p)/b + [k-1]*(p+h)/b = h*x/p + (k- 1)*p

Deriving the above total delay, -(h*x)/p^2 + (k-1), let the derivative be 0, and find p = √(h*x)/(k-1) (can’t see clear, there are pictures below)

 1-12. What are the characteristics of the two major components of the Internet (edge ​​and core)? What are the characteristics of their working methods?

Edge part: The part at the edge of the Internet is all the hosts connected to the Internet. The edge part utilizes the services provided by the core part, so that many hosts can communicate with each other and exchange information or share information.

Core part: The core part of the Internet consists of routers and networks. Provides connectivity to hosts at the edge of the network, enabling any host at the edge to communicate with any other host.

1-13. What is the main difference between the client-server method and the P2P peer-to-peer communication method? Are there any similar places?

Client-server method: It is the most commonly used and traditional method on the Internet. Client and server both refer to the two application processes involved in the communication. Client-server refers to the relationship between the service and the service between two processes. The client is the service requester and the server is the service provider. Both the service requester and the service provider use the services provided by the core part of the network.

P2P peer-to-peer communication: when two hosts communicate, they do not distinguish which one is the service requester and which one is the service provider. As long as the two hosts are running peer-to-peer connection software (P2P software), they can communicate on an equal peer-to-peer connection.

Similarities: In fact, the peer-to-peer connection mode is still a client-server mode in essence, but each host in the peer-to-peer connection is both a client and a server.

1-14. What are the commonly used performance indicators for computer networks?

1) Rate: Refers to the data transmission rate, also known as "data rate" or "bit rate", the unit of rate is bit/s (bit per second, sometimes also written as bps, that is, bit per second), when it is mentioned When specifying the speed of the network, it often refers to the rated speed or the nominal speed, not the actual running speed of the network.

2) Bandwidth: Bandwidth originally refers to the frequency bandwidth of a certain signal, but in a computer network, bandwidth is used to indicate the ability of a certain channel in the network to transmit data, so the network bandwidth indicates that a certain channel in the network can pass through within a unit of time "Maximum Data Rate". So the unit of bandwidth is the unit of data rate bit/s, which is "bit per second".

3) Throughput: Indicates the actual amount of data passing through a network (or channel, interface) per unit time. Throughput is more often used as a measure of real-world networks to know how much data is actually going through the network. Throughput is limited by the network bandwidth or the rated rate of the network.

4) Latency: divided into sending delay, propagation delay, party experiment, processing delay, etc.

5) Delay-bandwidth product: Delay-bandwidth product = propagation delay x bandwidth

From the above formula, we can know that the unit of delay-bandwidth product is bit. If the link is likened to a pipe, the cross-sectional area of ​​the pipe is regarded as the bandwidth, and the length of the pipe is the propagation delay of the link, then the delay-bandwidth product represents the volume of the pipe and how many such links can accommodate bit. This shows that if the sender sends data continuously, when the first bit sent is about to reach the end point, the sender sends data with a delay-bandwidth product bit, and these data are all moving on the link. Therefore, the delay-bandwidth product of a link is also called the link length in bits.

 6) Round-trip time (RTT): Indicates the time required for a two-way two-way communication communication

7) Utilization: There are two types of utilization: channel utilization and network utilization. The channel utilization rate indicates how many percent of the time a certain channel is used (data passes through). The utilization rate of a completely idle channel is 0, but the higher the channel utilization rate, the better. According to the queuing theory, when the utilization rate of a certain channel increases, the delay caused by the channel also increases rapidly. Assuming that D0 represents the delay when the network is idle, D represents the current delay of the network, and the current network utilization rate is U, then there is a formula:

 1-15 Assuming that the utilization rate of the network reaches 90%, try to estimate how many times the current network delay is its minimum value?

According to the formula: D = D0/(1-U), the minimum value of the known network delay is D0, and U = 90% is substituted into the formula to get D = 10D0, so the current network delay is its minimum value 10 times.

1-16 What are the non-performance characteristics of computer communication network? What is the difference between non-performance characteristics and performance indicators?

1) Cost: Generally speaking, the higher the network rate, the higher the cost.

2) Quality: The quality of the network depends on the quality of all components in the network.

3) Standardization: The design of network hardware and software can be based on general international standards or specific dedicated network standards. It is best to adopt the design of international standards, so that better interoperability can be obtained, easier to upgrade and repair, and easier to get technical support.

4) Reliability

5) Scalability and upgradeability

6) Easy to manage and maintain

Difference: The performance index refers to the index related to the performance of the network itself, while the non-performance index has nothing to do with the network itself.

1-17 The transmission distance between the sending and receiving ends is 1000km, and the propagation speed of the signal on the medium is 2x10^8 m/s. Try to calculate the sending delay and propagation delay for the following two cases.

1) The data length is 10^7bit, and the data sending rate is 100k bit/s.

2) The data length is 10^3bit, and the data transmission rate is 1 Gbit/s.

What conclusions can be drawn from the above calculation results?

1) Sending delay: 10^7 bit/100k bit/s = 100s Propagation delay: 1000km/2x10^8 m/s = 0.005 s

2) Sending delay: 10^3 bit /1G bit/s = 10^(-6)s Propagation delay: 1000 km/2x10^8 m/s = 0.005 s

Conclusion: Propagation delay is related to link length, not to sending rate. The transmission delay is related to the transmission rate and has nothing to do with the link length.

1-18 Assume that the propagation speed of the signal on the medium is 2.3x10^8 m/s. The media length l is respectively:

1) 10cm (network interface card)

2) 100m (LAN)

3) 100km (MAN)

4) 5000km (wide area network)

Data is now transmitted continuously at data rates of 1 Mbit/s and 10 Gbit/s respectively. Try to count the number of bits in the medium in each case. (Hint: The number of bits in the medium cannot actually be measured with a meter. This question assumes that we can see the bits in the medium being propagated, and can take a snapshot of the bits in the medium. The number of bits in the medium depends on the length of the medium and the data Rate)

10cm:

10cm / 2.3x10^8 m/s * 1Mbit/s = 4.35 x 10^(-4) bit

10cm / 2.3x10^8 m/s * 10Gbit/s = 4.35 bit

100m:

100m / 2.3x10^8 m/s * 1Mbit/s = 4.35 x 10^(-1) bit

100m / 2.3x10^8 m/s * 10Gbit/s = 4.35 x 10^3 bit

100km:

100km / 2.3x10^8 m/s * 1Mbit/s = 4.35 x 10^2 bit

100km / 2.3x10^8 m/s * 10Gbit/s = 4.35 x 10^6 bit

5000km:

5000km / 2.3x10^8 m/s * 1Mbit/s = 2.17 x 10^4 bit

5000km / 2.3x10^8 m/s * 10Gbit/s = 4.35 x 10^8 bit

1-19 The application layer data with a length of 100 bytes is handed over to the transport layer for transmission, and a 20-byte TCP header needs to be added. Then hand it over to the network layer for transmission, plus a 20-byte IP header. Finally, it is handed over to the Ethernet transmission of the data link layer, plus a total of 18 bytes for the header and tail. Find the efficiency of data transmission. Data transmission efficiency refers to the sending layer data divided by the total data sent (that is, application data plus various header and trailer overhead).

If the application layer data length is 1000 bytes, what is the data transmission efficiency?

Transmission efficiency: 1 - (20+20+18)/(100+20+20+18) = 63.3%

If the data length is 1000 bytes: 1-(20+20+18)/(1000+20+20+18) = 94.5%

1-20 Why does the network architecture adopt a hierarchical structure? Give some examples of everyday life that are similar to the idea of ​​layered architecture.

① Each layer is independent, a layer does not need to know how its next layer is implemented, but only needs to know the services provided by the layer through the interlayer interface (ie interface).

② Good flexibility. When any layer changes (for example, due to technological changes), as long as the interface relationship between layers remains unchanged, the layers above or below this layer will not be affected.

③ The structure can be divided, and each layer can be realized by the most suitable technology.

④ Easy to implement and maintain. This structure makes it easier to implement and debug a large and complex system, because the whole system has been decomposed into several relatively independent subsystems.

⑤ It can promote standardization work, because the functions of each layer and the services it provides have been precisely described.

Similar examples: express logistics, etc.

1-21 What is the difference between an agreement and a service?

Protocol: A protocol is horizontal, a protocol is a collection of rules governing how two peer entities (or entities) communicate. Under the control of the protocol, the communication between two peer entities enables this layer to provide services to the upper layer. To realize the protocol of this layer, it is also necessary to use the services provided by the lower layer.

Service: The service is vertical, that is, the service is provided from the lower layer to the upper layer through the interface between layers. In addition, not all the functions completed in one layer are called services, only those functions that can be "visible" by higher-level entities can be called "services".

1-22 What are the three elements of the network protocol? What does each mean?

Three elements of a network protocol:

① Grammar: the structure or format of data and control information

② Semantics: What kind of control information needs to be sent, what kind of action to complete and what kind of response to make

③ Synchronization: a detailed description of the sequence of events

1-23 Why must a network protocol take into account all kinds of unfavorable situations?

Because the protocol must ensure that data can be exchanged in an orderly manner in the network without deadlocks and other phenomena, therefore, the protocol cannot assume that everything is normal and ideal, and must carefully check whether the protocol can cope with any probability of occurrence Minor exceptions.

1-24 Describe the main points of the network architecture with five-layer protocols, including the main functions of each layer?

①Physical Layer

Responsible for transparently transporting the bitstream. The unit of data transmitted on the physical layer is bit. The physical layer needs to consider how much voltage to use to represent "1" or "0", and how the receiver recognizes the bit sent by the sender. The physical layer also determines the plug of the connecting cable. How many pins should there be and how should each pin be connected.

② Data Link Layer (Data Link Layer)

Often referred to as the link layer. The data transmission between two hosts is always transmitted on a link of a link, which requires the use of a special link layer protocol. When transmitting data on the link between adjacent nodes, the data link layer assembles the IP data packets handed over by the network layer into a frame, and transmits the frame on the link between two adjacent nodes. Each frame includes data and necessary control information.

③ Network Layer (Network Layer)

The network layer is responsible for providing communication services for different hosts on the packet switching network. The data generated by the network layer is called an IP packet (because the IP protocol is used), and the network layer has two specific tasks: one is to generate a packet for forwarding packets on each router in the Internet through a certain algorithm. published. Second, when each router receives a packet, it forwards the packet to the next router according to the path specified in the forwarding table.

④ Transport Layer (Transport Layer)

The task of the transport layer is to provide general data transmission services for the communication between the processes in the two hosts. Multiple applications can use the same transport layer service. Since a host can run multiple processes at the same time, the transport layer has multiplexing and demultiplexing functions. Multiplexing means that multiple application layers can use the services of the lower transport layer at the same time, and demultiplexing means that 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, User Datagram Protocol UDP

⑤Application Layer

The application layer is the highest layer in the architecture. The task of the application layer is to complete specific network applications through the interaction between application processes. The application layer protocol defines the rules for communication and interaction between application processes. Different network applications require different application layer protocols. There are many application layer protocols in the Internet, such as domain name system DNS, HTTP protocol supporting World Wide Web applications, and SMTP protocol supporting e-mail. The data unit of application layer interaction is called message .

1-25 Can you give examples of the term "transparency" in daily life?

TV, computer windows operating system, industrial and agricultural products

1-26 Try to explain the following terms: protocol stack, entity, peer layer, protocol data unit, service access point, client, server, client-server approach?

① Protocol stack: The protocol stack refers to the sum of the protocols of each layer in the network, because several layers are drawn together to resemble a stack structure. It vividly reflects the process of data transmission in a network: from the upper layer protocol to the lower layer protocol, and then from the lower layer protocol to the upper layer protocol.

② Entity: When studying information exchange in open systems, the term entity is often used to refer to any hardware or software process that can send or receive information. In many cases, an entity is a specific software module.

③Peer-to-peer layer: refers to any two identical layers that directly (logically) transfer data (that is, data units plus control information) to each other in the computer network protocol layer.

④ Protocol data unit: The OSI reference model refers to the data unit transmitted between peer layers as the protocol data unit PDU (Protocol Data Unit) of this layer

⑤Service access point: In the same system, the place where entities of two adjacent layers interact (that is, exchange information), is usually called a service access point. Service access point is an abstract concept, it is actually a logical interface.

⑥Client: Refers to the computer process. The client program is generally run after being called, and actively initiates communication (request service) to the server during communication. Therefore, the client program must know the address of the server program. The client program does not require special hardware and a very complicated operating system.

⑦Server: Refers to a computer process, which is a program specially designed to provide a certain service, and can handle requests from multiple remote or local clients at the same time. After the server system is started, it has been running continuously, passively waiting and accepting communication requests from customers from all over the world. Therefore, the server does not need to know the address of the client program. Servers generally require powerful hardware and advanced operating system support.

⑧Client-server method: This is one of the communication methods between end systems, the client is the service requester, and the server is the service provider.

1-27 Try to explain everything over IP and IP over everything?

The IP layer can support a variety of transport layer protocols, and there can be multiple application layer protocols on different transport layer protocols. This is everything over IP. At the same time, the IP protocol can also run on various types of networks. This is IP over everything

1-28 Suppose you want to transfer a 1.5MB file over the network. Let the packet length be 1KB. Round trip time RTT = 80ms. It takes time to establish a TCP connection before transmitting data, which is 2xRRT = 160ms. Try to calculate the time required for the recipient to receive the last bit of the file under the following conditions.

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

2) The data transmission rate is 10M bit/s, but after each packet is sent, it has to wait for an RTT time before sending the next packet.

3) The data transmission rate is extremely fast, and the time required for sending data may not be considered. However, it is stipulated that only 20 packets can be sent in each RTT round-trip time.

4) The data sending rate is extremely fast, and the time required for sending data may not be considered. But 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 (ie 2^(3-1) = 2^ 2 = 4 groups).

untie:

1) T = TCP establishment time + sending delay + propagation delay of the last bit = 160ms + 1.5x2^20x8/10^7 + 40ms = 1.458s

2) T = TCP establishment time + sending delay + waiting delay for each packet * (number of packets - 1) + propagation delay of the last bit = 160ms +1.5x2^20x8/10^7+(1.5MB/1KB -1)*80ms +40ms = 124.258s

(The number of packets here is -1, because the first packet does not need to wait when it is sent)

3) T = TCP establishment time + RTT*[number of packets/20] + propagation delay of the last group = 160ms + 80ms*[1536/20] + 0.04s =6.28s

4) The summation formula of geometric series:

 After n RTT can be sent: 1+2+4+...+2n = 2^n - 1 (packet)

So 1535 packets need 11RTT (2^10 <1535 <2^11)

T = TCP establishment time + propagation delay of the first 1024 packets + propagation delay of the last 511 packets = 160ms+10x80ms+40ms =1s

1-29 has a point-to-point link with a length of 50km. If the propagation rate of data on this link is 2x10^8 m/s, what is the bandwidth of the link so that the propagation delay is as large as the sending delay of sending a 100-byte packet? What happens if packets are sent that are 512 bytes long?

Let the bandwidth be y

Propagation delay=50km/2x10^8 m/s = 100B/y = sending delay, get y= 3.2x10^6 bit/s

If 512 bytes are sent: y1 = 1.6384x10^7 bit/s

1-30 has a point-to-point link with a length of 20000km. The sending rate of data is 1k bit/s, and the data to be sent has 100bit. Data travels at a rate of 2x10^8 m/s on this link. Assuming we can see the bits transmitted on the line, try to draw the bits on the line we see (draw two pictures, one is when 100bit has just been sent, and the other is after 0.05s)

1-31 The conditions are the same as the above question, but the data sending rate is changed to 1M bit/s. Compared with the results of the previous question, what conclusion can you draw?

Conclusion: The increase of sending rate can make up for the problem of information interruption in information transmission.

1-32 Send data at a rate of 1G bit/s. How much is the width of a bit when taking distance or time as the abscissa? 

When taking distance as the abscissa: 1bit * 2*10^8 m/s /1G bit/s = 0.2 m (the transmission medium is assumed to be optical fiber)

When taking time as the abscissa: 1bit/1G bit/s = 10^(-9) s

1-33 When we send data on the Internet, we often send it from a source to a destination, rather than sending it across and back again. So why is the round-trip time RTT an important performance indicator?

In many cases, the information on the Internet is often two-way rather than one-way transmission, and we sometimes need to know the time required for a round trip between the two communicating parties. In addition, when one party sends information to the other party, sometimes it is necessary to ensure that the data is delivered correctly. At this time, the receiver must send a confirmation message to the sender. How long will it take to receive the confirmation from the other party after sending the data? Also depends on the size of the RTT.

1-34 Host A sends a message with a length of 10^7 bits to host B, passing through two node switches in the middle, that is, a total of three links. Let the transmission rate of each link be 2 Mbit/s. All propagation, processing and queuing delays are ignored.

1) If message switching is used, that is, the entire message is not segmented, and each node switch forwards the entire message after receiving it. How long does it take to transmit a message from host A to the first node switch? How long does it take to send a packet from host A to host B?

2) If packet switching is used, the message is divided into 1000 equal-length packets (the impact of the packet header on the calculation of this question is ignored here), and sent continuously. Node switches are capable of receiving and sending at the same time. How long does it take to transfer the first packet from host A to the first node switch? How long does it take to transmit the first packet from host A to host B? How long does it take to send 1000 packets from host A to host B?

3) Generally speaking, compare the advantages and disadvantages of using the entire message to transmit and how many packets are divided to transmit.

1) Transmission to the first node: T = transmission delay = 10^7 bit /2 Mbit/s * 2 = 5s

      A to B:T = sending delay*3 = 15s

2) Transmission to the first node: T = transmission delay = 10^7 bit/1000/2 Mbit/s*2 = 0.005s

     A packet from A to B: T = sending delay*3 =0.015s

    1000 packets from A to B = transmission delay * 1000 + transmission delay of the last packet to B = 0.005 s * 1000 + 0.005s * 2 = 5.01s

3) Message exchange:

Advantages: Compared with circuit switching, it is more flexible and does not need to establish a connection in advance.

Disadvantage: If the message is very long, the storage and forwarding delay at the node of the link is long each time.

Packet switching:

Advantages: Compared with message exchange, the storage and forwarding delay at the node is smaller and more flexible.

Disadvantages: The equipment is more complex and requires higher hardware requirements; the header information of each packet reduces the efficiency of data transmission.

1-35 Host A continuously sends a 600 000 bit file to host B. There is a link between A and B with a bandwidth of 1 Mbit/s, the distance is 5000 km, and the propagation speed on this link is 2.5 x 10^8 m/s.

What is the maximum number of bits on the link?

What is the width (in meters) per bit on the link?

If you want to change the width of each bit on the link to 5000 km (that is, the length of the entire link), what value should you adjust the sending rate to?

Maximum number of bits on a link: Delay-Bandwidth Product = Propagation Delay x Bandwidth = 5000 km / 2.5 x 10^8 m/sx 1 Mbit/s = 2 x 10^4 bit

Width per bit on the link: 5000km / 2x10^4 bit = 250 (meters)

Assuming the sending rate is y, 1 bit *2.5*10^8 m/s / y = 5000km, the solution is y = 50 bit/s

1-36 There are three links on the path from host A to host B, the rates of which are 2 Mbit/s, 1 Mbit/s and 500 kbit/s respectively. Now A sends a large file to B. Try to calculate the throughput of this file transfer. Let the file length be 10MB, and there is no other traffic on the network. May I ask how much time it takes for the file to be transferred from A to B? Why is only the approximate time calculated here?

Throughput of this file transfer: 500kbit/s (depending on the link with the lowest rate)

Approximate time from A to B: 10MB /500kbit/s = 10 x 2^20 x 8 bit / 5x10^5 bit/s = 167.77s

Because the calculated value is only a theoretical value, in fact, if the network is congested, this value cannot be reached.

Guess you like

Origin blog.csdn.net/qq_56919740/article/details/128188774
Recommended