Advertisement

Routed IP:port

Started by March 13, 2016 03:11 PM
0 comments, last by frob 8 years, 8 months ago

I wonder if I connect to some public point twice, over TCP/IP, what will this public point see for those two connections of mine, considering I am behind my router that is public point of mine:

will it see

- PUBLICIPOFMYROUTER:portA and PUBLICIPOFMYROUTER:portA

or

- PUBLICIPOFMYROUTER:portA and PUBLICIPOFMYROUTER:portB

The question is wheather the port will be the same or different for server observed endpoint of my two conections.

[EDIT] I forgot to mention both connections come out from the same local IP that routes to the router.

It will see two different ports.

Every connection has a unique 4-tuple of { Source IP, Source Port, Dest IP, Dest Port}

If it is a different connection, the values must be different. Since the destination IP and destination port are fixed, and your box's ip is fixed, the only variable that changes is your machine's port.

By default your source port is assigned by the system automatically to an unused port.

This topic is closed to new replies.

Advertisement