Add Book to My BookshelfPurchase This Book Online

Chapter 2 - Internet Protocol (IP) Addresses

Cisco Multicast Routing & Switching
William R. Parkhurst
  Copyright © 1999 The McGraw-Hill Companies

IP Address Format
An IP address is a 32-bit number that can be represented in many formats. Routers and computers are designed to operate efficiently on binary numbers, so a binary representation is a natural way for them to store and manipulate IP addresses. A typical 32-bit IP address to a router would look something like this:
10011100000110100001111000111100
This may be a fine representation for routers, but for us it is not the most appealing method. So let’s take a look at the binary representation and see if we can find a way to represent these numbers using a method that may be a bit more palatable. One way is to simply represent the IP address as a decimal number. The binary number used in the example above has a decimal value of
2,618,957,372
This may be easier to read, but the size of the number makes it cumbersome to work with. Another representation scheme is to break up the binary number into pieces and represent each piece as a decimal number. A natural size for binary pieces is 8 bits, which is the familiar “byte” or not-as-familiar “octet” (octet is the telecommunication term, but the two words can be used interchangeably). So let’s take our binary number, write it using groups of 8 bits (four octets) and then represent each group as a decimal number.
10011100
00011010
00011110
00111100
156
26
30
60
Table 2-1: Range of IP Addresses
Low
High
Binary
0000000000000000000
0000000000000
11111111111111111111111111111111
Decimal
0
4,294,967,295
Dotted Decimal
0.0.0.0
255.255.255.255
We don’t need all that space between the numbers, so let’s use a period, or dot, as a separator. Now our IP address has the form
156.26.30.60
which is referred to as dotted decimal notation. How many IP addresses are there? The range of IP addresses in all our representation schemes is shown in Table 2-1.
Theoretically, there are 4,294,967,296 possible IP addresses, although we will discover in this chapter that the actual usable number of IP addresses is much smaller.
Classful IP Addressing
For a protocol to be routable, its address structure must be hierarchical, meaning that the address must contain at least two parts. For IP addresses, these parts are the network portion and the host portion. A host is an end station such as a computer workstation, router interface, or printer, while a network consists of one or more hosts. Figure 2-1 is a simple network consisting of two networks connected by a two-port router. The address of each host on this network, including the router interfaces, is given by its network and host numbers.
Figure 2-1: Hierarchical addressing
When the IP address scheme was designed, the decision was made to create five classes of IP addresses simply named Class A, B, C, D, and E. The logic behind the first three network classes was that the IP addressing scheme would be used for a few networks with a large number of hosts (Class A), a moderate number of networks with a moderate number of hosts (Class B), and a large number of networks with a small number of hosts (Class C). Class D addresses would be used for multicasting and Class E addresses would be reserved for experimental use.
Having three classes of IP addresses to handle different size networks requires that the network part and the host part for each address class have unequal sizes. The breakdown for the allocation of bits for the network and host portion for the first four IP address classes is shown in Figure 2-2.
Figure 2-2: Classful IP address structure
Class A addresses use 8 bits to identify the network and 24 bits to identify the host with the most significant bit of the first octet set to zero. Class B addresses use 16 bits to identify the network and 16 bits to identify the host with the first two bits of the first octet set to 1 0. Class C addresses use 24 bits to identify the network and 8 bits to identify the host with the first 3 bits of the first octet set to 1 1 0.
Class D or multicast addresses differ from unicast addresses in their interpretation.
A Class A, B, or C address is used to identify a network and a host on that network. A Class D multicast address is used to identify a group of receivers and senders of multicast traffic. Additionally, multicast senders and receivers can be present on any network.
If we examine the first octet of each class, we can see that the range of values for the four classes is
00000001 (1)—01111110 (126) for Class A
10000000 (128)—10111111 (191) for Class B
11000000 (192)—11011111 (223) for Class C
11100000 (224)—11101111 (239) for Class D
Looking at the first octet of the IP address can easily identify the network class. For example, the address used previously, 156.26.30.60, is a Class B address because the first octet is between 128 and 191. Another (and more tedious) way to identify the class is to represent the first octet of the address in binary and see what the first couple of bits are set to. For example, 156 equals 10011100 in binary. The first two bits are 1 0, so according to Figure 2-1, this is a Class B address.
How many Class A, B, and C networks are there? Class A networks use 7 bits for the network ID, so 128 Class A networks are possible. Class B addresses use 6 bits from the first octet and all 8 bits of the second octet, so there are 16,384 networks (64 x 256), 64 from the first octet and 256 from the second octet. Class C addresses use 5 bits from the first octet, 8 bits from the second octet, and 8 bits from the third octet, so there are 2,097,152 possible Class C networks (32 x 256 x 256). Class D addresses are not associated with networks but with multicast groups.
Class A, B, and C addresses are unicast addresses. Each IP address in the first three classes is used to identify a particular and unique Internet host, while a Class D address is used to identify a group of hosts belonging to a particular IP multicast group. The multicast addresses are in the range 224.0.0.0 through 239.255.255.255 (currently assigned multicast addresses are listed in Appendix B). The range of addresses between 224.0.0.0 and 224.0.0.255, inclusive, is reserved for the use of routing protocols and other low-level topology discovery or maintenance protocols, such as gateway discovery and group membership reporting. Multicast routers should not for ward any multicast datagram with destination addresses in this range, regardless of the TTL.
How many hosts can each network have? Class A networks have 24 bits to identify a host; this equals 1,677,216 possible hosts per network! Class B networks have 16 bits to identify a host, which equals 65,536 hosts, and Class C networks have 8 bits to identify a host, which equals 256 possible hosts. Table 2-2 lists the capabilities for Class A, B, and C addresses.
Table 2-2: IP Classful Address Capabilities
Class
Networks
Hosts
A
0,000,126
16,777,214
B
0,016,384
00,065,534
C
2,097,152
00,000,254
You may have noticed that the number of hosts listed in Table 2-1 is always two less than the number calculated. The reason for this discrepancy is that two special addresses can’t be assigned to a host. A host address of all ones is the broadcast address for a particular network, and a host address of all zeros is used by a host to temporarily identify itself (“this host”) until it has been assigned an IP address. Only 126 Class A networks exist because network 0 cannot be used, and network 127 is reserved for the loopback address that is used for testing interprocess communication. When a host sends a packet to 127.0.0.1, the data is not sent on the network but is returned immediately to the sending host.
The IP address blocks listed below have been reserved for private Internets.
11110.0.0.0 — 10.255.255.2550
1172.16.0.0 — 172.31.255.2550
192.168.0.0 — 192.168.255.255
These private IP addresses should never be advertised on the Internet because they can be used by any private Internet. If these addresses are used, then a technique such as network address translation would need to be used in the private Internet to be connected to the public Internet.
Classful IP address assignments can be extremely inefficient as the following design problem demonstrates. Assume we are designing a network for a campus that has approximately 1500 nodes or end-stations. Also assume that the predicted future growth of the network over the next five years will be no more than 5000 nodes. At first glance, it would seem that a Class B network would suffice for the current network requirements and also leave plenty of room for future growth. Having 1500-plus nodes (5000-plus in the future) would be a very large ethernet collision domain. If we want to limit the number of nodes on an ethernet segment to no more than 100, then we need 50 networks to accomplish our design. Regardless of which class of IP network addresses we decide to use (assuming we could choose any addresses we want), there will be an enormous waste of IP addresses as shown in Table 2-3.
Table 2-3: IP Address Design Inefficiencies
Network Class
Addresses Required
Addresses Available
Addresses Wasted
A
100
16,777,214
16,777,114
B
100
00,065,534
00,065,434
C
100
00,000,254
00,000,154
Now multiply each entry in Table 2-3 by the 50 networks that are required and you can easily see that regardless of which address class we choose, an enormous number of IP addresses will be wasted. Also, if we are to have connectivity to the Internet, then the network will have to advertise 50 networks to the Internet routers. Multiply that by the number of campuses in the world and you have a situation where the size of the Internet routing tables becomes unmanageable. How do we overcome these problems? In a word, subnetting.

 


 
Books24x7.com, Inc © 2000 –  Feedback