What are the differences between localhost address 127.0.0.1 and 127.0.1.1?

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
Why does my hostname appear with the address 127.0.1.1 and what does 127.0.0.1 mean? what are the differences between localhost address 127.0.0.1 and 127.0.1.1? I quite don't understand the meaning of these IP addresses. Can any one explain me in details with some examples?
 

HyperFilter

Member
Registered
Joined
Jan 23, 2017
Messages
25
Points
0
Why does my hostname appear with the address 127.0.1.1 and what does 127.0.0.1 mean? what are the differences between localhost address 127.0.0.1 and 127.0.1.1? I quite don't understand the meaning of these IP addresses. Can any one explain me in details with some examples?
127.0.0.1 is a reserved address by IANA to be used in every user computer or device as a loopback address, it means applications which operate in the IP Protocol layer can listen and connect in ports by using this IP with a guarantee that it won't be used in a local network or in the internet by any company. So basically, as I've said, this address might be used for local connectivity purposes by any application in your server or computer. :)
 

Collabora

Well-known member
Registered
Joined
Jan 24, 2017
Messages
123
Points
18
Both are loopback addresses that use the loopback interface. The 127.0.0.1 loopback address allows you (and software) treat the local machine as if it were a remote machine. An issue arises however, if you (or sofware) want to use the hostname instead of IP and there is no network at all. Debian and ubuntu choose to define 127.0.1.1 for mapping the ip of your host_name in case that you have no network.

From the Debian manual:

Some software (e.g., GNOME) expects the system hostname to be resolvable to an IP address with a canonical fully qualified domain name. This is really improper because system hostnames and domain names are two very different things; but there you have it. In order to support that software, it is necessary to ensure that the system hostname can be resolved. Most often this is done by putting a line in /etc/hosts containing some IP address and the system hostname. If your system has a permanent IP address then use that; otherwise use the address 127.0.1.1.
 
Older Threads
Recommended Threads
Replies
3
Views
2,877
Replies
14
Views
4,376
Replies
13
Views
5,577
Replies
43
Views
13,469

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top