Public and Private IP Addresses

A linux machine can have multiple network cards installed (some of them can be virtual devices). Each Adapter can have either a public or private address attached to them.

It has been internationally agreed by all network hardware manufacturers that the following ip addresses ranges are reserved for use inside private networks (aka local networks, aka Local Area Networks aka LANs):

– 10.0.0.0/8 (This lets you build a private network of 255x255x255 hosts)
– 172.16.0.0/12
– 192.168.0.0/16

These addresses are referred to as Private IPv4 addresses namespaces.

This means that there are no device on the internet that has an ip address that falls in the range of the above three. This also means that these ranges of ip address can be re-used over and over again inside LANs, where each of these IP addresses are unique within the scope of the LAN that the device resides in.

The magic that lets a device in one LAN to communicate over the internet to a device that belongs to another LAN, is done through a technology called Network Address Translation (NAT).

https://en.wikipedia.org/wiki/Reserved_IP_addresses

if an interfaces has an IP address that belongs within any of these ranges, then that interface is attached to a private network.

https://en.wikipedia.org/wiki/Reserved_IP_addresses

https://app.pluralsight.com/player?course=linux-networking-advanced-lfce&author=anthony-nocentino&name=linux-networking-advanced-lfce-m3&clip=5&mode=live