Vous êtes sur la page 1sur 13

# Discovery II Module 4 Planning the Addressing Structure

## 4.1 IP Addressing in the LAN

The 8-bit network designation made sense at first, because originally people thought that the Internet would be made up of a few very large universities, governments, and military organizations. Using only 8 bits for the network number enabled the creation of 256 separate networks, each containing over 16 million hosts. It soon became apparent that more organizations, and eventually individuals, would be connecting to the Internet to do research and to communicate with others. More networks were required, and a way to assign more network numbers had to be created.

In order to cope with the demand, more unique network numbers were required. To create more possible network designations, the 32-bit address space was organized into five classes. Three of these classes, A, B, and C, provide addresses that can be assigned to individual hosts or networks. The other two classes, D and E, are reserved for multicast and experimental use. Dividing the original eight-bit networks into smaller classes increased the number of available network designations from 256 to over two million. Until this change, routers examined only the first 8-bits of an IP address for the network ID. Now how would routers know to look beyond the first 8-bits to identify Class B or C networks? It was decided to divide the networks in a manner that would make it easy for routers to determine the correct number of network ID bits. The class of a network is indicated by the values of the first few bits of the IP addresses, called the high order bits. If the first bit is 0, the network is a Class A and the first octet represents the network ID. When the first bit is 1, the router examines the second bit. If that bit is 0, the network is a Class B, and the router uses the first 16 bits for the network ID. If the first 3 bits are 110, it indicates a Class C address. Class C addresses use the first 24 bits, or three octets, to designate the network. Networks grew throughout the 1980s and into the 1990s, with many organizations adding hundreds, even thousands, of hosts. An organization with thousands of hosts should have been well served by a Class B network. Unfortunately there were some problems. Organizations with thousands of hosts rarely had them all in one place. Some organizations wanted to separate individual departments from each other for security purposes. To solve these problems, the organizations leading the development of the Internet chose to partition their networks into mini-networks, or subnets, using a process called subnetting. How does a single class B network get split into multiple networks, in a way that each subnet is treated as a separate network?

## 4.1.2 Subnetting a Network

Most networks today use a private address structure. Only the devices that connect directly to the Internet are assigned registered Internet routable addresses. By default, most consumer networking devices give out private addresses through DHCP.

## 4.1.3 Classful Subnetting

A classed IP address hierarchy has two levels: a network and a host. In classful routing, the first three leading bit values determine whether an IP address is either class A, B, or C. After an address is identified by class, the number of bits that make up the network ID and the number of bits that make up the host ID are known. Default subnet masks are used to tell the network and host bits apart. Subdividing a network adds a level to the network hierarchy. Now there are three levels: a network, a subnetwork, and a host. How are these three levels identified? In classful addressing, the number of network bits is fixed. There are 8 bits that designate a Class A network, 16 bits for a Class B, and 24 for a Class C. That leaves the host bits as the only part of the IP address with any flexibility to modify. The available host bits can be divided into a subnet identifier ID and a host ID. The decision about how many host bits to use for the subnet ID is a big planning decision. There are two considerations when planning subnets: the number of hosts on each network, and the number of individual local networks needed. The table for the subnet possibilities for the 192.168.1.0 network shows how the selection of a number of bits for the subnet ID affects both the number of possible subnets and the number of hosts that can be in each subnet.

Routers distinguish between networks by using the subnet mask to determine which bits make up the network ID and which bits make up the host portion of the address. When a
network is partitioned, the router needs a modified or custom subnet mask to distinguish the subnets from each other.

A default subnet mask and a custom subnet mask differ from each other as follows: Default subnet masks only change on octet boundaries. For instance, the default subnet mask for a Class A network is 255.0.0.0. Custom subnet masks take bits from the host ID portion of the IP address and add them to the default subnet mask.
To create a custom subnet mask, the first question to answer is how many bits to take from the host ID to add to the subnet mask.

The number of bits for a subnet ID that will be added to the subnet mask depends on several factors. In this example, those factors have been limited for the sake of simplicity. Not all situations will be so simple. For instance, in an organization assigned a Class C address, what if there are multiple networks, one network with 7 hosts, another with 60 hosts, and a third with 34 hosts? In classed subnetting, all subnets must be the same size, which means that the minimum number of hosts that each subnet must support is 60. To support a minimum number of 60 hosts, at least 6 bits are required in the host ID, which leaves 2 bits for the subnet identifier. Under these conditions, four subnets can be created, each with 64 hosts. Devices on the network are informed of the subdivision by the use of the subnet mask. Now, it is possible to tell what subnet an IP address is in and to design simple classful subnetted IP address schemes.

## 4.1.5 Communicating between Subnets

Think of a subnet as a small network. When a network is split into two subnets, there are actually two separate networks. Remember that routers connect networks. In order for a device in one subnet to communicate with a device in the other, a router is required. In this particular network, there are two routers: the wireless ISR and the 1841 ISR.

The configuration must ensure that interfaces on routers that connect to each other are assigned IP addresses in the same network or subnet, and that clients are assigned default gateways that they can reach. The interface that connects the wireless ISR to the 1841 ISR must be on a common network. Here the common link shows the two routers connected on the 192.168.1.16/29 subnet with IP addresses 192.168.1.17/29 and 192.168.1.18/29.

What can you gather from the customer subnet mask of 255.255.255.248? 1. 192.168.1.0 has been subnetted 2. That five bits were borrowed 255.255.255.1111100 = 248 There are 6 IP addresses listed. How many SUBnetworks are being used? 3 Subnet work x.x.x.0 .8 .16 .24 .32 .40 1st useable address .1 .9 .17 .25 .33 And so on Range .1-.6 .9-.14 .17-.22 .25-.30 .33-.38 Last useable address .6 .14 .22 .30 .38 Broadcast address .7 .15 .23 .31 .49

4.1.6 IPv6
CIDR and private IP addressing were developed to provide a temporary solution to the problem of IP address depletion. These methods, though useful, did not create more IP addresses. IPv6 does that. IPv6 was first proposed in 1998 with RFC 2460.

## 4.2 NAT and PAT

4.2.1 Basic Network Address Translation (NAT)

## 4.2.3 Static and Dynamic NAT

One of the advantages of using NAT is that individual hosts are not directly accessible from the public Internet. But what if one or more of the hosts within a network are running services that need to be accessed from Internet connected devices, as well as devices on the local private LAN?