Public and Private IP Addresses Explained (2024)

This article will help you understand the concepts behind IP addresses. It will describe the concept of subnets, and will explain when to use public and private IP addresses. This information will be useful for Matillion developers when connecting to data sources and targets. It will also help cloud architects who are planning how to configure Matillion itself.

You should also find this article useful as advanced reading before taking the Matillion Security course from the Matillion Academy.

Prerequisites

The prerequisites for working with public and private IP addresses are:

  • Access to Matillion ETL or Matillion Data Loader
  • Access to the network management area in your cloud provider’s console

What are IP addresses?

The entire internet, including most cloud networking, is based on the Internet Protocol Suite known as TCP/IP. It contains two closely related standards:

  • IP (Internet Protocol) – concerned with addressing and routing
  • TCP (Transmission Control Protocol) – concerned with making data transmission reliable

Internet Protocol (IP) addresses are made up of four numbers, and are also known as IPv4 addresses. The numbers are usually written separated by dots, for example like this:

74.125.193.138

The above is actually the IP address of one of Google’s servers. Whenever you perform a Google search, data flows between your computer’s IP address and this one.

Public and Private IP Addresses Explained (1)

In TCP/IP, both the sender and the receiver are uniquely identified by their IP address

Just like a postal address, an IP address that anyone can use has to be globally unique. They are known as public IP addresses.

This is how the internet works. Any IP address in the world can, in principle, communicate with any other. The diagram below shows a simplified TCP/IP network with five addresses.

Public and Private IP Addresses Explained (2)

Each of the four numbers in an IPv4 address can go from 0 to 255. So the total number of possible addresses is 256 x 256 x 256 x 256: about 4.3 billion. That’s a large number, but in fact, it’s nowhere near enough to give every single device in the world its own globally unique public IP address.

This issue is known as IPv4 address exhaustion. It would have been a big problem for the internet without another invention: subnets.

What is a subnet?

A subnet is a set of closely related IP addresses that share their own, private address scheme. As far as the internet is concerned, a subnet just looks like one ordinary public IP address. But zooming in reveals a whole new private network inside:

Public and Private IP Addresses Explained (3)

One single public IP address may act as a gateway to thousands of private IP addresses inside the subnet. The gateway has two IP addresses: a public-facing one that the internet can see, and a private-facing one just for within the subnet. Nowadays, almost all devices get allocated private IP addresses inside a subnet. IPv4 address exhaustion has been sidestepped.

In a typical cloud deployment, the private IP addresses within a subnet mostly communicate with each other. It is very fast, efficient, and secure to route this data entirely within the subnet.

Public vs Private subnets

Some cloud providers allow fine-grained control over IP address allocation within their subnets, and differentiate between “private” and “public” subnets.

In a “private” subnet there is no direct communication between the internet and the private IP addresses. Data going to or from the internet travels via the gateway through a process called Network Address Translation (NAT).

Most home networks are set up like this. It is very secure, although you can not host an internet-facing server inside the private subnet.

Public and Private IP Addresses Explained (4)

In contrast, all the members of a “public” subnet are able to obtain both a public and a private IP address. All internet communication still goes via the gateway, but it is possible to access individual members of the subnet from the internet.

A subnet set up this way is often used to protect further, private subnets that are hidden from the internet. A public subnet used for this purpose is known as a DMZ.

Public and Private IP Addresses Explained (5)

When to use a Public vs a Private IP address

As far as an individual device or server is concerned, it makes little difference whether it has a public IP address, a private one, or both. Routing data to the correct target is handled automatically by the Internet Protocol (IP) part of TCP/IP.

From inside Matillion ETL, you can find its IP address by running an ifconfig command inside a Bash Script component, like this.

Public and Private IP Addresses Explained (6)

The IP address is shown in the Task Output, and is 172.21.27.37 in this example. But is that a public IP address or a private one? What if it has both?

The way to tell is to reference a standard used by TCP/IP:

  • An IPv4 address beginning with any of the following is a private address:
    • 10.
    • 172.16., 172.17., 172.18, etc up to 172.30. and 172.31.
    • 192.168.
  • Otherwise it’s a public IPv4 address (with a few minor exceptions)

In practice you will find that the ifconfig command almost always returns the private IP address.

To find the public IP address, you can use a REST API provided by Matillion. It also works inside a Bash Script component, like this:

curl https://devrel.matillion.com/api/getmyip

In most cases, Matillion ETL will have both a private IP address and a public one. So which is better to use? The answer depends on where you are trying to communicate from and to.

If data needs to go between two devices in the same subnet, you should use private IP addresses. This is faster, cheaper and more secure. Some common examples are:

  • Using the migrate utility, provided the source and target are in the same subnet
  • Loading data from a source database in the same subnet
  • Connecting Matillion to Snowflake using Private Connectivity

Public and Private IP Addresses Explained (7)

In contrast, whenever data needs to pass through a gateway between subnets, you should use public IP addresses. Some common examples are:

  • Logging into Matillion ETL from your home or office
  • Loading data from a source database on the internet, or cross-cloud provider
  • Connecting Matillion to Snowflake over the internet

Public and Private IP Addresses Explained (8)

In summary:

Public and Private IP Addresses Explained (9)

Use private IP addresses if you are communicating entirely within the same subnet. Otherwise use the public IP addresses.

If you are still uncertain which IP address is going to work, Matillion ETL has a shared job for checking network access.

How to Check Network Access

Matillion ETL’s Check Network Access shared job is a convenient way to check in advance if there is a network path to a particular destination address.

You can check either a public or private IP address. If there is a DNS name for this destination you can use the name instead of the dotted IP address.

TCP/IP requires that you choose a port number during all communication. In the example below it is set to 3306 which is the standard port for MySQL. The component has run successfully, which confirms that Matillion ETL does have network access to this particular MySQL database.

Public and Private IP Addresses Explained (10)

The example above is checking a private IP address. From this information, you can infer that the source MySQL database is in the same subnet as Matillion.

To help with DataOps, consider using a Check Network Access component immediately before every data loading component. In conjunction with the standard Matillion error handling, this can help manage a variety of transient network problems that would otherwise manifest as timeouts.

Next Steps

Understanding your own network is a vital part of configuring security. In particular, this applies to your network firewalls, and to data encryption in transit. For more information:

  • Take the Matillion Security course on Matillion Academy.
  • Learn about implementing Role Based Access Control (RBAC) with Matillion.
  • Read about Data Fabric Integration using the Matillion ETL REST API.

I have made some simplifications in this article around the relationship between IP addresses and servers. In reality, address allocation and routing are configured as separate virtualized services in different ways among the cloud providers. Follow these links for more information on AWS networking, Azure networking and GCP networking.

Two other related subjects that I did not discuss are:

  • The Domain Name System (DNS) – which can convert a name into an IP address (either private or public)
  • IPv6 – which is conceptually similar to IPv4 but has a much larger address space

Finally for Matillion ETL users, if you do not find the Check Network Access shared job installed already, you can download it from the Matillion Exchange.

Public and Private IP Addresses Explained (2024)

FAQs

Public and Private IP Addresses Explained? ›

A public IP address identifies you to the wider internet so that all the information you're searching for can find you. A private IP address is used within a private network to connect securely to other devices within that same network.

What are public and private IP addresses? ›

A public IP address is unique and visible to everyone. It ensures that you can be clearly identified on the internet. By contrast, a private IP address is only used within a private network. This allows the devices within a network to connect securely to one another.

How to tell if an IP address is public or private? ›

The way to tell is to reference a standard used by TCP/IP:
  1. An IPv4 address beginning with any of the following is a private address: 172.16., 172.17., 172.18, etc up to 172.30. and 172.31. 192.168.
  2. Otherwise it's a public IPv4 address (with a few minor exceptions)
Aug 23, 2022

Is 10.0 0.0 a public IP? ›

According to standards set forth in Internet Engineering Task Force (IETF) document RFC-1918 , the following IPv4 address ranges are reserved by the IANA for private internets, and are not publicly routable on the global internet: 10.0. 0.0/8 IP addresses: 10.0. 0.0 – 10.255.

Is public IP better than private IP? ›

Public IP Addresses: More exposed to external threats due to their visibility on the Internet. Private IP Addresses: Less vulnerable to threats due to being used within a private network and not directly accessible from the Internet.

Can a private IP address be traced? ›

Can Private IP Addresses Be Tracked? Private IP addresses can only be tracked by other devices on the same network, unlike public IP addresses. Therefore, private IP addresses cannot be seen online as they are only visible within a specific network.

Is 192.168 public or private? ›

And don't be surprised if you have a device or two at home with a so-called 192 IP address, or a private IP address beginning with 192.168. This is the most common default private IP address format assigned to network routers around the globe.

Can anyone see your public IP address? ›

Unless you use a VPN (Virtual Private Network) when you access the internet at home, your IP address remains public. Each time you click on a link, your router sends your IP information to the site you've opened.

Can someone know my private IP address? ›

Website administrators can access this information. Social media platforms: Social media platforms can collect personal information about you such as your IP address. File sharing: Peer-to-peer (P2P) file sharing may expose your IP address to other users participating in the same file-sharing network.

How do I change my IP address from public to private? ›

An easy way to change an IP address is by using a Virtual Private Network (VPN). The VPN creates a private tunnel for sending and receiving data.

Is 192.168 1.1 a public or private IP address? ›

If you were searching for information on an IP address such as 192.168.1.1 or 10.0.0.1, you're most likely looking for a private IP address, not a public one.

Is 192.168 0.0 private or public? ›

How to tell if an IP address is public or private
Public IP addressesPrivate IP addresses
Not freeFree
Any number not included in the private IP address ranges10.0.0.0 — 10.255.255.255; 172.16.0.0 — 172.31.255.255; 192.168.0.0 — 192.168.255.255
Example: 8.8.8.8.Example: 10.11.12.13
5 more rows
Jun 4, 2021

Is wifi a public IP? ›

It depends. A router knows IP address that a provider gave to the router to communicate with the outside world. It can be a public IP address that is routed directly to the internet, but can also be a private address that a provide would translate to a public address at some point (with so-called provider-grade NAT).

How do I check if my IP is public or private? ›

To check if your IP address is public, you can use myip.com (or any similar service). You will be shown the IP address that was used for accessing the site, and if it matches the IP address that your Internet service provider assigned you, then you have a public IP address.

What is the disadvantage of private IP? ›

Disadvantage 1: Complexity

Private IP networks involve additional setup and non-standard configurations. They also will not interact with the public internet; alternative solutions are needed.

What is the most common private IP address? ›

Private IPv4 address ranges include:
  • 10.0. 0.0 to 10.255. 255.255.
  • 172.16. 0.0 to 172.31. 255.255.
  • 192.168. 0.0 to 192.168. 255.255.

What is an example of a private IP address? ›

Private IP Numbers
PrefixFirst AddressLast Address
10.0.0.0/810.0.0.010.255.255.255
172.16.0.0/12172.16.0.0172.31.255.255
192.168.0.0/16192.168.0.0192.168.255.255

What is your public IP address? ›

What is a public IP address? A public IP address is a unique numerical label assigned to each device connected to the Internet, allowing for the identification and communication between devices on a global scale. Think of it as your digital home address that enables you to send and receive data over the Internet.

Is 172 a private IP address? ›

An IP that starts with 172 could be public or private. However, if the second octet in the IP is 16 through 31, it's definitely a private address. 172.16.1.1 and 172.31.99.4 are private.

Can you change your public IP address? ›

While public IP addresses can only be changed by your ISP, you can change your private IP address whenever you want. Private IP addresses are used to identify devices on a network, rather than on the wider internet.

Top Articles
Estate Planning for Millennials – How to Get Started
Tyra Banks reveals how to take the perfect selfie
55Th And Kedzie Elite Staffing
Truist Bank Near Here
27 Places With The Absolute Best Pizza In NYC
10000 Divided By 5
Barstool Sports Gif
My.doculivery.com/Crowncork
Boat Jumping Female Otezla Commercial Actress
Epaper Pudari
Slope Unblocked Minecraft Game
Signs Of a Troubled TIPM
What to do if your rotary tiller won't start – Oleomac
Magicseaweed Capitola
Slope Tyrones Unblocked Games
Arre St Wv Srj
Epro Warrant Search
Dumb Money, la recensione: Paul Dano e quel film biografico sul caso GameStop
Union Ironworkers Job Hotline
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Recap: Noah Syndergaard earns his first L.A. win as Dodgers sweep Cardinals
Account Suspended
Allentown Craigslist Heavy Equipment
Decosmo Industrial Auctions
Craigslist Org Appleton Wi
Riversweeps Admin Login
Neteller Kasiinod
Martins Point Patient Portal
Housing Assistance Rental Assistance Program RAP
Solarmovie Ma
Bus Dublin : guide complet, tarifs et infos pratiques en 2024 !
Heavenly Delusion Gif
Dmitri Wartranslated
Rs3 Bis Perks
Restored Republic June 6 2023
Sand Castle Parents Guide
Sofia Franklyn Leaks
John M. Oakey & Son Funeral Home And Crematory Obituaries
Csgold Uva
Gas Buddy Il
Access to Delta Websites for Retirees
Dagelijkse hooikoortsradar: deze pollen zitten nu in de lucht
Blippi Park Carlsbad
Every Type of Sentinel in the Marvel Universe
A Snowy Day In Oakland Showtimes Near Maya Pittsburg Cinemas
Diccionario De Los Sueños Misabueso
Fredatmcd.read.inkling.com
Sj Craigs
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Koniec veľkorysých plánov. Prestížna LEAF Academy mení adresu, masívny kampus nepostaví
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6216

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.