Beginner 5 min read Updated: Sep 09, 2026

What Is an IP Address?

An IP (Internet Protocol) address is a unique numerical label assigned to every device connected to a computer network that uses the Internet Protocol...

An Internet Protocol (IP) address is a unique numerical label assigned to every device connected to a computer network that uses the Internet Protocol for communication. Just as a physical house needs a street address to receive mail, a computer needs an IP address to send and receive data across a network or the internet.

IPv4 Basics and Structure

The most common version of the IP protocol in use today is IPv4. An IPv4 address is a 32-bit number, typically written in "dotted-decimal" format consisting of four numbers separated by periods (e.g., 192.168.1.15). Each number can range from 0 to 255.

Every IP address contains two hidden parts determined by its Subnet Mask:

  • The Network Portion: Identifies the specific network the device is on (like the street name).
  • The Host Portion: Identifies the specific device on that network (like the house number).

For example, if the IP is 192.0.2.50 with a standard 255.255.255.0 mask, the network portion is 192.0.2 and the host is 50.

Public vs Private IP Addresses

Because there are a limited number of IPv4 addresses, they are split into two main types:

  • Public IP Addresses: These are unique across the entire global internet. Servers, public websites, and your home router's outside connection use public IPs.
  • Private IP Addresses: These are reserved for internal use within a home or office network (e.g., 192.168.x.x or 10.x.x.x). Millions of homes can use 192.168.1.5 internally because they are not directly reachable from the internet.

To learn more about how private IPs reach the internet, read our Public vs Private IP Address guide.

Special IP Addresses

  • Loopback Address (127.0.0.1): This address points directly back to the local computer. Pinging 127.0.0.1 verifies that the computer's network stack is functioning correctly.
  • APIPA / Link-Local (169.254.x.x): If a Windows computer is configured to get an IP automatically but fails to reach a DHCP server, it will assign itself an Automatic Private IP Address (APIPA). Devices with APIPA can only talk to other APIPA devices on the same local switch.

Static vs Dynamic IPs and DHCP

An IP address can be assigned in two ways:

  • Static IP: Manually typed into the device's network settings by an administrator. Used for servers and printers that must never change their address.
  • Dynamic IP: Automatically assigned by a DHCP server when the device connects to the network. Used for laptops, phones, and most employee workstations.

The Default Gateway Relationship

If a computer wants to talk to a device on its own network (e.g., 192.0.2.10 talking to 192.0.2.20), it communicates directly. However, if it wants to reach the internet (like Google's 8.8.8.8), it must send the traffic to the Default Gateway (usually the local router).

Simple Office Example

Imagine a small office using the 198.51.100.0/24 network. The router (Default Gateway) is assigned 198.51.100.1. The office file server has a Static IP of 198.51.100.10 so employees can always map network drives to it. When an employee connects a laptop to the Wi-Fi, the DHCP server grants it a Dynamic IP like 198.51.100.150.

Commands to Check IP Configuration

Windows

> ipconfig
IPv4 Address. . . . . . . . . . . : 192.168.1.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Linux / macOS

# Modern Linux command
$ ip addr show

# Older Linux / macOS command
$ ifconfig

Common IP Problems and Troubleshooting

1. IP Conflict

Problem: Two devices on the same network have the exact same IP address. Both devices will experience intermittent drops or total loss of connectivity.

Troubleshooting: This usually happens when an administrator assigns a static IP to a server that falls inside the DHCP server's dynamic pool. Check your DHCP scope and exclude the statically assigned IPs.

2. The APIPA Address (169.254.x.x)

Problem: A user complains they have "no internet." You run ipconfig and see their IP is 169.254.20.50.

Troubleshooting: The PC cannot reach the DHCP server. Check the physical cable, ensure the switchport is active, and verify the DHCP server is online. If the client is on a different VLAN, ensure the DHCP Relay is configured.

3. Wrong Default Gateway

Problem: A computer can ping other PCs in the office, but cannot reach the internet.

Troubleshooting: Check the IP configuration. If the Default Gateway is blank or pointing to the wrong IP, the computer does not know how to route traffic outside its local network.

Looking to the Future

Because the world has run out of IPv4 addresses, the internet is slowly migrating to IPv6. You can learn about the next generation of IP addressing in our IPv6 Fundamentals guide.

Code copied to clipboard!