Allied Telesis x908, X8100 manual A community list, Case

Page 28

BGP: Configuring Route Maps

Case 1:

awplus(config)# ip as-path access-list example deny ^$ awplus(config)# ip as-path access-list example permit 15557 awplus(config)# router bgp 100

awplus(config-router)#neighbor 192.168.200.201 filter-list example out

Case 2:

awplus(config)# ip as-path access-list example permit ^$ awplus(config)# ip as-path access-list example deny 15557 awplus(config)# route-map rmapexample deny 1

awplus(config-route-map)# match as-path example awplus(config-route-map)# route-map rmapexample permit 65535 awplus(config-route-map)# router bgp 100

awplus(config-router)#neighbor 192.168.200.201 route-map rmapexample out

Both of these configurations would cause outgoing update packets with empty AS paths to be dropped, and update packets with an AS path containing 15557 to be allowed.

But, to achieve that in the second case, the AS path list has to be configured to permit empty paths. This way, the empty path will match the AS path list, and be included into the route map's action of dropping packets that match the AS path list.

In the second case, the AS path list specifically excludes packets whose AS path contains 15557. Therefore, these packets are not dropped by the first route map entry, and are permitted by the last (permit all) route map entry.

A community list

Creating A community list is a set of entries that specify which community attribute values are included in or excluded from the list.

There are two types of community list: standard and expanded.

Standard lists are a just a list of one or more communities. They can be identified by a name, a number, or the word standard, and are created by using any of the following commands:

awplus(config)# ip community-list <1-99>{denypermit} {aa:xx internetlocal-asno-advertiseno-export}

awplus(config)# ip community-list <list-name>{denypermit} {aa:xx internetlocal-asno-advertiseno-export}

awplus(config)# ip community-list standard <list-name>{denypermit} {aa:xxinternetlocal-as no-advertiseno-export}

If you have more than one community in an entry, separate them with spaces.

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

Image 28
Contents Introduction Technical GuideContents IntroductionWhich products and software version does it apply to? BGP Applying Route Maps to Imported RoutesRelated How To Notes Which products and software version does it apply to?BGP Concepts and Terminology BGP updatesBGP peers Update attributes OriginAS-path Next-hopAccess Control List ACL filters BGP Overview of the Available Filter TypesFilter types Distribute filtersExamples for filtering BGP Update messages Difference and Relationship in BGPHierarchy of the Different Filters BGP Example Example Distribute filters on page  Example AS path filters on page  Example Prefix filters on pageBasic configuration AlliedWare switch Confirming the neighbor relationshipawplus#show ip route BGP Configuring Distribute Filters About ACLsExample Distribute filters Using ACLs as filtersFilter out one particular route from a neighbor Filter out a range of prefix lengths 3. Check that the IP route table now includes all the routes awplusconfig# neighbor 45.45.45.46 distribute-list list2 in6. Shut down the neighbor, and then bring it up again Use a numbered ACL instead of a named ACL awplusconfig-router# do show ip route BGP Configuring AS Path Filters AS path listsExample AS path filters Using AS path lists as path filtersDiscard or allow routes from a neighbor a neighbor 4. Shut down the neighbor, and then bring it up again7. Shut down the neighbor, and then bring it up again Another example An outgoing filter that uses an AS-path listBGP Configuring AS Path Filters About prefix lists BGP Configuring Prefix FiltersMask length Using prefix lists as prefix filters Example Prefix filtersawplusconfig-router# neighbor neighbor prefix-list list-name in 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 mapClauses Configuring a match clauseAn AS path list A community list CaseOne or more prefixes, by using a prefix list One or more prefixes, by using an ACLConfiguring a set clause A next hop addressAn origin A metric the MED attributeset community community-values additive set weight set atomic-aggregateset extcommunity rtsoo ext-comm-number set ip next-hop ipaddThe effect of different combinations of clauses One match clause with an actionNo match clause and one or more set clauses A match clause and one or more set clausesUpdate from Peer Update 1 to PeerUpdate 2 to Peer Router ASFirst, enter BGP router mode for the AS. The prompt should look like Examples Example B Match on a prefix-list that denies an entryawplusconfig#ip prefix-list test1 permit 52.0.0.0/8 awplusconfig-route-map#set metric4. Apply this route map as the in route map on the neighbor Example D Matching on a next-hop prefix-list Example E Prepending AS numbersawplusconfig-route-map#match ip address awplusconfig-route-map#router bgp1. Configure the AW peer to send out a community number The routes coming from that peer has communityadd ip routem=com entry=1 set commmun=8989 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 default-originate Other Uses of Route Mapsneighbor unsuppress-map networkRoute map configuration BGP configurationBGP Route Map Filtering Example set local-preference route-map outdef permit Metric OSPF Configuring Route Maps for Filtering and Modifying OSPF RoutesInterface A prefix, by using an ACL A prefix, by using a prefix listExternal route type 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