Using Prefixes to Represent a Subnet Mask

As discussed, subnet masks identify the number of bits in an address that represent the network, subnet, and host portions of the address. Another way of indicating this information is to use a prefix. A prefix is a slash (/) followed by a numeric value that is the number of bits in the network and subnet portion of the address. In other words, it is the number of contiguous 1s in the subnet mask. For example, assume you are using a subnet mask of The binary representation of this mask is 11111111.11111111.11111111.00000000, which is 24 1s followed by eight 0s. Thus, the prefix is /24, for the 24 bits of network and subnet information, the number of 1s in the mask.

Table B-4 shows some examples of the different ways you can represent a prefix and subnet mask.

Table B-4 Representing Subnet Masks

IP Address/Prefix

Subnet Mask in Decimal

Subnet Mask in Binary




It is important to know how to write subnet masks and prefixes because Cisco routers use both, as shown in Example B-1. You will typically be asked to input a subnet mask when configuring an IP address, but the output generated using show commands typically displays an IP address with a prefix.

Example B-1 Examples of Subnet Mask and Prefix Use on Cisco Routers p1r3#show run

<Output Omitted> interface Ethernet® ip address

Example B-1 Examples of Subnet Mask and Prefix Use on Cisco Routers (Continued)

interface Serial0

ip address <Output Omitted>

p1r3#show interface ethernet0

Ethernet0 is administratively down, line protocol is down

Hardware is Lance, address is 00e0.b05a.d504 (bia 00e0.b05a.d504) Internet address is <Output Omitted>

p1r3#show interface serial0

Serial0 is down, line protocol is down Hardware is HD64570 Internet address is <Output Omitted>

This section reviews IPv4 access lists. It includes the following topics:

■ IP access list overview

■ IP standard access lists

■ IP extended access lists

■ Restricting virtual terminal access

■ Verifying access list configuration

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment