CLASSLESS DOMAIN An Internet Protocol (IP) network that uses a variable-bit subnet mask. Overview A classful domain is an IP network that uses a default subnet mask such as 255.0.0.0 for Class A networks, 255.255.0.0 for Class B, or 255.255.255.0 for Class C. Classful domains thus have only one subnet and one broadcast domain. By contrast, a classless domain is an IP network that uses a variable-bit subnet mask (VBSM), also called a classless subnet mask, to divide the network into two or more subnets, each of which represents a different broadcast domain. Classless domains are generally built using routers. Each subnet within a classless domain constitutes a unique broadcast domain and collision domain, which generally improves performance over using a single broadcast and collision domain. Switches operate at the data-link layer and can partition a network into different collision domains, but they do not create different broadcast domains. CLASSLESS INTERDOMAIN ROUTING (CIDR) Also called supernetting, an alternative way of classifying Internet Protocol (IP) addresses from the traditional Class A-E system. Overview Classless interdomain routing (CIDR) is a more efficient routing mechanism than the original method of segregating network IP addresses into classes named Class A, B, and C. The trouble with the old system is that it leaves too many unused IP addresses. For example, while Class A networks support large numbers of network nodes, there are not enough Class A networks to go around and none of the owners of these networks make anywhere near full use of the large number of IP addresses available to them. As a result, large numbers of Class A (and Class B) IP addresses go unused, and CIDR was developed as a way of reclaiming those IP addresses for allocation elsewhere. Similarly, while many Class C network IDs are available, many companies require more than the 254 IP addresses available on a Class C network, but not nearly as many as the 65,534 IP addresses available on any Class B network. History In the late 1980s, prescient architects of the Internet foresaw that the standard Class A-E method for assigning IP addresses would eventually fail and that the routing tables used by the core routers of the Internet.s backbones would eventually grow unmanageably large. The class system provides for a huge number of IP addresses, but for only about 2 million different IP networks. As the number of networks attached to the Internet grew exponentially, a time was anticipated when there would be no more network numbers left to assign for new Class B and C networks (all Class A networks were assigned early on). In the early 1990s the Internet Engineering Task Force (IETF) produced a group of Requests for Comments (RFCs), namely RFCs 1517 to 1520, that brought a way out of the dilemma. These RFCs formed the basis of CIDR and provided a way of not only reducing the growing load on the Internet.s core routing tables (another result of the Internet.s rapid growth) but also of reusing unused IP addresses to make about 8 million additional IP networks of Class C size available for assignment to other companies and organizations. Uses CIDR is used primarily by routers and gateways on the backbone of the Internet for routing packets across the Internet. CIDR is not used much in private networks because most networks are hidden behind firewalls and can use any arbitrary block of IP addresses, such as the 10.x.y.z block allocated by Internet Network Information Center (InterNIC) for general, private use. Instead, CIDR comes into its own on the Internet backbone to facilitate routing and ensure the continued functioning of the Internet. However, CIDR is viewed only as a workaround to the issues of insufficient numbers of IP networks available for allocation and maintaining the routing tables of backbone routers at workable sizes. Most Internet architects see IPv6 as the real solution to these issues and expect the need to change over to this system of addressing in the next few years. Implementation CIDR replaces the old class method of allocating 8, 16, or 24 bits to the network ID, and instead allows any number of contiguous bits in the IP address to be allocated as the network ID. For example, if a company needs a few thousand IP addresses for its network, it can allocate 11 or 12 bits of the address for the network ID instead of 8 bits for a Class C (which would not work because you would need to use several Class C networks) or 16 bits for Class B (which is wasteful). CIDR assigns a numerical prefix to each IP address. For example, a typical destination IP address using CIDR might be 177.67.5.44/13 (the last part being pronounced .slash thirteen.). The suffix /13 indicates that the first 13 bits of the IP address identify the network, while the remaining 32.13 = 19 bits identify the host. In subnetting notation, the CIDR address 177.67.5.44/13 would be equivalent to the combination of IP address 177.67.5.44 and subnet mask 255.255.128.0 (see the following table). As another example, in CIDR notation an old style class B network 132.16.0.0 with default subnet mask 255.255.0.0 would be represented simply as 132.16/16. The prefix helps to identify the Internet destination gateway or group of gateways to which the packet will be forwarded. Prefixes vary in size, with longer prefixes indicating more specific destinations. Routers use the longest possible prefix in their routing tables when determining how to forward each packet. CIDR enables packets to be sent to groups of networks instead of to individual networks, which considerably simplifies the complex routing tables of the Internet.s backbone routers. The table shows the different CIDR values and their subnet mask equivalents. Notes There might seem to be an alternate solution for avoiding the waste of IP addresses from Class A and Class B networks. Consider, for example, a company with a network of 5,000 nodes. Assigning a single Class B network ID such as 166.33.0.0 to the network would provide 65,534 possible IP addresses for hosts, which is far too many.60,534 addresses would remain unused. A solution to this might seem to be assigning the company a contiguous set of 20 Class C network IDs. Because each Class C address provides 254 possible host addresses, 20 contiguous Class C network Ids, such as 198.15.1.0 through 198.15.20.0, would provide 20 x 254 = 5080 possible IP addresses, which is just right, plus a few to spare. Using this technique does eliminate the wasting of IP addresses, but it creates a new problem: to handle routing between your corporate network and the Internet, you need to add 20 new entries to the routing tables on Internet routers, one entry for each network ID you are using. Following this method quickly overwhelms the routers that form the Internet.s backbone because as their routing tables grow their performance slows down. CIDR was devised to address this very issue by decreasing the number of entries required in the Internet.s routing tables. CIDR does this by supernetting the 20 Class C networks above into a single supernet, which needs only one entry in the routing tables. CIDR Values and Their Subnet Mask Equivalents Class CIDR Value Subnet Mask Class A /8 255.0.0.0 /9 255.128.0.0 /10 255.192.0.0 /11 255.224.0.0 /12 255.240.0.0 /13 255.248.0.0 /14 255.252.0.0 /15 255.254.0.0 /16 255.255.0.0 Class B /17 255.255.128.0 /18 255.255.192.0 /19 255.255.224.0 /20 255.255.240.0 /21 255.255.248.0 /22 255.255.252.0 /23 255.255.254.0 /24 255.255.255.0 Class C /25 255.255.255.128 /26 255.255.255.192 /27 255.255.255.224 /28 255.255.255.240 /29 255.255.255.248 /30 255.255.255.252 /31 255.255.255.254 /32 255.255.255.255 SUBNET A portion of a network that has been subnetted. SUBNET MASK A 32-bit number that is used to partition Internet Protocol (IP) addresses into a network ID and a host ID. Overview Subnet masks are used by Transmission Control Protocol/Internet Protocol (TCP/IP) services and applications to determine whether a given IP address on an internetwork is a local network address or a remote network address. Two types of subnet masks are used in TCP/IP networking: . Default subnet mask: Partitions IP addresses into their network ID and host ID portions . Custom subnet mask: Further partitions the network ID into a number of separate subnets by using a process called subnetting The default subnet masks for IP address classes A, B, and C are shown in the following table. The table also shows how these subnet masks would partition an IP address such as w.x.y.z into a network ID and a host ID portion. Default Subnet Masks for IP Addresses Class Default Subnet Mask Network ID Host ID A 255.0.0.0 w x.y.z B 255.255.0.0 w.x y.z C 255.255.255.0 w.x.y z Implementation Subnet masks are represented as four-octet dotted-decimal numbers, just as IP addresses are, except that the most common values for an octet in a subnet mask are 0 and 255. In binary notation, decimal 0 represents the octet 00000000, and decimal 255 represents 11111111. A subnet mask thus consists of 32 binary digits, the first n of which are 1s and the remaining of which are 0s. When the subnet mask is logically ANDed with a 32-bit IP address of a TCP/IP host, the result is the network ID of the host.the portion of the host.s IP address that identifies which network the host is on. When the inverse of the subnet mask (for example, the NOT mask) is logically ANDed with the IP address of the host, the result is the host ID of the host.the portion of the host.s IP address that uniquely identifies the host on its network. Examples For example, consider the IP address 207.61.16.119 and the subnet mask 255.255.255.0. Converting these two numbers to binary and ANDing them gives the host.s Network ID: Host = 11001111 00111101 00010000 01110111 Mask = 11111111 11111111 11111111 00000000 AND = 11001111 00111101 00010000 00000000 = 207.61.16.0 = network ID Taking the logical NOT of the subnet mask and ANDing it with the host.s IP address gives the host.s Host ID: Host = 11001111 00111101 00010000 01110111 NOT Mask = 00000000 00000000 00000000 11111111 AND = 00000000 00000000 00000000 01110111 = 0.0.0.119 = host ID Partitioning a single Internet Protocol (IP) network into multiple subnets. Overview To subnet an IP network, you take the assigned network ID and borrow bits from the host ID to establish a group of subnet IDs (subnetted network IDs), one for each subnet. The more bits you borrow, the more subnets you produce, but the fewer the number of possible hosts for each subnet. The borrowing process also defines a unique custom subnet mask for the network. Subnets are then typically joined together using routers. The advantages of subnetting include . Reducing network congestion by limiting the range of broadcasts using routers . Enabling different networking architectures to be joined Implementation To subnet your network, you first determine how many subnets you need and the maximum number of possible hosts on each subnet. Then use one of the three tables below, depending on whether you have a Class A, B, or C network ID assigned to your network. Class A Subnetting Table Subnet Mask Number of Subnets Number of Hosts per Subnet 255.0.0.0 1 16,777,214 255.128.0.0 2 8,388,608 255.192.0.0 4 4,194,302 255.224.0.0 8 2,097,150 255.240.0.0 16 1,048,574 255.248.0.0 32 524,286 255.252.0.0 64 262,142 255.254.0.0 128 131,070 255.255.0.0 256 65,534 255.255.128.0 512 32,766 255.255.192.0 1024 16,382 255.255.224.0 2048 8190 255.255.240.0 4096 4094 255.255.248.0 8192 2046 255.255.252.0 16,384 1022 255.255.254.0 32,768 510 255.255.255.0 65,536 254 255.255.255.128 131,072 126 255.255.255.192 262,144 62 255.255.255.224 524,288 30 255.255.255.240 1,048,576 14 255.255.255.248 2,097,152 6 255.255.255.252 4,194,304 2 Class B Subnetting Table Subnet Mask Number ofSubnets Number of Hosts per Subnet 255.255.0.0 1 65,534 255.255.128.0 2 32,766 255.255.192.0 4 16,382 255.255.224.0 8 8190 255.255.240.0 16 4094 255.255.248.0 32 2046 255.255.252.0 64 1022 255.255.254.0 128 510 255.255.255.0 256 254 255.255.255.128 512 126 255.255.255.192 1024 62 255.255.255.224 2048 30 255.255.255.240 4096 14 255.255.255.248 8192 6 255.255.255.252 16,384 2 Class C Subnetting Table Subnet Mask Number of Subnets Number of Hosts per Subnet 255.255.255.0 1 254 255.255.255.128 2 126 255.255.255.192 4 62 255.255.255.224 8 30 255.255.255.240 16 14 255.255.255.248 32 6 255.255.255.252 64 2 Examples For example, consider a class B network that uses the network ID 172.16.0.0. If this network needs to be subnetted into six subnets, you can accomplish this using a custom subnet mask of 255.255.224.0. Each subnet can be shown to support a maximum of 8190 hosts. The IP address blocks for these six subnets can be selected from the eight possible subnets: . 172.16.0.1 to 172.16.31.254 . 172.16.32.1 to 172.16.63.254 . 172.16.64.1 to 172.16.95.254 . 172.16.96.1 to 172.16.127.254 . 172.16.128.1 to 172.16.159.254 . 172.16.160.1 to 172.16.191.254 . 172.16.192.1 to 172.16.223.254 . 172.16.224.1 to 172.16.255.254 SUPERNETTING The opposite of subnetting. Overview Subnetting involves creating a subnet mask that causes an Internet Protocol (IP) address to have more network ID bits than its default (classful) subnet mask. For example, the default subnet mask for a Class B address is 255.255.0.0, which identifies addresses for this network as having 16 network ID bits and 16 host ID bits. Subnetting is used to divide the default network into smaller networks. For example, a subnetted subnet mask of 255.255.128.0 identifies each Class B address as having 17 network ID bits and only 15 host ID bits. Supernetting is the opposite procedure.instead of borrowing bits from the host ID to increase the bits for the network ID (thus increasing the number of networks), supernetting borrows bits from the network ID to increase bits for the host ID, thus combining smaller networks to create larger networks. For example, a supernetted subnet mask of 255.254.0.0 identifies each class B address as having 15 network ID bits and 17 host ID bits, thus creating fewer networks, each with more hosts, than when using the default subnet mask. Implementation Supernetting is needed because the number of available class B addresses is small. By using supernetting, contiguous blocks of class C addresses can be combined and used for networks larger than a single class C block can satisfy. For example, if a company needs to deploy 2000 hosts as an IP network that is directly connected to the Internet, it can assign IP addresses for these hosts by . Using a single class B network ID. This approach is wasteful, as each class B network can support up to 65,534 different hosts, so most of these addresses would end up not being used. Also, it might be difficult or impossible to obtain a class B network ID from your Internet service provider (ISP), as they might have none available to assign. . Using eight separate class C network IDs, each of which can support up to 254 different hosts, making a total of 8 x 254 = 2032 hosts. This method would work, but it would lead to poorer routing performance because each router would require eight entries in its routing table, one for each of the eight networks to which frames could be forwarded. . Using supernetting to collapse the above block of eight class C network IDs into a single supernetted network ID. This is the best solution, as only one routing table entry will be required. The router must support classless interdomain routing (CIDR) for this procedure to work (most routers on the Internet support CIDR).