The IP address is the address assigned to a particular network and the host within the network.
There are two basic types of IP addresses:
IP Version 4 (IPv4): IPv4 was initially deployed in January 1983 and is commonly used in today's networks in general deployment. IPv4 addresses are 32-bit numbers displayed as four octets in dotted decimal notation (for example, 10.1.1.1). RFC 1166 specifies the IPv4 address format.
IP Version 6 (IPv6) or IPng: IPv6, also known as IPng, is a next-generation Internet protocol, with a new version designed to be an evolutionary move in Internet addressing. Growth is the basic issue because the IPv4 address is becoming increasingly strained. This scarce has laid the foundation for the next generation IP. IPv6 addresses are 128-bit numbers and are typically displayed in hexadecimal strings (for example, 2080:0:0:2:8:400:20AC:217B). Cisco Systems announced IPv6 support in Cisco IOS 12.2(2)T on May 14, 2001.
Note
For more information on IPv6, refer to http://www.cisco.com/go/ipv6.
The Internet Assigned Numbers Authority (IANA) grouped IP addresses into the following classes. Each class has its own requirements and purpose:
Class A
Class B
Class C
Class D
Class E
Class A—0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
First octet represents the network address and the remaining three octets represent the host address.
First high order bit is set to 0.
7 network bits.
24 host bits.
First byte range: 0–127.
126 Class A ranges exist (0 and 127 are reserved).
16,777,214 hosts are on each Class A.
Example: Host 10.0.0.1 on network 10.0.0.0
Class B—10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
First two octets represent the network address and the remaining two octets represent the host address.
First two high order bits are set to 1 and 0, respectively.
14 network bits.
16 host bits.
First byte range: 128–191.
65,532 hosts are on each Class B.
Example: Host 128.10.1.5 on network 128.10.0.0
Class C—110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
First three octets represent the network address, and the remaining octet represents the host address.
First three high-order bits are set to 1, 1, and 0, respectively.
21 network bits.
8 host bits.
First byte range: 192–223.
2,097,152 Class C ranges exist.
254 hosts are on each Class C.
Example: Host 192.15.1.1 on network 192.15.1.0
Class D—1110MMMM.MMMMMMMM.MMMMMMMM.MMMMMMMM
Mainly reserved as multicast addresses.
First four high-order bits are set to 1, 1, 1, and 0, respectively.
28 multicast address bits.
First byte range: 224–247 (first octet of a Class D address has a minimum value of 224 and a maximum value of 239).
Class D range is used for multicast addresses—see RFC 1112.
Example: 225.1.100.100
Class E—1111RRRR.RRRRRRRR.RRRRRRRR.RRRRRRRR
Mainly reserved for experimental and future use.
First four high bits are set to 1, 1, 1, and 1, respectively.
28 reserved address bits.
First byte range: 248–255 (first octet of a Class E address starts with 240).
In addition to being used for experimentation, Class E addresses are reserved for future use.
Note
N denotes the network ID bits.
H denotes the host ID bits.
M denotes the multicast address bits.
R denotes the reserved bits.
The class of an IP address can be established from the first four bits of the first byte of the IP address. The value of the first octet in the IP address resolves to the class within the range of which the IP address falls. Table 2-1 summarizes the possible range of IP addresses for the different IP address classes that were previously discussed.
Table 2-2 shows the maximum number of networks and hosts that can be derived within each class.
Class | Max Number of Networks | Max Number of Hosts per Network |
---|---|---|
A | 126 (2^7–2) | 16777214 (2^24–2) |
B | 16384 (2^14) | 65534 (2^16–2) |
C | 2097152 (2^21) | 254 (2^8–2) |
D | — | — |
E | — | — |
Note
Class A—The maximum number of networks is reduced by 2 to account for the reserved network IP address of 0.xxx.xxx.xxx and 127.xxx.xxx.xxx.
The maximum number of hosts per network is also reduced by 2 to account for the reserved host IP address in which all the host ID address bits are either 1 or 0—that is, the network address and the broadcast address.
Under the present IPv4 addressing scheme, the IP address space is divided into two types: public IP address space and private IP address space. The public IP address space is routable via the Internet and is managed by one of the Regional Internet Registries (RIR). A small part of the address range, shown in Table 2-1, has been set aside and designated as a "reserved" or "private" IP address range, as documented in RFC 1918. These addresses are reserved for use by private networks and are not routed on the Internet. These private IP address ranges must be filtered on border routers so that no traffic with a private address as source is allowed from the Internet. Table 2-3 includes the details of the private address ranges.
Class | Range of Addresses |
---|---|
A | 10.0.0.0 through 10.255.255.255 |
B | 172.16.0.0 through 172.32.255.255 |
C | 192.168.0.0 through 192.168.255.255 |
In addition to the previously described RFC 1918-based private addresses range, the IANA has blocked a special Class B private address range and reserved it for automatic private IP addressing (APIPA). For example, when using Dynamic Host Configuration Protocol (DHCP), if the DHCP server cannot be found for an assigned IP address, the operating system will automatically assign addresses from this special block to enable communication.
Note
The RIRs are nonprofit organizations charged to manage the role of management for allocating Internet number resources distribution, such as globally unique IP addresses (IPv4 and IPv6) and autonomous system numbers (within their assigned regions). For more information, visit the RIR of your region:
APNIC | http://www.apnic.net |
ARIN | http://www.arin.net |
LACNIC | http://www.lacnic.net |
RIPE NCC | http://www.ripe.net |
AfriNIC | http://www.afrinic.net |