tcp packet travel when source and destination is the same

Jakob Aagesen 136 Reputation points
2021-03-23T11:30:30.167+00:00

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 Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
11,936 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
623 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jakob Aagesen 136 Reputation points
    2021-03-29T06:38:38.603+00:00

    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 additional answer

Sort by: Most helpful
  1. Candy Luo 12,646 Reputation points Microsoft Vendor
    2021-03-24T02:56:01.733+00:00

    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.

    0 comments No comments