Kumpulan Tutorial networking , Trik dan Tips

Sunday 1 February 2015

Calculating Subnets variable size (VLSM)

Calculating Subnets variable size (VLSM) - Hallo my friends,, This post is entitled Calculating Subnets variable size (VLSM), All of the content is aim for reader satisfaction. Hopefully all the posts will be easy to understand and likeable.

Hello everyone.

A few hours after I published the last article on the mathematics behind the Wildcard Masks (see article here) a former student asked me to write an article on the blog VLSM (Variable Length Subnet Masks), one of the most common issues in examination Cisco CCNA and that brings great difficulty for students at first.

Those who are studying VLSM certainly have studied fixed length subnet calculation, so I'm assuming that the reader has this knowledge as a prerequisite. Before entering the discussion of VLSM, we review "lightning" the concept of subnets.

When studying calculation subnets first, it is explained that the IP address is associated with a subnet mask which is a 32-bit number consisting of a sequence of 1s (which represents the network prefix) + 0s (suffix is a host on the network), in that order, from left to right. In addition, the default values ​​of the network masks can be modified to meet the needs of certain environments that have more complex networks, creating several subnets. That is, you can "borrow" bits that identify hosts to identify and create subnets. Basically, the subnet calculation there are two basic rules to 

  • 1a. Rule: For bits "borrowed" to create subnets, we have:
              2bits = Subnet count

  • 2a. Rule: For the remaining bits that identify hosts, we have:
              2bits-2 = Hosts count

For example, 160.30.0.0/16 is a Class B address that allows hosts 65,534 (216-2) on a single network, which would be bad from the point of view of performance because of the broadcast domain size. Rather than having a single network with many hosts, it would be interesting to have more networks with fewer hosts, as shown below where we borrow 8 bits of the host suffix to identify smaller sub-networks (/ 24). So we now have 256 subnets (28) with 254 hosts each (28-2).

In variable length subnet calculation requirements will vary and will have to create new subnets with different sizes. You must begin the subnets calculation process from the segments with the greatest number of hosts. To do this, you must first be verified the amount of required hosts per subnet using the formula:

2bits-2 ≥ Hosts Volume Segment

Notice that this process is reversed to the fixed-length subnet calculation. In the traditional calculation of fixed-sized subnets the first thing to do is to determine the amount of subnets needed.

To practice and better understand these concepts, we will solve an exercise together. Given the topology shown in the figure below, through a network 192.168.2.0 Class C (/ 24) you must create an addressing plan to accommodate your subnets that have different requirements.

Fonte: CCNA Study Guide. Richard Deal. Editora McGraw Hill. 2008.

In this type of exercise the first thing to do is a topology of reading to identify what are the requirements for the exercise, after all we have to know what we need to do before calculating anything. Observing the figure it is possible to identify a hub-and-spoke topology where there is a matrix connected to other branches 7 via links point-to-point (/ 30). In addition, each LAN segment on the branches must accommodate 30 hosts. Thus, we already have our requirements:

  • 7 Sub-Redes de 02 Hosts (Links P2P)
  • 7 Sub-Redes de 30 Hosts (LANs das Filiais)

If we have more than one condition, namely, we need to create subnets with different sizes, can be sure that the exercise is about VLSM. If we had a single requirement with the same size networks, whatever the amount of required networks, it would be a fixed-size subnets exercise. First we write the network we have and their respective network mask:

Network Address: 192.168.2.0
Decimal Mask: 255.255.255.0 (/ 24)
Mask Binary: 11111111.11111111.11111111.00000000

Remember, then, we should start the VLSM calculation process from the segments with the greatest number of hosts. In our case, these are the subnets with 30 hosts, then we must apply the following formula to determine how many bits should we use to ensure 30 hosts:

2bits-2  ≥ 30 => Bits = 5 (já que 2= 32)

As we had 8 bits for hosts and we need to ensure 5 segments of 30, 3 bits left over we use the new prefix to have the maximum possible subnets. So our new network mask becomes / 27, see below the bits borrowed highlighting in yellow:

New Binary Mask: 11111111.11111111.11111111.11100000

At that moment the old network 192.168.2.0/24 there is more and we have 8 new subnets (23) with 30 hosts (25-2). Below relate all these 8 new subnets and have already booked the 7/1 to meet the requirement of LANs branches:

  1. 192.168.2.0   /27 OK
  2. 192.168.2.32  /27 OK
  3. 192.168.2.64  /27 OK
  4. 192.168.2.96  /27 OK
  5. 192.168.2.128 /27 OK
  6. 192.168.2.160 /27 OK
  7. 192.168.2.192 /27 OK
  8. 192.168.2.224 /27 **

The essence of VLSM is to work with the "leftovers" successively redoing the calculations. Notice that originally had 1 Network / 24 (a full pizza) which split into 8 smaller pieces. The total pizza, eat 7 pieces, but still left one. That is, all we have left now is a subnet 192.168.2.224 / 27, then we will try to meet her from the next requirement. Again, we first write the network we have and their respective network mask:

Network Address: 192.168.2.224
Decimal Mask: 255.255.255.224 (/ 27)
Mask Binary: 11111111.11111111.11111111.11100000

Our next requirement is to create subnets with 2 hosts for links point-to-point between the headquarters and branch offices, then we must re-apply the following formula to determine how many bits should we use to ensure two hosts:

2bits-2  ≥ 2 => Bits = 2 (já que 2= 4)

As we had 5 bits for hosts and we need to ensure two segments 2, 3 bits left over to use the new prefix to have the maximum possible subnets. Thus, our new network mask becomes / 30, see below the bits borrowed highlighting in yellow:

New Mask Binary: 11111111.11111111.11111111.11111100

At that moment the old subnet 192.168.2.224/27 there is more and we have eight (23) new subnets with 2 hosts (22-2). Below relate all these 8 new subnets and have already booked the 7/1 to meet the requirement of the links point-to-point:
  1. 192.168.2.224 /30 OK
  2. 192.168.2.228 /30 OK
  3. 192.168.2.232 /30 OK
  4. 192.168.2.236 /30 OK
  5. 192.168.2.240 /30 OK
  6. 192.168.2.244 /30 OK
  7. 192.168.2.248 /30 OK
  8. 192.168.2.252 /30 **

Now I serve the requirements of exercise and created 7 subnets / 30 for the links point-to-point between the headquarters and branch offices, plus 7 subnets / 27 for LANs branches (see figure). Consider that the entire pizza that was previously divided into eight pieces one piece was left which, in turn, was divided into 8 new smaller pieces. Even left us a "bit" very small which allows a new subnet / 30.

Fonte: CCNA Study Guide. Richard Deal. Editora McGraw Hill. 2008.

Finally, take the opportunity to leave an extra year and further bring the topology of the addressing plan with your answer, so you can check if hit. To master this topic is crucial to practice, good studies!

V3r0nocy



Extra exercise: Given the topology shown in the figure below, through a network 192.168.3.0 Class C (/ 24) you must create an addressing plan to accommodate the following sub-networks that have different requirements.

Fonte: CCNA Study Guide. Richard Deal. Editora McGraw Hill. 2008.

answer:
Fonte: CCNA Study Guide. Richard Deal. Editora McGraw Hill. 2008.



Ok, That's all about Calculating Subnets variable size (VLSM) Thank you for visiting, and have a nice day

Calculating Subnets variable size (VLSM)
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : Calculating Subnets variable size (VLSM)

0 komentar: