Jump to content

Private and Public IP Addresses: Difference between revisions

no edit summary
No edit summary
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
The are two types of Internet Protocol (IP) addresses: '''Public''' and '''Private'''.  
A router or another Internet-capable machine will typically have two types of network interfaces: <i>internal</i> & <i>external</i>.


A router will typically have two types of network interfaces:
[[File:Ieie.png|600px]]


*''An Internal Interface''
Any network interface must have an IP address in order to communicate inside or outside of the network. There are two types of IP addresses (in terms of accessibility, uniqueness & naming conventions): <b>public</b> and <b>private</b>.


*''An external Interface''
==Public IP address==


Each of these interfaces will have an IP address.
An <b>IP address</b> is a number used to identify a host on an IP (Internet Protocol) network. In order to successfully communicate on the Internet or any other computer network, a machine must have a network interface and an IP address assigned to it that is unique to that network.
 
[[File:Ieie.png|1100px]]
 
__TOC__
 
==Public IP address==


A '''Public IP address''' (''External'') is assigned to every device that connects to the Internet and each IP address is unique. Therefore, there cannot exist two device with the same public IP address. This addressing scheme makes it possible for the devices to “find each other” online and exchange information. A user has no control over the IP address (public) that is assigned to the device. The public IP address is assigned to the device by the Internet Service Provider as soon as the device is connected to the Internet.
A <b>public</b> IP address is an IP address that is unique to the entire Internet. Public IPs can be accessed globally; therefore, they are often used by publicly accessible entities such as websites, DNS and VPN servers, etc.


A public IP address can be '''static''', '''dynamic''' or '''shared'''.
The number of different public IPv4 addresses is limited and they are usually assigned to a device by an Internet Service Provider (ISP).


===Static IP address===
===Static IP address===
Line 33: Line 27:
'''Public dynamic''' - means the IP address can change from time-to-time (for example, when you lose connection and re-connect or the ISP might change the address periodically).
'''Public dynamic''' - means the IP address can change from time-to-time (for example, when you lose connection and re-connect or the ISP might change the address periodically).


[[File:Dip.png|1500px]]
[[File:Dip.png|1100px]]


From the example above we can see that in case of dynamic IP addresses the ISP provides the routers with private WAN IP addresses that are then "translated" into public IP addresses when connecting to remtoe hosts on the internet. The main difference from static IP addresses is that the dynamic IPs provided by the ISP are not permanent. They will change when the router disconnects and reconnects, re-registers to a network operator or, in some cases, the ISP might update the IP addresses periodically.
From the example above we can see that in case of dynamic IP addresses the ISP provides the routers with private WAN IP addresses that are then "translated" into public IP addresses when connecting to remote hosts on the internet. The main difference from static IP addresses is that the dynamic IPs provided by the ISP are not permanent. They will change when the router disconnects and reconnects, re-registers to a network operator or, in some cases, the ISP might update the IP addresses periodically.


Speaking in terms of remote access, dynamic IPs complicate the situation because there is no way to tell what IP address a remote has at any given time. While remote access is more complicated with dynamic IP addresses, it is not impossible and can be achieved using '''[[Dynamic DNS]]'''. '''DNS''' or '''Domain Name Service''' provides names (such as www.google.com, www.facebook.com) for IP addresses. The difference with Dynamic DNS is that it periodically rebinds IP addresses to a hostname. Therefore, when using Dynamic DNS you would only have to remember the hostname to reach a specific device at any given time even though its IP address might change from time to time.
Speaking in terms of remote access, dynamic IPs complicate the situation because there is no way to tell what IP address a remote has at any given time. While remote access is more complicated with dynamic IP addresses, it is not impossible and can be achieved using the Dynamic DNS service ('''Services → Dynamic DNS'''). '''DNS''' or '''Domain Name Service''' provides names (such as www.google.com, www.facebook.com) for IP addresses. Dynamic DNS periodically rebinds IP addresses to a hostname. Therefore, when using Dynamic DNS you would only have to remember the hostname to reach a specific device at any given time even though its IP address might change from time to time.


===Shared IPs===
===Shared IPs===
Line 43: Line 37:
'''Public shared''' - in some cases, an ISP can assign a public IP address to a group of users, and then employ NAT to isolate their traffic.
'''Public shared''' - in some cases, an ISP can assign a public IP address to a group of users, and then employ NAT to isolate their traffic.


[[File:Shrip.png|1500px]]
[[File:Shrip.png|1100px]]


In the example above we can see that it is possible for multiple devices (even websites) to share a single public IP address. An ISP provides clients with private WAN IP addresses and then uses NAT to differentiate to which host specific data packets should be directed to.
In the example above we can see that it is possible for multiple devices (even websites) to share a single public IP address. An ISP provides clients with private WAN IP addresses and then uses NAT to differentiate to which host specific data packets should be directed to.
Line 49: Line 43:
However, shared IPs have a huge disadvantage since an owner of a device or website is no longer the only entity responsible for their IP address. For example, if one the multiple users of the same IP address commits an online felony of some sort and the IP address gets blocked, all of the users using that IP will get blocked as well.
However, shared IPs have a huge disadvantage since an owner of a device or website is no longer the only entity responsible for their IP address. For example, if one the multiple users of the same IP address commits an online felony of some sort and the IP address gets blocked, all of the users using that IP will get blocked as well.


You can find more information on Network Address Translation (NAT) '''[[Network Address Translation|here]]'''.
You can find more information on Network Address Translation (NAT) '''here'''.


==Private IP address==
==Private IP address==
Line 118: Line 112:
==External links==
==External links==


https://www.iana.org/
*https://www.iana.org/
*https://www.internic.net/


https://www.internic.net/
[[Category:Networking]]