As you probably know, The IPv4 address space consists of 32-bit addresses, notated as four 8-bit decimal values from 0 to 255 and separated by periods (for example, 192.168.43.100).
This is known as dotted-decimal notation and the individual 8-bit decimal values are called octets or bytes.
Each address consists of network bits, which identify a network, and host bits, which identify a particular device on that network. To differentiate the network bits from the host bits, each address must have a subnet mask.
A subnet mask is another 32-bit value consisting of binary 1 bits and 0 bits. When compared to an IP address, the bits corresponding to the 1s in the mask are the network bits, and the bits corresponding to the 0s are the host bits. Thus, if the 192.168.43.100 address mentioned earlier has a subnet mask of 255.255.255.0 (which in binary form is 11111111.11111111.11111111.00000000), the first three octets (192.168.43) identify the network and the last octet (100) identifies the host.
IPv4 classful addressing
Because the subnet mask associated with IP addresses can vary, the number of bits used to identify the network and the host can also vary.
The original IP standard defines three classes of IP addresses, which support networks of different sizes, as shown in Figure 4-1.
The number of networks and hosts supported by each of the address classes are listed in Table 4-1.
NOTE: ADDITIONAL CLASSES
In addition to Classes A, B, and C, the IP standard defines Class D and Class E. Class D addresses begin with the bit values 1110 and Class E addresses begin with 11110. The Internet Assigned Numbers Authority (IANA) has allocated Class D addresses for use as multicast identifiers. A multicast address identifies a group of computers on a network, all of which possess a similar trait. Multicast addresses enable TCP/IP applications to
send traffic to computers that perform specific functions (such as all the routers on the network), even if they’re located on different subnets. Class E addresses are defined as experimental and are as yet unused.
The “First bit values” row in the table specifies the binary values that the first one, two, or three bits of an address in each class must have. Early TCP/IP implementations used these bit values instead of a subnet mask to determine the class of an address. The binary values of the first bits of each address class limit the possible decimal values for the first byte of the address. For example, because the first bit of a Class A address must be 0, the possible binary values of the first byte in a Class A address range from 00000001 to 01111111, which in decimal form are values ranging from 1 to 127. Thus, in the classful addressing system, when you see an IP address in which the first byte is a number from 1 to 127, you know that this is a Class A address.
In a Class A address, the network identifier is the first eight bits of the address and the host identifier is the remaining 24 bits. Thus, there are only 126 possible Class A networks (network identifier 127 is reserved for diagnostic purposes), but each network can have as many as 16,777,214 network interface adapters on it. Class B and Class C addresses devote more bits to the network identifier, which means they support a greater number of networks, but at the cost of having fewer host identifier bits. This trade-off reduces the number of hosts that can be created on each network.
The values in Table 4-1 for the number of hosts each address class supports might appear low. For example, an 8-bit binary number can have 256 (that is, 28) possible values, not 254, as shown in the table for the number of hosts on a Class C address. The value 254 is used because the original IP addressing standard states that you can’t assign the “all zeros” or “all ones” addresses to individual hosts. The “all zeros” address identifies the local network, not a specific host, and the “all ones” identifier always signifies a broadcast address. You cannot assign either value to an individual host. Therefore, to calculate the number of possible network or host addresses you can create with a given number of bits, you use the formula 2x–2, where x is the number of bits.
Classless Inter-Domain Routing
When IP was developed, no one imagined that the 32-bit address space would ever be exhausted. In the early 1980s, there were no networks that had 65,536 computers, never mind 16 million, and no one worried about the wastefulness of assigning IP addresses based on these classes.
Because of that wastefulness, classful addressing was gradually obsolesced by a series of subnetting methods, including variable length subnet masking (VLSM) and eventually Classless Inter-Domain Routing (CIDR). CIDR is a subnetting method that enables administrators to place the division between the network bits and the host bits anywhere in the address, not just between octets. This makes it possible to create networks of almost any size.
CIDR also introduces a new notation for network addresses. A standard dotted-decimal address representing the network is followed by a forward slash and a numeral specifying the size of the network-identifying prefix. For example, 192.168.43.0/24 represents a single Class C network that uses a 24-bit network identifier, leaving the other 8 bits for up to 254 host identifiers. Each of those hosts would receive an address from 192.168.43.1 to 192.168.43.254, using the subnet mask 255.255.255.0.
However, by using CIDR, an administrator can subnet this address further by allocating some of the host bits to create subnets. To create subnets for four offices, for example, the administrator can take two of the host identifier bits, changing the network address in CIDR notation to 192.168.43.0/26. Because the network identifier is now 26 bits, the subnet masks for all four networks will now be 11111111.11111111.11111111.11000000 in binary form, or 255.255.255.192 in standard decimal form. Each of the four networks will have up to 62 hosts, using the IP address ranges shown in Table 4-2.
TABLE 4-2 Sample CIDR 192.168.43.0/26 networks
If the administrator needs more than four subnets, changing the network address to 192.168.43.0/28 adds two more bits to the network address for a maximum of 16 subnets, each of which can support up to 14 hosts. The subnet mask for these networks would therefore
Public and private IPv4 addressing
For a computer to be accessible from the Internet, there must be an IP address that is both registered and unique, either on the server or a device providing access to it, such as a NAT router. All web servers on the Internet have registered addresses, as do all other types of Internet servers.
The IANA is the ultimate source for all registered addresses. Managed by the Internet Corporation for Assigned Names and Numbers (ICANN), this organization allocates blocks of addresses to regional Internet registries (RIR), which, in turn, allocate smaller blocks to Internet service providers (ISPs). An organization that wants to host a server on the Internet typically obtains a registered address from an ISP.
Registered IP addresses are not necessary for workstations that merely access resources on the Internet. If organizations used registered addresses for all their workstations, the IPv4 address space would have been depleted long ago. Instead, organizations typically use private IP addresses for their workstations. Private IP addresses are blocks of addresses that are allocated specifically for private network use. Anyone can use these addresses without registering them, but they cannot make computers using private addresses accessible from the Internet without using a specialized technology such as network address translation (NAT).
The three blocks of addresses allocated for private use are as follows:
– 192.168.0.0/16 Most enterprise networks use addresses from these blocks for their workstations. It doesn’t
matter if multiple organizations use the same addresses, because the workstations are never directly connected to the same network.
In most cases, enterprise administrators use addresses in one of the private IP address ranges to create the subnets they need. If you are building a new enterprise network from scratch, you can choose any one of the private address blocks and make things easy on yourself by subnetting along the octet boundaries. For example, you can take the 10.0.0.0/8 private IP address range and use the entire second octet as a subnet ID. This enables you to create up to 256 subnets with as many as 65,536 hosts on each one. The subnet masks for all the addresses on the subnets will be 255.255.0.0 and the network addresses will proceed as follows:
When you are working on an existing network, the subnetting process is likely to be more difficult. You might, for example, be given a relatively small range of addresses and be asked to create a certain number of subnets from them. To do this, you use the following procedure.
1. Determine how many subnet identifier bits you need to create the required number of subnets.
2. Subtract the subnet bits you need from the host bits and add them to the network bits.
3. Calculate the subnet mask by adding the network and subnet bits in binary form and converting the binary value to decimal.
4. Take the least significant subnet bit and the host bits, in binary form, and convert them to a decimal value.
5. Increment the network identifier (including the subnet bits) by the decimal value you calculated to determine the network addresses of your new subnets.
Using the example earlier in this chapter, if you take the 192.168.43.0/24 network address and allocate two extra bits for the subnet ID, you get a binary subnet mask value of 11111111.11111111.11111111.11000000 (255.255.255.192 in decimal form, as noted earlier).
The least significant subnet bit plus the host bits gives you a binary value of 1000000, which converts to a decimal value of 64. Therefore, if you know that the network address of your first subnet is 192.168.43.0, the second subnet must be 192.168.43.64, the third 192.168.43.128, and the fourth 192.168.43.192, as shown in Table 4-2.
In addition to simplifying network notation, CIDR also makes possible a technique called IP address aggregation or supernetting, which can help reduce the size of Internet routingtables. A supernet is a combination of contiguous networks that all contain a common CIDR prefix. When an organization possesses multiple contiguous networks that can be expressed as a supernet, it is possible to list those networks in a routing table by using only one entry instead of many.
For example, if an organization has the following five subnets, standard practice would be to create a separate routing table entry for each one.
To create a supernet encompassing all five of these networks, you must isolate the bits
they have in common. When you convert the network addresses from decimal to binary, you
get the following values:
In binary form, you can see that all five addresses have the same first 21 bits. Those 21 bits become the network identifier of the supernet address, as follows:
After zeroing out the host bits to form the network address and converting the binary number back to decimal form, as follows, the resulting supernet address is 172.16.40.0/21.
This one network address can replace the original five in routing tables duplicated throughout the Internet. This is just one example of a technique that administrators can use to combine dozens or even hundreds of subnets into single routing table entries.
Assigning IPv4 addresses
In addition to understanding how IP addressing works, a network administrator must be familiar with the methods for deploying IP addresses to the computers on a network.
To assign IPv4 addresses, there are three basic methods:
– Manual configuration
– Dynamic Host Configuration Protocol (DHCP)
– Automatic Private IP Addressing (APIPA)
The advantages and disadvantages of these methods are discussed in the following sections.
MANUAL IPV4 ADDRESS CONFIGURATION
Configuring a TCP/IP client manually is neither difficult nor time-consuming. Most operating systems provide a graphical interface that enables you to enter an IPv4 address, a subnet mask, and various other TCP/IP configuration parameters. To configure IP address settings in Windows Server 2012 R2, you use the Internet Protocol Version 4 (TCP/IPv4) Properties sheet, as shown in Figure 4-2.
FIGURE 4-2 The Internet Protocol Version 4 (TCP/IPv4) Properties sheet
When you select the Use The Following IP Address option, you can configure the following IP address options:
– IP Address Specifies the IP address on the local subnet that will identify the network interface in the computer
– Subnet Mask Specifies the mask associated with the local subnet
– Default Gateway Specifies the IP address of a router on the local subnet, which the system will use to access destinations on other networks
– Preferred DNS Server Specifies the IP address of the DNS server the system will use to resolve host names into IP addresses
The primary problem with manual configuration is that a task requiring two minutes for one workstation requires several hours for 100 workstations and several days for 1,000.
Manually configuring all but the smallest networks is impractical, and not just because it is slow. You must also track the IPv4 addresses you assign and make sure each system has an address that is unique. This can present formidable logistical challenges, which is why few network administrators choose this option.
DYNAMIC HOST CONFIGURATION PROTOCOL (DHCP)
DHCP is an application-layer protocol that together enable administrators to dynamically allocate IP addresses from a pool. Computers equipped with DHCP clients automatically contact a DHCP server when they start, and the server assigns them unique addresses and all the other configuration parameters the server is configured to provide.
The DHCP server provides addresses to clients on a leased basis, and after a predetermined interval, each client either renews its address or releases it back to the server for reallocation. DHCP not only automates the address assignment process but also keeps track of the addresses it assigns, preventing address duplication on the network.
AUTOMATIC PRIVATE IP ADDRESSING (APIPA)
APIPA is the name assigned by Microsoft to a DHCP failover mechanism used by all the current Microsoft Windows operating systems. On Windows computers, the DHCP client is enabled by default. If, after several attempts, a system fails to locate a DHCP server on the network, APIPA takes over and automatically assigns an address on the 169.254.0.0/16 network to the computer.
For a small network that consists of only a single local area network (LAN), APIPA is a simple and effective alternative to installing a DHCP server. However, for installations consisting of multiple LANs connected by routers, administrators must take more positive control over the IP address assignment process. This usually means deploying one or more DHCP servers in some form.
This article is a part of 70-410 Installing and Configuring Windows Server 2012 Prep course, more articles in this course are :
70-410 Installing and Configuring Windows Server 2012 Prep course includes following practice tests: