Can you imagine a telephone without a phone number, or an email without an email address? Networks also need addresses to know who (or what) is on the network and where to find them. You won’t be able to connect to 50 billion IoT devices without good addressing plans!
Address management on an industry level is a necessary evil in the world of network engineering. Every device connected to the Internet or to a private TCP/IP network MUST be assigned an Internet Protocol (IP) address. IP addressing can, however, be a bit of a mystery and is usually an after-thought.
The first step is to understand what addresses are for, what they look like, how they are assigned, and why the support tools from LightMesh can be important.
First, what is an IP address?
The Internet Protocol is a fundamental and definitional building block of the Internet – the Internet as we know it would simply not exist without the innovation of IP as previous protocols like IPX/SPX (Remember Novell?) could never scale to what the internet has become today. IP addresses are the pointers to network-connected devices that implement the Internet Protocol – this is everything from your smart phone to the servers inside web-scale datacenters.
One fundamental aspect of an IP packet is the header, where both the source and destination addresses are key fields. This header lets intermediary routers know where the packet is going, and where it has come from. The router will then choose the best “next hop” based on the other routers it is connected to, known as it’s “peers”.
The two versions of IP currently in use are IPv4 (which has 32 bit addresses) and IPv6 (which has 128 bit addresses).
Although the 32 bits of the IPv4 addresses theoretically allows up to 4,294,967,296 (232) addresses, this is not enough when technologies such as the Internet of Things (IoT) are taken into account. IPv6 has been designed to remove address space limitations.
Within the IP address space, we have two primary classes of IP addresses:
- Public – each address is unique within the Internet (default); or
- Private – where each address is unique within a routable network zone, usually behind a firewall/router or other NAT device; these are defined in RFC1918 (e.g. 192.168.0.0–192.168.255.255).
Some IP address ranges are also reserved for special purposes including broadcast, loopbacks, multicast, and others.
IPv4 was specified by the IETF in RFC791 (and dates back to the early 1980s). Although it will eventually be replaced by IPv6 (see Wikipedia entry for an overview and RFC2460 for the details), IPv4 today defines the predominant format for addresses.
What does an IPv4 address look like?
The IPv4 header includes both a source 32-bit address and a destination 32-bit address.
For easy reading by humans, IP addresses are usually written in dotted-decimal notation: 4 numbers separated by dots (for example 192.168.255.255). Since each of these numbers represents 8 bits in the IP header, the maximum value of each number is 255 (which equals 8 “1”s).
Several standardized interpretations for an IP address have been used over the years. The most recent, described in RFC 4632, is called Classless Inter-Domain Routing (CIDR). CIDR provides a method for partitioning the addresses to allow smaller or larger blocks of addresses to be allocated to users.
The CIDR notation counts the number of bits in the network prefix and appends that number to the address after a slash (/) character separator. For example, 192.168.0.0 with a netmask 255.255.255.0 is written as 192.168.0.0/24.
IP addresses convey two types of information:
- The network/subnetwork identifier, taken from the most significant bits, with the number of allocated bits being specified by the netmask (e.g., 192.168.0.0/24); and
- The host/device identifiers that are associated with the subnet.
For example, we can have:
- 192.168.0.0/24 as the CIDR notation for a leading network address of 192.168.0.0 with a 255.255.255.0 netmask, which leaves 8 bits to be used for host identifiers.
- The routing prefixes for subnets of this size would range from 192.168.0.0 to 192.168.255.0 (a total of 256 networks, each with up to 256 IPs, or 254 hosts);
- 10.0.0.0/16 is the CIDR notation for a leading address of 10.0.0.0 with a 255.255.0.0 netmask, which leaves 16 bits to be used for host identifiers, which translates into 65,536 IPs.
NB: See http://lightmesh.com/subnet-builder/ for a free subnet calculator to visualize your address space.
Working with IP addresses
There are a number of steps needed to get started with IP addressing. Here’s a few of the tasks you will need to complete:
- The first task is to get a block of addresses that fits your business requirements, i.e. the number of hosts that are to be attached to your network.
You may have applied for a block of addresses many years ago (in which case you may have plenty to spare!) or you may have been given addresses by your Internet Service Provider’s (ISP).
- The next decision is whether to use private addressing (Do all your hosts need to be directly connected to the internet? Is this desirable?)
- One of the important tasks in any IP address design process is the assignment of addresses to hosts. There are basically two ways to do this:
- Static allocation – an address is permanently associated with a device’s interface; or
- Dynamic – the address is assigned on a temporary basis by a DHCP server.
- Develop a tracking system that will allow you to keep track of all your IP addresses, preferably with as many automatic interfaces as possible.
- Define your IP Plan. This is an important step if you want to ensure your network is maintainable for many years to come.
Hopefully this has gone some way to demystifying Internet addresses for you!
The best way to formalize the processes for IP address management is to use a tool designed for the purpose. You can get a taste of what’s possible by trying out LightMesh IPAM, free for 30 days.