Fundamentals of communication and networkingː Public and private IP addresses
Public and Private IP addressesEdit
The problem arising from the lack of IP version 4 addresses was predicted long before it became a issue. To this end a number of solutions have been devised along the way. One such solution is the idea of public and private IP addresses.
If we wish to build our own enclosed network and not connect it to the internet, we are of course at liberty to use any IP addresses we want. However should our network ever get connected to the Internet we do not want to have potential conflict with an Internet addresses. To this end, a range of IP addresses have been specified to be private and only used on Internal Networks. These networks are not to be connected 'directly' to the Internet. These are then Private IP addresses. The remaining addresses are then Public IP addresses and devices with these addresses can be directly connected to the Internet.
(NOTE - The word 'directly' used here does not refer to a physical connection, but refers to some modification to the IP packets.)
In addition it may be that we have a network of over 1000 devices but have only been allocated a Class C address. This has insufficient host addresses for our needs. Hence we use a private address range for our internal communications and borrow addresses from the Class C range whenever we go out to the Internet. (More of this later in NAT)
The private IP addressed are further explained in RFC 1918
|10.0.0.0||255.0.0.0||10.0.0.0 - 10.255.255.255|
|172.16.0.0||255.240.0.0||172.16.0.0 - 172.31.255.255|
|192.168.0.0||255.255.0.0||192.168.0.0 - 192.168.255.255|
Hence if you look at your home or college network, it is most likely that you will be using a private address for your device.
NO . This is a private IP address.
YES. The address is a public IP address
Should an IP packet get out to the Internet with a private IP address as the source address, internet routers should delete it. However if it gets to its destination and a reply is returned, the original sources address, will now be the destination address on the returning packet. Internet routers will not deliver the packet and will just delete them. Thus we call them non-routable addresses. This is technically not correct as we would route them in our internal network. It is just out on the public Internet they are unroutable.