Skip to main content

prefix-list vs access-list

You need to remember how an access list wildcard mask works. 192.168.1.0 0.0.0.255 Where you have a 0 bit in the wildcard then the corresponding bit within the IP Address must match. So in the example above 192.168.1 must match. Where you have a 1 bit then the Wildcard mask does not care about the corresponding bit within IP address (also known as the 'don't care bit), thus the 255 in the last octect means that the corresponding bit within the IP address can be anything between 1 and 255. Therefore when matching routes with an access list, the access list would let through 'Prefixes' from: 192.168.1.0 to 192.168.1.255 Obviously within this range there would be no routes that are advertised as routes from a routing protocol (like broadcast), however it does capture everything.
A Prefix list is far more precise 192.168.1.0/24 will only let through 192.168.1.0, if you wanted the prefix list to act like the access list, you would use the ge and le statements at the end of the prefix. My advice would be, when dealing with routes, and in particular BGP use a prefix list

Comments

Popular posts from this blog

LSA types. Type Code

LSA types. Type Code Description 1 Router LSA 2 Network LSA 3 Network Summary LSA 4 ASBR Summary LSA 5 AS External LSA 6 Group Membership LSA 7 NSSA External LSA 8 External Attributes LSA 9 Opaque LSA (link-local scope) 10 Opaque LSA (area-local scope) 11 Opaque LSA (AS scope)

OSPF STUB , NSSA AREAs

IP Routing How Does OSPF Generate Default Routes? Document ID: 13692 Contents Introduction Before You Begin Conventions Prerequisites Components Used Types of OSPF Areas Normal Areas Stub and Totally Stub Areas NSSAs Related Information Introduction The way that Open Shortest Path First (OSPF) generates and advertises default routes (0.0.0.0) varies depending on the type of area the default route is being injected into. In this document, we cover normal areas, stub/totally stub areas and not-so-stubby areas (NSSAs). Before You Begin Conventions For more information on document conventions, refer to the Cisco Technical Tips Conventions . Prerequisites There are no specific prerequisites for this document. Components Used This document is not restricted to specific software and hardware versions. Types of OSPF Areas Normal Areas: These areas can either be standard areas or transit (backbone) areas. Standard areas are defined as ...

IP prefix-list

IP prefix-list ip prefix-list provides the most powerful prefix based filtering mechanism Here is a quick little tutorial on Prefix-lists for you. A normal access-list CANNOT check the subnet mask of a network. It can only check bits to make sure they match, nothing more. A prefix-list has an advantage over an access-list in that it CAN check BOTH bits and subnet mask - both would have to match for the network to be either permitted or denied. For checking bits a prefix list ALWAYS goes from left to right and CANNOT skip any bits. A basic example would be this: 172.16.8.0/24 If there is only a / after the network (no le or ge) then the number after the / is BOTH bits checked and subnet mask. So in this case it will check the 24 bits from left to right (won't care about the last 8 bits) AND it will make sure that it has a 24 bit mask. BOTH the 24 bits checked and the 24 bit subnet mask must match for the network to be permitted or denied. No we can do a range of subn...