What is my IP & Understanding IP Addresses

A detailed, step-by-step explanation of IP addresses — from basic concepts and addressing schemes to configuration, routing, and best practices.

Introduction

An IP (Internet Protocol) address is a unique identifier assigned to every device on a network that uses the Internet Protocol for communication. It works like a postal address for your computer, phone, or IoT device, allowing data to be sent and received across local networks and the global Internet. This guide covers the history, structure, types, and practical usage of IP addressing.

Finding My IP Address

Follow these step-by-step instructions to find your computer's IP address on both Windows and macOS:

On Windows
  1. Press Windows + R to open the Run dialog.
  2. Type cmd and press Enter to open Command Prompt.
  3. In the Command Prompt window, type ipconfig and press Enter.
  4. Look for the section labeled Ethernet adapter or Wireless LAN adapter. Your IPv4 Address will appear as IPv4 Address: 192.168.x.x.
  5. If you need your IPv6 address, find IPv6 Address in the same output.
On macOS
  1. Click the Apple menu and select System Settings (or System Preferences in earlier versions).
  2. Go to Network.
  3. Select your active connection (e.g., Wi-Fi or Ethernet) from the left sidebar.
  4. Your IP address is displayed under the connection status (e.g., Wi-Fi is connected to MyNetwork and has IP address 192.168.x.x).
  5. Alternatively, open Terminal and type ifconfig, then locate the inet entry under the appropriate interface (en0 for Wi-Fi, en1 for Ethernet).

These methods reveal your private (local) IP address assigned by your router. To find your public (Internet) IP, visit a website like whatismyipaddress.com.

History & Purpose

The concept of IP addressing originated in the 1970s with the development of the ARPANET. IPv4 (Internet Protocol version 4) standardized a 32-bit address system to route packets. As the Internet grew, IPv6 emerged in the 1990s with 128-bit addresses to overcome address exhaustion. IP allows diverse networks to interconnect seamlessly, forming the modern Internet.

IPv4 Address Structure

IPv4 addresses are 32-bit numbers typically written in dotted-decimal notation (e.g., 192.168.0.1). Each of the four octets represents 8 bits (0-255). The address comprises a network portion (identifies the network) and a host portion (identifies the device). A subnet mask (e.g., 255.255.255.0) determines which bits belong to each portion.

IPv6 Address Structure

IPv6 uses 128-bit addresses, written in eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Leading zeros may be omitted and consecutive zero groups compressed using ::. IPv6 eliminates NAT by providing a vastly larger address space, supporting auto-configuration and built-in security.

Public vs. Private Addresses

Public IPs are globally routable on the Internet, assigned by ISPs. Private IPs (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are used within local networks and not reachable from the Internet. Routers use NAT (Network Address Translation) to map private IPs to a public IP for external communication.

Classful vs. Classless Addressing

Early IPv4 used classful addressing: Class A (/8), B (/16), C (/24). This led to inefficient allocations. CIDR (Classless Inter-Domain Routing) introduced variable-length prefixes (e.g., 192.168.1.0/24), allowing more precise subnetting and efficient use of address space.

Subnetting & CIDR

Subnetting divides networks into smaller subnets by extending the network prefix. For example, 192.168.1.0/24 can split into two /25 subnets (192.168.1.0/25 and 192.168.1.128/25) each with 126 usable addresses. CIDR notation (/25) indicates how many bits are fixed for the network, facilitating routing aggregation.

DHCP & Static Configuration

DHCP (Dynamic Host Configuration Protocol) automates IP assignment: devices request an address from a pool managed by a DHCP server. Static IPs are manually configured for servers, printers, or network devices requiring fixed addresses. Example DHCP range: 192.168.0.100 - 192.168.0.200.

DNS & Reverse DNS

DNS (Domain Name System) maps domain names to IP addresses. A records point names to IPv4, AAAA records to IPv6. Reverse DNS uses PTR records to map IPs back to hostnames. DNS resolution involves iterative and recursive queries across root, TLD, and authoritative servers.

Routing & Gateways

Routers forward packets between networks based on routing tables. The default gateway is the router IP on your subnet that handles traffic destined for external networks. Static routes can be configured for specific paths; dynamic routing protocols (OSPF, BGP) automate route exchange between routers.

IPv4 Exhaustion & IPv6 Migration

By the 2010s, available IPv4 addresses were depleted. Organizations use NAT and private addressing to extend usage. IPv6 adoption grows via dual-stack deployments, tunneling (6to4, Teredo), and translation (NAT64). IPv6 ensures global end-to-end connectivity and IPv4-IPv6 interoperability.

Security Considerations

IP addresses can expose network topology and host information. Use firewalls to block unwanted traffic, implement IP whitelisting for critical services, and monitor logs for suspicious IPs. Geolocation and reputation services help identify malicious sources. IPv6 introduces unique privacy challenges—temporary addresses and privacy extensions mitigate tracking risks.

IPv6 Address Types

IPv6 defines multiple address types:

  • Global Unicast: Public, routable addresses.
  • Link-Local: Auto-configured (fe80::/10) for neighbor discovery only.
  • Unique Local: Private scope (fc00::/7), analogous to IPv4 private addresses.
  • Multicast: Group addresses (ff00::/8) for one-to-many delivery.

Troubleshooting & Tools

Key commands and tools:

  • ipconfig/ifconfig to view local IPs.
  • ping and tracert/traceroute to test reachability and path.
  • nslookup/dig for DNS queries.
  • Network scanners (nmap) to map IPs and open ports.

Getting Started: Configuration Examples

Example static IPv4 setup on Windows:

  1. Open Network Settings > Adapter Properties.
  2. Select IPv4 > Properties.
  3. Enter IP: 192.168.1.50, Subnet: 255.255.255.0, Gateway: 192.168.1.1.
  4. DNS: 8.8.8.8 and 8.8.4.4.

Example IPv6 auto-configuration on Linux:

sudo sysctl net.ipv6.conf.all.autoconf=1
sudo dhclient -6 eth0

What's Next?

To deepen your IP networking knowledge, explore these resources: