Subnet masks and wildcards


 

 

 

 

 

Introduction to this web page

Cisco use two methods for identifying which part of an ip address is the network identity, and which part is the host identity :-

  • When setting an interface ip address in > enable > config t > interface, then the subnet mask is used

  • When specifying network identities in access control lists, then the Cisco ACL wildcard format is used

The chart below compares them.


             Binary value                 Mask    Subnet mask         Cisco ACL 
                                                                         wildcard



    00000000 00000000 00000000 00000000    /0       0.0.0.0          255.255.255.255

    10000000 00000000 00000000 00000000    /1     128.0.0.0          127.255.255.255

    11000000 00000000 00000000 00000000    /2     192.0.0.0          63.255.255.255

    11100000 00000000 00000000 00000000    /3     224.0.0.0          31.255.255.255

    11110000 00000000 00000000 00000000    /4     240.0.0.0          15.255.255.255

    11111000 00000000 00000000 00000000    /5     248.0.0.0          7.255.255.255

    11111100 00000000 00000000 00000000    /6     252.0.0.0          3.255.255.255

    11111110 00000000 00000000 00000000    /7     254.0.0.0          1.255.255.255

    11111111 00000000 00000000 00000000    /8     255.0.0.0          0.255.255.255

    11111111 10000000 00000000 00000000    /9     255.128.0.0        0.127.255.255

    11111111 11000000 00000000 00000000    /10    255.192.0.0        0.63.255.255

    11111111 11100000 00000000 00000000    /11    255.224.0.0        0.31.255.255

    11111111 11110000 00000000 00000000    /12    255.240.0.0        0.15.255.255

    11111111 11111000 00000000 00000000    /13    255.248.0.0        0.7.255.255

    11111111 11111100 00000000 00000000    /14    255.252.0.0        0.3.255.255

    11111111 11111110 00000000 00000000    /15    255.254.0.0        0.1.255.255

    11111111 11111111 00000000 00000000    /16    255.255.0.0        0.0.255.255

    11111111 11111111 10000000 00000000    /17    255.255.128.0      0.0.127.255

    11111111 11111111 11000000 00000000    /18    255.255.192.0      0.0.63.255

    11111111 11111111 11100000 00000000    /19    255.255.224.0      0.0.31.255

    11111111 11111111 11110000 00000000    /20    255.255.240.0      0.0.15.255

    11111111 11111111 11111000 00000000    /21    255.255.248.0      0.0.7.255

    11111111 11111111 11111100 00000000    /22    255.255.252.0      0.0.3.255

    11111111 11111111 11111110 00000000    /23    255.255.254.0      0.0.1.255

    11111111 11111111 11111111 00000000    /24    255.255.255.0      0.0.0.255

    11111111 11111111 11111111 10000000    /25    255.255.255.128    0.0.0.127

    11111111 11111111 11111111 11000000    /26    255.255.255.192    0.0.0.63

    11111111 11111111 11111111 11100000    /27    255.255.255.224    0.0.0.31

    11111111 11111111 11111111 11110000    /28    255.255.255.240    0.0.0.15

    11111111 11111111 11111111 11111000    /29    255.255.255.248    0.0.0.7

    11111111 11111111 11111111 11111100    /30    255.255.255.252    0.0.0.3

    11111111 11111111 11111111 11111110    /31    255.255.255.254    0.0.0.1

    11111111 11111111 11111111 11111111    /32    255.255.255.255    0.0.0.0

Note that some of these values above either have special meanings, or are not permitted by RFC specifications. However they are shown above for completeness.

 


© 2005 Ron Turner


Return to the Cisco index page