How to Determine Network Prefixes

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

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.

Advertisement

Step 1

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.

Video of the Day

Step 2

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

Advertisement

Step 3

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

Video of the Day

Advertisement

Advertisement