Variable Length Subnet Masks (VLSM)


When you're working with TCP/IP, one of the most difficult topics to understand is the concept of Variable Length Subnet Masks (VLSM). As the use of TCP/IP has grown more widespread, it has become obvious that sometimes assigning even a full Class C address with 254 available hosts is a waste of address space; this would be the case, for example, in a branch office with five employees, a file server, and a printer. An IP address range must be broken into smaller pieces to allow for more efficient use of the address space. Using VLSM (also known as subnet addressing) is a method for "borrowing" bits from the host ID portion of an IP address and applying them to the network ID.

Suppose that you have been assigned the Class C address 193.18.5.0 and you need to create five separate networks, one for five different offices, from your one IP address range. To do so, you will need to borrow three bits from the host ID field, thus creating the subnet mask of 255.255.224.0. By using this subnet mask, you actually end up being able to create six separate subnets, which is the closest match to your needs since you can't create five subnets and the next smallest amount is four subnets using the 255.255.192.0 subnet mask as you'll see a bit later on.

To see how subnet addressing works, let's first convert the IP address 193.18.5.0 to binary form:

11000001 00010010 00000101 00000000


Remember, in a default Class C address, the first 24 bits are the network ID, and the last 8 bits are the host ID.

To indicate that bits are being borrowed from the host ID, you use a subnet mask, which is also a 32-bit binary number. To make clear the purpose of the subnet mask, you need to examine it in conjunction with the binary IP address, like this:

11000001 00010010 00000101 00000000 represents the IP address assigned to you. 11111111 11111111 11100000 00000000 represents the subnet mask required.

In dotted-decimal notation, the subnet mask address is 255.255.224.0. The rules of subnet masking are simple:

  • 1 in the network mask indicates that a bit in the IP address is part of the network ID.

  • 0 in the network mask indicates that a bit in the IP address is part of the host ID.

This example has 27 bits in the network mask, so within the network ID are 27 bits for addressing. This subnet mask allows the following subnetworks (that is, subnet IDs) to be used within the Class C address range:

10101100 00010010 11111111 11100000 10101100 00010010 11111111 00100000 10101100 00010010 11111111 01000000 10101100 00010010 11111111 01100000 10101100 00010010 11111111 10000000 10101100 00010010 11111111 10100000 10101100 00010010 11111111 11000000 10101100 00010010 11111111 00000000


If you do the math to convert the binary addresses to decimal, you will find that the subnet mask 255.255.255.224 lets you construct eight subnets with the following IP address ranges:

  • 193.18.5.0-193.18.5.31

  • 193.18.5.32-193.18.5.63

  • 193.18.5.64.-193.18.5.95

  • 193.18.5.96-193.18.5.127

  • 193.18.5.128-193.18.5.159

  • 193.18.5.160-193.18.5.191

  • 193.18.5.192-193.18.5.223

  • 193.18.5.224-193.18.5.255

Recall that the 224 in the subnet mask 255.255.224.0 comes from the fact that we are borrowing bits from the host ID and using them for the network ID. Referring back to Table 1.1, we can see how the value was obtained. 224=128+64+32 in decimal notation equals 11100000 in binary notation. The subnet mask actually becomes part of the configuration of each host on the network, enabling the hosts to discriminate between network ID, subnet ID, and host ID.

To determine the available IP addresses in each subnet, you simply perform the binary math again on the host ID portion of the third octet. The second range, 193.18.5.32-193.18.5.63, yields host IDs in the fourth octet from 32 to 63. The IP address 193.18.5.32 itself is not valid for host use because it is the broadcast address for that subnet, so the first IP address that a host could use would be 192.18.5.33. In this case, 33=0+0+32+0+0+0+0+1 equals 00100001 in binary notation.

Note: Controlling the Numbers

By now, you might be wondering how the rules and regulations for IP addresses and IP addressing are laid down and who regulates them. The Internet Assigned Numbers Authority (IANA) is responsible for assigning IP address blocks to organizations (ISPs and large companies) as well as maintaining three private IP address ranges (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) that are intended for use on private networks. You can learn more about IANA's activities by visiting www.iana.org.


Note

Let's take a short break before moving on to the next topic and examine what some sample subnetting charts might look like. Obviously this is much more detail than you'd need to create for your exam to answer a single exam question, but seeing it here should help you to understand the relationship between the subnet mask, the subnet network address, the host IP address ranges, and the subnet broadcast address.


Sample Class C Subnetting Chart Using the IP Address of 192.168.15.0

Subnet Mask

Number of Subnets

Number of Hosts per Subnet

Network Address

Usable IP Range

Broadcast Address

255.255.255.0

1

254

192.168.15.0

192.168.15.1-192.168.15.254

192.168.15.255

/24

     

255.255.255.128

2

126

192.168.15.0

192.168.15.1-192.168.15.126

192.168.15.127

/25

  

192.168.15.128

192.168.151.29-192.168.15.254

192.168.15.255

255.255.255.192

4

62

192.168.15.0

192.168.15.1-192.168.15.62

192.168.15.63

/26

  

192.168.15.64

192.168.15.65-192.168.15.126

192.168.15.127

   

192.168.15.128

192.168.15.129-192.168.15.190

192.168.15.191

   

192.168.15.192

192.168.15.193-192.168.15.254

192.168.15.255

255.255.255.224

8

30

192.168.15.0

192.168.15.1-192.168.15.30

192.168.15.31

/27

  

192.168.15.32

192.168.15.33-192.168.15.62

192.168.15.63

   

192.168.15.64

192.168.15.65-192.168.15.94

192.168.15.95

   

192.168.15.96

192.168.15.97-192.168.15.126

192.168.15.127

   

192.168.15.128

192.168.15.129-192.168.15.158

192.168.15.159

   

192.168.15.160

192.168.15.161-192.168.15.190

192.168.15.191

   

192.168.15.192

192.168.15.193-192.168.15.222

192.168.15.223

   

192.168.15.224

192.168.15.225-192.168.15.254

192.168.15.255

255.255.255.240

16

14

192.168.15.0

192.168.15.1-.14

192.168.15.15

/28

  

192.168.15.16

192.168.15.17-.30

192.168.15.31

   

192.168.15.32

192.168.15.33-.46

192.168.15.47

   

192.168.15.48

192.168.15.49-.62

192.168.15.63

   

192.168.15.64

192.168.15.65-.78

192.168.15.79

   

192.168.15.80

192.168.15.81-.94

192.168.15.95

   

192.168.15.96

192.168.15.97-192.168.15.110

192.168.15.111

   

192.168.15.112

192.168.15.113-192.168.15.126

192.168.15.127

   

192.168.15.128

192.168.15.129-192.168.15.142

192.168.15.143

   

192.168.15.144

192.168.15.145-192.168.15.158

192.168.15.159

   

192.168.15.160

192.168.15.161-192.168.15.174

192.168.15.175

   

192.168.15.176

192.168.15.177-192.168.15.190

192.168.15.191

   

192.168.15.192

192.168.15.193-192.168.15.206

192.168.15.207

   

192.168.15.208

192.168.15.209-192.168.15.222

192.168.15.223

   

192.168.15.224

192.168.15.225-192.168.15.238

192.168.15.239

   

192.168.15.240

192.168.15.241-192.168.15.254

192.168.15.255


We'll leave the last two subnets (.248/29 and .252/30) for you to complete on your own later!

Recall that the /24 subnet mask is the default Class C subnet mask, and one that you'll typically see in production, but not so much during your exam. Another common subnet mask is /16, or 255.255.0.0. When working with that subnet mask, you can use the same basic subnetting logic as we've seen thus far. The next table illustrates how subnetting works for a Class B IP address.

Sample Class B Subnetting Chart Using the IP Address of 172.16.0.0

Subnet Mask

Number of Subnets

Number of Hosts per Subnet

Network Address

Usable IP Range

Broadcast Address

255.255.0.0

256

254

172.16.0.0

172.16.0.1-

172.16.0.255

/16

   

172.16.0.254

 
   

172.16.1.0

172.16.1.1-

172.16.1.255

    

172.16.1.254

 
   

   

172.16.255.0

172.16.255. 1-

172.16.255.255

    

172.16.255.254

 

255.255.128.0

128

508

172.16.0.0

172.16.0.1-

172.16.1.255

/17

   

172.16.0.254 and

 
    

172.16.1.1-

 
    

172.16.1.254

 
   

172.16.2.0

172.16.2.1-

172.16.3.255

    

172.16.2.254 and

 
    

172.16.3.1-

 
    

172.16.3.254

 
   

   

172.16.254.0

172.16.254.1-

172.16.255.255

    

172.16.254.254 and

 
    

172.16.255.1-

 
    

172.16.255.254

 

255.255.192.0

64

1016

172.16.0.0

172.16.0.1-

172.16.3.255

/18

   

172.16.0.254 and

 
    

172.16.1.1-

 
    

172.16.1.254 and

 
    

172.16.2.1-

 
    

172.16.2.254 and

 
    

172.16.3.1-

 
    

172.16.3.254

 
   

   

172.16.252.0

172.16.252.1-

172.16.255.255

    

172.16.252.254 and

 
    

172.16.253.1-

 
    

172.16.253.254 and

 
    

172.16.254.1-

 
    

172.16.254.254 and

 
    

172.16.255.1-

 
    

172.16.255.254

 


Exam Alert: Private IP Address Ranges

You should know that within each IP address class range there exists a private IP address range. Addresses in these private ranges are to be used only on private networks and are thus not routable on the Internet. These ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Chances are that your organization is using one or more subnets from one or more of these private address ranges.





MCSA(s)MCSE 70-291(c) Implementing, Managing, and Maintaining a Microsoft Windows Server 2003 Network Infrastructure
MCSA/MCSE 70-291: Implementing, Managing, and Maintaining a Microsoft Windows Server 2003 Network Infrastructure (Exam Prep)
ISBN: 0789736497
EAN: 2147483647
Year: 2006
Pages: 196
Authors: Will Schmied

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net