Not sure how else to phrase the question so that's why it's phrased the way it is. I have these two questions:
- Is it possible for two TCP segments with source port 80 to be sent by different processes at the sending host
- Is it possible for two UDP segments with source port 5723 to be sent by different processes at the same host?
I was unsure of the answer at first, but I believe the answer for both of these to be no, it isn't possible. The reason for this is in the case of TCP, there is no way to uniquely identify the segment because the 4 tuple (source port, dest port, source ip, and dest ip) will be the same across both processes which means no way to distinguish between the segments. Similarly, for UDP, the IP datagram will carry the source/dest IP, however, these will be the same. The UDP segment will carry the source port/dest port, but again, these will be the same. This means no ability to distinguish between segments for either protocol.
Possible solutions are to use the processes on two separate clients (would mean separate IP, solving the problem in both scenarios), or using the processes from the same host with different ports.
Please inform me if this is correct or if I'm way off, please tell me why. Thank you for your time!