Monday, August 19, 2019

CCNA LESSON 8:.Variable Length Subnet Mask (VLSM)

Variable Length Subnet Mask (VLSM)


Why VLSM?


• In subnetting we have seen that how larger network were broken into a bunch of smaller networks called as subnets those have the same number of hosts, which is known as Fixed Length Subnet Mask (FLSM).
• In FLSM all the subnets were using the same subnet mask, so it leads to inefficiencies. In real scenario, some networks or subnets may require huge number of host addresses while other may require less number of host addresses.
• Because once the subnet mask is defined; it locks the network into a fixed number of subnets. For resolving this issue of fixed host number in all subnets, a method was introduced that was known as Variable Length Subnet Mask (VLSM).

Class full & Classless


Classful subnetting


• In classful subnetting i.e. also refer as Fixed Length Subnet Mask (FLSM), all subnets use same subnet mask and has same number of hosts.

Classless subnetting


• In classless subnetting i.e. also known as Variable Length Subnet Mask (VLSM), subnet may have different number of hosts depending upon network requirement.

Classfull Network Design




• In the above fig four routers, are connected together with a WAN serial link.
• In a classful network design, you can subnet a network such as: 192.168.1.0/27
• Where Network is 192.168.1.0 and subnet mask is /27 = 255.255.255.224. So we will get 8 subnets as follows 0, 32, 64, 96, 128, 160, 192, 224.
• But in each network how many hosts would be available? That is in each network you will get 30 hosts with the subnet mask of 255.255.255.224. Each LAN has 30 valid hosts as well as the point-to-point WAN link also has 30 valid hosts. Here all routers and hosts interfaces have the same subnet mask which is refer to classful routing.
• The issue with this kind of network is that the link between the routers only uses two valid hosts address and rest of the valuable hosts address are wasted.

Variable Length Subnet Mask (VLSM)


• Variable Length Subnet Mask (VLSM) is a key technology that divides a single network into many subnetworks with subnet masks of different lengths for different types of network designs.
• VLSMs networking provide us with different subnet masks for different router interfaces.

Benefit of VLSM

The major benefit of VLSM is:

• Subnets can be defined to different sizes as needed under a single Network ID, thereby minimizing, if not eliminating, wasted addresses.
• As a result, an organization's assigned IP address space is more efficiently used.
• Second, when correctly defined to match the physical topology of the network, variable-length subnet masks can be used to permit router aggregation that minimizes the number of distinct routes that need to be advertised and processed by network backbone or Internet routers

VLSM Design


• In Classfull Network Design, we wasted address space. What would be good is to provide only the needed number of hosts on each router interface. To do this, we use what are referred to as Variable Length Subnet Masks (VLSMs).
• We can use different size masks on each router interface. And if we use a /30 on our WAN links and a /27, /28, and /29 on our LANs, we'll get 2 hosts per WAN interface, and 30, 14, and 8 hosts per LAN interface. This makes a huge difference, as not only can we get just the right amount of hosts on each LAN, we still have room to add more WANs and LANs using this same network.

Implementing VLSM Networks


• In VLSM or classless Subnetting, you have to do subnetting as per the network requirement.
• While creating VLSMs mask for Class C networks you will get block size as shown table 8.1.

• Here you can see when any network require 100 hosts then you have to use a block size of 128 which has total of 126 hosts. If you want to connect 28 hosts in the network, then the block size will be of 32 and so on. You cannot just make up block sizes, so memorize the block sizes as they are the same numbers we used with subnetting.

Steps for VLSM Subnetting

  1. Find the largest segment or subnet that has largest number of hosts
  2. Provide the proper subnet mask for the largest segment.
  3. Find the second largest segment, take one of these newly created subnets and apply a different, more appropriate, subnet mask to it.
  4. Provide the proper subnet mask for the second largest segment.
  5. Repeat these steps until the last network is satisfied or solved.


VLSM Example
Below Fig company network with four departments




• The company requires total 8 subnets and 132 hosts.
• List the entire department i.e. LAN segments according the hosts requirement i.e. Largest to smallest as shown below.


Do subnetting for largest segment. Here the largest segment requires 58 host addresses. As you can see in table 8.1 the 58 host demand come in the total host value of 62 with a block size = 64 and CIDR value = /26. So 192.168.1.0/26 network gives us four subnets with 64 hosts in each subnet.

Table 8.2 Valid host address range for 192.168.1.0/26



Providing subnet mask to the largest segment. As you can see in table 8.2, subnet 1 fulfills our largest segment hosts requirement as shown in table 8.3.

Table 8.3 Providing subnet mask for Institute department



• Do subnetting for second largest segment from next available subnet i.e. subnet 2. Next segment that is the sales department requires 34 host addresses. Subnetting of /26 has given us four subnets with 64 hosts in each and from that we have allocated first subnet to institute department. So the subnet 2 i.e. 192.168.1.64 network address, we would use this network for subnetting.

• Here also we have to use /26 as it fulfils our host require i.e. 34 hosts. So we can just used subnet 2 results for sales department Table 8.4 Providing subnet mask for Sales department



• The third largest segment requires 20 hosts i.e. HR department. From above subnetting we have subnet 3 and subnet 4 available. Do subnetting for the requirement of 20 hosts. Subnetting of 192.168.1.0/ 27 is shown in table 8.5. Table 8.5 Valid host address range for 192.168.1.0/27




• Subnets 1 to 4 i.e. address from 0 to 127, are already assigned to the by previous segments that is institute and sales department. From the table 8.5, we can assign subnet 5 to this segment or HR department to fulfil it hosts requirement as shown in table 8.6.

Table 8.6 providing subnet masks information for HR department



Our last four segments require 2 hosts per subnet. So carrying out subnetting for 192.168.1.0/30 Valid subnets are:
0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164, 168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256

From the above valid subnets, the address from 0 - 159 is already assigned to previous segments. As shown in table 8.7, we have to use 160,164,168, and 172 for WAN links.



• WAN Link 1 subnet mask and host address information is shown in table 8.8

• WAN Link 2 subnet mask and host address information is shown in table 8.9


• WAN Link 3 subnet mask and host address information is shown in table 8.10

• WAN Link 4 subnet mask and host address information is shown in table 8.11


Summarization
• The process of taking a range of IP addresses and advertising them in one address block is known summarization or route summarization.
• The most well- known summarization or supernet is the RFC1918 Class B Range. More commonly we know the range to be 172.16.0.0 172.31.255.255, however the supernet is 172.16.0.0/12.

Benefit of Summarization
• If we have just one address instead of lots of individual addresses then the routing table is going to be smaller. This in turn means that memory requirements are reduced.
• The less obvious benefit is that summarization means you're tracking whether or not you're connected to some subnets of a summary, not the up/down state of every link. Thus when the link goes up or down, you don't have a flurry of traffic announcing the state change.


Implementing summarization

• The first method shows you the long way.
• Starting from the left of the IP address, identify the first octet that has a change of address in it. For example, the Class B RFC1918 range, the IP addresses first changes in the second octet i.e. 172.16.x.x - 172.31.x.x.
• Write out the binary equivalent of the address up to and including the changing octet. So for example the range above is:

10101100.00010000 = 172.16
10101100.00010001 = 172.17
10101100.00010010 = 172.18
10101100.00010011 = 172.19
10101100.00010100 = 172.20
10101100.00010101 = 172.21
10101100.00010110 = 172.22
10101100.00010111 = 172.23
10101100.00011000 = 172.24
10101100.00011001 = 172.25
10101100.00011010 = 172.26
10101100.00011011 = 172.27
10101100.00011100 = 172.28
10101100.00011101 = 172.29
10101100.00011110 = 172.30
10101100.00011111 = 172.31

• From this list, count from the left how many bits are same in each address. If we look at it we see that the first 12 bits for each address are the same so that gives us our mask in slash notation. We therefore start at our first address 172.16.0.0 and append our mask so the summary address is 172.16.0.0/12.

• Here is the second method for quicker result.
• So here it goes:
• How many subnets are in the range? The RFC1918 Class B range is 16 subnets.
• What power of 2 equals our range? 16 subnets = 24 so the answer is four.
• Subtract the figure from step 2 from the default mask of our address range. In this example our default mask is 16 so the mask after subtracting 4 is /12.
• Add this mask to the first address in the range - 172.16.0.0/12 in this example
• One last example:
• Summarise the following:

192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24

• There are 4 subnets. 2 to the power of 2 gives us 4 so default mask of 24, minus 2, gives us /22. Address is therefore 192.168.0.0/22.


Troubleshooting IP Addressing

• One of the most important skill is troubleshooting of IP address: you can figure out (diagnose) the problem and fix it on an IP network whether you're at work or at home!

• An example of your basic IP troubleshooting, Raghav can't log in to the Windows server. So in order to troubleshoot we will do the following steps:

• Open a DOS window and ping 127.0.0.1. This is the diagnostic, or loopback, address, and if you get a successful ping, your IP stack is considered to be initialized. If it fails, then you have an IP stack failure and need to reinstall TCP/IP on the host. From the DOS window, ping the IP addresses of the local host. If that's successful, your network interface card (NIC) is functioning. If it fails, there is a problem with the NIC. Success here doesn't mean that a cable is plugged into the NIC, only that the IP protocol stack on the host can communicate to the NIC (via the LAN driver).

• From the DOS window, ping the default gateways (router). If the ping works, it means that the NIC is plugged into the network and can communicate on the local network. If it fails, you have a local physical network problem that could be anywhere from the NIC to the router.

• If steps 1 through 3 were successful, try to ping the remote server. If that works, then you know that you have IP communication between the local host and the remote server. You also know that the remote physical network is working.

• If communication with the server fails even after steps 1 through 4 are successful, you probably have some type of name resolution problem and need to check your Domain Name System (DNS) settings. But if the ping to the remote server fails, then you know you have some type of remote physical network problem and need to go to the server and work through steps 1 through 3 until you find the snag.


No comments:

Post a Comment

CCNA LESSON 10. BASIC CISCO ROUTER CONFIGURATION

  10.Basic Cisco Router Configuration Basic configuration of Router • While configuring the router you should be in the global mode i....