TCP/IP Networks and Subnets

Subnet Masks

Traffic is routed to a host by looking at the network and the subnet part of its IP address. In order for hosts and routers to differentiate between the network/subnetwork part of an address and the host part, a parameter called the subnet mask is used.

The subnet mask is a sequence of 32 bits. The bits corresponding to the network and subnet fields of an address are set to 1, while the bits for the system field are set to 0.

For example, if we will use the third byte of addresses starting with 128.121 to identify subnets, the mask is:

	11111111 11111111 11111111 00000000	in dotted decimal notation
	ffffff00	in hexadecimal notation

Hosts and routers connected to a subnet are configured with the mask for the subnet. It is common practice to use a single subnet mask throughout an organization's internet.

Special Reserved Addresses

Not every number can be assigned to a subnet or to a host. For example, some addresses are used for broadcasting while others are reserved for use in routing tables.

A good rule of thumb is: stay away for using a block of 0s or a blocks of 1s in either your subnet field or your host field. Also, there are no network numbers consisting of all 0s or all 1s. Hence, to be usable a network, subnet or host field must contain at least 2 bits.

Identifying Networks and Subnets It is convenient to use a dotted address format to refer to a network, by filling in the local part of the address with zeroes. (Class A network) (Class B network) (Class C network)
Broadcasting By setting the local address, or all bits of an address to 1s, an IP datagram can be sent to all hosts on the local subnet or to all hosts on a remote subnet. (to all hosts on local subnet) (to all hosts on Class B network (to all hosts on subnet
Loopback Address At the opposite extreme to broadcasting are messages that never leave the local host. There are many hosts that contain both client and server processes. The local clients and servers communicate via IP within the host. To do this, they use a special address called the loopback address. (reserved for loopback) (the only one actually used)

Summary of Special Addresses
AddressDescription Used as the source address in a boot configuration request. Also denotes the default route in a routing table. Reserved. Loopback. Client and server are in the same host. Reserved. Reserved. Reserved. Reserved. Reserved. Reserved. Broadcast on locally attached LAN.

Go Back to the ELNC1221 Page