CISCO IBGP COMMUNITY NO-EXPORT
This is a working configuration, This will redistribute connected routes based on route-map
configuration LOOPBACK1 and also will only advertise the connected route to neighbor
peer address 2.2.2.2 with configured route-map COMMUNITY.
The community is set to “no-export“, meaning the peer address of 2.2.2.2 will not advertise
this route to other peer’s connected to this peer.
interface Loopback0
ip address 100.0.0.1 255.255.255.255
!
router ospf 1
log-adjacency-changes
network 100.0.0.1 0.0.0.0 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected route-map LOOPBACK1
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 send-community
neighbor 2.2.2.2 route-map COMMUNITY out
!
!
ip access-list standard BGP_LOOPBACK1_ADVERTISE
permit 100.0.1.0 0.0.0.255
!
ip access-list standard LOOPBACK1_COMMUNITY
permit 100.0.1.0 0.0.0.255
!
!
route-map LOOPBACK1 permit 10
match ip address BGP_LOOPBACK1_ADVERTISE
!
route-map LOOPBACK1 deny 20
!
!
route-map COMMUNITY permit 10
match ip address LOOPBACK1_COMMUNITY
set community no-export
!
route-map COMMUNITY permit 20