Sunday, May 1, 2011

Lab 116 - BGP Communities - LOCAL-AS

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

Topology

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

Task 1 
R5 is advertising 172.16.105.0/24 into BGP. Use the BGP community so it can be propagated in AS 65035 (sub-autonomous system) and is not advertised any further.

Solution

Task 1 
R5 is advertising 172.16.105.0/24 into BGP. Use the BGP community so it can be propagated in AS 65035 (sub-autonomous system) and is not advertised any further.

R5 Configuration:
!
ip prefix-list LOOPBACK0 seq 5 permit 172.16.105.0/24
!
route-map SET_COMMUNITY permit 10
 match ip address prefix-list LOOPBACK0
 set community local-AS
!
route-map SET_COMMUNITY permit 999
!
router bgp 65035
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 bgp confederation identifier 135
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 65035
 neighbor 10.1.35.3 send-community
 neighbor 10.1.35.3 route-map SET_COMMUNITY out
 no auto-summary
!

Verification:
Pic. 2 - BGP Prefix on R3.

Notice!
The prefixes with the community 'local-as' cannot be advertised outside the AS. This includes sub-autonomous systems which are members of a confederation AS. R1 does not receive 172.16.105.0/24 like shown below.

Pic. 3 - BGP Table on R1.