Allied Telesis X8100 External route type, A prefix, by using a prefix list, A next hop address

Page 51

OSPF: Configuring Route Maps for Filtering and Modifying OSPF Routes

External route type

The entry will match all routes of either Type 1 External or Type 2 External.

To match a route type, use the command:

match external {type-1type-2}

A prefix, by using a prefix list

The entry will match one or more route prefixes.

For information about creating a prefix list, see "About prefix lists" on page 22.

Once you have made the prefix list, apply it to the match clause of a route map entry by using the command:

match ip address prefix-list <list-name>

A prefix, by using an ACL

An ACL is an alternative to a prefix list for matching route prefixes.

For information about creating an ACL, see "About ACLs" on page 11.

Once you have made the ACL, apply it to the match clause of a route map entry by using the command:

match ip address <acl-number-or-name>

A next hop address

The entry will match the route’s next hop.

You can use either a prefix list or an ACL to specify a next hop address. Once you have made the prefix list or ACL, apply it to the match clause of a route map entry by using one of the commands:

match ip next-hop prefix-list <list-name> match ip next-hop <acl-number-or-name>

Configuring a set clause

If a route matches the match clause, then the action of the route map entry will be applied to that route. The action might simply be to permit or deny the route, or it might be to update its parameters by applying one or more set clauses.

Note: When configuring a set clause, make sure you are in route map mode for the same route map name sequence number as you used for the match clause.

The prompt should look like: awplus(config-route-map)#

A set clause can alter the following parameters on a route.

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

Image 51
Contents Technical Guide IntroductionBGP Applying Route Maps to Imported Routes ContentsIntroduction Which products and software version does it apply to?Which products and software version does it apply to? Related How To NotesBGP updates BGP Concepts and TerminologyBGP peers Next-hop Update attributesOrigin AS-pathDistribute filters Access Control List ACL filtersBGP Overview of the Available Filter Types Filter typesDifference and Relationship in BGP Examples for filtering BGP Update messages Example AS path filters on page  Example Prefix filters on page Hierarchy of the Different FiltersBGP Example  Example Distribute filters on pageBasic configuration Confirming the neighbor relationship AlliedWare switchawplus#show ip route About ACLs BGP Configuring Distribute FiltersUsing ACLs as filters Example Distribute filtersFilter out one particular route from a neighbor Filter out a range of prefix lengths awplusconfig# neighbor 45.45.45.46 distribute-list list2 in 3. Check that the IP route table now includes all the routes6. Shut down the neighbor, and then bring it up again Use a numbered ACL instead of a named ACL 4. Check that the IP route table no longer includes 52.0.0.0/8 AS path lists BGP Configuring AS Path FiltersUsing AS path lists as path filters Example AS path filtersDiscard or allow routes from a neighbor 4. Shut down the neighbor, and then bring it up again a neighbor7. Shut down the neighbor, and then bring it up again An outgoing filter that uses an AS-path list Another exampleBGP Configuring AS Path Filters BGP Configuring Prefix Filters About prefix listsMask length awplusconfig-router# neighbor neighbor prefix-list list-name out Using prefix lists as prefix filtersExample Prefix filters awplusconfig-router# neighbor neighbor prefix-list list-name inFilter out a range of different prefix lengths awplusconfig-router# do show ip route Structure of a route map BGP Configuring Route MapsConfiguring a match clause ClausesAn AS path list Case A community listOne or more prefixes, by using an ACL One or more prefixes, by using a prefix listA metric the MED attribute Configuring a set clauseA next hop address An originset community community-values additive set ip next-hop ipadd set weightset atomic-aggregate set extcommunity rtsoo ext-comm-numberA match clause and one or more set clauses The effect of different combinations of clausesOne match clause with an action No match clause and one or more set clausesRouter AS Update from PeerUpdate 1 to Peer Update 2 to PeerFirst, enter BGP router mode for the AS. The prompt should look like awplusconfig-route-map#set metric ExamplesExample B Match on a prefix-list that denies an entry awplusconfig#ip prefix-list test1 permit 52.0.0.0/84. Apply this route map as the in route map on the neighbor awplusconfig-route-map#router bgp Example D Matching on a next-hop prefix-listExample E Prepending AS numbers awplusconfig-route-map#match ip addressset bgp peer=45.45.45.45 outroutemap=com sendcommunity=yes 1. Configure the AW peer to send out a community numberThe routes coming from that peer has community add ip routem=com entry=1 set commmun=8989BGP#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 Route maps ACLs Path filters Prefix filtersSyntax BGP Applying Route Maps to Imported Routesnetwork neighbor default-originateOther Uses of Route Maps neighbor unsuppress-map BGP configuration Route map configuration BGP Route Map Filtering Example set local-preference route-map outdef permit OSPF Configuring Route Maps for Filtering and Modifying OSPF Routes MetricInterface A prefix, by using a prefix list A prefix, by using an ACLExternal route type  Set the metric, by using the command set metric OSPF Applying Route Maps
Related manuals
Manual 8 pages 39.31 Kb Manual 21 pages 8.63 Kb