IP addressing, design and configuration

When amazon.com sends your order, the shipping details on your parcel should be enough to ensure you receive the goods safely, all the way to your doorsteps. Your property is the only property with that specific address, it is unique in the globe. Equally, each host or device on a given network must have a unique IP address, so packets destined to it do not end up delivered to another device.

Keeping the same analogy with postal services, if IP packet had shipping labels, the address on them must be enough to locate which network and host address you have. Therefore, in the packet header, destination address is in a format which clearly states a network, a subnet and host. As you progress in the industry, you will find that subnet is often used to describe network and subnet parts.

IPv4 addresses are defined by a total 32 bits or 4 octets separated by a dot. For example 10101100.00010000.00010100.0 0000001, or in Dotted decimal notation, 172.16.20.1. You would agree, the latter is easier to remember. IP addresses are also followed by a subnet mask in the form of 255.255.255.0 for example. The mask determines which part is a network, or subnet and host in an ip address.

A router will act as a forwarder between LANs or broadcast domains. A set oh hosts in one domain cannot communicate with another set oh host in a different domain, unless there is a router linking the 2 LANs. In this figure, hosts on students LAN are all in the same subnet 172.16.10.x. To reach the library server on 172.16.20.15, they need to send packets to their LAN gateway RTR1. RTR1 which has an address on 172.16.10.x, will forward packets to RTR2, which in turn hands them over the the server on 172.16.20.x subnet or LAN.

IP addresses classes

IPv4 addresses can be categorised into 5 different classes, and can be either public or private.

  • 127.0.0.0/8 network is missing. This is where 127.0.0.1, known as loopback IP address is located. As a result, the whole  class A is wasted.
  • Class D is a multicast address range. These addresses are used when a streaming device is sending to multiple listeners.
  • Class E is a reserved range for experiments.
Address Class 1st Octet value Classful Mask-decimal  Classful Mask-prefix Notation
A 1-126 255.0.0.0 /8
B 128-191 255.255.0.0 /16
C 192-223 255.255.255.0 /24
D 224-239 N/A N/A
E 240-255 N/A N/A

For a class A, the default classful mask is 255.0.0.0, in binary 1111 1111.0000 0000.0000 0000.0000 0000. The 1st 8 bits helps to identify the network part of the address, therefore the mask can also be written as /8.

Another example for a class this time, 192.168.1.0/24 is the same as 192.168.1.0 255.255.255.0, and represents a network where hosts are on the last octet. So, hosts for this network will range from 1-254.

Private IPv4 addresses

Within the 1st three known classes, there can be private IP addresses. These are IP addresses you will not find on the internet…or at least should not.

RFC1918 defines private IP addresses which helped slowing down the depletion of public IP addresses. Private IP addresses  do not need to be unique to each company, in fact the PC, Mac or tablet you are using right now is likely assigned a private IP address. These addresses are in the following ranges.

Class of networks Private range
A 10.0.0.0
B 172.16.0.0 to 172.31.0.0
C 192.168.0.0 to 192.168.255.0

IP addressing design and numbering

As an engineer tasked to come up with an IP scheme for a new backbone, campus or network in general. There are few pieces of information to ascertain, or at least  be aware off and investigate. Although we have not yet covered how to calculate and size subnets using the right mask and network, these concepts are critical to the design of an IP scheme.

  • Public or Private range ?

    It is important to know if there is a need to use private or public IP addresses. For the latter,  there is a process for ordering and have them allocated by one of the Regional Internet Registries (RIRs). Although, these days you would most likely have to buy these IP ranges. However, when it comes to private IP ranges, just pick from table above and select what covers your needs.

  • How many subnets and hosts ?

    Do you need a subnet which supports 10, 50 or 200 hosts ? and how many subnets you need in total, will you have one subnet per department or campus ? and when you have gathered this information, you also need to figure out how much room for future growth you need to allow for. A campus with 30 hosts today, may grow to 50 in next 12 months.

  • How to assign IP addresses ?

    Will the IP addresses be statically configured per host, or would Dynamic Host control Protocol (DHCP) be used ? Typically both methods are used, so routers are manually configured with static IP address, and hosts are assigned IP addresses by a DHCP server.

To build on this introduction, go through  This subnetting example,. You will go through a common scenario, where subnetting rules and considerations are explained with concrete calculations.