Make your own free website on
BuildPC * CustomizeWindows * InstallOS * Internet * HardwareProblems * E-Mail * Home

Understanding TCP/IP

TCP/IP is versatile but also complex. Before you can set up a TCP/IP network and correctly configure the computers and other devices on the network, you must understand many key issues. The following sections explain these issues, beginning with IP addressing.

Understanding IP Addressing

On a TCP/IP network, a host is any device on the network that uses TCP/IP to communicate, including computers, routers, and other devices. Each host must have a unique address, called an IP address (IP stands for Internet Protocol). An IP address identifies the host on the network so IP data packets can be properly routed to the host. IP data packets are simply data encapsulated in IP format for transmission using TCP. Every IP address on the network must be unique; conflicting (identical) IP addresses on two or more computers prevents those computers from correctly accessing and using the network.

An IP address is a 32-bit value usually represented in dotted-decimal notation, in which four octets (eight bits each) are separated by decimals, as in The IP address actually contains two items of information: the address of the network and the address of the host on the network. How the network and address are defined within the address depends on the class of the IP address.

IP addresses are grouped into three classes, A, B, and C. These classes are designed to accommodate networks of varying sizes. Table 26.1 describes the IP address classes, where the variables w.x.y.z designate the octets in the address structure.

Table 26.1 IP Address Classes
Class ID Network Host ID Available Networks Available Hosts per Network
w x.y.z 126 16,777,214
B 128-191 w.x y.z 16,384 65,534
C 192-223 w.x.y z 2,097,151 254

The address 127.x.x.x is reserved on the local computer for loopback testing and interprocess communication, and therefore is not a valid network address. Addresses 224 and higher are reserved for special protocols, such as IGMP multicast, and can't be used as host addresses. Host addresses 0 and 255 are used as broadcast addresses and should not be assigned to computers. You can always reference your local LAN card by the address for testing.


As Table 26.1 shows, class A networks are potentially quite large, encompassing as many as 16,777,214 hosts. If you set up your own TCP/IP network, yours most likely falls into the class C network category, which is limited to 254 hosts.

You might wonder what's so important about an IP address. Routing data packets between computers is impossible without an IP address. By referencing the network portion of your IP address, a sending computer can route packets (with the help of intermediate routers and networks) to your network. The host portion of your IP address then routes the packet to your computer when the packet finally reaches the network.

Using Subnet Masks

A subnet mask is a 32-bit value expressed as a series of four octets separated by periods, just like an IP address. The subnet mask enables the recipient of an IP data packet to strip (mask) the IP address to which the IP packet is being sent into network ID and host ID. Basically, the subnet mask enables the IP address to be broken into its two component parts. Table 26.2 shows the default subnet masks for standard class A, B, and C networks, with each subnet mask shown in binary and dotted-decimal forms.

Table 26.2 Default Subnet Masks
Class Bit Value Subnet Mask
A 11111111 00000000 00000000 00000000
B 11111111 11111111 00000000 00000000
C 11111111 11111111 11111111 00000000

The subnet masks described in Table 26.2 are not the only masks you can use. Sometimes you have to mask only some of the bits in an octet. The network address and subnet mask must match, however, for every host on a local network.


In addition to enabling an IP address to be resolved into its network and host components, subnet masks also serve to segment a single network class address space into multiple subnets. For example, subnetting enables you to divide a single class C address space into multiple, separate networks. Instead of having one subnet that contains 254 hosts, for example, you might divide the class C address space into two separate subnets. Each subnet would act as a unique network. Using a mask of, for example, creates 6 subnets with a maximum of 30 hosts per subnet.

Here's an example of when you might use subnetting: Assume that you want to build a wide area network (WAN) that encompasses multiple divisions of your company. You have two different sites and need to route traffic between them. You have been assigned only one class C address space, however. To set up routing between the different divisions, the IP addresses of the routers must be in different subnets. So, you divide your single class C address space into two subnets, one for each division.

Without subnetting, class A and B networks would be too large to be practical. A class A address space, for example, contains enough addresses to accommodate 224 - 2 hosts. It's unlikely that anyone would want to build a network with that many hosts, so subnetting is employed to break the class A network into separate smaller networks with fewer hosts.

In addition, subnetting hides the internal structure of a network from external routers. To reach a host on a subnetted network, an external router needs only to know the IP address of the router that serves the class B network. This significantly reduces the size of public routing tables and makes routing much more efficient.

When you are applying a subnet mask to a computer, keep in mind that the subnet mask effectively places the computer on a specific subnet. The subnet mask must therefore match the subnet mask of all other hosts on the same subnet. If it does not match, routing will not occur properly for that computer. The subnet mask you use is dependent on the logical design of your network. If you aren't sure which subnet mask to use, consult your network administrator.

Calculating subnet masks by hand is difficult. A good utility that simplifies subnet calculation is the IP Subnet Calculator developed by Net3 Group, Inc. of St. Paul, MN., US. You can find a copy of the program at