|
|
HP 3000/iX Network Planning and Configuration Guide: HP 3000 MPE/iX Computer Systems > Chapter 2 Networking ConceptsSubnetworks |
|
IP Subnets are used to divide one network into two or more distinct subnetworks. Subnet numbers identify subnetworks in the same way that network addresses identify physically distinct networks. Subnetting divides the node address portion of an IP address into two portions—one for identifying a specific subnetwork and one for identifying a node on that subnetwork. The use of subnets is optional. Subnets are typically used in organizations that have a large number of computers. You may want two or more physically distinct networks to share the same network address. This may occur, for example, if your organization has acquired only one network number, but any of the following is true:
You may use subnets to divide your current network into subnetworks without informing remote networks about an internal change in connectivity. A packet will be routed to the proper subnet when it arrives at the gateway node. However, if you want a remote node to know about only some of the subnets on your network, this must be configured. The network portion of an IP address must be the same for each subnetwork of the same network. The subnet portion of an IP address must be the same for each node on the same subnetwork. Before you can determine subnet numbers, you first must determine which bits of the node address will be used to contain your subnet numbers. The bits that you designate for subnet identifiers compose the subnet mask. The subnet mask is configured with NMMGR. The remaining part of the node address is used to identify the host portion of the IP address. The following rules apply when choosing a subnet mask and an IP address:
To determine the subnet mask, you first need to estimate the number of networks required and the number of nodes on each subnet. Allow enough bits for both nodes and subnets, as described in example 1. Example 2-1 Example 1 Assume you are choosing a subnet mask for a class C network (three bytes for network address, one byte for node address), and you need four subnets with up to 30 nodes on each subnet. You will need to reserve three bits for the subnet address (remember, all 0s and all 1s cannot be used) and the remaining five bits for the node numbers as shown in Figure 2-1 “Class C Address with Subnet Number (Example 1)”. The 30 nodes per subnet will require at least five bits of the node portion of the IP address (30 <32, and 32=25, therefore you need 5 bits). This leaves three bits remaining in the node portion of the IP address for use as the subnet identifier. Subnet parts of all 0's or all 1's are not recommended because they can be confused with broadcast addresses. Therefore, you can have up to six subnets (23 -2=6) when three bits are used for the subnet identifier. Example 2-2 Example 2 An IP address on a class B network with an 8-bit subnet mask separates as shown in Figure 2-2 “Class C Address with Subnet Number (Example 2)”. Now, refer again to example 1. The subnet mask must indicate that three bits of the node portion of the IP address will be used for the subnet identifier. The subnet mask turns on (sets to 1) all the relevant bits for its subnet scheme. The subnet mask for example 1 is shown below. Note that the most significant three bits of the rightmost byte are set. Subnet Mask
Table 2-1 “Valid Addresses of Example Subnetwork” shows valid addresses for the subnetwork in example 1. You will need to know this information for NMMGR configuration. The table shows the possible values of the rightmost byte of the IP address for each of the subnets, given the criteria described in the example. (Remember, an address of all 0s or all 1s is not valid). Column 2 shows the values, in binary, of the six subnet addresses. Five zeroes are shown in parentheses to indicate where the three subnet-address bits are located in the byte. The equivalent decimal value for each subnet address is shown in the third column. The fourth column shows the range of possible values for the node address of each subnet. The five rightmost bits make up the node portion, and the range is the same for all subnets. By combining the subnet address with the range of node addresses, the possible decimal values of the rightmost byte are obtained and shown in the fifth column. The table shows that subnets of 30 nodes each are possible given a subnet mask of 255.255.255 224. This is derived from the column that shows the range of possible values for the five bits that make up the node portion of the IP address. The range for each of the six subnets shows 30 possible values. Table 2-1 Valid Addresses of Example Subnetwork
By looking at the binary values of two IP addresses, it is easy to tell if nodes belong to the same subnet. If they do, all the bits that make up the subnet mask will be the same between IP addresses in the subnet. Take, for example, two IP addresses (in decimal and in binary) of subnet number 1 from Table 2-1 “Valid Addresses of Example Subnetwork”:
The subnet mask has already been defined as:
Because the mask has all bits except the five rightmost bits set to 1, all bits except the five rightmost bits must match between nodes on the same subnet. Because the two example IP addresses from subnet 1 do match except for their five rightmost bits, they belong to the same subnet.
|
|