An address given to a device inside a private network that is not directly reachable from the internet is known as a private IP address in networking. Private IP addresses are often provided by a router or a network administrator and are used for communication within a local area network (LAN). On the other hand, public IP addresses are given out by internet service providers and are utilized to identify devices on the internet. Private IP addresses can only be accessed within the local network, but public IP addresses can be accessed from anywhere on the internet. For the purpose of upholding security and facilitating communication within and across networks, it is crucial to employ both private and public IP addresses.
Introduction to AWS private/public IP
Hello everyone, in this tutorial series we will be discussing the necessary ideas about AWS (Amazon Web Service) networking. Understanding the core concept of networking will enable us to operate AWS smoothly. The first content will be about Private and public IP addresses.
Both private and public IP addresses are made available by Amazon Web Services (AWS) for instances running inside its virtual private cloud (VPC). Instances can interact with the internet using public IP addresses, but only the VPC can communicate internally using private IP addresses. Private IP addresses are used for communication between instances and other resources within the VPC whereas public IP addresses are specific to each instance and are reachable from anywhere on the internet. Amazon offers tools and services that let customers manage both public and private IP addresses, making it simple for them to set up and keep up their cloud-based networking infrastructure.
Private and Public IP Adress in Networking
What is an IP address, for starters? An IP address is a network identifier that is assigned to a computer or device. To communicate with other devices, every device must have an IP address. IP addresses are divided into two categories: public and private. So, what’s the distinction between the two?
So, first and foremost, let’s talk about public IP addresses. When we acquire internet service from an internet service provider (ISP), they will issue a public IP address to our modem or router. On the internet, this public IP address is registered which allows us to access the internet. As a result, if we don’t have a public IP, we won’t be able to access the internet. Public IP addresses are likewise one-of-a-kind; there are no duplicates anywhere on the planet.
Private IP addresses, on the other hand, are not registered on the internet. As a result, we are unable to access the internet using a private IP address. The router’s DHCP service assigns a private IP address to internal devices. As previously stated, connecting to the internet through a private IP is not possible. If we wish to connect to the internet, we must convert our private IP to a public IP address.
Consider a local network, such as one at home or in the workplace, where several devices are present. The router’s DHCP assigns each device a private IP address. However, because these
Fig 1: Local network is connected to the internet through Public IP
devices that have private IPs, they are unable to connect to the internet. Our initial intuition tells us
Our first instinct is that all of those devices will require a public IP address in order to connect to the internet. This can be accomplished, but it is not the greatest practice. Providing a public IP address to each device is redundant, costly, and a waste of public IP addresses. Another service provided by routers is NAT (Network Address Translation), which solves this issue. When a device wishes to connect to the internet, the NAT service then converts its private IP to a public IP address. In this manner, all of those devices may share a single public IP address to access the internet. The NAT service may also convert a public IP address to a private IP address, which is required when a device connected to the internet wishes to interact with a device connected to this local network.
Range of Private and Public IP Addresses
Now private IP addresses have three different classes and these classes have different ranges.
|A||10.0.0.0 — 10.255.255.255|
|B||172.16.0.0 — 172.31.255.255|
|C||192.168.0.0 — 192.168.255.255|
The number 10 is the starting point for a class A private IP address. This is a class that is commonly used in huge enterprises. Class B begins with the number 172, which is commonly used in medium-sized businesses. Class C will begin with the number 192 which is utilized in small businesses and residences. The most often utilized range of private IP is Class C. So don’t be shocked if your IP addresses on your home devices start with 192.168.
The above-mentioned ranges of all three groups do not appear to be extensive. Actually, they aren’t required to be. Because these ranges are reserved for private networks, these IPs do not appear on the internet. As a result, they may be reused on a variety of private networks throughout the world.
Predictably, the public IP address range includes all numbers that aren’t part of the private IP address range. Because a public IP address is a one-of-a-kind identification for any device connected to the internet, it must be unique.
Tracing an IP Address
Public IP addresses are traceable since they are utilized outside of the internet. As a result, public IP addresses are not secure. When devices use public IP, they are more exposed to numerous cyberattacks and other schemes, which is why we may opt to hide them.
To make a public IP address more safe, we may use security measures like a proxy or VPN to mask our public IP address. Private IP addresses are more secure since they are concealed from the internet. Because they are only utilized internally, they cannot be tracked outside of their own network.
Finding your own IP address
It is quite simple to determine your own IP address. To do so, open a command window and type ipconfig for windows, followed by the enter key. That is all there is to it. You will receive a great deal of information. IP address as an IPv4 address will be shown at the bottom of the command window. Figure 2 shows that IP addresses begin with the number 192. So, based on our knowledge, that appears to be the class C private IP address. For finding the public IP, one can visit “what is my IP address” and find out.
Fig 2: Private IP address of the own device.