WildCard Masks

KMAN24KMAN24 Posts: 44Member ■■□□□□□□□□
Could someone break down wildcard masks for me ? For instance what does the Wildcard mask in the following access-list actually tell me ? access-list 105 deny tcp eq 20 ?



  • netheadnethead Posts: 43Member ■■□□□□□□□□
    Ok with the wildcard masks you just add up the bits in the other direction, ie. from right to left instead of left to right.

    In order for an address to match the access list entry the bits are compared, if the bit in the wild card is 0 then it must be matched in the address being compared, if the bit in the wild card is 1 then this bit of the address does not have to match (it is ignored).

    so with
    7 = 1 + 2 + 4

    So when comparing an address every bit except the last 3 bits must match.

    Therefore will match this access list.

    Looking at these addresses in bit format for the last eight bits: 00000000 00000001
    ..... 00000100
    ... 00000110 00000111 00001000

    The first 5 bits above all match for .0 - .7 so these addresses will match against the access list. The first 5 bits for .8 do not match so this address will be rejected against this access list.

    "The time for talking is over. Now call it extreme if you like, but I propose we hit it hard, and we hit it fast, with a major, and I mean major, leaflet campaign. "
    - Rimmer, Polymorph
  • KMAN24KMAN24 Posts: 44Member ■■□□□□□□□□
    That clears it up some, I need some more practice though !!
  • rossonieri#1rossonieri#1 Posts: 800Member
    addition to basic wild card mask,
    specify the subnet you want to filter : 128-192-224-240-248-252-254-255
    the wildcard is :
    the More I know, that is more and More I dont know.
  • tunerXtunerX Posts: 447Member ■■■□□□□□□□
    Even easier. Broadcast mask minus the netmask.
    0. 0. 0. 7

    Then add the inverse mask to the network number to get the range.
    0. 0.0.0

    The range for your first net is 0-7.
  • fuseboxfusebox Posts: 87Member ■■□□□□□□□□
    KMAN24 wrote:
    That clears it up some, I need some more practice though !!

    I agree.... You asked an excellent question.
    Im a newbie.... please be easy on me.
Sign In or Register to comment.