02-19-2012 02:34 AM - edited 03-04-2019 03:20 PM
R1 AS100--------L2SWITCH---------R4 AS100
|
|
|
R1( AS100)
|
|
|
R3 (AS200)
-------R4 is sending to R1 via ibgp
112.0.0.0/8 with "No-export" comm
113.0.0.0/8 No eommunity
R1#sh ip bgp 112.0.0.0/8
BGP routing table entry for 112.0.0.0/8, version 5
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer, Advertisements suppressed by an aggregate.)
Flag: 0x820
Not advertised to any peer
Local, (Received from a RR-client)
155.1.146.4 from 155.1.146.4 (113.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: no-export <-----------------------------------------
Router R1 is generating summary route 112.0.0.0 248.0.0.0
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only
neighbor 155.1.13.3 remote-as 200
neighbor 155.1.13.3 send-community both
neighbor 155.1.146.4 remote-as 100
neighbor 155.1.146.4 route-reflector-client
neighbor 155.1.146.4 send-community both
R1#sh ip bgp 112.0.0.0/5
BGP routing table entry for 112.0.0.0/5, version 10
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x820
Advertised to update-groups:
1 2
Local, (aggregated by 100 155.1.146.1)
0.0.0.0 from 0.0.0.0 (155.1.146.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best
Community: no-export<------------------------------Community attached to summary route as specific route is carrying the same community
Now i want to remove the "no-export" community from the summary route 112.0.0.0/5.
so i used attribute-map to remove the "no-export" community
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only attribute-map ATT
sh route-map ATT
route-map ATT, permit, sequence 10
Match clauses:--------------------------> No match statement.
Set clauses:
community none
Policy routing matches: 0 packets, 0 bytes
R1#sh ip bgp 112.0.0.0/5
BGP routing table entry for 112.0.0.0/5, version 13
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x880
Advertised to update-groups:
1 2
Local, (aggregated by 100 155.1.146.1)
0.0.0.0 from 0.0.0.0 (155.1.146.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best <----Commnity removed
Till here everything is looking fine.
Now if i match the prefix 112.0.0.0/5 in attribute-map its not removing the community of the route.
R1#sh route-map ATT
route-map ATT, permit, sequence 10
Match clauses:
ip address prefix-lists: ATT
Set clauses:
community none
Policy routing matches: 0 packets, 0 bytes
route-map ATT, permit, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R1#sh ip prefix-list ATT
ip prefix-list ATT: 1 entries
seq 5 permit 112.0.0.0/5
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only attribute-map ATT
neighbor 155.1.13.3 remote-as 200
neighbor 155.1.13.3 send-community both
neighbor 155.1.146.4 remote-as 100
neighbor 155.1.146.4 route-reflector-client
neighbor 155.1.146.4 send-community both
R1#sh ip bgp 112.0.0.0/5
BGP routing table entry for 112.0.0.0/5, version 4
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Advertised to update-groups:
1
Local, (aggregated by 100 155.1.146.1)
0.0.0.0 from 0.0.0.0 (155.1.146.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best
Community: no-export <------------------------------Community present in route
Want to know is matching crateria is not allowed OR not working in this senario.
This just to identify the reason.
Please suggest.
/Ganapt
02-19-2012 02:49 AM
Hi ,
I do not belive that match statements are permited on attribute map. This attribute map changes the attributes of the aggregate, so I do not see any logic behind using match.
Dan
02-19-2012 03:30 AM
Hi Dan,
I am not seeing logic in this however as per configuration its should macth the prefix 112.0.0.0/5
!
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only attribute-map ATT
!
ip prefix-list ATT seq 5 permit 112.0.0.0/5
!
route-map ATT permit 10
match ip address prefix-list ATT
set community none
!
route-map ATT permit 20!
!
/Ganpat
02-19-2012 05:09 AM
Hi ,
As per config guidelines , if you see the suppress-map and advertise-map have the explicit support of match statements - still limited to ACL and as-path acl - but the attribute-map does not have an explicit support of match. The desciption tells that : "An attribute map route map can be created to change the aggregate attributes." So I will stick to my first impresion that attribute-map does not support match statements.
Using the suppress-map keyword creates the aggregate route but suppresses advertisement of specified routes. You can use the match clauses of route maps to selectively suppress some more-specific routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported.
Using the advertise-map keyword selects specific routes that will be used to build different components of the aggregate route, such as AS_SET or community. This form of theaggregate-address command is useful when the components of an aggregate are in separate autonomous systems and you want to create an aggregate with AS_SET, and advertise it back to some of the same autonomous systems. You must remember to omit the specific autonomous system numbers from the AS_SET to prevent the aggregate from being dropped by the BGP loop detection mechanism at the receiving router. IP access lists and autonomous system path access lists match clauses are supported.
Using the attribute-map keyword allows attributes of the aggregate route to be changed. This form of the aggregate-address command is useful when one of the routes forming the AS_SET is configured with an attribute such as the community no-export attribute, which would prevent the aggregate route from being exported. An attribute map route map can be created to change the aggregate attributes.
Dan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide