Got it

Topic discussion | What is the difference between 127.0.0.1 and localhost?

35 0 0 0 0

What is Localhost?

“localhost” describes a communication port connecting to the origin server. It allows you to spoof network connections when such a network does not or does not exist, by allowing a network connection to loop back on itself. In practice, localhost is considered a synonym for 127.0.0.1 for use and discussion. However, it is important to remember that they are not exactly the same.


What is 127.0.0.1? 

127.0.0.1 is the most commonly used loopback IP address. It's part of a reserved block of over sixteen million IP addresses used specifically for loopback functionality. Loopback allows your computer to communicate with itself while using network connection protocols.


How localhost differs from 127.0.0.1?

what-is-localhost

    On most machines localhost and 127.0.0.1 are functionally the same. But localhost is a label for the IP address, not the address itself. Different IP addresses of localhost can be pointed to. In fact, it can be pointed at any IP address, even outside the reserved address block. The HOST file doesn't care and doesn't stop you. However, it will break essential functionality on your system and crash any application that relies on a local area connection.

    Address block 127 was chosen for the loopback address block because it was the last block of Class A addresses operating from the binary address value 00000001 to 01111111. In IPv6, the loopback address is the first address 0:0:0. : 0: 0: 0: 0: 1 is most often expressed in truncated form as ::1.

    If you're coming from Windows to a Unix system, you may have noticed that fallback is practically synonymous with localhost. You could use your HOST file to have the fallback redirect to 127.0.0.1, but that's more of a text replacement than anything else.




So, how you see the differences between them?

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.