Skip to main content

Is 127.0.0.1 a routable IP address [Resolved]

Hi I have a app that I am working on.

I have the DNS entry me.myappdomain.com that has dns entry points to 127.0.0.1

When my app starts up, it talks locally to a server I have on each device. I have been asked to use a rout-able IP address but I am not sure that this is even possible.

My question is, Why is 127.0.0.1 not considered a routable IP address?

Thanks


Asked March 20, 2017
Posted Under: Network
22 views
1 Answers

The IPv4 address range 127.0.0.0/8 is reserved for host loopback. This address should never appear anywhere on any network. Traffic sent to any address in that range will immediately be looped back inside the host.

See RFC 1122, Requirements for Internet Hosts -- Communication Layers, Section 3.2.1.3:

(g) { 127, <any> }

Internal host loopback address. Addresses of this form MUST NOT appear outside a host.

Also RFC 3330, Special-Use IPv4 Addresses

127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an address anywhere within this block should loop back inside the host. This is ordinarily implemented using only 127.0.0.1/32 for loopback, but no addresses within this block should ever appear on any network anywhere [RFC1700, page 5].


Answered March 20, 2017
 
Thanks for your explanation. Its clearer now. I guess if you wanted to communicate with localhost, you would need another method – Dai Bok 46 mins ago
 CanDoerz  1 month ago
 
You can't get anything sent to an address in that block to leave the host, and any router seeing an address in that range on the network is supposed to drop the packets that have such an address. Addresses in that block simply cannot be used on a network. – Ron Maupin 1 hour ago
 CanDoerz  1 month ago
 
Could you elaborate ron? What would you anticipate happening on a network? – Dai Bok 1 hour ago
 CanDoerz  1 month ago
 
It is perfectly acceptable to use addresses in that range for communications that will never leave the host, e.g. testing. It may be a poor idea to use it in production if the application may be used on a network in the future. – Ron Maupin 5 hours ago
 CanDoerz  1 month ago
 
what if that is the purpose of the application. Only to talk internally? – Dai Bok 5 hours ago
 CanDoerz  1 month ago
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA