IPv4 Addressing Scheme Design

Welcome, to IPv4 network design.

We’re all very familiar with IPv4, you’ve probably been working with it for years, and you may even have a pretty solid addressing plan in your network currently. In this video, we’ll first do a brief overview of some more technical aspects of IPv4 addressing and subnetting, and then how to use those to design a repeatable plan that you can use within your network design. This is a plan that should be scalable and relatively easy to identify the purpose of the network in question. So without further ado, let’s jump right in.

IPv4 Address Dotted Binary Format

The IPv4 address contains 32 bits of addressing space. This is broken up into 4 octets of 8 bits each to simplify writing it out in dotted decimal notation. The address itself is comprised of a network identifier and host identifier within that network. So like the network is the street you live on and the host is the house number you live in.

Subnet Mask Dotted Binary Format

The thing that defines which portion of the address is the network identifier and which is for the host is the subnet mask. Moving from left to right, all parts of the mask which are a 1 indicates that respective bit in the address field is a bit which is part of the network identifier. The remaining 0s in the subnet mask indicate that respective bit in the address field is a member of the host identifier. I mean this makes sense once you realize that computers talk in binary and that fundamentally that’s what all the communication is in, right? So it receives this address that’s 32 bits, all being 1s and 0s, and then receives a mask which is a certain number of 1s in a row to indicate what part of that address is the network and what part is the host.

Calculating the network ID for an address

Now I mentioned dotted decimal notation already, but we didn’t talk about CIDR. It’s pronounced “cider”, and stands for classless inter-domain routing. This notation expresses the subnet mask with a forward slash and a number which corresponds to the number of 1s in the subnet mask. This is often referred to as the prefix length. A lot of people for simplicity sake go with the /24 network, to go at the bit boundary to allow for nice clean subnetting; but sometimes we forget that it doesn’t have to actually be this way. We can certainly do a /21 network instead, allowing 3 more bits for the host address, meaning we can now have 2046 host addresses; when you consider the first address in the subnet is the network identifier, with all the host bits being 0s, and the last address is the broadcast address for the network, with all the host bits being 1s.

I wanted to take this chance to go over subnetting, and specifically how one determines what the network identifier address is for a subnet. Say you’re given this address, and you want to find what the network ID is. Well you can do this 1 of 2 ways really. The easiest is to write it out in binary. On top we have the address, and below it the mask which is 21 1s in a row. Here you do a logical AND operation between them. What that means is if both the subnet bit and the corresponding address bit are a 1, then the resulting bit is a 1, if they differ or are 0s, then they’re 0. We find that what this does it give us the same bits up to where the subnet mask turns to 0s, and the remaining bits are all 0s.  If you convert this into decimal, you get I find this is really the best way to learn because it lets you visualize what’s really happening with a subnet mask.

21 bit subnet mask

Now the second method is to determine what the stepping interval is of the networks. Here in the 3rd octet we have 3 bits for the host identifier. So we count the value places in binary, 1, 2, 4, 8 up to where we get the first 1 in the mask. So we know since that’s where the first 1 is in the mask, the network IDs will step by 8s. so it’ll be, then, then, etc.

RFC 1918 Private Address Spaces

Hopefully you’re aware of private addressing in
IPv4, but I wanted to review what address spaces we have available to us in our
designs. Of course the reason private address spaces are called private and are
reserved is because these address spaces do not uniquely identify a device on
the internet and therefore is not routable on the internet.

We have 3 classes of networks in the
private addressing space. Class A is one large /8 network using the
space. Class B private networks are /12 networks; and the space which is used
for class B networks is to which contains 16 class B
networks. And finally class C networks are /24 networks and the space available
is to which provides for 256 class C networks.

Now, this might feel a bit strange to you because we don’t often deal with classful routing anymore; you can certainly subnet a class B address space into a /24, using for example; or make a smaller network if you don’t need 254 host addresses available, we just want to be aware of the address space available for us to use in private addressing.

Cisco NAT Terminology

Only subscribers can view the full content. Join Now!

Scroll to top

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

CiscoLessons will use the information you provide on this form to send occasional (less than 1/wk) updates and marketing.