Friday, October 7, 2011

LAB: BGP Communities No-Export

- Modify R2’2 configuration so that AS254 prefixes are constrained to stay within AS 200 only.


configuration:

R2:
route-map SET_COMMUNITY permit 10
set community no-export
!
router bgp 200
neighbor 155.1.23.3 send-community
neighbor 155.1.0.5 send-community
neighbor 192.10.1.254 route-map SET_COMMUNITY in

R3:
router bgp 200
neighbor 155.1.0.5 send-community

R5:
router bgp 200
neighbor 155.1.23.3 send-community

verification:

Rack1R3#sho ip bgp 205.90.31.0
BGP routing table entry for 205.90.31.0/24, version 87
Paths: (2 available, best #2, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x820
  Advertised to update-groups:
     2          4        
  254
    192.10.1.254 (metric 2560512256) from 155.1.0.5 (150.1.5.5)
      Origin incomplete, metric 0, localpref 100, valid, internal
      Community: no-export
      Originator: 222.22.1.1, Cluster list: 150.1.5.5
  254, (Received from a RR-client)
    192.10.1.254 (metric 2560512256) from 155.1.23.2 (222.22.1.1)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      Community: no-export

Rack1R5#sho ip bgp 205.90.31.0
BGP routing table entry for 205.90.31.0/24, version 96
Paths: (2 available, best #2, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x820
  Advertised to update-groups:
     2          3        
  254
    192.10.1.254 (metric 2560512256) from 155.1.23.3 (150.1.3.3)
      Origin incomplete, metric 0, localpref 100, valid, internal
      Community: no-export
      Originator: 222.22.1.1, Cluster list: 150.1.3.3
  254, (Received from a RR-client)
    192.10.1.254 (metric 2560512256) from 155.1.0.2 (222.22.1.1)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      Community: no-export

Rack1R3#show ip bgp neighbors 155.1.37.7 advertised-routes
BGP table version is 94, local router ID is 150.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.0.0.0/24      155.1.23.2               0    100      0 i
*>i10.0.0.0/22      155.1.0.5                0    100      0 i
*>i10.0.1.0/24      155.1.23.2               0    100      0 i
*>i10.0.2.0/24      155.1.23.2               0    100      0 i
*>i10.0.3.0/24      155.1.23.2               0    100      0 i
*> 28.119.16.0/24   155.1.13.1                             0 100 54 i
*> 28.119.17.0/24   155.1.13.1                             0 100 54 i
*> 112.0.0.0        155.1.13.1                    200      0 100 54 50 60 i
*> 113.0.0.0        155.1.13.1                    200      0 100 54 50 60 i
*> 114.0.0.0        155.1.13.1                             0 100 54 i
*> 115.0.0.0        155.1.13.1                             0 100 54 i
*> 116.0.0.0        155.1.13.1                             0 100 54 i
*> 117.0.0.0        155.1.13.1                             0 100 54 i
*> 118.0.0.0        155.1.13.1                             0 100 54 i
*> 119.0.0.0        155.1.13.1                             0 100 54 i
*> 155.1.0.0        155.1.13.1                             0 100 i
*>i222.22.0.0       155.1.23.2               0    100      0 i
*>i222.22.1.0       155.1.23.2               0    100      0 i
*> 222.22.3.0       155.1.37.7                             0 300 i
         
Total number of prefixes 19 

No comments:

Post a Comment