Allied Telesis x908, X8100 manual BGP#show ip route

Page 40
BGP#show ip route

Examples

4.Set the prefix-list to be the match criterion on a permit entry in the route map: route-map com permit 2

match ip address prefix-list test1

If the route 52.0.0.0/8 is dropped by this route map, we can be sure that it was dropped by the first deny entry, and not by the implicit deny-all entry at the end of the route map.

5.Apply this route map as the incoming filter for the neighbor 45.45.45.46: neighbor 45.45.45.46 route-map com in

6.Shut down the neighbor, and then bring it up again:

awplus(config-router)#neighbor 45.45.45.46 shutdown awplus(config-router)#neighbor 45.45.45.46 no shutdown

If the deny clause in the routemap does its job, then the routes advertised from the peer will be dropped. And, indeed they are dropped.

BGP#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

* - candidate default

C45.45.45.0/24 is directly connected, vlan1

C 64.0.0.0/4 is directly connected, vlan64

Example H Combination of a distribute list and a route map and an AS-Path list filter

1.Add some new static routes to the AW peer, and configure the peer to redistribute these static routes into BGP:

add ip rou=156.23.4.0 mask=255.255.255.248 int=vlan2 next=52.34.5.4

add ip rou=156.23.4.8 mask=255.255.255.248 int=vlan2 next=52.45.45.45

add ip rou=156.23.4.32 mask=255.255.255.224 int=vlan2 next=52.45.45.45

add ip rou=156.23.4.144 mask=255.255.255.240 int=vlan2 next=52.45.45.45

add bgp import=static

2.Configure the peer to give Community 89:89 to the route 156.23.4.32/27 and append AS path 34599 to the route 156.34.4.144/28.

add ip prefixlist=com entry=1 action=match prefix=156.23.4.32 masklength=27

add ip prefixlist=as entry=1 action=match prefix=156.23.4.144 masklength=28

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

Image 40
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 metric 4. 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