Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 2001

Hanging Out with the Classless Crowd


RSS
Subscribe to Windows IT Pro | See More Domains Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Binary Numbers and Subnet Masks

A couple of tricks can help you subnet your network with classless subnet masks

If your network uses a default subnet mask—255.0.0.0 for Class A, 255.255.0.0 for Class B, or 255.255.255.0 for Class C—you have a classful domain. I like to associate the term classful with mindful—that is, you're mindful that you're working in an open domain with no subnetworks (subnets). Actually, your entire domain is a subnet, but it isn't further divided into sub-subnets.

A classful domain can be a very busy place, with all your network traffic whizzing around the same set of pathways. Switches, which operate at the data-link layer, separate collision domains, but they do nothing to separate broadcast domains because broadcasts happen at the network layer.

If you have a router, you can group portions of your network into subnets to cut down on the number of broadcasts. For example, you might want to group your infrastructure gear (including your server farm and printers) into one subnet, the marketing department into another subnet, and the sales department into another subnet. Subnetting can be a handy tool for busy networks.

If you have subnets, you have a classless domain with a classless subnet mask. A classless subnet mask, also known as a variable-length subnet mask (VLSM), borrows bits from an IP address' host section and gives them to the address' network section. "Classless" and "variable length" stem from the fact that subnet mask addresses don't fit into standard IP's Class A, B, and C format.

The only problem with subnetting is performing the binary calculations necessary to derive the subnet addresses—I prefer to work with decimal numbers when possible. I can teach you a little bit about Classless Inter-Domain Routing (CIDR) and let you in on an easy nonbinary mathematical trick. These two pieces of information will help you decipher the "slash notation" that you see in technical support literature and will make subnetting quick and easy.

CIDR, Anyone?
First, a quick overview of subnetting and CIDR. The Internet Engineering Task Force (IETF) realized early on that IP addresses would run out sooner rather than later. In 1985, Request for Comments (RFC) 950 proposed subnetting to extend the number of available IP addresses. In 1993, RFCs 1517, 1518, 1519, and 1520 described CIDR as a standard for subnetting.

CIDR bought some time for resolving the IP address dilemma and provided a way to limit the growing number of entries in Internet backbone routing tables. Internet backbone routers can handle tens of thousands of entries but eventually become overloaded. Thanks mostly to CIDR, backbone routers today hover at a manageable number of routes in their routing tables.

You can find more information about CIDR at http://public.pacbell.net/ dedicated/cidr.html. In this article, I want to focus on the notation that emanated from the CIDR routing technique. CIDR notation offers an alternative to the old-fashioned Class A, B, and C addressing terminology, but you still must understand the basics of the traditional IP address format.

Traditional Class A, B, and C addresses are made up of four 8-bit bytes. The 8-bit binary numbers are typically represented by their decimal equivalents separated by dots (e.g., 192.24.68.48). Figure 1 shows that Class A addresses use the first 8 bits for the network and the last 24 bits for the host. Class B addresses use the first 16 bits for the network and the last 16 bits for the host, and Class C addresses use the first 24 bits for the network and the last 8 bits for the host. Subnet mask addresses are often represented in the same dotted-decimal format.

CIDR notation uses a slash followed by the number (in decimal) of network bits in the address (e.g., /8, pronounced "slash 8"). Suppose you have a network using the reserved Class A address 10.0.0.0 and a classful subnet. You could say that your network is 10.0.0.0/8, which is the same as a 255.0.0.0 subnet mask. For a reserved Class B address, such as 172.20.0.0, you could use the CIDR notation 172.20.0.0/16 or the subnet mask notation 255.255.0.0 to specify that you're subnetting on the 16th bit. For a Class C address, you might use 192.16.1.0/24 or 255.255.255.0.

An 8-bit byte yields eight possible subnet values: 128, 192, 224, 240, 248, 252, 254, and 255. Table 1, page 110, shows these subnet values in subnet masks for each class and shows their CIDR equivalents. Each subsequent CIDR value borrows one more bit from the host section and moves it to the network section. Thus, if you subnet the Class C address 192.16 .1.0 with a 240 mask (i.e., 255.255.255 .240), you have network 192.16.1.0/28. (Remember that the 0 is a placeholder. Sixteen possible subnets are associated with the /28 CIDR value.) If you subnet 192.16.1.0 with a 248 mask (i.e., 255.255 .255.248), you have network 192.16.1.0/29.

The 255 subnet value identifies a classful subnet, so it isn't relevant to a discussion of classless subnetting. However, the other seven subnet values do permit classless subnetting. With the list of subnet values and Table 1 handy, you're ready to start subnetting.

Magic Number Subnetting
Suppose you have a Class C network address of 192.16.1.0 and you want to apply a subnet mask that will yield four subnets, each with 50 or fewer hosts. Which mask would you use? Well, you could go through the trouble of calculating the subnet value in binary. (For a refresher course about working with the binary numbers used in IP addresses and subnet masks, see the sidebar "Binary Numbers and Subnet Masks," page 108.) Or, you could employ a little trial and error, find what I call the "magic number," and use that number in a few simple calculations to find the appropriate subnet value.

For a Class C address, to find the number of hosts per subnet that a given subnet value will yield, simply subtract the subnet value from 256 (the overall number of hosts). Here's where the trial and error comes in. Pick one of the seven classless subnet values—say, 192—and subtract it from 256 to get a magic number of 64. However, you need to take one more step to find the actual number of hosts you can use per subnet for the Class C 192 subnet value. Because you need the first number in a subnet for the network and the last number for broadcast, subtract 2 from 64. Therefore, the actual number of hosts per subnet from the Class C 192 subnet value is 62.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Where is Microsoft NetMeeting in Windows XP?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing