1 Answers
The side INITIATING a TCP/IP session dictates the port to receive data back on. So for example if you are SSH’ing to an EC2 instance, you initiate the connection to the EC2 instance by connecting to it on port 22, and your system tells it "send traffic back to me on this IP and Port" via information in the packet headers. It’s a bit more technical than this, but I hope the simple explanation clears up your question. You can google something like "how TCP connections work" for more info!
Thanks! Client source ip: source port (ephemeral port, ie 52353) -> Server destination IP: destination port (well known port, ie 22)
ok, the slide is correct. Ephemeral port is indeed on the client side.
The ephemeral port number is assigned by the operating system of the client.
no server involved. Obviously when the client initiates the TCP connection to the server it sends the ephemeral port it is going to use.