15 July 2014

IP Addresses

The Basics

TCP/IP (or Transmission Control Protocol/Internet Protocol) is the most ubiquetous inter-network protocol in use today. Computers use TCP/IP to connect to other networks as well as to the internet. An IP address is a unique identifier for a device connected to a TCP/IP network.

IP addresses consists of four eight-digit binary numbers or octets (also called bytes), usually represented in base-10 notation, and separated by periods.

Example Binary Representation

1100000 10101000 00000001 00110110

Example Base-10 Representation

Reserved Addresses

Some addresses are reserved for particular purposes. A list follows: is reserved for the Default Route, meaning that address lookups that do not match any route known to the network fall back to this address. It typically points to the default gateway – the node on the network (often your router) that serves as the point of access for connecting to other networks or the internet. is reserved for Network Broadcasts. Messages sent to this address go to all computers on the network. is the most commonly-used Loopback Address, which is an address your computer uses to refer to itself. Messages sent from your computer to this address echo back to your computer. The hostname ‘localhost’ resolves to this address.

Private IP Addresses

The TCP/IP protocol was devised in the 1970s before the internet took off. The specification for IPv4 addresses (as opposed to the newer IPv6) only provides for 256 ^ 4 or 4,294,967,296 unique addresses. If every internet-enabled device was assigned a unique address, the pool of unique addresses would have been exhausted long ago.

Realizing this, back in 1996, the Internet Engineering Task Force (IETF) specified special blocks of private IP addresses – i.e. addresses that could not be used over the internet. This way, groups of internet-enabled devices could share a single globally-unique public IP address through a router, while maintaining separate private IP addresses to communicate amoungst themselves on a local network. The uniqueness of a private IP address is only enforced amoung devices on a given local network, thus many devices can simultaneously use the same local IP address on separate local networks.

Reserved private IP address ranges are as follows:

Class Address Range Leading Bits CIDR Notation Unique Addresses
A - 00001010 16,777,216
B - 10101100 0001 1,048,576
C - 11000000 10101000 65,536

Since the number of computers connected to a LAN is typically much smaller than 65,536, most routers limit their IP assignments to 255 addresses in the range -

If you check your private IP address under network preferences (assuming you’re on a Mac), it is probably in the form ‘192.168.0.X.’

Public IP Addresses

If you google ‘what is my ip address’, you will quickly find your router’s public IP address. This will be the same for every device connected to your LAN.