How to Determine Network Prefixes

Network prefixes are determined directly from the subnet mask of the network. Internet Protocol networking is used to define three usable classes of addresses exclusively, Class A through C, each of which has its own default IP subnet mask. This is called "classful addressing." Classless Inter-Domain Routing was invented as a way to use variable-length subnet masks, or VLSM, to create more concise IP networks. Subnets based on VLSM include a prefix, such as /24, instead of an IP address, such as 255.255.255.0. You can determine network prefixes by converting the IP address of the subnet.

Step

Determine the full subnet mask IP address, such as 255.255.255.192. On a computer system, this can be obtained from the command-line by typing "ipconfig" for Windows systems, and "ifconfig" for UNIX-like systems.

Step

Convert each octet of the subnet mask to a binary value. Using the previous example, the result is 11111111.11111111.11111111.11000000.

Step

Count the consecutive ones to determine the prefix. In the previous example, the network prefix is /26.