inVURTED.com

With great virtualisation comes great responsibility!

[PRACTICE] Fixed length subnet masking #1

After the other week’s CCENT course, I made a promise to start emailing subnetting examples out. Rather than writing and re-writing the same thing time and time again, I figured I’d put them up here instead.

So, fixed length subnet masking example #1 is this:

You have been given the network range 192.168.128.0/22. Your first task is to break this network up into blocks of one hundred IP addresses. How many blocks of IP addresses will you get (how many networks will you have)? What are the network IDs and what are the broadcast IP addresses for each of the network ranges?

I will post the answer on Tuesday 9th December, 2008 at 10:30am EDST.

Okay. The question specifically asks for hosts. Therefore, we are working from the thirty second bit back to the start to get hosts.

The original subnet mask is a /22 (255.255.252.0). This tells me that the first twenty two bits are “locked away” leaving me the last ten bits to play with. Straight away we can discern at least one piece of information about my network: there are 2^10 total hosts in the network ie. 2^#bits that aren’t locked away, or one thousand and twenty four total hosts.

On to the good stuff. If we look at the IP address in it’s binary format we have to do a decimal to binary conversion on the third and fourth octets. By looking at the subnet mask this tells me it’s not a full block of eight bits in the third octet and the fourth is all zeroes.

Which looks something like this:
192.168.10000000.00000000
255.255.11111100.00000000

Notice twenty two contiguous ones and ten contiguous zeroes.

As previously mentioned, I want hosts. So, I am working from the last bit leftwards. Each zero represents two hosts (1 and 0). Every time I go up a column, I am adding a power of two to the total number of hosts. If I use one column (the thirty-second bit), I have 2^1 hosts, two columns gives me 2^2 hosts etc. Can I get exactly 100 hosts for the network? The answer is no. If I use the last six bits I have sixty-four hosts (2^6), well below the required one hundred hosts! Let’s use the last seven bits. This gives me 2^7 hosts. One hundred and twenty eight is well above the one hundred required, but is the nearest value over one hundred I get given I have to count in powers of two.

My new subnet mask now looks something like this:
192.168.100000 00.0 0000000
255.255.111111 11.1 0000000

The spaces show the modifications that I have made to the network range given the requirements of the scenario.

The three bits between the spaces are telling me what networks I am now defining. Three bits, straight away, tells me I have 2^3 or eight networks in total. The network part of the IP address has to be unique. The eight unique combinations of the network ID are:
192.168.100000 00.0 0000000 (192.168.128.0)
192.168.100000 00.1 0000000 (192.168.128.128)
192.168.100000 01.0 0000000 (192.168.129.0)
192.168.100000 01.1 0000000 (192.168.129.128)
192.168.100000 10.0 0000000 (192.168.130.0)
192.168.100000 10.1 0000000 (192.168.130.128)
192.168.100000 11.0 0000000 (192.168.131.0)
192.168.100000 11.1 0000000 (192.168.131.128)

The rules of TCP/IP state that the host ID can’t be all zeroes and it can’t be all ones. The all zeroes address is the network ID and the all ones address is the broadcast IP address for that network.

In our example, the last six bits are the host ID. Therefore, the network IDs are up above and the broadcast IP addresses are:
192.168.100000 00.0 1111111 (192.168.128.127)
192.168.100000 00.1 1111111 (192.168.128.255)
192.168.100000 01.0 1111111 (192.168.129.127)
192.168.100000 01.1 1111111 (192.168.129.255)
192.168.100000 10.0 1111111 (192.168.130.127)
192.168.100000 10.1 1111111 (192.168.130.255)
192.168.100000 11.0 1111111 (192.168.131.127)
192.168.100000 11.1 1111111 (192.168.131.255)

Any questions or problems, please email me contactme@invurted.com or my work email address.

 

 

Stay tuned because I’ll post another example later this week.

Tagged as: , ,

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

*