Teach you how to do the basics of computer network - message exchange

1. Topic

As shown in the figure, host A wants to send a message with a length of 300KB to host B at a transmission rate of 10Mbps. The transmission path needs to pass through 8 routers. The length of the link connecting the routers is 100km. The propagation of the signal on the link The speed is 2×108m/s. The queuing delay of each router is 1ms. The sending rate of the router is also 10Mbps. Ignore: The length of the link between the host and the router, and the queuing delay of the router has nothing to do with the data length, and it is assumed that there is no error or congestion in the signal transmission on the link. Please calculate:
(1) Using the message exchange method, the length of the message header is 60B, how long does it take for the message to go from host A to host B?
(2) Using the message packet switching method, when the length of the packet header is 20B, and the length of the packet data is 2KB, how long does it take for all message packets to go from host A to host B?

insert image description here

2. Answer

Solution 1

Packet switching method: the packet is transmitted one by one, 300KB is divided into 2KB data packets, there are 150, and the last packet is sent from host A to the last router, which is equivalent to 9+149=158 2KB data packets sent times, delay time = sending time × 158 + 8 routers waiting delay time + link propagation time.
In addition, Mbps is the abbreviation of Million bits per second, and 1Mbps represents the transmission of 1,000,000 bits per second (bit).
(1) Sending delay=[(300×1024+60)×8/10000000]×9×103=2212.272ms
queuing delay=8×1=8ms
propagation delay=[(100×1000)/2×108 ]×7×103=3.5ms
The time required for a message to travel from host A to host B=sending delay+queuing delay+propagation delay
=2212.272+8+3.5=2223.8ms

(2) Sending delay=[(2×1024+20)×8/10000000]×(9+149)×103
=261.3952ms
queuing delay=8×1=8ms
propagation delay=[(100×1000) /2×108]×7×103=3.5ms
The time required for all packets to travel from host A to host B=transmission delay+queuing delay+propagation delay=261.3952+8+3.5=272.9ms
Answer: (1 ) Using the packet switching method, it takes 2223.8ms for a packet to go from host A to host B
(2) Using the packet switching method, it takes 272.9ms for all packets to go from host A to host B?

Solution 2

(1) Message exchange
① Message length: L1=300KB=300×1024×8=2457600 (bit)
Header length: L2=60B=60×8=480 (bit)
Total message length: L=L1+L2 =2458080 (bit)
Total delay in message transmission: t1=L/S=2458080/1×107≈245.81 (ms)
② Propagation delay: t2=D/V=[(100×1000)/2×108] ×103=0.5ms
③ It is known that the queuing delay of each router is 1ms
④ The total delay: the message is transmitted from host A to host B to go through 9 transmissions (9 transmission delays), and 7 links to the router link, and the queuing delays of the eight routers. Therefore, the total delay of message exchange is:
T=9×245.81+7×0.5+8×1≈2223.79 (ms)
(Note: The above S represents the transmission rate of the signal, and D is the link length connecting the two routers , V is the propagation speed of the signal on the link).

(2) Message packet exchange
① Number of packets: N=300KB/2KB=150 (pieces)
② Packet length: L=L3+L4=(2×1024+20)×8=16544 (bit)
③ Each packet is sent Delay: t3=L/S=16544/1×107≈1.6544 (ms)
④ It is known that the queuing delay of each packet passing through the router is 1ms, and the propagation delay through each link is 0.5ms.
⑤ The time T for all packets to be transmitted from host A to host B should be equal to the transmission delay of host A sending N-1 packets plus the total time for the last packet to be transmitted from host A to host B.
T=(N-1)×sending delay (t3)+(9×sending delay (t3)+7×propagation delay (t2)+8×waiting delay) = (150-1)×1.6544+
( 9×1.6544+7×0.5+8×1)
=158×1.6544+3.5+8
=272.9 (ms)
Answer: (1) Using the message exchange method, it takes 2223.79ms for the message to go from host A to host B
(2 ) Using the packet switching method, it takes 272.9ms for all packets to go from host A to host B

➡️Welcome friends to leave a message in the comment area below! Follow my csdn! More excitement is waiting for you!

Guess you like

Origin blog.csdn.net/m0_53291252/article/details/122840669