Understanding IP Addresses: How IP Addressing Works

Enterprise Networking Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

What is an IP address?

An Internet Protocol (IP) address is like a phone number for your computer. Just like you need to dial a phone number to reach someone, your computer (or computing device, such as a smartphone or tablet) needs an IP address to reach other devices on the network.

The history of IPv4 dates back to the early 1980s when the internet was a private network solely used by the military. Despite its initial intended purpose, it quickly grew in popularity, leading to an eventual shortage of IPv4 addresses due to all the different networks and devices now accessing the internet. 

The total pool of 4.3 billion IPv4 addresses initially seemed like ample amounts; however, this figure quickly proved incapable of meeting demands. The depletion of available IPv4 began as early as the 1990s. Clever technical networking tricks have managed to delay this exhaustion and allow us access to IPv4 transactions even today.

IPv6 is the most recent variation of the Internet Protocol, granting more computer systems and devices access to the internet than ever before. IPv6 is designed to enable routing only within a local area network (LAN) or subnetwork.

How IP addressing works

There are two types of IP addresses, IPv4 and IPv6, and they work a little differently from each other—specifically, IPv4 is a 32-bit address while IPv6 is 128 bits.

IPv4 addressing

IPv4 uses 32 bits, and its address format is usually a unique string of numbers and letters that looks something like this: Each IP address comprises four sets of numbers separated by periods, each ranging from 0 to 255.

IPv4 addresses are composed of two parts: the network ID and the host ID. The network ID identifies the network a device is connected to, while the host ID identifies a specific device on that network.

The network ID is typically expressed in dotted decimal notation, which is a series of three numbers separated by dots. Each number can range from 0 to 255, forming an 8-bit binary number. The host ID is also expressed in dotted decimal notation, but it can be any combination of numbers up to 32 bits long.

For example, take the IP address

The first part, 192.168.1, represents the network ID, while the last part, 20, represents the device ID.

Usually, a device ID 1 is allocated to the router while subsequent numbers 2 and onwards are used to identify other devices on the network.

Together, these two parts make up an IPv4 address and allow devices to communicate with each other over the internet. By knowing both the network ID and host ID, devices can send and receive data from one another without knowing each other’s exact location or IP address.

IPv6 addressing

Like IPv4, an IPv6 address is made up of two distinct parts: a network component and a participant/node component. However, IPv6 uses 128 bits for its address instead of the 32 bits allowed by IPv4. This provides users with a much greater range of addresses than IPv4, enabling every device to have a unique address.

Represented in hexadecimal format, each IPv6 address includes eight groups separated by colons. For example, 2620:0aba2:0d01:2042:0100:8c4d:d370:72b4.

6 types of IP addresses

Within the two types of IPv4 and IPv6 addresses, there are also several other classifications to be aware of: internal versus external IPv4, static versus dynamic IP addresses, and special address formats for particular purposes.

Internal IPv4 addresses (local/private)

Internal IPv4 addresses are used for private networks, such as LANs. They’re not visible on the public internet; only devices connected to the same subnetwork can see each other’s internal IP address. These IP addresses generally start with 192.168.x.x, 10.0.x.x, or 172.16-31.x.x and cannot be accessed from directly outside the network. In other words, they are not globally routable.

External IPv4 addresses (public)

External IPv4 addresses are used to connect to the public internet and make websites available on the World Wide Web. They’re assigned by internet service providers (ISPs) and are usually dynamic, meaning they can change over time. They do not start with 192.168 or 10.0, as these numbers signify private IP addresses. Being public IP addresses means they’re globally routable.

Static IP addresses

A static IP address remains constant over time, allowing for a more reliable connection on the network. This type of address is beneficial when computers need to access the same resource regularly, such as remote desktop access and file sharing between devices. Static IPs remain unchanged until manually changed by an administrator.

Dynamic IP addresses

A dynamic IP address changes each time you connect to a new network. This type of address is beneficial for reducing the amount of IP address space needed from the ISP, as well as providing a more secure connection. Dynamic IP addresses are assigned to each computer or device on the network when they join it. External IP addresses are almost always dynamic.

Special IP addresses

Special IP addresses are used to identify particular services, such as servers, web hosting, and other uses. These special-use IP addresses include the IANA IPv4 Special-Purpose Address Registry, loopback addresses, wildcard addresses, multicast addresses, limited broadcasts, and directed broadcasts.

IANA IPv4 Special-Purpose Address Registry

IANA IPv4 Special-Purpose Address Registry is a registry managed by the Internet Engineering Task Force (IETF) for protocol assignments in the address block of It consists of all the current IETF assignments from this particular address block and provides a convenient centralized database for tracking protocol assignment usage. It’s an important resource for those needing special-purpose IP addresses, as it provides easy access to the latest updates and provides information about IETF-assigned protocol assignments.

Loopback address

A loopback address is a special IP address that serves as a virtual interface, allowing your computer to connect to itself. It’s usually used for testing or diagnostics purposes, such as checking network configurations and running programs that require two or more network connections simultaneously. On IPv4, this address ranges from to

Wildcard address

A wildcard address is a special IP address that matches any host or domain name, allowing for a broad range of access from the same source IP address. It’s commonly used for websites and applications needing multiple services from the same IP address. Wildcard addresses are usually in the form of an asterisk (*) followed by a number or string that matches any IP address.

Multicast address

A multicast address is a special type of IP address used for sending data to multiple computers on a network simultaneously. It’s a helpful tool for sending large files, such as multimedia streams and video, as it reduces bandwidth usage by sending the same data stream to multiple computers at once. Multicast addresses range between and on IPv4 networks.

Limited broadcast

A limited broadcast is a special type of IP address used to send data to a specific subnet. It’s used to find the gateway address on a network or to send messages out to all hosts within a certain range. Limited broadcasts are usually in the form of an IP address with all 255s in the last octet.

Directed broadcast

A directed broadcast is a special type of IP address used to send data to all computers on an external network. It’s usually used for network administration, such as notifying all computers on the network about a change in configuration or retrieving information from multiple sources.

Different formats of IPv6 addresses

Since IPv6 addresses consist of 128 bits (in contrast to IPv4’s 32 bits), they allow for much greater variation and flexibility than IPv4. Three of the most common types of IPv6 addresses are global unicast, link local, and unique local addresses.

Global unicast address

Global unicast addresses are globally unique IP addresses assigned to a single interface or host. These addresses are used for communication between two systems over the public internet, or within a private network. Global unicast addresses are structured in eight 16-bit blocks, each separated by a colon (e.g., 2001:0db8:0000:0000:0000:ff00:0042:8329).

Link-local address

Link-local addresses are used for communication between nodes on the same local link or subnet. Link-local addresses are not routable over the public internet but can be used within a private network. Link-local addresses start with fe80::/10 and have a 64-bit interface identifier appended at the end (e.g., fe80::d3b0:f2f7:a5b1).

Unique local address

Unique local addresses (ULAs) are similar to global unicast addresses, but they are only intended for use within private networks and cannot be routed over the public internet. ULAs start with fc00::/7 and have a 40-bit randomly generated interface identifier appended at the end (e.g., fd37:6c82:f9a5::1).

How to find your IP address

Knowing your IP address can be useful in many different ways, from troubleshooting network issues to accessing geo-restricted content. Here’s how you can look up your IP address on Mac and Windows computers.

How to find your IP address on a Mac (OS X 10.5 and later)

There are two methods for finding your IP address on macOS devices: through your System Preferences, or in your macOS Terminal.

How to find your IP address in macOS using System Preferences

  1. Go to the Apple menu and select System Preferences.
  2. Click on Network.
  3. Select your active network connection, such as AirPort or Ethernet, from the list on the left.
  4. Your IP address will be displayed in the IPv4 Address field to the right.

How to find your IP address in macOS Terminal

  1. Open the Terminal application located in Applications > Utilities.
  2. Type the following commands into the Terminal window:
    1. For Ethernet: ipconfig getifaddr en1
    2. For Wi-Fi: ipconfig getifaddr en0
    3. For public IP address: curl ifconfig.me
  3. The command will return your IP address.

How to find your IP address on Windows 11

On Windows, you can find your IP address in your system settings, or via command prompt.

  1. How to find your IP address in your Windows Settings
  2. Open the Settings app.
  3. Click on Network & internet.
  4. Click Properties, and scroll down to see your IP address.

How to find your IP address in Windows using Command Prompt

  1. Open the Command Prompt by typing cmd into the Windows search bar.
  2. Type ipconfig and press Enter.
    1. To find your public IP address, type nslookup myip.opendns.com. resolver1.opendns.com into the Command Prompt and press Enter.
  3. Your IP address will be listed under IPv4 Address.

How to find your IP address on any device

The fastest and easiest way to find your public IPv4 or IPv6 address is simply to fire up Google, type in “my ip,” and click search.

Why you might want to know your IP address

One of the most common reasons you would want to find your IP address is to troubleshoot network issues. Your IP address can help you identify problems with your internet connection or router, as well as help diagnose any technical issues you may be having with other devices on the same network.

You may also want to access geo-restricted content. Many websites and streaming services use your IP address to determine where you are located and block access if you’re outside their allowed area. Knowing your IP address can help you bypass these restrictions by using a virtual private network (VPN).

In addition, knowing your IP address is necessary when setting up new devices on your network. For example, when configuring a wireless printer or router, you must know the IP address to connect it properly.

Further, if you need to access a device remotely over the internet, you’ll need to know its IP address and your own to configure the connection.

Finally, some people are just curious. It’s always interesting to know more about how the internet works, and understanding what an IP address is and how it functions can be a great way to learn more about the technology behind it all.

IP address security threats

IP address information is valuable to cybercriminals, as it can be used to track and target you or your business. Some of the main security threats include tracking and online stalking, spoofing, hacking your devices, or attacking your network.

  • Tracking and online stalking: Criminals or people/entities with nefarious intentions can use IP address information to find out where you are geographically located and use other services to determine your identity or even where you live.
  • Spoofing: Spoofing attacks are when a cyber attacker creates data packets with a false IP source address in order to trick the firewall or receiver into believing it’s safe.
  • Hacking your devices: Knowing your IP address can allow malicious actors to identify vulnerabilities in your device and attempt to gain access or even seize control.
  • Attacking your network: Cybercriminals can also use IP addresses to target a group of devices, such as a home network or business servers, in an attempt to gain access and carry out malicious activities. Knowing the IP addresses of an organization is also a prelude to a DDoS attack.

Many of these risks can be mitigated by using a virtual private network (VPN) or taking other security measures, such as regularly changing your IP address and maintaining an effective, advanced firewall.

Bottom line: Understanding IP addresses

IP addresses are an integral component of the internet and how it functions. It’s important to understand the basics of how IP addresses work and the different types of IP addresses.

Knowing your own IP address can come in handy for purposes as diverse as gaming, setting up remote access, or troubleshooting network issues.

It’s also important to be aware of the potential security threats associated with having an active IP address and take the necessary steps to mitigate the risks.

Using a virtual private network (VPN) to hide your IP address can help protect your network and let you browse more freely. Here’s a guide to the top VPN services available today.

Kihara Kimachia
Kihara Kimachia
Kihara Kimachia is a writer and digital marketing consultant with over a decade of experience covering issues in emerging technology and innovation. In addition to appearing regularly in Enterprise Networking Planet, his work has been published in many leading technology publications, including TechRepublic, eSecurity Planet, Server Watch, Channel Insider, IT Business Edge, and Enterprise Storage Forum.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends, and analysis.

Latest Articles

Follow Us On Social Media

Explore More