If you connect to your computer via its own IP does the traffic leave your NIC then comes back?

network-protocols, networking, tcp

Solution

No, it does not. Your operating system will recognize that it is a local address and internally loop-back even though the address is bound to a physical network port.

As a simple test, pull the network cable. You'll still be able to communicate locally. (Note that a DHCP served address may get revoked if the OS detects the cable has been removed; you may have to configure a static IP address before trying this test.)

Also, hubs (and presumably many/most switches) will not pass outgoing packets back down the wire so "going out on the wire" wouldn't work with most networking equipment, either.

Problem

I believe that if you use 127.0.0.1 the traffic never leaves the NIC, but I was wondering whether the same was true when you use the actual IP address of the computer.

Original source