Chapter 15: TCPIP Network
15.1 Data Delivery
Two basic steps must be completed to deliver data successfully between two Internet participants. First, it is necessary to transmit the data across the network to the appropriate host. Second, the
data has to be transmitted within that host to the appropriate user or process. TCPIP uses three schemes to accomplish these tasks:
Addressing
1. IP addresses uniquely identify each host on the entire internet; TCPIP relies
on IP addressing to deliver data to the correct host on the network.
Routing
2. The Internet consists of many interconnected networks; different networks are
connected over routers gateways. Routing means to forward data to the correct network or subnetwork via an appropriate router gateway.
Multiplexing
3. Protocol numbers and port numbers identify how to deliver data to the correct
software module within the host.
15.1.1 IP Address Classes
The Internet protocol IP moves data between hosts in the form of datagrams. Each datagram is delivered to the host identified by a 32−bit IP address located in the Destination Address field in the
datagram header.
An IP address contains a network part and a host part, but the format of these parts is not uniformly determined; the number of address bits used to identify the network and the number used to identify
the host vary according to the class of the address. The three address classes are class A, class B, and class C. By examining the first few bits of an address, IP software can quickly determine the
addresss class and, therefore, its structure. Figure 15.1 illustrates how the address structure varies with an address class. It presents three addresss classes in three arbitrary IP address examples.
The rules for address classes are:
If the first address bit is 0, this is the address of a class A network; the next seven bits identify the network itself, and the remaining 24 bits identify the host in that network. There
are fewer than 128 class A network addresses and 16 million hosts addresses available in each network a certain number of network addresses are reserved for special purposes.
•
If the first two bits are 10, this is the address of a class B network; the next 14 bits identify the network, and the remaining 16 bits identify the host in that network. There are slightly
more than 16,000 class B network addresses and more than 64,000 hosts addresses available in each network.
•
If the first two bits are 11, this is the address of a class C network; the next 22 bits identify the network, and the last 8 bits identify the host in that network. There are more than 4
million class C network addresses with 256 hosts addresses available actually this number is lower, because the hosts address 0 is reserved to identify the network itself, and the
address 255 is the network broadcast address. The C class addresses that start with the first three bits 111 are reserved for special purposes, which means 2 million class C network
addresses are available for general use. •
338
Figure 15.1: IP address structure. IP addresses are written as four−decimal numbers separated by dots periods. Each of the four
numbers is between 0 and 255, and identified by one byte in the 32−bit address. Keeping in mind the previous division of address classes, the first decimal number fully indicates the addresss class:
Fewer than 128
• Class A address
Between 128 and 191
• Class B address
Greater than 191
• Class C address
Not all network and host addresses are available for general use. Class C addresses greater than 223 are reserved for special purposes, and certain class A addresses are also reserved, for
instance,
network 1.
Default route, to simplify the routing information that IP must handle.
network 127
2. Loopback address, to allow the local host to be addressed in the same manner as a
remote host. This address is very important in configuring the host. Please note that among all classes, the hosts address 0 is reserved to identify the network itself,
and the highest address within the network is reserved as a broadcast address to propagate
339
IP addresses are often called hosts addresses. This is very common, but is not correct. IP addresses are assigned to the network interfaces, not the systems themselves. Any router
gateway, is always connected to more than one network and contains more network interfaces; consequently, it has more than one IP address associated with the same system host, and a
different IP address for each of the networks it is connected to. Similarly, multihome hosts have multiple network interfaces and multiple associated IP addresses; their main task is not routing, but
to improve system and network performance.
The IP addressing scheme is designed to make routing easy; it is network−oriented. The disadvantage of this approach is that many hosts addresses among all classes are not used within
the corresponding networks and have no chance to be used elsewhere, either. Given todays enormous network growth, the need for new addresses has reached the saturation point. The lack
of IP addresses is obvious, and the question is how long they will be available at all. The new proposal for 132−bit IP addressing is under consideration; the main problem is how to keep the
necessary compatibility with the current IP addressing system and the millions of already installed and active networks and hosts worldwide.
In the meantime, the intranet has become a workable solution. Intranets are isolated internet−type networks that use an arbitrary IP addressing scheme, so IP addresses can be repeated among
different intranets. All addresses in an intranet are hidden from the Internet; they are strictly internal to the intranet, and the whole intranet appears to the Internet as a single or a few IP addresses only.
Address mapping and the required isolation are provided by special systems known as proxy servers and firewalls; they also protect the intranet from external intruders. The basic network
services are fully provided and are transparent to intranet users; users see the system as being a part of the Internet itself the intranet is fully discussed in Chapter 25.
It is assumed that each IP address of any class belongs to one local network; at the very least, a host understands that another host with the same network−part IP address shares the same local
network. If that is literally true, then it means that the class A IP address defines a LAN with 4 million participating hosts it is very hard to imagine the data traffic within such a network; obviously, a
huge number of available hosts IP addresses cannot be used in that way.
One solution to this problem is known as subnetworking also referred as subnetting. A given IP address of a certain class can be divided into multiple IP address subclasses, each of them defining
a separate subnetwork there are no technological differences between a network and a subnetwork; the two terms are used only to identify their mutual relationship. Subnetting means
expanding the network part of an IP address by some address bit of the hosts address part.
While a host can easily figure out an IP address class that its own IP address belongs to, subnetting is arbitrary and the host has no information about it. For that purpose, the so−called netmask has
been introduced. A netmask specifies how many address bits in an IP address correspond to the network part; by default the netmask matches the corresponding IP address class. To be
operational, subnetting requires that you modify the hosts netmask actually, netmasks are, like IP addresses, associated with network interfaces, so a host could have multiple netmasks.
Netmasks are specified in a way very similar to IP addresses; a netmask is a 32−bit number that contains all ones for the network part, and all zeros for the host part. In the same way as an IP
address, it is also represented by four decimal numbers separated by dots periods; each of the four numbers is between 0 and 255 and identified by one byte in the 32−bit netmask.
340
It is quite common to subnet class C networks, too. To describe subnets verbally, sometimes we identify them by specifying subclasses of IP addresses; for example, C+3, or C+4. This is shown
in Figure 15.1. Keeping in mind that the class A IP address contains a 24−bit network address part, class B IP addresses have a 16−bit network address part, and class C IP address have an 8−bit
network address part, the meaning of the presented subnetwork identifications should be clear.
15.1.2 Internet Routing