$devtoolkit.sh/glossary/what-is-ip-address

What is an IP Address? — IPv4 and IPv6 Explained

Definition

An IP (Internet Protocol) address is a numerical label assigned to every device connected to a network that uses the Internet Protocol. It serves two primary functions: identifying the host or network interface, and providing the location of the host in the network to enable routing. IPv4 addresses are 32-bit numbers written in dotted-decimal notation (192.168.1.1), and IPv6 addresses are 128-bit numbers written in hexadecimal colon notation (2001:db8::1).

How It Works

IPv4 uses 32 bits, allowing about 4.3 billion unique addresses — a number that was exhausted, driving the adoption of IPv6. An IPv4 address has a network part (identifying the network) and a host part (identifying the specific device on that network). The subnet mask determines the boundary between these parts. CIDR notation (192.168.1.0/24) combines the address and prefix length. IPv6 has 128 bits (3.4 × 10^38 addresses), built-in autoconfiguration, and simplified headers. NAT (Network Address Translation) allows private IP ranges (10.x.x.x, 172.16.x.x, 192.168.x.x) to share a single public IP.

Common Use Cases

  • Routing packets across the internet to the correct destination server
  • Configuring firewalls to allow or deny traffic from specific addresses or ranges
  • Geolocation to determine the approximate location of a user
  • Rate limiting and abuse detection by source IP address
  • Configuring static IPs for servers and network devices

Example

IPv4:
  Public: 8.8.8.8 (Google DNS)
  Private: 192.168.1.100
  Loopback: 127.0.0.1 (localhost)

IPv6:
  Full:  2001:0db8:0000:0000:0000:0000:0000:0001
  Short: 2001:db8::1
  Loopback: ::1

CIDR: 192.168.1.0/24 → 192.168.1.0 – 192.168.1.255

Related Tools

FAQ

What is the difference between a public and private IP address?
Private IP addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are used on local networks and are not routable on the public internet. Public IP addresses are globally unique and internet-routable. A home router has one public IP (from the ISP) and assigns private IPs to devices via DHCP.
What is a subnet mask and CIDR notation?
A subnet mask divides an IP address into network and host parts. CIDR notation /24 means the first 24 bits are the network address — equivalent to subnet mask 255.255.255.0. A /24 network has 254 usable host addresses (256 minus network and broadcast addresses).
Why is 127.0.0.1 called localhost?
127.0.0.1 is the loopback address — a virtual network interface that connects back to the same machine. Any traffic sent to 127.0.0.1 (or ::1 in IPv6) goes to the local machine without actually going out to the network. It is used to connect to locally running servers during development.

Related Terms

/glossary/what-is-ip-addressv1.0.0