Jump to content

Private and Public IP Addresses: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(50 intermediate revisions by 9 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==
 
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.
 
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.
 
The number of different public IPv4 addresses is limited and they are usually assigned to a device by an Internet Service Provider (ISP).


Each of these interfaces will have an IP address.
===Static IP address===
[[File:Internal external.png]]
----
'''Public static''' - some times called '''Dedicated''' - means the IP address never changes and is tied to a single user, device, server or website.  


==Public IP address==
[[File:Sip.png|1100px]]


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.
The example above depicts a scenario where the Internet Service Provider (ISP) provides different routers with IP addresses that are unique and constant (they never change for each device). In this case the router performs the NATing process instead of the ISP, thefore the ISP is "transparent" when the router sends or receives data from remote hosts on the internet.  


A public IP address can be '''static''', '''dynamic''' or '''shared'''.
Most users don't need static IP addresses, however, a static IP address matters a lot when external devices, websites or users need to remember your IP address for constant use. For example, if you require constant remote access to a device. Since the IP address never changes you or other users need to remember only one IP address to reach the device at any given time.


===Dynamic and Static IPs===
===Dynamic IP address===
----
'''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 static''' - some times called '''Dedicated''' - means the IP address never changes. '''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|1100px]]


[[File:Dynamic and static ip.JPG]]
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.


The figure above shows how a Dynamic IP address might change over time and that a Static (Dedicated) IP always stays the same. We can also see how it is easier to reach a device that has a Static IP address rather than a Dynamic one, because at any given we will be able to reach the device via the same IP address. From a remote control perspective this is a huge benefit when it comes to convenience. But it also possible to set up remote access to a device that has a Dynamic IP address using '''[[Dynamic DNS]]'''.
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===
----
'''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|1100px]]


'''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.
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.


[[File:Shared ip.png]]
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.


In the example above we can see that it is possible for multiple devices, even companies and websites to share a single public IP address. However, this creates a huge disadvantage since an owner 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) '''here'''.


==Private IP address==
==Private IP address==
Line 43: Line 56:


''192.168.0.0 - 192.168.255.255 (Total Addresses: 65,536)''
''192.168.0.0 - 192.168.255.255 (Total Addresses: 65,536)''
==Difference between Public and Private IPs==
The main difference between Public and Private IPs is that we use Private in LAN or '''Internal''' networks for communication between local devices and we use Public IPs to communicate with devices that are located in '''External''' networks anywhere in the world.
[[File:Static public ip.png]]
The figure above roughly describes the difference between Private and Public IPs and Internal and External networks.


==IP Address Terminology==
==IP Address Terminology==
Line 85: Line 90:
'''Can I setup remote access for my Teltonika router with a dynamic IP address?'''
'''Can I setup remote access for my Teltonika router with a dynamic IP address?'''


''Yes. You can use [[Dynamic DNS]] or [[RMS]] services.''
''Yes. You can use '''[[Dynamic DNS]]''' or '''[[RMS]]''' services.''


'''What are the advantages and disadvantages of a static IP address?'''
'''What are the advantages and disadvantages of a static IP address?'''
Line 107: Line 112:
==External links==
==External links==


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


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