TCP/IP Defined - Internet Addresses

 

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:

  • Cannot be duplicated or otherwise conflict with other networks on the internet
  • Permit a virtually unlimited number of hosts or networks to connect to an internet
  • Allow you to include networks using different hardware addressing schemes

 

Rules

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:

  • Each internet address consists of 32 bits divided into four fields of one byte (eight bits) each.
  • An internet address has two parts: a network number and a host number (also known as a machine number).
  • All hosts on the same network must have the same network number.
  • No two hosts on the same network can have the same host number.
  • No two networks can have the same network number if they are connected in any way.

 

Classes and Masks

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:

  • Class A — This address uses the first byte for the network number and the remaining three bytes for the host number. The first byte ranges in decimal value from 1 to 127. A Class A address fits an internet situation that has up to 128 (27) networks and up to 16,777,216 (224) hosts per network.
  • Class B — This address uses the first two bytes for the network number and the last two bytes for the host number. The first byte ranges in decimal value from 128 to 191. A Class B address fits an intermediate situation with up to 16,384 (214) networks and up to 65,536 (216) hosts per network.
  • Class C — This address uses the first three bytes for the network number and the last byte for the host number. The first byte ranges in decimal value from 192 to 223. A Class C address fits a situation with up to 2,097,152 (221) networks, and less than 256 (28) hosts per network.

The address class determines the network mask of the address. Hosts and gateways use the network mask to route internet packets by:

  1. Extracting the network number of an internet address
  2. Comparing the network number with their own routing information to determine if the packet is bound for a local address

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.

Table 1 Internet Address Classes
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.

Figure 3: Internet Address Classes and Notation

 

Address Extensions Through CIDR

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).

 

Reserved Network and Host Numbers

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.

 

Private Network and Host Numbers

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.

Table 2 Private Network Addresses
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.

 

Subnets and Subnet Addresses

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.

 

Gateway or Router Addresses

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:

  • A gateway must have a different internet address for each physically connected network or subnet.

    For example, the gateway (host Homer) that connects Network 1 and Network 2 in Figure 2 has a separate internet address for each network.

  • All networks that use the same gateway must have different network numbers. A gateway cannot support two networks that have the same network number. This statement also applies to any subnets connected to a gateway.
  • A gateway must have a unique host number for each network or subnet number. This host number cannot duplicate an existing host number on that network or subnet.

 

Assigning an Internet Address

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 

Figure 4: Internet Address Classes and Notation

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.