The default 32-bit binary address is divided into four 8-bit octets, although there is nothing to prevent you from changing this structure. Although you can't change the binary values of the address itself, you can change the way that your network interprets the address. By using the 8-bit boundaries, networks can only use 8, 16, or 24 bits to delineate the network portion of the address from the host portion. However, within your internal network you can change the delineation point so that you are using 25 bits instead of 24 bits for the network portion of the address, or you can use 16 bits, or whatever you want.
For example, the host address 192.168.1.20 is a Class C address, so the first 24 bits are used to identify the network portion of the address. The remaining 8 bits identify the host on that network. However, you can change this bit pattern so that the first 25 bits (or however many you wish) are used for the network portion of the address, leaving the remaining 7 bits for the host portion. This effectively splits the Class C network you are assigned into two networks of 128 devices each.
This is achieved through the use of a "sub-net mask." A sub-net mask is a 32-bit filter that you assign to your local routers and hosts which indicates which portion of the address should be used for the network, and which portion should be used for the host.
A "normal" Class C network has a default sub-net mask of "11111111 11111111 11111111 00000000." Anywhere the sub-net masks bit is set to "1", the IP stack should interpret the underlying number as the network part of the address. Anywhere the sub-net mask is set to 0, the stack should interpret as a host address. To split a Class C network into two smaller networks, simply change the first bit in the host portion of the mask to a "1". In this case, the modified sub-net mask would appear as "11111111 11111111 11111111 10000000."
Devices on the network don't see this modified mask automatically, and so they must be configured to use it explicitly. All devices on the same network should use the same sub-net mask, or else they will not able to see each other.
Figure B.4 below shows the default sub-net masks for the different network classes:
|
Class |
Default Sub-Net Mask |
|
A |
11111111 00000000 00000000 00000000 |
|
B |
11111111 11111111 00000000 00000000 |
|
C |
11111111 11111111 11111111 00000000 |
Figure B.4: The sub-net mask for splitting a single Class C network into two sub-networks.
The sub-net mask for a node is appended to its binary address when processed by routers. Just as the router would look to see if network 192.123.4 were locally attached before forwarding the packet, it would now look to see if the sub-net mask of the destination network matched as well. If the sub-net mask doesn't match the local network, then the data is forwarded to another router that does match.
Figure B.5 below shows the possible Class C sub-net masks (in decimal notation), and the number of networks and hosts that result from them:
|
Sub-Net Mask |
Net Bits |
Host Bits |
Nets |
Hosts |
|
255.255.255.0 (default) |
24 (default) |
8 (default) |
1 |
254 |
|
255.255.255.128 |
25 |
7 |
2 |
126 |
|
255.255.255.192 |
26 |
6 |
4 |
62 |
|
255.255.255.224 |
27 |
5 |
8 |
30 |
|
255.255.255.240 |
28 |
4 |
16 |
14 |
|
255.255.255.248 |
29 |
3 |
32 |
6 |
|
255.255.255.252 |
30 |
2 |
64 |
2 |
Figure B.5: Possible Class C sub-net masks, with available networks and hosts.
There are three important details you must remember when using sub-net masks.
For more information the 32-bit addressing, refer to section 1 Binary Addresses, Octets and Network Classes. For more information on address availability, refer to section 2 Addressing Limitations and section 3 Internet-Legal versus Private Addressing.
Copyright 1997 Unoverica Corporation. All Rights Reserved page
Send comments to docs@unoverica.com