Sunday, May 1, 2011

Lab 114 - BGP Communities - NO-EXPORT

Prerequisites: CCNP level skills.

BGP Default Communities
  • internet - Advertise this route to the Internet community. All routers belong to it.
  • no-export - Do not advertise this route to eBGP peers (real BGP peers).
  • no-advertise - Do not advertise this route to any peer (internal or external).
  • local-as - Do not advertise this route to peers outside the local autonomous system. This route will not be advertised to other autonomous systems or sub-autonomous systems when confederations are configured.
source:
http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfbgp.html#wp1001855

Notice!
AS 13 is a confederation autonomous system. It has two sub-autonomous systems: 65001 and 65003.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1 
On R5 advertises 172.16.105.0/24 so that neither AS 20 nor AS 40 receive it. Do not configure any filtering in AS 13.

Solution

Task 1 
On R5 advertises 172.16.105.0/24 so that neither AS 20 nor AS 40 receive it. Do not configure any filtering in AS 13.

Pic. 2 - State Before Configuration Applied (R1).


Pic. 3 - State Before Configuration Applied (R2).

Pic. 4 - State Before Configuration Applied (R4).
  
R5 Configuration:
!
ip prefix-list L0 seq 5 permit 172.16.105.0/24
!
route-map SET_COMMUNITY permit 10
 match ip address prefix-list L0
 set community no-export
!
route-map SET_COMMUNITY permit 999
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 13
 neighbor 10.1.35.3 send-community
 neighbor 10.1.35.3 route-map SET_COMMUNITY out
 no auto-summary
!

R3 Configuration:
!
router bgp 65003
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 bgp confederation identifier 13
 bgp confederation peers 65001
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 65001
 neighbor 10.1.13.1 next-hop-self
 neighbor 10.1.13.1 send-community
 neighbor 10.1.23.2 remote-as 20
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!


Apply 'clear ip  bgp * out'

Verification:
Pic. 5 - BGP Table on R1.

Pic. 6 - Detailed BGP Prefix on R1.

Notice!
R3 received (and passed on) the community no-export to R1. Prefixes with this community cannot be advertised to eBGP peers! R2 and R4 no longer receive 172.16.105.0/24 like shown below:

Pic. 7 - BGP Table on R2.

Pic. 8 - Missing Prefix on R4.