NetTalk Central

Author Topic: Loopbacks. MANY loopbacks....  (Read 1424 times)

Jane

  • Full Member
  • ***
  • Posts: 249
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Loopbacks. MANY loopbacks....
« on: March 01, 2020, 10:53:47 AM »
If you're working with the multi-site host, you probably run into an issue on your dev machine where you say,
"I've used localhost for one site, 127.0.0.1 for a second site, and my machine's actual IP address for the host.  How do I add another site?"

You no doubt know that localhost maps to 127.0.0.1.

But did you know that you have 16 million such loopback addresses at your disposal?

RFC 3330 (https://tools.ietf.org/html/rfc3330 ) actually dedicates the entire 127.0.0.0/8 range of addresses to loopback.

Some people have complained over the years that this is a bit wasteful.  Of course, the widespread adoption of NAT eased the IP V4 crisis and pushed IP V6 out of most of our consciousness.

Windows’ implementation definitely gives us all 16 million loopback addresses to use.   (127.0.0.1 through 127.255.255.254).

In my own development, I’ve never needed more than that <g>.

Obviously you can create as many aliases as you want by editing the HOSTS file.  But I often find the 127.x.x.x route quicker and easier.

So when you need another address for multi-site testing, try 127.0.0.2:88
Or 127.0.0.99:88
Or 127.255.255.254:88

Cheers,

Jane


peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Loopbacks. MANY loopbacks....
« Reply #1 on: April 01, 2020, 11:48:26 PM »
Hi Jane,

I'm pretty sure I knew - but sometimes you forget what you know  ;). Way easier than editing the hosts file. Using it this very moment, so thank you for reminding us!

Peter