Your personal computer and mobile phones are always connected to the Internet, one way or the other. When you go online for email, shopping, or chat, your request has to be sent out to the right destination, and the responses and information you want will need to come back directly to you. An IP address plays an important role here.
You and your computer/mobile phone connect to the Internet indirectly. How? Let’s check this out. You first connect to a network that is 1) connected to the Internet itself and 2) gives you access to the Internet.
This network could be your Internet service provider (ISP) at the home, company or any other wireless network in your vicinity. However, with the humongous number of computers on the Internet, how can your single computer/mobile phone jump right in and get your work done without any hassles? This whole activity is governed by a set of rules and standards called protocols and thus the term ‘Internet Protocol’ – IP!
The full form of ‘IP’ in IP address is ‘Internet Protocol’ while ‘address’ indicates a unique number that gets associated with all online activity you do. In fact, the most common way to identify a device in a network is through IP addressing. Let us learn some important terms related to IP addressing in this blog.
So, I am going to explain the below topics.
What is IP?
What is an IP address?
What are Public IP and Private IP addresses?
Major Differences between Public and Private IP address
How to identify the IP address type?
What is IP (Internet Protocol)?
IP (Internet Protocol) is a network protocol that set up the rules for relaying and routing data on the internet.
IP is an important standard within the TCP/IP protocol category. TCP/IP implements the set of protocols that provides a crucial service for the internet because it enables the successful routing of network traffic among devices on a network. Useful points about TCP/IP are
- It uses IP addresses to identify devices
- It uses port numbers to identify endpoints
- It supports subnetting to sub-divide a network
What is an IP address?
Every device on a network is uniquely identified by an IP address assigned to it. Each device on a network has an IP address and serves two main functions.
- To identify a host and a network
- IP addresses are used for location addressing also.
IP addresses can be assigned to devices in a static or dynamic manner.
A dynamic IP address is a temporary address for devices connected to a network that constantly changes over time. Most devices on a network use dynamic IP addresses, which are assigned by the network when they connect. This is useful in scenarios where devices might leave and come back to a network.
A device with a static address has an IP address that does not change. A static IP address can be helpful in many use cases, such as servers or printers on a network that other devices often connect to.
IP addresses can also be made public or private.
What is a Public IP address?
A public IP address is accessible over the internet. A public IP address is similar to a public phone number that is displayed through an advertisement or on a website. The phone number is discoverable by anyone who wants to call it. A public IP address is a globally unique IP address that is assigned to a computing device that is intended to access the internet.
What is a Private IP address?
A private IP address is assigned to devices within a private network and they are not allowed to be accessed from the internet. Private addresses are best suited for use cases when an address is assigned to a device that you do not want other devices to know. Let us consider the phone number analogy, a private IP address would be similar to a private listing or a personal phone number that is not made publicly available. For example, the application and database servers in a typical data center are assigned private IP addresses because you might not want other devices to know about such servers.
Major Differences between Public and Private IP address
Attribute | Public IP address | Private IP address |
Scope | Global | Local |
Use | To communicate over the Internet | To communicate within a private network |
Security | Require additional security layers, prone to attacks. | Secure |
Range | Any IP address outside private IP address range | Any address from these ranges.10.0.0.0 – 10.255.255.255;172.16.0.0 – 172.31.255.255;192.168.0.0 – 192.168.255.255 |
Uniqueness | It is a unique address, and cannot be used by other devices on the Internet. | Address from one private network can be used in another private network |
Provided by | Assigned by your Internet Service Provider (ISP) | Assigned by the router on the local network to a specific device. |
Cost | Incur cost. We have to buy from a service provider. | Free of cost |
Example | 8.8.8.8 | 10.0. 0.0 |
How to identify the IP address type?
As mentioned above, private IP addresses are the ones that are in between the following ranges.
Class A: 10.0.0.0 to 10.255.255.255
Class B: 172.16.0.0 to 172.31.255.255
Class C: 192.168.0.0 to 192.168.255.255
Any address outside this range is a public IP address.
You can find out your private IP address by typing ‘ipconfig’ command in your command line window. To find out your public IP address, you have to search ‘what is my IP address?’ on Google.
When we connect to the internet, our private IP address is replaced/covered with our ISP-assigned public IP address. This protects our private IP and other devices in our network from getting exposed to the Internet, however, we can still connect online.
There are special IP addresses also for specific functionalities as below.
The first and last addresses of any private IP range class cannot be used for our communication inside the private network. These two IP addresses are reserved and called ‘Network address’ and ‘Broadcast address’ respectively.
Conclusion
For anyone planning to set up a small office or home network with fewer devices, private IP addresses are useful. Public IP addresses are preferred for businesses with global reach and global users.
We will continue learning more networking-related concepts in our further blogs. Stay tuned!
Check out this post to learn How to connect AWS EC2 instance using session manager – A step-by-step guide
Pingback: Pravin Mishra - AWS Mentor & Trainer