Subnetting Made Easy, Part 6

Note: As you will soon see I use tables (some might say excessively :P) in this post. I did this is because it closely resembles what a lot of network engineers do when they’re performing subnet calculations with a pen and paper. This is a very important skill to learn as you won’t always have access to a subnet calculator when you need one.

I recently received an e-mail from a reader asking for subnetting assistance. An extract of the e-mail is below.

I looked at your subnetting archive but I am still confused on how to subnet! *sobs*

So could you help me subnet a IP address of 192.168.25.0/24 with 2 and 27 hosts.

It’s been a while since I’ve done this and your blog is the closest guide that’s helped somewhat.

Could you explain to me step by step how to find the:
  1. Number of bits in the subnet
  2. The subnet mask in binary
  3. The subnet mask in decimal
  4. The maximum number of usable subnets including the 0 subnet
  5. The number of usable hosts per subnet
  6. The first and last host address  for each subnet

Continue reading

Subnetting Made Easy, Part 5

After publishing my previous post, I received another e-mail from the author of the original e-mail:

… So basically, I would like to find out how to find the first usable IP address. As I say, using your process, I can figure out the Network IP address, and the Broadcast IP address, but I don’t know how to figure out the first usable IP.

I was asking someone in a class this morning, and he was saying something, that I didn’t understand, about adding a “1” to the network address, which would make sense. If the Network IP address is 192.168.0.0 then the first usable address would be 192.168.0.1.

The bit I don’t get is, when you have the IP address and the Subnet Mask in binary, and the Subnet Mask is, say, 21 bits then that would leave 3 bits in the third octet belonging to the host part of the address. Therefore, in total there would be 11 bits belonging to the host address, but how is the calculation made to find the first host address? What happens to the three host bits in the third octet?

My reply to this e-mail went as follows:

Continue reading

Subnetting Made Easy, Part 4

Recently I received the following e-mail from a reader:

I have read, and followed your method of finding subnet mask addresses, and calculating the first and last and broadcast addresses, but there is something that I would like to ask.

I can follow the “normal” /30 method, using borrowed bits from the fourth octet, but I find it difficult to figure out what happens when you are using the third, or possibly the second, octet.

If I may pose an example with a classless address:

IP address = 192.162.45.212 /22
Therefore S/M = 255.255.252.0

I believe that this would be demonstrated as : N.N.nnnnnnhh.H

Using the borrowing principal, what is the Network address, and then doing an “Anding” calculation I come up with the following:

11000000—10100010—00101101—11010100 = IP address
11111111—11111111—11111100—00000000 = S/M
11000000—10100010—00101100—00000000 = Network address

Network address = 192.162.44.0
1st Host = 192.162.44.1

What I am puzzled about is how do you calculate the last host, and the broadcast? Although based on your explanation, the last host will be one address lower than the broadcast. My problem is that I can figure out what you do with the two “hh” bits that are in octet 3.

Continue reading

Subnetting Made Easy – Index

Below is a list of all the posts in the “Subnetting Made Easy” series:

My posts on Stack Exchange’s Network Engineering forum:

As always, if you have any questions or have a topic that you would like me to discuss, please feel free to post a comment at the bottom of this blog entry, e-mail at will@oznetnerd.com, or drop me a message on Twitter (@OzNetNerd).

Note: This website is my personal blog. The opinions expressed in this blog are my own and not those of my employer.

Subnetting Made Easy, Part 3

Note: For the first post in this series, please see the Subnetting Made Easy, Part 1 post.

Recently I received an e-mail from a reader who was having trouble with one of their labs. The lab required them to write an ACL which matches only part of a subnet, as opposed to the whole subnet which is what is commonly seen in lab environments. The details are as follows:

  • Network Address: 192.168.0.192 /27
  • Usable Addresses: 192.168.0.193 – 192.168.0.222
  • Subnet Mask: 255.255.255.224
  • Wildcard Mask: 0.0.0.31

The range of addresses inside the subnet which need to be matched are:

Match Addresses: 192.168.0.193 – 192.168.0.206

In order to create the ACL, the author needs to find out which wildcard mask matches only the above mentioned addresses.

Continue reading

EIGRP No Auto Summary Command, Part 2

A few years ago I wrote a blog post about EIGRP and the “auto-summary” command called EIGRP No Auto Summary Command, Part 1. In that post I provided a brief description of what “auto-summary” does and demonstrated how it works by creating a basic lab. Now that you’ve seen the basics though, it is time to dig a little deeper.

In the previous post we saw that R1 and R2 were both automatically summarising the 10.45.100.0/24 and 10.16.0.0/24 networks respectively and therefore R3 and R4 could not reach one another. That’s seems normal enough seeing as though the command is called “auto-summary”. However, things aren’t that simple unfortunately.

For example, take a look at this topology:

topology

Both routers are running EIGRP, but only R1 has the “auto-summary” command enabled, as per the configurations below:

Continue reading

Subnetting Made Easy – Formula

I covered subnetting in my earlier posts, Subnetting Made Easy, Part 1 and Subnetting Made Easy, Part 2.

In the latter mentioned post, I explained how you can use simple additions or subtractions to work out the First Usable Address, the Last Usable Address and the Broadcast Address of a subnet.

As the post was quite long, I thought I should re post the formulas in case they got lost in the sea of text.

Here they are:

  • First Address = Network Address + 1
  • Broadcast Address = Next Network Address – 1
  • Last Address = Broadcast Address – 1

Continue reading

Subnetting Made Easy, Part 2

In my previous post, Subnetting Made Easy, Part 1, I demonstrated the way I use to find the Network Address, First Usable Address, Last Usable Address and Broadcast Address when given any IP address and subnet mask. This time I will demonstrate how this process can also be used when dealing with multiple, consecutive subnets.

To make things easier, I’ll use the same setup as last time.

As per Part 1, we found that the network address was 195.70.16.156. We also knew that we were only going to be dealing with the fourth octet as this is a /30 address. We then converted this information in to binary format and were left with this:

128 64 32 16 8 4 2 1
SN SN SN SN SN SN H H
1 0 0 1 1 1 1 1

Now, let’s get started on the next part. To put a clear division between the Subnet Bits and the Host Bits, what I like to do is put a line between them, like this:

128 64 32 16 8 4 | 2 1
SN SN SN SN SN SN | H H
1 0 0 1 1 1 | 1 1

Continue reading

Subnetting Made Easy, Part 1

There are a wide range of techniques people use to work out their network, host and broadcast addresses. I prefer to take the binary approach as I find it the quickest and easiest method, and is never wrong.

Remember, the four most important things to know about a subnet is the following:

Network Address:
First Usable Address:
Last Usable Address:
Broadcast Address:

Let’s say for example, we were given the IP address 195.70.16.159 and told that it is in a /30. This is how I’d go about filling in the template above…

First of all, as IP addresses are 32 bits long, and each octet is 8 bits in length, we know that:

  • Bits 0 to 8 are covered in the first octet.
  • Bits 9 to 16 are covered in the second octet.
  • Bits 17 to 24 are covered in the third octet.
  • Bits 25 to 32 are covered in the fourth octet.

Continue reading