IP Addressing
Hosts
UNIX: /etc/hosts
Windows: %SystemRoot%\System32\drivers\etc\hosts
CIDR
(CIDR) Classless Inter-Domain RoutingWorked Example of CIDR Block Relationships
10.0.0.0/16 = 10.0.0.0 to 10.0.255.255 which is 65,536 addresses
10.0.0.0/19 = 10.0.0.0 to 10.0.31.255 which is 8,192 addresses
10.0.32.0/19 = 10.0.32.0 to 10.0.63.255 which is 8,192 addresses
10.0.128.0/20 = 10.0.128.0 to 10.0.143.255 which is 4,096 addresses
10.0.144.0/20 = 10.0.144.0 to 10.0.159.255 which is 4,096 addresses
10.0.144.7/32 = 10.0.144.7 to 10.0.144.7 which is 1 address
Private Address Space
IANA has reserved the following three blocks of the IP address space for private internets:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
Loopback / localhost
Addresses in the 127.0.0.0/8 CIDR range are reserved for connections within the same machine (i.e. they cannot be used for connecting to another machine in the way that other IP addresses can). The loopback address is most often 127.0.0.1 but, in theory, any of the other addresses in the range could be used to similar effect.
For IPv6 the loopback address is 0000:0000:0000:0000:0000:0000:0000:0001 which is equivalent to 0:0:0:0:0:0:0:1 ior ::1
Bibliography
HOSTShttps://en.wikipedia.org/wiki/Hosts_(file)https://man7.org/linux/man-pages/man5/hosts.5.html
CIDRhttps://en.wikipedia.org/wiki/Classless_Inter-Domain_Routinghttps://www.ipaddressguide.com/cidr https://mxtoolbox.com/SubnetCalculator.aspxhttps://datatracker.ietf.org/doc/rfc4632 (Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan)https://datatracker.ietf.org/doc/rfc1918 (Address Allocation for Private Internets)
localhosthttps://www.ionos.com/digitalguide/server/know-how/localhost/https://awebanalysis.com/en/ip-lookup/127.0.0.1https://www.whois.com/whois/127.0.0.1https://datatracker.ietf.org/doc/rfc1122/ (Requirements for Internet Hosts - Communication Layers)https://en.wikipedia.org/wiki/IPv6https://datatracker.ietf.org/doc/rfc5156/ (Special-Use IPv6 Addresses)https://datatracker.ietf.org/doc/rfc5952 (A Recommendation for IPv6 Address Text Representation)