Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 986
Sandy DeLeon Avatar asked Oct 19 '12 14:10

Sandy DeLeon


People also ask

Can a NIC have 2 IP addresses?

By default, each network interface card (NIC) has its own unique IP address. However, you can assign multiple IP addresses to a single NIC.

What happens if two devices have same IP address?

Conflicts arise when two devices are on the same network trying to use the same IP address. When this occurs, both computers cannot connect to network resources or perform other network operations.

Does an IP address stay with a computer?

Plus, if you go on vacation and take along your laptop, your home IP address doesn't go with you. It can't, because on vacation you'll be using another network to connect to the Internet.

Does your IP address travel with you?

Yes, your IP Address will changeEven if you keep the same ISP, because you are moving to a new location, and different cables and connection method may be used, it is a very rare instance to keep the same IP Address.


1 Answers

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.

like image 159
Brian White Avatar answered Nov 16 '22 02:11

Brian White