Unternehmensberatung Lemberg
aggregate-address3

BGP-Funktion : aggregate-address part 3

Hallo zum dritten Teil. Hier beschäftigen wir uns noch mit den Optionen suppress-map und attribute-map. Dann sollte das Thema Aggregierung aber auch wirklich durch sein. Hier nochmal unser simpler Versuchsaufbau :

Zeichnung107

Zunächst schauen wir uns den Einsatz der attribute-map an, die hier vorgestellten Konfigurationen können das selbe Ergebnis auch mit der Option route-map erreichen.
Erstes Fallbeispiel ist, daß die Aggregierung der Route eine Metric von 50 erhalten soll. Schauen wir uns mal an, wie das mit route-maps, bzw. attribute-maps erreicht werden kann. Zuerst einmal die Konfig ohne route-maps und deren Ergebnisse :

Rtr-C#sh run | beg bgp
router bgp 3
 no synchronization
 bgp log-neighbor-changes
 aggregate-address 192.168.0.0 255.255.240.0 summary-only
 neighbor 172.22.1.1 remote-as 2
 neighbor 172.22.1.6 remote-as 4
 neighbor 172.22.1.9 remote-as 1
 no auto-summary
!

---------------------------------------------------------------------

Rtr-B#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.12.0/24 is directly connected, Loopback5
C    192.168.13.0/24 is directly connected, Loopback6
C    192.168.14.0/24 is directly connected, Loopback7
C    192.168.15.0/24 is directly connected, Loopback8
C    192.168.8.0/24 is directly connected, Loopback1
C    192.168.9.0/24 is directly connected, Loopback2
C    192.168.10.0/24 is directly connected, Loopback3
     172.22.0.0/16 is variably subnetted, 4 subnets, 2 masks
C      172.22.1.8/30 is directly connected, Serial0/0
B      172.22.1.0/30 [20/0] via 172.22.1.10, 00:13:24
C      172.22.100.17/32 is directly connected, Loopback0
B      172.22.100.6/32 [20/0] via 172.22.1.10, 00:13:24
C    192.168.11.0/24 is directly connected, Loopback4
B    192.168.0.0/20 [20/0] via 172.22.1.10, 00:13:25
Rtr-B#

---------------------------------------------------------------------

Rtr-A#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     172.22.0.0/16 is variably subnetted, 4 subnets, 2 masks
B      172.22.1.8/30 [20/0] via 172.22.1.2, 00:02:39
C      172.22.1.0/30 is directly connected, Serial0/0
B      172.22.100.17/32 [20/0] via 172.22.1.2, 00:02:39
C      172.22.100.6/32 is directly connected, Loopback1
C    192.168.4.0/24 is directly connected, Loopback104
C    192.168.5.0/24 is directly connected, Loopback105
C    192.168.6.0/24 is directly connected, Loopback106
C    192.168.7.0/24 is directly connected, Loopback107
C    192.168.0.0/24 is directly connected, Loopback100
C    192.168.1.0/24 is directly connected, Loopback101
C    192.168.2.0/24 is directly connected, Loopback102
C    192.168.3.0/24 is directly connected, Loopback103
B    192.168.0.0/20 [20/0] via 172.22.1.2, 00:02:41
Rtr-A#

Wie wir sehen, werden die Standard-Metriken auch bei der Aggregation Route verwendet. So weit auch kein Problem. Nun soll der Summary-Route, aber nicht den more-specific Routen die Metric 50 gegeben werden. Metric ist ein Attribut, es können natürlich weitere Attribute verwendet werden. Wichtig : ein “clear ip bgp *” wirkt wahre Wunder.

Rtr-C#sh run | beg bgp
router bgp 3
 no synchronization
 bgp log-neighbor-changes
 aggregate-address 192.168.0.0 255.255.240.0 summary-only attribute-map METRIC-CHANGE
 neighbor 172.22.1.1 remote-as 2
 neighbor 172.22.1.6 remote-as 4
 neighbor 172.22.1.9 remote-as 1
 no auto-summary
!
route-map METRIC-CHANGE permit 10
 description setze Metric auf 50
 set metric 50
!       

--------------------------------------------------------------------

Rtr-B#
*Mar 1 00:56:55.811: %BGP-5-ADJCHANGE: neighbor 172.22.1.10 Up
c2611xm-3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.12.0/24 is directly connected, Loopback5
C    192.168.13.0/24 is directly connected, Loopback6
C    192.168.14.0/24 is directly connected, Loopback7
C    192.168.15.0/24 is directly connected, Loopback8
C    192.168.8.0/24 is directly connected, Loopback1
C    192.168.9.0/24 is directly connected, Loopback2
C    192.168.10.0/24 is directly connected, Loopback3
     172.22.0.0/16 is variably subnetted, 4 subnets, 2 masks
C      172.22.1.8/30 is directly connected, Serial0/0
B      172.22.1.0/30 [20/0] via 172.22.1.10, 00:00:10
C      172.22.100.17/32 is directly connected, Loopback0
B      172.22.100.6/32 [20/0] via 172.22.1.10, 00:00:10
C    192.168.11.0/24 is directly connected, Loopback4
B    192.168.0.0/20 [20/50] via 172.22.1.10, 00:00:11
Rtr-B#

--------------------------------------------------------------------
 
Rtr-A#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     172.22.0.0/16 is variably subnetted, 4 subnets, 2 masks
B      172.22.1.8/30 [20/0] via 172.22.1.2, 00:01:41
C      172.22.1.0/30 is directly connected, Serial0/0
B      172.22.100.17/32 [20/0] via 172.22.1.2, 00:01:41
C      172.22.100.6/32 is directly connected, Loopback1
C    192.168.4.0/24 is directly connected, Loopback104
C    192.168.5.0/24 is directly connected, Loopback105
C    192.168.6.0/24 is directly connected, Loopback106
C    192.168.7.0/24 is directly connected, Loopback107
C    192.168.0.0/24 is directly connected, Loopback100
C    192.168.1.0/24 is directly connected, Loopback101
C    192.168.2.0/24 is directly connected, Loopback102
C    192.168.3.0/24 is directly connected, Loopback103
B    192.168.0.0/20 [20/50] via 172.22.1.2, 00:01:43
Rtr-A#
 

So, was haben wir jetzt bewiesen? Es ist also möglich, auch aggregate-routes bestimmte Attribute mit zu übergeben. Wichtig ist, daß beim Einsatz von
route-maps unbedingt der BGP-Prozeß zurückgesetzt werden muß, damit Änderungen wirksam werden.
Im nächsten Part kümmern wir uns mal um die suppress-map. Dies kann interessant sein, wenn bei einer summary-only doch bestimmte Netze announced werden sollen, oder bestimmte Netze bei einer aggregation ohne summary-only eben nicht announced werden sollen. Genug verwirrt ? Auf gehts...
Folgendes Fallbeispiel : Es soll nur eine Summary-Route (also eine Aggregation) announced werden. Rtr-E benötigt aber auch eine more-specific-route, nämlich das Netz 192.168.5.0, aus welchen Gründen auch immer. Wie wir sehen, schafft untere Konfig den gewünschten Effekt :

Karriere   Kontakt   Impressum