Originating BGP advertisements and BGP community tagging in Cisco IOS-XR

Originating BGP advertisement can be configured to any iBGP peer router. Here’s the sample configuration of originating BGP routes and community tagging in Cisco

bgp

Assuming these are the summarized prefixes that you want to advertise via BGP.
111.111.0.0/16
222.222.0.0/16

Configuration:
  1. Configure the prefix-set

prefix-set SITE1
111.111.0.0/16,
222.222.0.0/16
end-set

2. Configure the community

route-policy bgp-statement
if destination in SITE1 then
set community (12345:111)
endif
end-policy

3. Configure BGP

router bgp 11111
nsr
bgp router-id 1.1.1.1
bgp graceful-restart
address-family ipv4 unicast
network 111.111.0.0/16
network 222.222.0.0/16

neighbor-group RR-IBG
remote-as 11111
password encrypted 2185073C7B74154C
description RR IBGP GROUP IPV4
update-source Loopback0
address-family ipv4 unicast
soft-reconfiguration inbound

neighbor 192.168.100.5
use neighbor-group RR-IBG
description RR-IPv4
address-family ipv4 unicast
route-policy iBGP-policy-in in
route-policy bgp-statement out


In Formal:

prefix-set SITE1
111.111.0.0/16,
222.222.0.0/16,
end-set

route-policy bgp-statement
if destination in SITE1 then
set community (12345:111)
endif
end-policy

router bgp 11111 nsr
router bgp 11111 bgp router-id 1.1.1.1
router bgp 11111 bgp graceful-restart
router bgp 11111 address-family ipv4 unicast
router bgp 11111 address-family ipv4 unicast network 111.111.0.0/16
router bgp 11111 address-family ipv4 unicast network 222.222.0.0/16
router bgp 11111 neighbor-group RR-IBG
router bgp 11111 neighbor-group RR-IBG remote-as 11111
router bgp 11111 neighbor-group RR-IBG password encrypted 2185073C7B74154C
router bgp 11111 neighbor-group RR-IBG description RR IBGP GROUP IPV4
router bgp 11111 neighbor-group RR-IBG update-source Loopback0
router bgp 11111 neighbor-group RR-IBG address-family ipv4 unicast
router bgp 11111 neighbor-group RR-IBG address-family ipv4 unicast soft-reconfiguration inbound
router bgp 11111 neighbor 192.168.100.5
router bgp 11111 neighbor 192.168.100.5 use neighbor-group RR-IBG
router bgp 11111 neighbor 192.168.100.5 description RR-IPv4
router bgp 11111 neighbor 192.168.100.5 address-family ipv4 unicast
router bgp 11111 neighbor 192.168.100.5 address-family ipv4 unicast route-policy iBGP-policy-in in
router bgp 11111 neighbor 192.168.100.5 address-family ipv4 unicast route-policy bgp-statement out

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *