206k views
20 votes
. Suppose client A initiates an FTP session with server S. At about the same time, client B also initiates an FTP session with server S. Provide possible source and destination port numbers for: (a) the segments sent from A to S? (b) the segments sent from B to S? (c) the segments sent from S to A? (d) the segments sent from S to B? (e) If A and B are different hosts, is it possible that the source port numbers in the segments from A to S are the same as those from B to S? (f) How about if they are the same host?

1 Answer

7 votes

Final answer:

The source and destination port numbers for FTP segments sent between client A, client B, and server S are explained. Possible port numbers are provided and it is shown how the source and destination ports change depending on the direction of the communication. The possibility of source port numbers being the same for different hosts is also discussed.

Step-by-step explanation:

(a) The source port number for segments sent from client A to server S can be any available port number on client A, let's say 5000. The destination port number for these segments would be port number 21, which is the well-known port number for the FTP service on the server S.

(b) Similarly, the source port number for segments sent from client B to server S can be any available port number on client B, for example, 6000. The destination port number would still be port number 21 (FTP service).

(c) The source port number for segments sent from server S to client A would be port number 21 (FTP service) since server S is responding to client A's FTP request. The destination port number would be the port number 5000 used by client A.

(d) The source port number for segments sent from server S to client B will be port number 21 (FTP service) since server S is responding to client B's FTP request. The destination port number will be the port number 6000 used by client B.

(e) If A and B are different hosts, it is possible that the source port numbers in the segments from A to S are the same as those from B to S. This is because the source port numbers are allocated independently by the operating systems on A and B, and there is a large range of available port numbers to choose from.

(f) If A and B are the same host, the source port numbers in the segments from A to S cannot be the same as those from B to S. This is because the port numbers are unique for different processes running on the same host.

User Darline
by
4.8k points