Lecture 13 - BGP Part 3
Lecture 13 - BGP Part 3
Lecture 13 - BGP Part 3
BGP Part 3
INFR 2411U – Advanced Networking I
Josh Lowe
November 2023
In this lecture…
▪ Prefix lists can be used as an alternative to access lists in many route filtering
commands
▪ Prefix list characteristics include:
• A significant performance improvement over ACLs in loading and route lookup of large lists
• Support for incremental modifications
• An improved user-friendly command-line interface ?
• Greater flexibility in specifying subnet mask ranges
▪ If a prefix is permitted, the route is used. If a prefix is denied, the route is not used
▪ Prefix lists consist of statements with sequence numbers. The router begins the
search for a match at the top of the prefix list, which is the statement with the
lowest sequence number
▪ When a match occurs, the router does not need to go through the rest of the
prefix list. For efficiency, you might want to put the most common matches
(permits or denies) near the top of the list by specifying a lower sequence number
▪ An implicit deny is assumed if a given prefix does not match any entries in a prefix
list
172.16.10.0/24 172.16.0.0/16
AS 65000 172.16.10.0/24
R2 R3
172.16.11.0/24
10.1.1.1
R1
172.16.10.0/24 172.16.0.0/16
AS 65000
R2 R3
10.1.1.1
R1
172.16.10.0/24 172.16.10.0/24
AS 65000 172.16.11.0/24
R2 R3
10.1.1.1
R1
172.16.10.0/24 172.16.0.0/16
AS 65000 172.16.10.0/24
R2 R3
172.16.11.0/24
10.1.1.1
R1
172.16.10.0/24 172.16.10.0/24
AS 65000 172.16.11.0/24
R2 R3
10.1.1.1
R1
▪ Route maps are similar in function to ACLs but provide far more control
▪ Just as ACLs are used by a variety of Cisco IOS features, route maps can also be
used for various applications
• The actual route map implementation will vary based on how its applied
Else
route-map DEMO permit 30
Set nothing (and exit route-map)
▪ Match criteria on the same line mean a logical OR condition (If this or this or …)
▪ Multiple match and set criteria on separate lines indicates an AND condition (and if this …)
Matches
▪ A route-map statement without any match statements will be considered matched Everything
▪ Like an access list, an implicit deny any appears at the end of a route map
• The consequences of this deny depend on how the route map is being used
INFR 2411U – Advanced Networking I ©Josh Lowe, 2023
Route Maps
The match Commands*
Command Description
match interface Matches any routes that have the next hop out of one of the interfaces specified
match ip address Matches any routes that have a destination network number address that is permitted
by a standard or extended ACL (or prefix-list)
match as-path Matches routes based on a regex query to isolate the ASN in the BGP path attribute
AS_PATH. The AS path ACLs are numbered 1 to 500
match local-preference Matches routes based on the BGP attribute local preference. This command allows for
multiple match variables
*partial list
INFR 2411U – Advanced Networking I ©Josh Lowe, 2023
Route Maps
The set Commands*
Command Description
set as-path Modifies an AS path for BGP routes
set automatic-tag Computes automatically the tag value
set community Sets the BGP communities attribute
set default interface Indicates where to output packets that pass a match clause of a route map for policy
routing and have no explicit route to the destination
set interface Indicates where to output packets that pass a match clause of a route map for policy
routing
set ip default next-hop Indicates where to output packets that pass a match clause of a route map for policy
routing and for which the Cisco IOS software has no explicit route to a destination
set ip next-hop Indicates where to output packets that pass a match clause of a route map for policy
routing
set level Indicates where to import routes for IS-IS and OSPF
set local-preference Specifies a BGP local preference value
set metric Sets the metric value for a routing protocol
set metric-type Sets the metric type for the destination routing protocol
set tag Sets tag value for destination routing protocol
set weight Specifies the BGP weight value
*partial list
INFR 2411U – Advanced Networking I ©Josh Lowe, 2023