Provider Communities (XRv)
Topology: bgp-mh-xr

configure
load bootflash:communities.init.cfg
commit r
y
This lab is the same as the previous "Provider Communities" lab, just with XRv nodes instead of IOL nodes.
All links are in the format 100.X.Y.X/24.
For example, the link between R4 and R7 is 100.4.7.0/24.
Lo0 is X.X.X.X/32 and is used for iBGP
Lo1 is <AS>.0.0.X/32 and is used as a public IP address that is pingable. The public Lo1 addresses are aggregated into a /8 at each edge router.
eBGP and iBGP is fully preconfigured.
Configure communities in AS20 to accomplish the following:
AS10 is an upstream provider, AS40 is a transit peer, and AS50 is a customer. Only advertise customer and local routes to transit peers and providers. Do not let transit routes leak to upstream providers, and upstream routes leak to transit providers.
Allow AS50 to control their inbound traffic using the following table:
Community
Action
20:80
LP=80
20:90
LP=90
20:110
LP=110
20:120
LP=120
20:1
Prepend AS20 one additional time on advertisements to upstreams
20:2
Prepend AS20 two additional times on advertisements to upstreams
20:3
Prepend AS20 three additional times on advertisements to upstreams
Answer
#R2, R4, R5
route-policy TAG_FOR_EXPORT
set community (20:1000)
end-policy
!
router bgp 20
add ipv4 uni
network 20.0.0.0/8 route-policy TAG_FOR_EXPORT
!
route-policy TRANSIT_OUTBOUND
if community matches-any (20:1000) then pass endif
end-policy
!
route-policy UPSTREAM_PREPEND
if community matches-any (20:1) then
prepend as-path own-as 1
endif
if community matches-any (20:2) then
prepend as-path own-as 2
endif
if community matches-any (20:3) then
prepend as-path own-as 3
endif
end-policy
!
route-policy UPSTREAM_OUTBOUND
if community matches-any (20:1000) then
apply UPSTREAM_PREPEND
pass
else
drop
endif
end-policy
!
route-policy CUSTOMER_INBOUND
if community matches-any (20:80) then
set local-preference 80
endif
if community matches-any (20:90) then
set local-preference 90
endif
if community matches-any (20:110) then
set local-preference 110
endif
if community matches-any (20:120) then
set local-preference 120
endif
set community (20:1000) additive
end-policy
#R2
router bgp 20
neighbor 100.1.2.1
address-family ipv4 unicast
route-policy UPSTREAM_OUTBOUND out
!
!
neighbor 100.2.10.10
address-family ipv4 unicast
route-policy TRANSIT_OUTBOUND out
#R4
router bgp 20
neighbor 100.4.7.7
address-family ipv4 unicast
route-policy CUSTOMER_INBOUND in
#R5
router bgp 20
neighbor 100.5.8.8
address-family ipv4 unicast
route-policy CUSTOMER_INBOUND in
Verification is the same as the previous lab which uses IOL nodes.
Last updated