This is part 2 of 4. My shortish summarized version of Cisco BGP Filters and Communities.
|MATCH USING…||STUFF TO SET…||DIRECTION|
|…and lots more||…and lots more|
Example: Filter AS 100 outbound with REGEX
1 2 3 4 5 6 7 8 9 10
Prefix-lists is for matching routes!
- Uses tree-structure
- Better CPU utilization
- Better subnet matching
- Two-stage matching system: network + mask
- Created in Global Config mode
- Matches x.x.x.x/xx EXACTLY
- le = less than or equel
- ge = greater than or equel
ip prefix-list NAME permit 0.0.0.0/0matches ONLY 0.0.0.0/0 (default route)
ip prefix-list NAME permit 0.0.0.0/0 ge 32matches all HOST routes
ip prefix-list NAME permit 0.0.0.0/0 le 32matches ANY route
ip prefix-list NAME permit 0.0.0.0/1 ge 24 le 24matches CLASS A networks or it’s subnets
ip prefix-list NAME permit 18.104.22.168/2 ge 16matches CLASS B networks or it’s subnets
1 2 3 4 5 6
Prefix-lists can also be attached to route-maps.
Outbound Route Filtering (ORF):
- Transmits INBOUND filters to apply OUTBOUND
- Neighbors must support ORF Type both sides
neighbor x.x.x.x capability orf prefix-list <SEND_RECEIVE_BOTH>
- The BGP community value is an optional, transitive attribute.
- ISP’s normally create community values for customers, to use, to influence routes.
- RFC guideline format: 100:12345 where 100 = AS_NUM and 12345 = community value
- community-list (1-99) matches on normal community values
- community-list (100-199) matches on REGEX
By default 4 well known communities that can be used to mark prefixes:
- Internet: advertise these routes to all neighbors.
- Local-as: prevent sending routes outside the local AS within the confederation.
- No-Advertise: do not advertise this route to any peer, internal or external.
- No-Export: do not advertise this route to external BGP peers.
1 2 3 4 5 6 7 8 9
1 2 3 4 5