简体   繁体   中英

Is it possible in Linux to have the two connections from the same client port to different server ports?

Say, the IP address of my Linux system is 10.0.0.2.

Is it possible, under any imaginable circumstance, that there are two connections that may look like the following, ie two connections with the same client port (eg 10.0.0.2:21426 ) connecting to two separate server ports (eg 10.0.0.2:5000 and 10.0.0.2:5001 )?

10.0.0.2:21426 --> 10.0.0.2:5000
10.0.0.2:21426 --> 10.0.0.2:5001

I don't care if the two client ports belong to the same process or different processes. I also don't care if the two server ports belong to the same process or different processes.

I just want to know if there is any possible situation where the above mentioned scenario is possible.

Yes, this is possible. A good example of this is FTP, where multiple file transfers in active mode would all originate from 10.0.0.2:20 to the various clients.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM