question

JakobAagesen-9684 avatar image
0 Votes"
JakobAagesen-9684 asked JakobAagesen-9684 action

tcp packet travel when source and destination is the same

hi
I am having a hard time finding information about this.
I would like to understand how TCP packets travel (are routed), when they are send from an application to a service on the same server. Basically when source and destination IP is the same (different ports though).
Also, is there any deferens in using the server assigned IP address compared to 'localhost' again compared to using the DNS name.
I think I have read somewhere, when sending packet to a local service running on the same server, it does not use the network and therefore does not put any load on the network. Is this true?

windows-serverwindows-platform-network
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JakobAagesen-9684 avatar image
0 Votes"
JakobAagesen-9684 answered CandyLuo-MSFT commented

Thank you for you input. Sorry for the late response.
You are right I can just test to see.
Would you agree that using DNS and IP address both use network then?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Would you agree that using DNS and IP address both use network then?

Yes, you are right.



0 Votes 0 ·
CandyLuo-MSFT avatar image
0 Votes"
CandyLuo-MSFT answered

Hi ,

I think I have read somewhere, when sending packet to a local service running on the same server, it does not use the network and therefore does not put any load on the network. Is this true?

As far as I know, it should be right. localhost packets don't pass through network stack.

We can have a quick way to test it. Disable NIC and then see if application can work. If it can work, then it means sending packet to a local service running on the same server will not use network.

Another way to confirm is capturing network packet. If it cannot be captured, then means sending packet to a local service running on the same server will not use network.

Best Regards,

Candy


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.