Internets use a consistent, global addressing scheme. Each host on an internet has a unique internet address. It is better to use internet addresses instead of existing hardware addresses because internet addresses:
Internet addresses are fields of binary values separated by a decimal point. Each field of the address is one byte. Here are some examples:
10.2.0.1 142.59.6.2 192.42.92.7
Internet addresses conform to the following rules:
Internet addresses fall into three primary categories or address classes. You usually determine the address class by the number of networks in proportion to the number of hosts at an internet site. However, a large internet like the Internet can use all three internet address classes. The address classes are as follows:
The address class determines the network mask of the address. Hosts and gateways use the network mask to route internet packets by:
The network mask is a 32-bit internet address; the bits in the network number are all set to one and the bits in the host number are all set to zero.
Table 1 lists the decimal value of each address class with its corresponding network mask. The first byte of the address determines the address class.
Address Class Mask | First Byte | Network Mask |
---|---|---|
A | 1. to 127. | 255.0.0.0 |
B | 128. to 191. | 255.255.0.0 |
C | 192. to 233. | 255.255.255.0 |
D | 224. to 239. | None |
Class D addresses are used for multicasting (a form of broadcasting). Values 240 to 255 are reserved for Class E (experimental) addresses. These are currently not used. Figure 3 shows the decimal notation of internet addresses for address classes A, B, and C.
In 1992, the Internet Engineering Steering Group determined that Class B addresses assigned to hosts were quickly becoming exhausted and inefficiently used. Their solution was an Internet standard track protocol, the Classless Inter- Domain Routing (CIDR) protocol, to solve this problem. CIDR is described in a set of RFCs starting with 1517, Applicability Statement for the Implementation of Classless Inter-Domain Routing (CIDR).
The idea is to eliminate address class distinctions and depend on address masks that fall on bit instead of byte boundaries. Class C assignments were limited to 254 hosts while Class B assignments could accommodate 65,534 hosts, a number too large for mid-size organizations. The solution is somewhere in between — CIDR assigns blocks of Class C addresses to Internet providers, which then “subnet” the addresses in further units to organizations.
Furthermore, aggregating routing information sharply reduces the growth in routing tables in Internet routers beyond their manageable capacity.
With CIDR, the network mask must accompany the address. For example, an Internet service provider is allocated the address range 192.24.0.0 through 192.31.255.0 to assign to organizations. The “supernetted” route to this block of network numbers shown next, with the address followed by the mask:
192.24.0.0 255.248.0.0
The Internet provider allocates addresses to Organization A, which requires fewer than 2048 addresses (or eight Class C networks), in the range of 192.24.0 through 192.24.7. The designation for Organization A is:
192.24.0.0 255.255.248.0
Organization B, which requires less than 512 addresses (or two Class C networks) is allocated an address range of 192.24.32 through 192.24.33 and has the following designation:
192.24.0.0 255.255.254.0
In this way, only 2 routing designations are needed for these organizations, rather than 10 (the 10 Class C networks between them).
Some network and host numbers are reserved for special purposes, such as broadcasting. These numbers cannot be assigned to a network or host. Reserved network numbers are 0 and 127. Both are Class A addresses. Host reserved addresses are all bits zero or all bits one. The reserved host numbers refer to all three classes.
The Internet Assigned Numbers Authority (LANA) has reserved a range of Internet Protocol (IP) addresses for hosts that use TCP/IP but do not need outside network layer connectivity. Table 2 contains the reserved address ranges for these private networks.
Class | Reserved Address Range | Description |
---|---|---|
A | 10.0.0.0-10.255.255.255 | Network 10 |
B | 172.16.0.0 - 172.31.255.255 | Networks 172.16 — 172.31 |
C | 192.168.0.0 - 192.168.255.255 | Networks 192.168.0 — 192.168.255 |
You can use these host numbers without coordinating them with IANA or an Internet registry. However, the addresses must be unique within your enterprise. If at any time you want to connect the host directly to the Internet without going through an application layer gateway, you must obtain another, “global” address for it from an Internet registry.
You can divide an internet network into smaller networks called subnetworks (or subnets). Subnets allow you to group hosts logically within a larger network. This is practical in an organization that has many hosts connected to a single network, or one that has many networks and has plans to connect to the Internet.
You can assign a subnet address by taking bits from the host number of the internet address and using them to extend the network number. A host that is part of a subnet still has a 32-bit internet address, except that the address is divided into three fields: network number, subnet number, and host number.
To hosts and gateways outside of the subnet, the subnet number appears as part of the host number. Only hosts or gateways connected to the subnet need to know the subnet mask (the bits used to identify the subnet number).
You can create the subnet mask by extending the network mask with the bits used to indicate the subnet number. Local hosts and gateways of a subnet make routing decisions based on the subnet mask rather than on the network mask.
Of course, you can also create subnets (or even supernets) using variable masks based on the CIDR scheme described in the section Address Extensions Through CIDR.
Gateways, or routers, must also have internet addresses. The reserved network and host numbers also apply to gateway addresses. In fact, the rules for assigning an internet address to a gateway are similar to those used to assign an internet address to a host, with these additions:
For example, the gateway (host Homer) that connects Network 1 and Network 2 in Figure 2 has a separate internet address for each network.
This section describes example situations and how to assign internet addresses.
The Family Company has three different hosts to interconnect to form an internet. This internet consists of one network made up of three hosts. Since the Family Company has a single network, a Class C private address is appropriate. All the hosts on that network have the same network number: 192.168.1. This is called Network 1.
The Family Company assigns the following numbers and private internet addresses to its hosts:
Host Bart 1 192.168.1.1 Host Lise 2 192.168.1.2 Host Maggie 3 192.168.1.3
Suppose that the Family Company adds a second network, Network 2, that connects to the first one through a gateway. Figure 4 shows what the new internet configuration looks like.
The Network 1 addresses do not change.
Since Network 1 and Network 2 are connected by a gateway (Homer), Network 2 must use a different network number: 192.168.2 The internet addresses assigned to the Network 2 hosts are:
Host Zeno 192.168.2.1 Host Laotse 192.168.2.2
Homer is assigned these internet addresses:
Gateway Homer 192.168.1.4 — for Network 1 192.168.2.5 — for Network 2
In summary, the Family Company's two networks must have different network numbers because they are joined by a gateway. Gateway Homer must have two internet addresses because it connects two networks.
Before assigning internet addresses to your network, check with your network administrator.