-->
Previous Table of Contents Next


Subnetworks and Subnet Masks

Subnetting is the process of dividing a large logical network into smaller physical networks. Reasons for dividing a network may include electrical limitations of the networking technology, a desire to segment for simplicity by putting a separate network on each floor of a building (or in each department or for each application), or a need for remote locations connected with a high-speed line.

The resulting networks are smaller chunks of the whole and are easier to manage. Smaller subnets communicate among one another through gateways and routers. Also, an organization may have several subnetworks that are physically on the same network, so as to logically divide the network functions into workgroups.

The individual subnets are a division of the whole. Suppose that a class B network is divided into 64 separate subnets. To accomplish this subnetting, the IP address is viewed in two parts: network and host (see Figure 23.3). The network part becomes the assigned IP address and the subnet information bits. These bits are, in essence, removed from the host’s part of the address. The assigned number of bits for a class B network is 16. The subnet part adds 6 bits, for a total of 22 bits to distinguish the subnetwork. This division results in 64 networks with 1,024 nodes in each. The network part can be larger or smaller, depending on the number of networks desired or the number of nodes per network.


Fig. 23.3  An example of class B subnetwork masking.

Setting a subnet mask is a matter of determining where the network address ends and the host address begins. The subnet mask contains all 1s in the network field and 0s (zeroes) in the host field.

Suppose a class C network is composed of the following:


N = network

H = Host

NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH

Each position represents a single bit out of the 32-bit address space. If this class C network is to be divided into four class C networks, the pattern resembles the following:


NNNNNNNN.NNNNNNNN.NNNNNNNN.NNHHHHHH

The subnet mask looks like the following:


11111111.11111111.11111111.11000000

If this address is written in base-10 dot notation, the subnet mask is 255.255.255.192. This mask is used to communicate among nodes on all subnetworks within this particular network.

If three bits are taken from the host field, eight networks can be formed, and the resulting network mask is as follows:


11111111.11111111.11111111.11100000

This subnet mask is 255.255.255.224. Each of the eight networks would have 29 nodes because five address bits are available. (It would be 32 except that all 1s, all 0s, and 127 aren’t legal addresses.)

This concept can be extended to class B and class A networks. The only difference is that the remaining fields are 0 (zero).

Consider a class B network. The address space is divided as follows:


NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH

If two bits are taken from the host field and added to the network part, the following subnet mask is used:


11111111.11111111.11000000.00000000

The mask is written as 255.255.192.0.

The bits needed for the subnet mask can be taken from any of the bit positions within the host field, but this leads to complex subnet masks and address exclusions. You should avoid this if at all possible.

Routing

Routing is a method of transferring information between networks. A router works at the Network layer of network protocols. Data may be routed by several different means. The routing method implemented for an Internet network is the Routing Information Protocol (RIP).

Routing Information Protocol (RIP)

RIP is designed to be used in small- to medium-sized networks and is based on Xerox Network Systems (XNS) routing protocols. RIP determines a message route by using a distance-vector routing algorithm. This algorithm assumes that each path is assigned a cost. This cost can be representative of network throughput, type of line, or desirability of the path. The protocol then determines the lowest cost path over which to transmit the message. (You can obtain information about routing from several RFCs.)


How a Routing Protocol Works:  
To maintain a list of hops to adjacent nodes, a RIP router keeps a routing table in the router or computer memory. This table is updated at 30-second intervals with information from neighboring routers. The information is used to recalculate the lowest cost path between systems. Each router on a network sends out (advertises) and receives routing information.

The routing protocol is limited in the distance a message can be routed. Each router can route a message only to a cost of 16. If the message sent out on a wire costs more than 16, the host is deemed unreachable. Cost is a method of assigning values to different paths through the network and is a way of ensuring an efficient route to a destination when there’s more than one way to get there.

When a network break occurs, the routers must relearn least-cost paths. This takes time and can result in messages being transmitted at a higher cost for a period of time. When a node goes down, all routers must readjust their respective routing tables. During this time, messages can be lost in the network. After a period of time, the routers are again synchronized and routing continues.

Router crashes are also a concern. In the event of a crash, adjacent routers update their adjacency to a crashed router in 180 seconds. After that period of time, if no routing information is received from the crashed router, that path is removed from the local router’s database.


RIP doesn’t manage routing distances, just cost. As a result, RIP may not use the shortest physical path between two points. Work and modifications have been made to the protocols to help correct this problem. A newer routing protocol being developed and tested is Open Shortest Path First (OSPF), which is beginning to gain acceptance and use.


Previous Table of Contents Next