• Aucun résultat trouvé

Network Addressing

Dans le document Study Guide (Page 82-86)

The network address collectively identifies each network. Every interface on the same network shares that network address as part of its IP address. In the IP address 172.16.30.56, for example, 172.16.0.0 is the network address, by default, because of the classful boundary.

The host address singularly identifies each interface on a network segment. This part of the address must be unique because it identifies a particular interface—an individual—as opposed to a network, which is a group. Of course, host addresses may be duplicated across subnet boundaries. Otherwise, IP address space would be grossly limited. Nevertheless, when the entire 32-bit IP address is taken as a unit, by combining the network and host portions, it becomes unique across the accessible internetwork.

In the sample IP address 172.16.30.56, 30.56 is the host address because of the default Class B boundary.

The designers of the Internet decided to create classes of networks based on network size. For the small number of networks possessing a very large number of nodes, they created the Class A network. At the other extreme is the Class C network, reserved for the numerous networks with a small number of nodes. The class distinction for networks between very large and very small is predictably called a Class B network. The default division of an IP address into a network and node address is determined by the class designation of a network. Table 2.1 provides a summary of the three classes of networks, which will be described in much more detail throughout this chapter, plus special classes D and E.

To ensure efficient routing, Internet designers defined a mandate for the leading bits section of the address for each network class. For example, because a router knows that a Class A network address always starts with 0, the router can determine the default boundary between network and host portions after reading only the first bit of its address. This capability is invaluable when the router has no way of determining the actual prefix length of an address. It allows at least a min-imum level of functionality and reachability.

T A B L E 2 . 1 The Three Classes of IP Addresses Used in Networks Today

Class

Leading Bit Pattern

Default

Subnet Mask Address Range

Number of Addresses per Network

A 0 255.0.0.0 1.0.0.0–126.255.255.255 16,777,214

B 10 255.255.0.0 128.0.0.0–191.255.255.255 65,534

C 110 255.255.255.0 192.0.0.0–223.255.255.255 254

D 1110 None 224.0.0.0–239.255.255.255 Multicast

E 1111 None 240.0.0.0–255.255.255.255 Experimental

4421.book Page 41 Tuesday, February 1, 2005 2:52 PM

42 Chapter 2 IP Addressing

This is where the address schemes define the difference between a Class A, a Class B, a Class C, a Class D, and a Class E address. Class D is used for multicast addresses and Class E is reserved for experimental uses. Recall from Chapter 1, “Routing Principles,” that a neat trick that you can use to almost immediately determine the class of an IP address in binary form is to label the first four bits A, B, C, and D. Wherever the first zero lies is the class of address you are dealing with.

No 0s in the first four bits signify a Class E address. Try it.

Some IP addresses are reserved for special purposes, and network administrators shouldn’t assign them to nodes. Table 2.2 lists some of the members of this exclusive little club and explains why they’re included in it. For a more complete list of special-use addresses, consult RFC 3330,

“Special-Use IPv4 Addresses,” and RFCs 1700 (page 3) and 3232, “Assigned Numbers.”

T A B L E 2 . 2 Reserved IP Addresses

Address Function

Network address 0 with node address of all 0s (0.0.0.0/8)

Original Unix general broadcast. Interpreted to mean

“this network or segment.” Source address only.

Network address 0 with node address of all 0s (0.0.0.0/32)

Interpreted to mean “this host on this network.”

Source address only.

Network address 0 with specific node address (0.x.x.x/8)

Interpreted to mean “specified host on this net-work.” Source address only.

Entire IP address set to all 0s (0.0.0.0/0) Used by devices to generate the default route.

Network 127 Reserved for loopback tests. Designates the local node and allows that node to send a test packet to itself without generating network traffic. Should never appear outside a host.

Node address of all 0s Interpreted to mean “this network.” Mainly appears in routing tables and engineering docu-ments to refer to the entire network in general, but to no particular node. Should never appear as a source or destination address in a packet header.

Node address of all 1s A directed broadcast. Interpreted to mean “all nodes” on the specified network; for example, 128.2.255.255/16 means “all nodes on network 128.2” (Class B address). Destination address only.

Entire IP address set to all 1s (same as 255.255.255.255)

Broadcast to all nodes on the current network;

sometimes called a limited broadcast or an “all ones broadcast.” Destination address only, not to appear outside local segment.

Review of IPv4 Addressing 43

Let’s now take a look at the different network address classes, which can be assigned to an individual host.

Class A Addresses

In a Class A address, the first byte—or octet—is assigned to the network address, and the three remaining bytes are used for the node addresses, by default. The Class A format is

Network.Node.Node.Node

For example, in the IP address 49.22.102.70, 49 is the network address and 22.102.70 is the node address. Every machine on this particular network would have the distinctive network address of 49.

Class A network addresses have the first bit of the first byte set to 0 by definition, and the seven remaining bits are available for IANA manipulation. Thus, the maximum number of Class A networks that can be created is 128. Why? Because each of the seven bit positions can either be 0 or 1, thus 27 or 128. But to complicate things further, it was also decided that the network address of all 0s (0000 0000) would be reserved to designate the default route and other special-use addresses (see Table 2.2 earlier in this chapter). Thus, the actual number of usable Class A network addresses is 128 minus 1, or 127. However, the address 127 is reserved for diagnostics, so that can’t be used, which means that you can use only numbers 1 through 126 in the first octet to designate Class A networks.

It can also be argued that the total number is 125, because Class A network 10 is reserved for private (intranet) use by RFC 1918. RFCs 1700 and 3330 expose still other reserved Class A networks. Still others, visible as reserved via a brute-force journey through the American Reg-istry for Internet Numbers’ (ARIN—arin.net) whois service, reveal why there are precious few Class A addresses in the wild, all of which have been spoken for.

Each Class A address has three bytes (24 bit positions) for the host address of a machine.

Thus, there are 224—or 16,777,216—unique combinations and, therefore, precisely that many possible unique node addresses for each Class A network. Because addresses with the two pat-terns of all 0s and all 1s in the host ID are reserved, the actual maximum usable number of nodes for a Class A network is 224 minus 2, which equals 16,777,214.

Here’s an example of how to figure out the valid host IDs in a Class A network:

10.0.0.0 All host bits off is the network address.

10.255.255.255 All host bits on is the broadcast address.

The valid hosts are the numbers in between the network address and the broadcast address:

10.0.0.1 through 10.255.255.254. Note that 0s and 255s are valid in the second, third, or even last octet of the IP address. All you need to remember when trying to find valid host addresses is that the host bits cannot all be turned off or on at the same time.

As alluded to earlier, when you request a network number from ARIN, don’t expect to be assigned a Class A address. These have all been taken for quite some time. Big names such as HP and IBM got in the game early enough to have their own Class A network. However, a check of the Inter-net Assigned Numbers Authority (IANA) records shows that several corporations were handed Class A addresses back in 1995, and that Stanford University’s Class A was given back to IANA in

4421.book Page 43 Tuesday, February 1, 2005 2:52 PM

44 Chapter 2 IP Addressing

July 2000. The records also indicate that the IANA has control of many Class A addresses, ones that have not been allocated to regional ISPs. A company can also buy another company to get a Class A network ID. For example, Compaq got the 16 network by acquiring Digital.

Class B Addresses

In a Class B address, the first two bytes are assigned to the network address, and the remaining two bytes are used for host addresses, by default. The format is

Network.Network.Node.Node

For example, in the IP address 172.16.30.56, the network address is 172.16, and the host address is 30.56.

With a network address being two bytes of eight bits each, there would be 65,536 unique combinations. But the Internet designers decided that all Class B addresses should start with the two binary digits 10. This leaves 14 bit positions for IANA to manipulate; therefore, there are 16,384 unique Class B addresses.

A Class B address uses two bytes for node addresses. This is 2 to the power of 16 minus the two reserved patterns (all 0s and all 1s in the host portion), for a total of 65,534 possible node addresses for each Class B network.

Here is an example of how to find the valid hosts in a Class B network:

172.16.0.0 All host bits turned off is the network address.

172.16.255.255 All host bits turned on is the broadcast address.

The valid hosts would be the numbers in between the network address and the broadcast address: 172.16.0.1 through 172.16.255.254.

Just as you saw with Class A addresses, all Class B addresses have also been assigned. Many universities, which were connected to the Internet in the early 1990s, in addition to many big-name organizations such as Microsoft, Cisco, Sprint, Xerox, Novell, and Sun Microsystems, have all of these addresses consumed. However, they are available under the right circumstances.

Class C Addresses

The first three bytes of a Class C address are dedicated to the network portion of the address, with only one measly byte remaining for the host address, by default. The format is

Network.Network.Network.Node

Using the example IP address 192.168.100.102, the network address is 192.168.100, and the host address is 102.

In a Class C address, the first three bit positions are always the binary 110. The calcu-lation is as follows: 3 bytes, or 24 bits, minus 3 reserved positions, equals 21 positions left for IANA manipulation. There are, therefore, 2 to the power of 21, or 2,097,152, possible Class C networks.

Each unique Class C network uses one byte for node addresses. This leads to 2 to the power of 8, or 256, minus the two reserved patterns of all 0s and all 1s in the host portion, for a total of 254 node addresses for each Class C network.

Dans le document Study Guide (Page 82-86)