Friday, October 7, 2011

LAB: BGP Communities Deleting

- Configure R2 to tag prefixes received from AS 254 with the community values “254:100”, “200:254” and “200:123”.
- Configure AS 300 to add the community value 300:200 to the list of communities and send them to AS 100.
- Configure AS 300 to remove any communities attached by AS 200, i.e. community starting with “200:” when sending prefixes to AS 100.

configuration:

R2:
route-map SET_COMMUNITY 10
set community 200:254 254:200 200:123
!
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
!
ip bgp-community new-format

R3:
router bgp 200
neighbor 155.1.37.7 send-community
!
ip bgp-community new-format

R6:
ip bgp-community new-format

SW1:
ip community-list expanded AS200 permit 200:[0-9]+_
!
route-map RESET_COMMUNITY permit 10
set community 300:200 additive
set comm-list AS200 delete
!
router bgp 300
neighbor 155.1.67.6 send-community
neighbor 155.1.37.3 route-map RESET_COMMUNITY in
!
ip bgp-community new-format

verification:

Rack1R3#show 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)
  Advertised to update-groups:
     1          2          3          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: 200:123 200:254 254:200
      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: 200:123 200:254 254:200

Rack1R6#show ip bgp 205.90.31.0
BGP routing table entry for 205.90.31.0/24, version 32
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2        
  (65014) 200 254
    155.1.13.3 (metric 2172416) from 155.1.146.1 (150.1.1.1)
      Origin incomplete, metric 0, localpref 100, valid, confed-external, best
  300 200 254
    155.1.67.7 from 155.1.67.7 (150.1.77.77)
      Origin incomplete, localpref 100, valid, external
      Community: 254:200 300:200

Rack1SW1#show ip bgp 205.90.31.0
BGP routing table entry for 205.90.31.0/24, version 64
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x880
  Advertised to update-groups:
     1          3        
  100 200 254, (received & used)
    155.1.67.6 from 155.1.67.6 (150.1.6.6)
      Origin incomplete, localpref 100, valid, external
  200 254
    155.1.37.3 from 155.1.37.3 (150.1.3.3)
      Origin incomplete, localpref 100, valid, external, best
      Community: 254:200 300:200

No comments:

Post a Comment