wildcard/mask and prefix-list/access-list

sendalotsendalot Member Posts: 328
This whole wildcard vs subnet is confusing me as I'm cramming in books.

Do you use wildcard only on OSPF/EIGRP network statements?
But for BGP, use subnet?

What about summary address or routes? Do you use regular mask?

Lastly, when would you use a prefix-list over access list?

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    RIP uses the classful address, no mask is used.
    i.e. 10.0.0.0; 160.1.0.0; 200.1.1.0

    EIGRP can use the classful method as per above, or you can use a wildcard mask.
    i.e. you have an interface 12.1.1.2; any of the following will do, it depends how granular you want to get

    network 12.0.0.0
    network 12.1.0.0 0.0.255.255
    network 12.1.1.0 0.0.0.255
    network 12.1.1.2 0.0.0.0


    OSPF uses wildcard mask only, or you could enable ospf on the interface without using a network statement under "router ospf"

    network 12.1.1.2 0.0.0.0
    or
    interface lo12
    ip ospf 1 area 0


    BGP is different, you are not using the network statement to enable bgp on an interface, you are actually matching a route in the RIB. So in this case you need the regular mask, the mask has to match the exact mask in the RIB.

    network 12.1.1.0 mask 255.255.255.0


    The summary will get the proper mask, the wildcard is for matching bits, with the summary address you are specifying what route to advertise.

    Prefix-lists are used to match routes, i.e. a combination of network number and mask. Access-lists should be used to match packet fields, for ingress/egress packet filtering on an interface or as a debugging filter etc.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • cjsavescjsaves Member Posts: 6 ■□□□□□□□□□
    Cool post. I always confused netmask vs wildcard.
Sign In or Register to comment.