Friday, October 7, 2011

LAB: BGP Communities Local-AS

- Re-configure R1 and R4 in the same BGP sub-confederation, using the AS# 65014. R6 should be in the sub-confederation 65006.
- Advertise R4’s Loopback0 network in the BGP, but make sure that inside AS 100 only R1 receives it.


configuration:

R1:

router bgp 65014
bgp confederation identifier 100
bgp confederation peers 65006
neighbor 155.1.13.3 remote-as 200
neighbor 155.1.146.4 remote-as 65014
neighbor 155.1.146.6 remote-as 65006

R4:
route-map SET_COMMUNITY
set community local-as
!
router bgp 65014
bgp confederation identifier 100
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0 summary-only
neighbor 155.1.45.5 remote-as 200
neighbor 155.1.146.1 remote-as 65014
neighbor 155.1.146.1 send-community
neighbor 204.12.1.254 remote-as 54
network 150.1.4.0 mask 255.255.255.0 route-map SET_COMMUNITY

R6:
router bgp 65006
bgp confederation identifier 100
bgp confederation peers 65014
network 155.1.146.0 mask 255.255.255.0
aggregate-address 155.1.0.0 255.255.0.0 summary-only
neighbor 54.1.1.254 remote-as 54
neighbor 155.1.67.7 remote-as 300
neighbor 155.1.146.1 remote-as 65014

verification:

Rack1R4#show ip bgp 150.1.4.4
BGP routing table entry for 150.1.4.0/24, version 25
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS)
Flag: 0x8A0
  Advertised to update-groups:
     1        
  Local
    0.0.0.0 from 0.0.0.0 (150.1.4.4)
      Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
      Community: local-AS

Rack1R4#show ip bgp neighbors 204.12.1.254 advertised-routes
BGP table version is 25, local router ID is 150.1.4.4
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.13.3               0    100      0 200 i
*> 10.0.0.0/22      155.1.45.5               0             0 200 i
*>i10.0.1.0/24      155.1.13.3               0    100      0 200 i
*>i10.0.2.0/24      155.1.13.3               0    100      0 200 i
*>i10.0.3.0/24      155.1.13.3               0    100      0 200 i
*> 28.119.16.0/24   204.12.1.254             0             0 54 i
*> 28.119.17.0/24   204.12.1.254             0             0 54 i
*> 112.0.0.0        204.12.1.254                           0 54 50 60 i
*> 113.0.0.0        204.12.1.254                           0 54 50 60 i
*> 114.0.0.0        204.12.1.254                           0 54 i
*> 115.0.0.0        204.12.1.254                           0 54 i
*> 116.0.0.0        204.12.1.254                           0 54 i
*> 117.0.0.0        204.12.1.254                           0 54 i
*> 118.0.0.0        204.12.1.254                           0 54 i
*> 119.0.0.0        204.12.1.254                           0 54 i
*> 155.1.0.0        0.0.0.0                            32768 i
*> 222.22.0.0       155.1.45.5                             0 200 i
   Network          Next Hop            Metric LocPrf Weight Path
*> 222.22.1.0       155.1.45.5                             0 200 i
*>i222.22.3.0       155.1.67.7               0    100      0 (65006) 300 i

Total number of prefixes 19 

Rack1R1#show ip bgp 150.1.4.0
BGP routing table entry for 150.1.4.0/24, version 24
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised outside local AS, RIB-failure(17))
Flag: 0x880
  Not advertised to any peer
  Local
    155.1.146.4 from 155.1.146.4 (150.1.4.4)
      Origin IGP, metric 0, localpref 100, valid, confed-internal, best
      Community: local-AS

Rack1R6#show ip bgp 150.1.4.0
% Network not in table

No comments:

Post a Comment