Routing – block route being advertised to SP

bgpisprouting

I have a network that resembles this

CUSTOMER - BT - SPRINT
           BT - CISCO

customer loopback 192.168.10.1
customer loopback1 192.168.1.1

BT loopback 192.168.50.1

CISCO loopback 192.168.100.1

SPRINT loopback 192.168.150.1

customer is connected to BT

BT is connected to SPRINT and CISCO

I am using Community values and I want to block the advertisement of 192.168.1.1/24 to SPRINT but allow it to appear in Cisco

This was my failed attempt:

CUSTOMER:
ip prefix-list ROUTE 192.168.1.0/24
neighbor 2.2.2.2 (bt) route-map BLOCKSPRINT out
neighbor 2.2.2.2 send-community

route-map BLOCKSPRINT p 10
match ip add prefix-list ROUTE
set community 500:500
route-map BLOCKSPRINT p 20

BT
ip prefix-list CISCO 192.168.150.0/24
ip community-list 1 500:500 
neighbor 1.1.1.1 Peer-CUST in
neighbor 1.1.1.1 send-communities
neighbor 3.3.3.3 send-communities

route-map Peer-CUST p 10
match ip add prefix-list CISCO
match community 1
set community no-advertise
route-map Peer-CUST p 20

The address still shows up on the SPRINT router.

Best Answer

You have BT sending the route to Sprint with the no-advertise community so that the Sprint router will not advertise it. BT needs to filter the prefix to Sprint. Something like:

neighbor 3.3.3.3 distribute-list 1 out 
!
access-list 1 deny 192.168.1.1 0.0.0.255
access-list 1 permit any

or

neighbor 3.3.3.3 route-map BLOCKSPRINT out 
!
access-list 1 deny 192.168.1.1 0.0.0.255
access-list 1 permit any
!
route-map BLOCKSPRINT permit 10 
 match ip address 1
Related Topic