Allied Telesis x908, X8100 manual BGP Configuring Route Maps, Structure of a route map

Page 26

BGP: Configuring Route Maps

BGP: Configuring Route Maps

Route maps are very powerful and flexible entities. Therefore, the configuring of route maps must, by necessity, be relatively complex. The purpose of this section of the document is to understand route maps piece by piece and thereby build up a full understanding of how all the parts fit together.

Structure of a route map

There are various levels of structure within a route map:

A route map is an entity with a name

Each route map consists of multiple entries, identified by sequence numbers

Each entry can consist of multiple clauses

In effect, an entry defines an individual filter. It can have a match clause that defines what it will match on, and it can have multiple set clauses that can specify actions to be taken. An update packet is matched against each entry in turn. Once an entry is found that matches the packet, the action(s) associated with that entry is (are) performed, and no further entries are considered.

For example, if you create an entry that will permit an update packet, followed by an entry that would deny that packet, the packet is permitted. As another example, if you create two conflicting set clauses, in different entries, the first change is applied, not the second.

A route-map consists of an ordered set of entries. Each entry is configured by commands of the form:

route-map <map-name> permitdeny <sequence number> <match clause>

<set clause(s)>

There is no need for a command that creates a route-map prior to entries being created in the route-map. Simply, the first time an entry is created for route-map <name> then that route-map comes into existence.

The sequence numbers determine the order in which the entries are applied to update packets. A route-map entry is not required to include a match clause. An entry with no match clause will match every date packet.

There is an implicit match all filter at the end of the route map. The action on that implicit entry is deny. By default, any update packet that does not explicitly match any particular entry in the route map will be dropped.

You can change this by ending the route map with a “permit all” clause, such as the following:

awplus(config)# route-map <map-name> permit 65535

Page 26 Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes

Image 26
Contents Introduction Technical GuideWhich products and software version does it apply to? ContentsIntroduction BGP Applying Route Maps to Imported RoutesRelated How To Notes Which products and software version does it apply to?BGP peers BGP updatesBGP Concepts and Terminology AS-path Update attributesOrigin Next-hopFilter types Access Control List ACL filtersBGP Overview of the Available Filter Types Distribute filtersExamples for filtering BGP Update messages Difference and Relationship in BGP Example Distribute filters on page Hierarchy of the Different FiltersBGP Example  Example AS path filters on page  Example Prefix filters on pageBasic configuration awplus#show ip route Confirming the neighbor relationshipAlliedWare switch BGP Configuring Distribute Filters About ACLsFilter out one particular route from a neighbor Using ACLs as filtersExample Distribute filters Filter out a range of prefix lengths 6. Shut down the neighbor, and then bring it up again awplusconfig# neighbor 45.45.45.46 distribute-list list2 in3. Check that the IP route table now includes all the routes Use a numbered ACL instead of a named ACL awplusconfig-router# do show ip route BGP Configuring AS Path Filters AS path listsDiscard or allow routes from a neighbor Using AS path lists as path filtersExample AS path filters 7. Shut down the neighbor, and then bring it up again 4. Shut down the neighbor, and then bring it up againa neighbor Another example An outgoing filter that uses an AS-path listBGP Configuring AS Path Filters Mask length BGP Configuring Prefix FiltersAbout prefix lists awplusconfig-router# neighbor neighbor prefix-list list-name in Using prefix lists as prefix filters Example Prefix filters awplusconfig-router# neighbor neighbor prefix-list list-name outFilter out a range of different prefix lengths BGP Configuring Prefix Filters BGP Configuring Route Maps Structure of a route mapAn AS path list Configuring a match clauseClauses A community list CaseOne or more prefixes, by using a prefix list One or more prefixes, by using an ACLAn origin Configuring a set clauseA next hop address A metric the MED attributeset community community-values additive set extcommunity rtsoo ext-comm-number set weightset atomic-aggregate set ip next-hop ipaddNo match clause and one or more set clauses The effect of different combinations of clausesOne match clause with an action A match clause and one or more set clausesUpdate 2 to Peer Update from PeerUpdate 1 to Peer Router ASFirst, enter BGP router mode for the AS. The prompt should look like awplusconfig#ip prefix-list test1 permit 52.0.0.0/8 ExamplesExample B Match on a prefix-list that denies an entry awplusconfig-route-map#set metric4. Apply this route map as the in route map on the neighbor awplusconfig-route-map#match ip address Example D Matching on a next-hop prefix-listExample E Prepending AS numbers awplusconfig-route-map#router bgpadd ip routem=com entry=1 set commmun=8989 1. Configure the AW peer to send out a community numberThe routes coming from that peer has community set bgp peer=45.45.45.45 outroutemap=com sendcommunity=yesBGP#show ip route set bgp peer=45.45.45.45 outroutemap=mixed sendcommunity=yes 8. Add that ACL as a distribute-list in-filter on the neighbor route-map marker permit Examples ACLs Path filters Prefix filters Route mapsBGP Applying Route Maps to Imported Routes Syntaxneighbor unsuppress-map neighbor default-originateOther Uses of Route Maps networkBGP Route Map Filtering Example BGP configurationRoute map configuration set local-preference route-map outdef permit Interface OSPF Configuring Route Maps for Filtering and Modifying OSPF RoutesMetric External route type A prefix, by using a prefix listA prefix, by using an ACL OSPF Applying Route Maps  Set the metric, by using the command set metric
Related manuals
Manual 8 pages 39.31 Kb Manual 21 pages 8.63 Kb