Thursday, October 6, 2011

LAB: BGP - Aggregation -Advertised Map

-  Configure R2 with two new Loopback interfaces with the IP addresses 222.22.0.1/24 and 222.22.1.1/24 and advertise them into BGP.
-  Configure SW3 with a new Loopback interface with the IP address 222.22.3.1/24 and advertise it into BGP.
-  Configure R4 and R6 to advertise the aggregate 222.22.0.0/22 into BGP.  Include as much of the original AS-Path information as possible while still allowing devices in AS 300 to install the aggregate in the BGP table.

you cannot manipulate an important attribute such as AS_SET directly. Instead of this, you may specify the specific prefixes that will be used to make up the attribute list for the aggregate prefix. This is accomplished by using the advertise-map parameter to the aggregate-address command. The route-map used as advertise-map should permit specific prefixes to be used to compose the aggregate attributes, such as AS_SET. You can use only access-list, prefix-list or as-path access-lists to match the specific prefixes. Information from the prefixes denied by the route-map is not used when constructing the resulting summary-prefix. You may this method to remove the prefixes with unwanted BGP community attributes as well.

In our scenario, the AS_SET attribute for the summary route should be composed of AS numbers 200,254 and 300. However, by using the advertisemap parameter we filter out prefix originated in AS 300 and thus end up with AS_SET of {200,254}. This tricks AS 300 into accepting back the summary
prefix.

 configuration:

R2:
interface Loopback220
ip address 222.22.0.1 255.255.255.0
!
interface Loopback221
ip address 222.22.1.1 255.255.255.0
!
router bgp 200
network 222.22.0.0 mask 255.255.255.0
network 222.22.1.0 mask 255.255.255.0
 SW3:
interface Loopback 223
ip address 222.22.3.1 255.255.255.0
!
router bgp 300
network 222.22.3.0 mask 255.255.255.0

R4, R6:
ip prefix-list AS300_PREFIX permit 222.22.3.0/24
!
route-map ADVERTISE_MAP deny 10
match ip address prefix-list AS300_PREFIX
!
route-map ADVERTISE_MAP permit 100
!
router bgp 100
aggregate-address 222.22.0.0 255.255.252.0 summary-only as-set advertise-map ADVERTISE_MAP

verification:

Rack1R6#show ip bgp
BGP table version is 53, local router ID is 6.6.6.6
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
*  10.0.0.0/22      155.1.67.7                             0 300 200 i
*>i                 155.1.13.3               0    100      0 200 i
*> 10.0.1.0/24      155.1.67.7                             0 300 200 i
*> 28.119.16.0/24   54.1.1.254                             0 54 i
*> 28.119.17.0/24   54.1.1.254                             0 54 i
*> 112.0.0.0        54.1.1.254               0             0 54 50 60 i
*>i112.0.0.0/5      155.1.146.1              0    100      0 {54,50,60} i
*> 113.0.0.0        54.1.1.254               0             0 54 50 60 i
*> 114.0.0.0        54.1.1.254               0             0 54 i
*> 115.0.0.0        54.1.1.254               0             0 54 i
*> 116.0.0.0        54.1.1.254               0             0 54 i
*> 117.0.0.0        54.1.1.254               0             0 54 i
*> 118.0.0.0        54.1.1.254               0             0 54 i
*> 119.0.0.0        54.1.1.254               0             0 54 i
*> 155.1.0.0        0.0.0.0                            32768 i
s> 155.1.146.0/24   0.0.0.0                  0         32768 i
*  205.90.31.0      155.1.67.7                             0 300 200 254 ?
*>i                 155.1.13.3               0    100      0 200 254 ?
*  220.20.3.0       155.1.67.7                             0 300 200 254 ?
*>i                 155.1.13.3               0    100      0 200 254 ?
s  222.22.0.0       155.1.67.7                             0 300 200 i
s>i                 155.1.13.3               0    100      0 200 i
*> 222.22.0.0/22    0.0.0.0                       100  32768 {200,254} ?
s  222.22.1.0       155.1.67.7                             0 300 200 i
s>i                 155.1.13.3               0    100      0 200 i
s  222.22.2.0       155.1.67.7                             0 300 200 254 ?
s>i                 155.1.13.3               0    100      0 200 254 ?
s i222.22.3.0       155.1.13.3               0    100      0 200 300 i
s>                  155.1.67.7                             0 300 i

Rack1SW1#show ip bgp
BGP table version is 19, local router ID is 150.1.7.7
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
<snip>
*> 222.22.0.0      155.1.37.3     0     200 i
*> 222.22.0.0/22 155.1.67.6       0     0 100 {200,254} ?
*> 222.22.1.0     155.1.37.3      0     200 i
*> 222.22.2.0     155.1.37.3      0     200 254 ?
*>i222.22.3.0     155.1.79.9      0     100 0 i

No comments:

Post a Comment