- Ensure this community value propagates across AS 100.
- Configure R1 so that the summary prefix 112.0.0.0/5 is still advertised to AS 300 and AS 200.
In our scenario, we have R4 tagging just one prefix – 112.0.0.0/24 with the community value of “no-export”. However, when R1 aggregates all prefixes into one, the summary prefix inherits the “no-export” community from one of the specific routes. In effect, AS 100 speakers will not be able to advertise the summary prefix to the neighbors.
The solution to this problem is the use of the attribute-map parameter to the aggregate-address command. This parameter specifies the route-map that sets BGP attributes for the newly generated prefix. You may set any configuration BGP value, such as metric, origin, local-preference and so on.
However, in our case we are interested in setting the community attribute value for the summary. The route-map applies the set community none command and erases all communities for the new prefix. Naturally, all routers are configured to propagate communities across AS 100.
configuration:
R4:
no ip prefix-list NET_112
ip prefix-list NET_112 permit 112.0.0.0/8
!
no route-map SET_COMMUNITY
route-map SET_COMMUNITY permit 10
match ip address prefix-list NET_112
set community no-export
!
route-map SET_COMMUNITY permit 100
!
router bgp 100
neighbor 204.12.1.254 route-map SET_COMMUNITY in
neighbor 155.1.146.1 send-community
neighbor 155.1.146.1 send-community
R1:
route-map ATTR_MAP
set community none
!
router bgp 100
aggregate-address 112.0.0.0 248.0.0.0 summary-only as-set attributemap ATTR_MAP
neighbor 155.1.146.6 send-community
neighbor 155.1.146.4 send-community
verification:
Rack1R4#show ip bgp 112.0.0.0 255.0.0.0
BGP routing table entry for 112.0.0.0/8, version 42
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x800
Advertised to update-groups:
2
54 50 60
204.12.1.254 from 204.12.1.254 (31.3.0.1)
Origin IGP, localpref 100, valid, external, best
Community: no-export
BGP routing table entry for 112.0.0.0/8, version 42
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x800
Advertised to update-groups:
2
54 50 60
204.12.1.254 from 204.12.1.254 (31.3.0.1)
Origin IGP, localpref 100, valid, external, best
Community: no-export
before adding the attribute-map in R1.
Rack1R1#show ip bgp 112.0.0.0 248.0.0.0
BGP routing table entry for 112.0.0.0/5, version 126
Paths: (1 available, best #1, table Default-IP-Routing-Table, not
advertised to EBGP peer)
Flag: 0x880
Advertised to update-groups:
2
{54,50,60}, (aggregated by 100 150.1.1.1)
0.0.0.0 from 0.0.0.0 (150.1.1.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated,
local, best
Community: 54 no-export
Rack1R6#show ip bgp 112.0.0.0 248.0.0.0
BGP routing table entry for 112.0.0.0/5, version 92
Paths: (1 available, best #1, table Default-IP-Routing-Table, not
advertised to EBGP peer)
Flag: 0x880
Not advertised to any peer
{54,50,60}, (aggregated by 100 150.1.1.1)
155.1.146.1 from 155.1.146.1 (150.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 54 no-export
BGP routing table entry for 112.0.0.0/5, version 126
Paths: (1 available, best #1, table Default-IP-Routing-Table, not
advertised to EBGP peer)
Flag: 0x880
Advertised to update-groups:
2
{54,50,60}, (aggregated by 100 150.1.1.1)
0.0.0.0 from 0.0.0.0 (150.1.1.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated,
local, best
Community: 54 no-export
Rack1R6#show ip bgp 112.0.0.0 248.0.0.0
BGP routing table entry for 112.0.0.0/5, version 92
Paths: (1 available, best #1, table Default-IP-Routing-Table, not
advertised to EBGP peer)
Flag: 0x880
Not advertised to any peer
{54,50,60}, (aggregated by 100 150.1.1.1)
155.1.146.1 from 155.1.146.1 (150.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 54 no-export
after adding the attribute-map
Rack1R1#show ip bgp 112.0.0.0 248.0.0.0
BGP routing table entry for 112.0.0.0/5, version 61
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Multipath: iBGP
Flag: 0x820
Advertised to update-groups:
1 2
{54,50,60}, (aggregated by 100 150.1.1.1)
0.0.0.0 from 0.0.0.0 (150.1.1.1)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best
Community: 54
Rack1R1#show ip bgp neighbors 155.1.13.3 advertised-routes
BGP table version is 69, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i10.0.1.0/24 155.1.67.7 0 100 0 300 200 i
*>i28.119.16.0/24 54.1.1.254 0 100 0 54 i
*>i28.119.17.0/24 54.1.1.254 0 100 0 54 i
*> 112.0.0.0/5 0.0.0.0 100 32768 {54,50,60} i
*>i155.1.0.0 155.1.146.6 0 100 0 i
No comments:
Post a Comment