5

I saw there are 16.581.375 loopback addresses, but nearly every program only uses 127.0.0.1. So why are there so many unused addresses.

IPv4 has many address problems, so why are people wasting so many ip addresses? Is there a reakson for it?

Florian
  • 271
  • 3
  • 7
  • 2
    That number of IPv4 addresses is barely a drop in the bucket. There are only about 4 billion possible IPv4 addresses, but there are well over 5 billion devices on the Internet, and it is growing every day. The solution is IPv6, and no amount of reclaiming IPv4 addresses is going to solve the situation. This goes back to _[RFC 1122, Requirements for Internet Hosts -- Communication Layers](https://tools.ietf.org/html/rfc1122)_. – Ron Maupin Mar 31 '17 at 13:54
  • 2
    I know that ipv6 is the solution for the problem. What I mean is, if there are only 4 billion addresses, why are there so many addresses which are wasted for loopback or private networks? It's like throwing away food, when you are hungry. ^^ – Florian Mar 31 '17 at 14:07
  • 1
    If you didn't have private networks, we would have run out of IPv4 address many years ago, instead of just a few years ago. Also, changing the way loopback addresses work would have had far reaching consequences, causing many applications to need to be rewritten. You simply cannot change things like that. The RFC that created loopbacks was published in 1989, long before the Internet was commercial. As I wrote, reclaiming all the private, loopback, multicast, etc. addresses will not do anything toward solving the problem. – Ron Maupin Mar 31 '17 at 14:12

1 Answers1

4

In IPv4 the range 127.0.0.0 – 127.255.255.255 is reserved for loopback, i.e. a Host’s self-address. These loopback IP addresses are managed entirely by and within the operating system and enable testing of communications in client-server architecture systems on a single machine. When a process creates a packet with a destination address as loopback address, the operating system loops it back to itself directly without having to go through any NIC.

You might also use it for things like: Simulating a large number of different computers in a fast network (simply bring up more interfaces and bind services to them) without using virtual machines. This might be helpful if you wanted to have a number of different web servers running locally on port 80 for some reason. Or Permitting more locally running services than the 64k TCP would permit (though it seems unlikely that you would hit that limit rationally).

Historically, the first implementation of TCP/IP didn't support the use of Masks, which meant network nodes used the first number to distinguish network size and host ID. More info: https://www.experts-exchange.com/questions/20814842/why-loopback-testing-having-so-long-range.html

SLWS
  • 506
  • 4
  • 8