IP Addressing


Each host on an IP network requires a unique IP address and a subnet mask. If a host must communicate with other hosts outside if the local network, the IP address of the default gateway must also be specified.

The IP address is a 32-bit number, represented in dotted-decimal notation format that identifies each host. An IP address consists of two parts: the network ID and the host ID. The network ID specifies the particular network or subnet that the host is on. The host ID uniquely identifies a host on a specific network or subnet. For example, with the IP address of 12.10.125.2 and a Class A subnet mask of 255.0.0.0, the network ID is 12 and the host ID is 10.125.2.

IP Address Classes

IP addresses are organized into different address classes that define the number of bits out of the 32 that are used to identify the network and which are used to identify hosts on a network (see Table 2.1). By examining the address classes you can also determine the number of networks and the number of hosts.

Table 2.1. IP Address Classes

Address Class

Range

Number of Network IDs

Number of Host IDs

Class A

1126

126

16,777,214

Class B

128191

16,834

65,534

Class C

192223

2,097,152

254


There is also a Class D and a Class E. Class D is reserved for multicasting and Class E is reserved for testing purposes. You can determine the class of an IP address by mapping the first decimal value to one of the ranges outlined in Table 2.1. For example, 198.221.10.254 would be a class C address. Class ranges are defined by the contents of the first few digits of the IP address when in binary format. A Class A address starts with 1, Class B with 10, and Class C with 110.

Private IP Address Ranges

Three ranges of IP addresses have been reserved via RFC 1918, meaning they are not valid for use on the Internet. Any public network node encountering a Private IP Address as the source or destination address in a packet will automatically drop the packet. However, you can use these private address ranges on your private network. One of the disadvantages to this is that a proxy server or NAT server is needed for Internet access because the private IP address must be mapped to or translated into a public address. In terms of advantages, private IP addressing is more cost-effective, can accommodate growth on your network, and can increase security.

If you do decide to implement a private IP address range, you can use IP addresses from any of the following classes:

Class A 10.0.0.010.255.255.255

Class B 172.16.0.0172.31.255.255

Class C 192.16.8.0.0192.168.255.255

One of the decisions you will be faced with when designing a TCP/IP network is whether you want to use a private IP address range or public IP addresses. There are disadvantages and advantages to both of them. In making your decisions, keep in mind that any computers having a direct connection to the Internet will require at least one public IP address. A public IP address is an address leased from an ISP that allows or enables direct Internet communication. But for those computers with no direct Internet connection, you have the option of using public or private addresses.

Converting an IP Address to Binary Format

IP addresses, which consist of four octets, can be converted from decimal format to binary format. When in binary format, each set of 8 bits is known as an octet. When you convert each octet to a number, the value can range from 0 to 255. When these decimal equivalents are written side-by-side separated by a period, this is known as dotted-decimal notation.

The values assigned to each of the placeholders in a single octet are as follows:

1

1

1

1

1

1

1

1

128

64

32

16

8

4

2

1


Let's take a look at an example. An IP address of 131.107.2.10 can be converted to the following binary number:

10000011 01101011 00000010 00000001

Conversely, a binary number of 11000000 11110000 00101000 11110010 can be converted to the following decimal number:

11000000 11110000 00101000 11110010

192.240.40.242

Subnet Masks

When assigning IP addresses, each host requires a subnet mask to determine which part of an IP address is used as the network ID and which is used as the host ID.

The default subnet masks for the three IP address classes are

  • Class A: 255.0.0.0

  • Class B: 255.255.0.0

  • Class C: 255.255.255.0

For example, the default subnet mask for a Class C address is 255.255.255.0, which means the first three octets identify the network and the last octet identifies the host.

The subnet mask is also used to determine whether the destination host is on the local subnet or a remote subnet. The subnet mask of the local host is compared against the IP address of the destination host and through a process known as "Anding" it is determined whether the destination IP address is the local or a remote network.

Basically the number of 1s in the binary address of the subnet mask are masked against the binary form of the IP address to determine whether the address is on the local network or a remote network.

When the bits of the subnet mask are compared against the bits in the IP address, the ANDing process converts the combinations of 1 and 0, 0 and 1, or 0 and 0 into a value of 0, and converts the combination of 1 and 1 into a value of 1.

Let's look at an example of how this process works. The source host has an IP address of 192.168.0.10 and subnet mask of 255.255.255.0. The destination host has an IP address of 192.168.20.2.

IP address

11000000 10101000 00000000 00001010 (192.168.0.10)

Subnet mask

11111111 11111111 11111111 00000000 (255.255.255.0)

AND Results

11000000 10101000 00000000 00000000

IP address

11000000 10101000 00010010 00000010 (192.168.20.20)

Subnet mask

11111111 11111111 11111111 00000000 (255.255.255.0)

AND Results

11000000 10101000 00010010 00000000


As you can see from this example, the source IP address is ANDed against the subnet mask. The destination address is ANDed against the subnet mask assigned to the source host. If the results are not the same, the destination host is on a different network or subnet. Conversely, if the results are the same, it is determined that the destination host is on the local network.

Subnetting an IP Address

Subnetting is a popular exam topic across many different Microsoft certification exams. It allows you to divide a network into smaller logical networks. Subnetting offers many benefits that include the following:

  • Reduce the size of the routing tables.

  • Reduce network traffic. Broadcast traffic can be isolated within a single logical network.

  • Provide a way to secure network traffic by isolating it from the rest of the network.

Subnetting works by taking some of the bits that would normally be used for host IDs to identify logical networks. The number of logical networks you require will determine the number of bits you take away from the host IDs.

The first step in subnetting is to determine the number of logical networks you need and the maximum number of hosts that each logical network will support. After you have determined this you can then establish the subnet mask.

The following steps outline the general process to follow:

1.

Identify the number of logical networks you will require. For example, you might require six logical networks, but you'll want to factor in future growth as well.

2.

Convert this number to binary format. Using the previous example, you would convert the number 6 to binary format to obtain a value of 00000110.

3.

Count the number of bits required to support the number of networks. Referring back to step 2, 3 bits (00000110) are required to support six subnets.

4.

Convert the number of bits to high order (left to right). If the required number of bits is 3, the high order binary value will be 11100000.

5.

Convert the binary number back to a decimal. 11100000 would be 224. If you have a class C address the subnet mask would then become 255.255.255.224.

Let's take a look at an example of subnetting a Class B address. The network ID is 131.107.0.0 and the default subnet mask is 255.255.0.0. You require 10 logical networks. To start off the process, convert the number 10 to binary format.

Convert to Binary 00001010

Convert to High Order 11110000

Convert to a Decimal 240

Based on this example, the new subnet mask will be 255.255.240.0.

When choosing a subnet mask, you also need to be able to determine the number of hosts and subnets that a given subnet mask will support. For example, the subnet mask of 255.255.255.224 would allow for eight subnets.

You can determine the number of hosts a subnet mask will support by using the following formula:

2x where x is the number of host bits used for the subnet ID

The subnet ID of 224 requires 3 bits. Using this formula, 23 equals 8 subnets.

The formula used to determine the number of hosts per subnet is (2x) -2. For this calculation, x equals the number of bits remaining for the host ID. Because 3 bits are being used for the subnet ID, this leaves 5 bits remaining (remember each octet consists of 8 bits). Because (25) -2 equals 30, each subnet can have a maximum of 30 hosts. The two host IDs are removed from the calculation because

  • The first host ID is the same as the network ID and it cannot be used as a host ID.

  • The last host ID is the broadcast address for that subnet and it cannot be used as a host ID.

If you can remember these formulas, you will be able to determine the number of subnets and hosts that a specific subnet mask will support.

Exam Alert

Be prepared to perform subnetting calculations on the exam. For example, you might be required to choose the correct subnet mask based on specific subnetting requirements. Make sure you also have the formulas down for determining the number of hosts and subnets a given subnet mask supports.




Exam Cram(c) 70-291 Implementing, Managing, and Maintaining a Windows Server 2003 Network Infrastructure
Exam Cram(c) 70-291 Implementing, Managing, and Maintaining a Windows Server 2003 Network Infrastructure
ISBN: 131516345
EAN: N/A
Year: 2006
Pages: 126

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