Public and Private IP address: how it works
Although you may not know it, you have two IP addresses: an internal IP address (Private) and an external IP address (Public).
Why do you need two IP addresses and what is the difference between internal and external IP?
What is an external IP address?
The external IP address or public IP address is the IP address of the router interface that is connected to the Internet.
Here is a diagram illustrating the distribution of IP addresses in a typical home or small business network.
A router usually has two network interfaces.
- Internal interface
- Front end
Each of these interfaces will have an IP address. The IP address assigned to the outside interface will have a routable IP address and will be assigned by your ISP.
This address is also known as the public address .
Public address ranges are assigned to ISPs by the Internet Assigned Numbers Authority (IANA.
In home office networks using a NAT router , internal IP addresses use a special IP address range .
NAT allows thousands of computers on an internal network to access the Internet using a single external IP address.
This address range is specially reserved for internal addresses , and IP addresses will not be forwarded by routers on the Internet.
Internal addresses are also called private addresses , as they are restricted to private networks.
All devices on my home network have addresses like 192.168.1 . x but externally they have the address 220.127.116.11
Home networks typically use addresses in the .192.168.0.* or .192.168.1.* address range.
The network address range 192.168.0.0 is a dedicated non-routable private network address .
However, these are not the only non-routable private address ranges you can use. Other address ranges that can be used:
- 10.xxx is a 24-bit address block.
- 172.16.xx – 172.31.xx is a 20-bit address block.
See the private IP address on the wiki for more details.
Note. If you’re not familiar with network addresses, you can read the IP4 Addresses and Classes guide .
Finding your external (public) and internal (private) IP addresses
To find your external IP address , search for your IP address on Google, after which you will probably see a screen like this.
Google shows the IP address:
This is your external IP address .
Now open a command prompt and type:
You should see something like this:
This time your IP address is 192.168.1.64.
This is your internal IP address.
The internal IP address is used on your local internal network, and the external IP address is used when communicating with machines on the Internet.
Allow Internet access to your network
Because of the NAT router, there is no direct connection between the Internet and a computer on the local network.
All communication between your internal network and the Internet must be initiated by a device on your internal network.
This is usually not a problem and is a security benefit.
However, online gamers and those who would like to host a website or other services on their own network will need to allow external devices on the Internet to access them.
To do this, NAT routers can be configured to use a method called port forwarding.
Port forwarding allows the internal device to have an external IP address and allows incoming connections from the Internet.
Home and corporate networks use private or internal addresses from the reserved non-routable address range.
In home and small office networks, a NAT router connects the internal network to the Internet using a single routable public or public IP address assigned by the ISP from its allocated block of addresses.
A NAT router only allows connections from the internal network to the external network, and not vice versa, unless methods such as port forwarding are used .
General questions and answers
Q. My external IP address keeps changing. This is fine? Can I stop this?
A. Most ISPs allocate dynamic IP addresses to their customers. This address will become the external IP address assigned to your router, and thus may change.
This screenshot shows how my own external IP changed over the course of a month.
Some ISPs allow you to have a static IP address, but usually for a fee ( broadband for business ).
Static IP addresses do not change.
If you are going to provide access to your network from the Internet, then you really need a static external IP address .
However, an alternative for home and small business networks is to use the dynamic DNS service .
Dynamic DNS does not prevent external address changes, but instead automatically tracks these changes and automatically updates DNS records when an IP address changes.
General questions and answers
Q. Can I use my internal IP address on the Internet?
A. No – the above ranges of internal IP addresses are blocked by Internet routers.
Q. How does a message reach an internal IP address from an external one?
A. This is done using a lookup table on the NAT router and is covered in understanding port forwarding.
Q. Does it make a difference if I use the 10. IP address range and not the 192.168.0.0 address range?
A. Not at all. However, most home routers are configured to use the 192.168 address range.
Q. Who assigns my external (public) IP address?
A. It is assigned by your ISP.
Q. How do I know if my external address has changed?
A. You will need to test this using the technique shown earlier.
Q. Can I change my external IP address?
Read Also :