IP network addresses should be assigned by one person at your company. We recommend that a network administrator assign IP network addresses. Therefore, to obtain a new address, see your network administrator. If you are a network administrator this section helps you assign IP network addresses.
For a node using the TCP/IP protocol suite to communicate with other nodes, including nodes on other private networks and on the Internet, an IP network address is required. Your IP network address could be determined in one of the following ways:
If you are accessing the Internet through an Internet Service Provider (ISP), you can be assigned an IP address by your ISP.
If you are connected directly to the Internet community or if you cannot connect to the Internet using the registered IP address range you were assigned by your ISP, contact the following organization:
If your network is not attached to the public Internet community, you can select an arbitrary IP network number. However, if you plan to attach your network to the Internet later, you should use the guidelines in RFC 1918.
The addresses for all the nodes on the network must meet the following criteria:
All addresses within a network must use the same prefix. For example, any node on network 129.47 must have an address in the form 129.47.x.x.
Each node must have a unique IP address.
Each 4-byte IP address is divided into two parts:
A network portion, which identifies the network
A host portion, which identifies the node
IP addresses are differentiated into three classes, based on the two most significant bits of the first byte. This is done so that routers can efficiently extract the network portion of the address.
This division can occur at any one of three locations within the 32-bit address. These divisions correspond to the three IP address classes: Class A, Class B, and Class C. Regardless of address class, all nodes on any single network share the same network portion; each node has a unique host portion.
The following address classes are discussed in this section:
A Class A IP address consists of a 1-byte network portion followed by a 3-byte host portion, as shown in Figure 1-6. The highest-order bit of the network portion is always set to 0. Thus, within an internetwork, there can be a total of 126 Class A networks (1 through 126), with more than 16 million nodes in each (networks 0 and 127 are reserved).
The format of a Class A address is as follows:
0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
where n represents the network address and h represents the host address.
Class A addresses contain 7 bits of network address and 24 bits of host address.
Figure 1-6 Class A IP Address
A Class B IP address consists of a 2-byte network portion followed by a 2-byte host portion, as shown in Figure 1-7. The two highest-order bits of the network portion are always set to 10. Thus, within a single internetwork there can be approximately 16,000 Class B networks (128.0 through 191.255), with more than 65,000 nodes in each.
The format of a Class B address is as follows:
10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
where n represents the network address and h represents the host address.
Class B addresses contain 14 bits of network address and 16 bits of host address.
Figure 1-7 Class B IP Address
A Class C IP address consists of a 3-byte network portion followed by a 1-byte host portion, as shown in Figure 1-8. The three highest-order bits of the network portion are always set to 110. Within a single internetwork, there can be approximately 2 million Class C networks (192.0.0 through 223.255.255), with up to 254 nodes in each.
The format of a Class C address is as follows:
110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
where n represents the network address and h represents the host address.
Class C addresses contain 21 bits of network address and 8 bits of host address.
Figure 1-8 Class C IP Address
The first byte of an IP address identifies which of the three network classes that address belongs to. The ranges for that first byte are as follows:
Class A: 1 to 126 (1.h.h.h to 126.h.h.h)
Class B: 128 to 191 (128.n.h.h to 191.n.h.h)
Class C: 192 to 223 (192.n.n.h to 223.n.n.h)
An IP address beginning with 154 is a Class B address. The first two bytes of the address are represented by n for the network portion of the address, and the last two bytes are represented by h for the host portion. For example, an IP address of 154.1.0.3 means the IP network portion is 154.1.0.0 and the host portion on that network is #.#.0.3.
The network portion of an IP address should be the same for all nodes on that network. Each node connected to the network must have a unique IP host address assigned to it.
HINT:The key to selecting a number for the host portion of the IP address is to ensure that the number selected is unique; that is, that no other host on the network has the same IP address.
When selecting an IP address class, you must decide on both network numbers and host address portions. Because the first 1, 2, or 3 bits of the IP address determine how the entire address is to be interpreted and where the division between the network address and host address portion is to occur, you should know the consequences of your choice. When deciding on a network class, you should consider the number of IP nodes to be supported on your network and the number of networks you plan to configure.
For example, if you use Class C addresses (the first 3 bits of the IP address are 110 binary), then you are restricted to 254 nodes. However, the number of nodes available can be altered by using subnets. Before selecting an IP address class, see Section 1.7, Creating Subnets.
The IP addressing rules reserve the following types of IP addresses for special purposes:
Network addresses: IP addresses in which the host portion is set to all zeros. For example,129.47.0.0 is the network address (or network number) for a Class B network. Network addresses identify networks rather than nodes on a network. By convention, no node is ever assigned a host portion consisting of all zeros.
Broadcast addresses: Addresses in which the host portion is set to all ones. A packet with a broadcast address is destined for every node on the network. By convention, no node is ever assigned a host portion consisting of all ones.
Loopback addresses: Addresses that cause the protocol software to return data without sending traffic across a network. Network address 127.0.0.0 and all host addresses on that network (for example, 127.0.0.1) are reserved.
Multicast addresses: Addresses that are used to send packets to a group of hosts or routers. They range from 224.0.0.1 to 239.255.255.255.
Reserved addresses: Addresses in which the network portion consists of all zeros or all ones.