1

Everywhere on the Internet the same answer is given, private IP addresses exists only inside your network and public IP addresses are what everyone sees on Internet.

What exactly do they mean by the Internet?

I have a home network, on top of which my ISP has their network. They too connect to an internet exchange which in turn connects to networks outside my country. And this hierarchy goes on and on.

At which stage do we say IP addresses in a network are public?

I went to websites like iplocationfinder and they show my IP and also my ISP's network as private. Its confusing!

Citizen
  • 1,103
  • 1
  • 10
  • 19
NewStudent
  • 23
  • 3
  • Private IP is like your own House with small devices connecting together in a network (you got private printer, you got private devices connect to you and you can share with your family). You can let other people join you privately, but if you let more private people to join your network like 2-3 million people, then we don't call this private network, it's called the internet (public network). You just created the internet. Time to create a brand (you are the ISP) and this 3 million people is your customer. So the internet is the biggest part of private network. – MaXi32 Dec 29 '19 at 19:54
  • 1
    @maxi32 this is simplistic to the point of being wrong and ignores CGN. – davidgo Dec 29 '19 at 20:06
  • RFC 1918 defines the Private IPv4 address ranges. These ranges were arbitrarily chosen, and IPv4 has no idea about public or Private addresses. It is simply that the ISPs have agreed not to forward packets with addresses in the RFC 1918 address ranges. You can look at the _[IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml)_ to see if one of the special address ranges is Globally Reachable (public), otherwise the address is Globally Reachable (other than multicast addresses). – Ron Maupin Jan 01 '20 at 07:35
  • That's normally how I explain to New Student. Pardon me, what is CGN? – MaXi32 Jan 02 '20 at 14:45
  • @MaXi32, CGN is Carrier-Grade NAT, and it is the ISP performing NAPT on its routers and assigning Private or Shared addressing to its customers as the WAN addresses for the customers. This breaks any port forwarding on the customer routers because the customers cannot forward ports on the ISP routers. – Ron Maupin Jan 06 '20 at 03:01

3 Answers3

2

As defined by RFC 1918, the following address ranges are reserved for private use

 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)

The TLDR reason is public IPs need to be unique to the entire internet to ensure client devices can reach their target servers (typically websites). If your IP falls inside one of the above ranges, this indicates that you are behind a NAT, which translates all traffic behind a public IP to the specific private IP you are using. This is usually your home router doing this. If your ISP is giving you a private IP as well, that means you are a NAT inside another NAT.

This is fine for most end user purposes. It only becomes a problem if you are trying to host a server of some sort that you need to be publicly accessible from the internet. It may also affect online matchmaking games that rely on players being able to connect to you for the purposes of the online game (strict NAT).

1

Private IP Address

You can use any private IP address range within your private network. A private network can use both IPv4 and IPv6 addresses. Private IP ranges are NOT allocated to any particular organization

  • Private IP Ranges specified by RFC 1918
    • Class A: 10.x.x.x - 10.255.255.255 (CIDR - 10.0.0.0/8),255.0.0.0, 24 bit block
    • Class B: 172.16.x.x - 172.31.255.255 (CIDR - 172.16.0.0/12), 255.240.0.0, 20 bit block
    • Class C: 192.168.x.x - 192.168.255.255 (CIDR - 172.16.0.0/16), 255.255.0.0, 16 bit block
  • Available hosts per IP class

    • Class A: 16,777,216
    • Class B: 1,048,576
    • Class C: 65,536
  • Not routable on the Internet

  • Does not require issuance by IANA (Internet Assigned Number Authority)
  • Used within a 'private' local network space
  • Communicates to other private LAN's and hosts

Public IP Addresses

  • Public IP Ranges Specified by RFC
    • Class A: 0.0.0.0 - 127.255.255.255
    • Class B: 128.0.0.0 - 191.255.255.255
    • Class C: 192.0.0.0 - 223.255.255.255
  • Used on the Internet
  • Temporarily issued to customers by ISP's
  • Permanently issued to customers by IANA
  • Network addresses cannot be changed without co-ordination with a public network provider (ISP)

Routing Private to Public

Accessing public network from a private network requires the use of NAT (Network Address Translation) which modifies the private IP packet headers when they transit from private to a public network across a routing device that will perform the NAT translation to the public network. A routing device can be a firewall, router or Layer 3 switch.

There's the basics. Hope this is helpful.

Citizen
  • 1,103
  • 1
  • 10
  • 19
0

The definition of internet changed over time. It used to mean a connection between multiple organisations. For about 15 years (very, very roughly) its meant a the systems connected to the global network formally called "the Internet" (note capitalisation).

Private IP addresses are defined (in addition to other standards documents) in RFC1918, which sets asides specific IP address ranges for use within an organisation. These IP addresses can not be reached directly over the Internet from other organisations and include 10..., 192.168..* and 172.16-31.. There is additionally 100...* which is used for carrier grade NAT and is a grey area (and is not in RFC1918)

Where machines have an address in the above range, a router uses network address translation to partially allow internet connectivity for the IP address, but the wider Internet does not have knowledge of the internal address or how to route it. IE the internal IP address can exist in multiple networks and is not accessible from all of the Internet. (Except where a router substitutes a valid address and "proxies" for it)

davidgo
  • 6,222
  • 3
  • 23
  • 41
  • Your ISP is probably using Carrier Grade NAT (CGN) which is a special case of NAT and private networking used because there is a shortage of IPv4 addresses. It works like RFC1918 space, but on a wider scale with more robust mechanisms for handling issues caused by a 1:many relationship for Internet connection. – davidgo Dec 29 '19 at 20:22
  • An IP address is public if it has been assigned to a particular organisation by a domain registry. (You could sort if extend this or alternatively define it as an IP address that is routable in a global BGP routing table that does not have a default gateway and that excludes RFC1918 and other special ranges) – davidgo Dec 29 '19 at 20:25
  • 100.64.0.0/10 is reserved by IANA for “Shared Address Space” (e.g CGNat), as defined in RFC 6598. – Greg W Dec 30 '19 at 05:46