Interactive end-of-chapter exercises


TCP Multiplexing and Demultiplexing

In the scenario below, the left and right TCP clients communicate with a TCP server using TCP sockets. The Python code used to create a single welcoming socket in the server is shown in the figure (the welcoming socket itself is not shown graphically); code is also shown for the client sockets as well. The three sockets shown in server were created as a result of the server accepting connection requests on this welcoming socket from the two clients (one connection from the client on the left, and two connections from the client on the right).



Question List


1. What is the source port # for packet A?

2. What is the destination port # for packet A?

3. What is the source port # for packet B?

4. What is the destination port # for packet B?

5. What is the source port # for packet D?

6. What is the destination port # for packet D?

7. What is the source port # for packet C?

8. What is the destination port # for packet C?




Solution


1. The source port for packet A is port 5454.

2. The destination port for packet A is port 6212.

3. The source port for packet B is port 6212.

4. The destination port for packet B is port 5454.

5. The source port for packet D is port 5284.

6. The destination port for packet D is port 6212.

7. The source port for packet C is port 7489.

8. The destination port for packet C is port 6212.



That's incorrect

That's correct

The answer was: 5454

Question 1 of 8

The answer was: 6212

Question 2 of 8

The answer was: 6212

Question 3 of 8

The answer was: 5454

Question 4 of 8

The answer was: 5284

Question 5 of 8

The answer was: 6212

Question 6 of 8

The answer was: 7489

Question 7 of 8

The answer was: 6212

Question 8 of 8

Try Another Problem

We’d appreciate your leave us feedback on this networking tutor.

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site. The networking tutor was designed and implemented by Hashim Zia and Shayan Ahmad from New York University Abu Dhabi.

Copyright © 2010-2025 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu