Routing-Richtlinien für BGP-Communitys
Verstehen von BGP-Communities, erweiterten Communities und großen Communities als Übereinstimmungsbedingungen für Routing-Richtlinien
Eine BGP-Community ist eine Gruppe von Zielen, die sich ein gemeinsames Eigentum teilen. Community-Informationen sind als Pfadattribut in BGP-Aktualisierungsmeldungen enthalten. Diese Informationen identifizieren Community-Mitglieder und ermöglichen es Ihnen, Aktionen für eine Gruppe durchzuführen, ohne jedes Mitglied näher ausführen zu müssen. Sie können Community- und erweiterte Community-Attribute verwenden, um Routing-Entscheidungen wie Annahme, Ablehnung, Präferenz oder Neuverteilung auszulösen.
Sie können Community-Tags zu Nicht-BGP-Routen über die Konfiguration (für statische, aggregierte oder generierte Routen) oder eine Import-Routing-Richtlinie zuweisen. Diese Tags können dann abgeglichen werden, wenn BGP die Routen exportiert.
Ein Community-Wert ist ein 32-Bit-Feld, das in zwei Hauptabschnitte unterteilt ist. Die ersten 16 Bit des Werts kodieren die AS-Nummer des Netzwerks, aus dem die Community stammt, während die letzten 16 Bit eine eindeutige Nummer tragen, die vom AS zugewiesen wird. Dieses System versucht, einen weltweit eindeutigen Satz von Community-Werten für jeden AS im Internet zu garantieren. Junos OS verwendet die Notation von , wobei jeder Wert eine Dezimalzahl ist.as-number:community-value
Die AS-Werte 0 und 65.535 sind reserviert, ebenso wie alle Community-Werte innerhalb dieser AS-Nummern. Jede Community oder Gruppe von Communitys erhält einen Namen innerhalb der Konfigurationshierarchie.[edit policy-options]
Der Name der Community identifiziert es eindeutig für das Routing-Gerät und dient als Methode, nach der Routen kategorisiert werden. Eine Route mit dem Community-Wert 64510:1111 könnte z. B. zur Community mit dem Namen gehören.AS64510-routes
Der Community-Name wird auch innerhalb einer Routing-Richtlinie als Übereinstimmungskriterium oder als Aktion verwendet. Die Befehlssyntax zum Erstellen einer Community lautet: policy-options .community name members [community-ids]
Dabei handelt es sich entweder um einen einzelnen Community-Wert oder um mehrere Community-Werte.community-ids
Wenn einem Community-Namen mehr als ein Wert zugewiesen wird, interpretiert das Routing-Gerät dies als logisches UND der Community-Werte. Mit anderen Worten, eine Route muss alle konfigurierten Werte aufweisen, bevor ihr der Community-Name zugewiesen wird.
Das reguläre Community-Attribut sind vier Oktette. Netzwerkerweiterungen, wie z. B. VPNs, haben Funktionsanforderungen, die von einem Attribut wie einer Community erfüllt werden können. Der 4-Oktett-Community-Wert bietet jedoch nicht genug Erweiterung und Flexibilität, um VPN-Anforderungen zu erfüllen. Dies führt zur Schaffung erweiterter Communities. Eine erweiterte Community ist ein 8-Oktett-Wert, der ebenfalls in zwei Hauptabschnitte unterteilt ist. Die ersten 2 Oktette der Community codieren ein Typfeld, während die letzten 6 Oktette einen eindeutigen Datensatz in einem durch das Typfeld definierten Format enthalten. Erweiterte Communitys bieten einen größeren Bereich zum Gruppieren oder Kategorisieren von Communitys.
Das BGP-Attributformat für erweiterte Communitys besteht aus drei Feldern: type:administrator:assigned-number
. Das Routing-Gerät erwartet, dass Sie die Wörter verwenden oder das Typfeld darstellen.target
origin
Das Feld "Administrator" verwendet eine Dezimalzahl für die AS- oder IPv4-Adresse, während das Feld "Zugewiesene Nummer" eine Dezimalzahl erwartet, die nicht größer als die Größe des Feldes ist (65.535 für 2 Oktette oder 4.294.967.295 für 4 Oktette).
Beim Angeben von Community-IDs für Standard- und erweiterte Community-Attribute können Sie reguläre Ausdrücke im UNIX-Stil verwenden. Die einzige Ausnahme sind VPN-Importrichtlinien (), die keine regulären Ausdrücke für das erweiterte Community-Attribut unterstützen.vrf-import
Reguläre BGP-Community-Attribute sind ein Attribut variabler Länge, das aus einem Satz von einem oder mehreren 4-Byte-Werten besteht, die in 16-Bit-Werte aufgeteilt wurden. Das höchstwertige Wort wird als AS-Zahl interpretiert und das niedrigstwertige Wort ist ein lokal definierter Wert, der vom Operator des AS zugewiesen wird. Seit der Einführung von 4-Byte-ASNs können die reguläre 4-Byte-BGP-Community und die erweiterte 6-Byte-BGP-Community BGP-Community-Attribute nicht mehr unterstützen. Betreiber kodieren die AS-Nummer häufig im lokalen Teil der BGP-Community, was bedeutet, dass das Format der Community manchmal ASN:ASN ist. Bei der 4-Byte-ASN benötigen Sie 8 Byte, um sie zu codieren. Obwohl die erweiterte BGP-Community die Codierung eines 4-Byte-AS als globales Administratorfeld zulässt, verfügt das lokale Administratorfeld nur über 2 Byte verfügbaren Speicherplatz. Daher ist auch das erweiterte 6-Byte-Community-Attribut ungeeignet. Um dieses Problem zu lösen, können Sie mit Junos OS ein optionales transitives Pfadattribut konfigurieren – eine große 12-Byte-BGP-Community, die den wichtigsten 4-Byte-Wert zur Codierung der autonomen Systemnummer als globaler Administrator bereitstellt, und die verbleibenden zwei zugewiesenen 4-Byte-Nummern zur Codierung der lokalen Werte, wie in RFC 8092 definiert. Sie können die große BGP-Community auf der Hierarchieebene und konfigurieren.[edit policy-options community community-name members]
[edit routing-options static route ip-address community]
Das BGP-Format für große Community-Attribute besteht aus vier Feldern: :.large
global administrator:assigned number:assigned number
Die BGP-IPv6-Unicast-Adressen-spezifische erweiterte Community wird als Satz von 20-Byte-Werten codiert. Der 20-Byte-Wert wird im folgenden Format interpretiert:
-
Most significant 2-Byte codiert den Type- und Sub-Type-Wert (hoher Wert (höchstwertiges Byte) und niedriger Wert (zweithöchstwertiges Byte)).
-
Die nächsten 16 Bytes codieren die IPv6-Unicastadresse. Er ist der globale Administrator im IETF RFC.
-
Die letzten 2 Bytes kodieren die vom Operator definierten lokalen Werte. Er ist lokaler Administrator im IETF RFC.
Die IPv6-Unicast-Adressen-spezifischen BGP-Extended-Community-Attribute werden durch ein Schlüsselwort dargestellt, oder gefolgt von IPv6 und lokalem Administrator, getrennt durch <, > und :.ipv6-target
ipv6-origin
ipv6-extended
Die Länge des BGP-Attributwerts für große Communities sollte ein Vielfaches ungleich Null von 12 sein.
Siehe auch
Beispiel: Konfigurieren einer Routing-Richtlinie zur Umverteilung von BGP-Routen mit einem bestimmten Community-Tag in IS-IS
In diesem Beispiel wird eine Richtlinie definiert, die BGP-Routen aus der Community übernimmt und sie mit einer Metrik von 63 in IS-IS platziert.Edu
Anforderungen
Vor der Konfiguration dieses Beispiels ist keine spezielle Konfiguration erforderlich, die über die Geräteinitialisierung hinausgeht.
Überblick
Abbildung 1 Zeigt die in diesem Beispiel verwendete Topologie.
In diesem Beispiel befinden sich Gerät A, Gerät B, Gerät C und Gerät D im autonomen System (AS) 1 und führen IS-IS aus. Auf allen AS 1-Geräten, mit Ausnahme von Gerät D, wird internes BGP (IBGP) ausgeführt.
Gerät E befindet sich in AS 2 und verfügt über eine externe BGP-Peering-Sitzung (EBGP) mit Gerät C. Gerät E verfügt über zwei statische Routen: 10.2.0.0/16 und 10.3.0.0/16. Diese Routen sind mit dem Community-Attribut Edu 2:5 gekennzeichnet und werden über EBGP für Gerät C angekündigt.
Gerät C akzeptiert die BGP-Routen, die mit dem Community-Attribut Edu 2:5 gekennzeichnet sind, verteilt die Routen in IS-IS neu und wendet eine IS-IS-Metrik von 63 auf diese Routen an.
CLI-Schnellkonfiguration Zeigt die Konfiguration für alle Geräte in Abbildung 1an. In diesem Abschnitt werden die Schritte für Gerät C und Gerät E beschrieben.#d205e61__d205e378
Konfiguration
Verfahren
CLI-Schnellkonfiguration
Um dieses Beispiel schnell zu konfigurieren, kopieren Sie die folgenden Befehle, fügen Sie sie in eine Textdatei ein, entfernen Sie alle Zeilenumbrüche, ändern Sie alle Details, die für Ihre Netzwerkkonfiguration erforderlich sind, und kopieren Sie dann die Befehle und fügen Sie sie in die CLI auf Hierarchieebene ein.[edit]
Gerät A
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.5/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0001.00 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.1 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group int neighbor 192.168.0.3 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.1 set routing-options autonomous-system 1
Gerät B
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.6/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.9/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0002.00 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.2 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.3 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.2 set routing-options autonomous-system 1
Gerät C
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.10/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.13/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.25/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0003.00 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.3 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group external-peers type external set protocols bgp group external-peers export send-isis-and-direct set protocols bgp group external-peers peer-as 2 set protocols bgp group external-peers neighbor 10.0.0.26 set protocols isis export Edu-to-isis set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface fe-1/2/2.0 level 1 disable set protocols isis interface fe-1/2/2.0 level 2 passive set protocols isis interface lo0.0 set policy-options policy-statement Edu-to-isis term 1 from protocol bgp set policy-options policy-statement Edu-to-isis term 1 from community Edu set policy-options policy-statement Edu-to-isis term 1 then metric 63 set policy-options policy-statement Edu-to-isis term 1 then accept set policy-options policy-statement send-isis-and-direct term 1 from protocol isis set policy-options policy-statement send-isis-and-direct term 1 from protocol direct set policy-options policy-statement send-isis-and-direct term 1 from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement send-isis-and-direct term 1 from route-filter 192.168.0.0/16 orlonger set policy-options policy-statement send-isis-and-direct term 1 then accept set policy-options community Edu members 2:5 set routing-options router-id 192.168.0.3 set routing-options autonomous-system 1
Gerät D
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.14/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0004.00 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.4 set routing-options autonomous-system 1
Gerät E
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.26/30 set interfaces lo0 unit 7 family inet address 192.168.0.5/32 primary set interfaces lo0 unit 7 family inet address 10.2.0.1/32 set interfaces lo0 unit 7 family inet address 10.3.0.1/32 set protocols bgp group external-peers type external set protocols bgp group external-peers export statics set protocols bgp group external-peers peer-as 1 set protocols bgp group external-peers neighbor 10.0.0.25 set policy-options policy-statement statics from protocol static set policy-options policy-statement statics then community add Edu set policy-options policy-statement statics then accept set policy-options community Edu members 2:5 set routing-options static route 10.2.0.0/16 reject set routing-options static route 10.2.0.0/16 install set routing-options static route 10.3.0.0/16 reject set routing-options static route 10.3.0.0/16 install set routing-options router-id 192.168.0.5 set routing-options autonomous-system 2
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät E:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@E# set fe-1/2/0 unit 0 family inet address 10.0.0.26/30 user@E# set lo0 unit 7 family inet address 192.168.0.5/32 primary user@E# set lo0 unit 7 family inet address 10.2.0.1/32 user@E# set lo0 unit 7 family inet address 10.3.0.1/32
Konfigurieren Sie die Richtlinie, die den statischen Routen das community-Attribut hinzufügt.
statics
Edu
[edit policy-options] user@E# set policy-statement statics from protocol static user@E# set policy-statement statics then community add Edu user@E# set policy-statement statics then accept user@E# set community Edu members 2:5
Konfigurieren Sie EBGP, und wenden Sie die Richtlinie an.
statics
[edit protocols bgp group external-peers] user@E# set type external user@E# set export statics user@E# set peer-as 1 user@E# set protocols bgp group external-peers neighbor 10.0.0.25
Konfigurieren Sie die statischen Routen.
[edit routing-options static] user@E# set route 10.2.0.0/16 reject user@E# set route 10.2.0.0/16 install user@E# set route 10.3.0.0/16 reject user@E# set route 10.3.0.0/16 install
Konfigurieren Sie die Router-ID und die AS-Nummer.
[edit routing-options] user@E# set router-id 192.168.0.5 user@E# set autonomous-system 2
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät C:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@C# set fe-1/2/0 unit 0 family inet address 10.0.0.10/30 user@C# set fe-1/2/0 unit 0 family iso user@C# set fe-1/2/1 unit 0 family inet address 10.0.0.13/30 user@C# set fe-1/2/1 unit 0 family iso user@C# set fe-1/2/2 unit 0 family inet address 10.0.0.25/30 user@C# set fe-1/2/2 unit 0 family iso user@C# set lo0 unit 0 family inet address 192.168.0.3/32 user@C# set lo0 unit 0 family iso address 49.0002.0192.0168.0003.00
Konfigurieren Sie IBGP.
[edit protocols bgp group int] user@C# set type internal user@C# set local-address 192.168.0.3 user@C# set neighbor 192.168.0.1 user@C# set neighbor 192.168.0.2
Konfigurieren Sie die Edu-to-isis-Richtlinie, die die von Gerät E gelernten Edu-Tagged-BGP-Routen neu verteilt und die Metrik 63 anwendet.
[edit policy-options] user@C# set policy-statement Edu-to-isis term 1 from protocol bgp user@C# set policy-statement Edu-to-isis term 1 from community Edu user@C# set policy-statement Edu-to-isis term 1 then metric 63 user@C# set policy-statement Edu-to-isis term 1 then accept user@C# set community Edu members 2:5
Aktivieren Sie IS-IS auf den Schnittstellen, und wenden Sie die Edu-to-ISIS-Richtlinie an.
[edit protocols isis] user@C# set export Edu-to-isis user@C# set interface fe-1/2/0.0 level 1 disable user@C# set interface fe-1/2/1.0 level 1 disable user@C# set interface fe-1/2/2.0 level 1 disable user@C# set interface fe-1/2/2.0 level 2 passive user@C# set interface lo0.0
Konfigurieren Sie die Richtlinie send-isis-and-direct, die Routen über EBGP an Gerät E umverteilt.
Ohne diese Richtlinie hätte Gerät E keine Verbindung zu den Netzwerken in AS 1.
[edit policy-options policy-statement send-isis-and-direct term 1] user@C# set from protocol isis user@C# set from protocol direct user@C# set from route-filter 10.0.0.0/16 orlonger user@C# set from route-filter 192.168.0.0/16 orlonger user@C# set then accept
Konfigurieren Sie EBGP, und wenden Sie die Richtlinie send-isis-and-direct an.
[edit protocols bgp group external-peers] user@C# set type external user@C# set export send-isis-and-direct user@C# set peer-as 2 user@C# set neighbor 10.0.0.26
Konfigurieren Sie die Router-ID und die AS-Nummer (Autonomous System).
[edit routing-options] user@C# set router-id 192.168.0.3 user@C# set autonomous-system 1
Ergebnisse
Bestätigen Sie im Konfigurationsmodus Ihre Konfiguration, indem Sie die Befehle , , und eingeben.show interfaces
show protocols
show policy-options
show routing-options
Wenn die Ausgabe nicht die gewünschte Konfiguration anzeigt, wiederholen Sie die Anweisungen in diesem Beispiel, um die Konfiguration zu korrigieren.
Gerät E
user@E# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.0.0.26/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.5/32 {
primary;
}
address 10.2.0.1/32;
address 10.3.0.1/32;
}
}
}
user@E# show protocols
bgp {
group external-peers {
type external;
export statics;
peer-as 1;
neighbor 10.0.0.25;
}
}
user@E# show policy-options
policy-statement statics {
from protocol static;
then {
community add Edu;
accept;
}
}
community Edu members 2:5;
user@E# show routing-options
static {
route 10.2.0.0/16 {
reject;
install;
}
route 10.3.0.0/16 {
reject;
install;
}
}
router-id 192.168.0.5;
autonomous-system 2;
Gerät C
user@C# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.0.0.10/30;
}
family iso;
}
}
fe-1/2/1 {
unit 0 {
family inet {
address 10.0.0.13/30;
}
family iso;
}
}
fe-1/2/2 {
unit 0 {
family inet {
address 10.0.0.25/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.3/32;
}
family iso {
address 49.0002.0192.0168.0003.00;
}
}
}
user@C# show protocols
bgp {
group int {
type internal;
local-address 192.168.0.3;
neighbor 192.168.0.1;
neighbor 192.168.0.2;
}
group external-peers {
type external;
export send-isis-and-direct;
peer-as 2;
neighbor 10.0.0.26;
}
}
isis {
export Edu-to-isis;
interface fe-1/2/0.0 {
level 1 disable;
}
interface fe-1/2/1.0 {
level 1 disable;
}
interface fe-1/2/2.0 {
level 1 disable;
level 2 passive;
}
interface lo0.0;
}
user@C# show policy-options
policy-statement Edu-to-isis {
term 1 {
from {
protocol bgp;
community Edu;
}
then {
metric 63;
accept;
}
}
}
policy-statement send-isis-and-direct {
term 1 {
from {
protocol [ isis direct ];
route-filter 10.0.0.0/16 orlonger;
route-filter 192.168.0.0/16 orlonger;
}
then accept;
}
}
community Edu members 2:5;
user@C# show routing-options
router-id 192.168.0.3;
autonomous-system 1;
Wenn Sie mit der Konfiguration des Geräts fertig sind, rufen Sie den Konfigurationsmodus auf .commit
Überprüfung
Vergewissern Sie sich, dass die Konfiguration ordnungsgemäß funktioniert.
IS-IS-Nachbar verifizieren
Zweck
Stellen Sie sicher, dass die BGP-Routen von Gerät E im IS-IS-Netzwerk in AS 1 kommuniziert werden.
Was
Geben Sie im Betriebsmodus den Befehl ein.show route protocol isis
user@D> show route protocol isis inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.4/30 *[IS-IS/18] 22:30:53, metric 30 > to 10.0.0.13 via fe-1/2/0.0 10.0.0.8/30 *[IS-IS/18] 22:30:53, metric 20 > to 10.0.0.13 via fe-1/2/0.0 10.0.0.24/30 *[IS-IS/18] 03:31:21, metric 20 > to 10.0.0.13 via fe-1/2/0.0 10.2.0.0/16 *[IS-IS/165] 02:36:31, metric 73 > to 10.0.0.13 via fe-1/2/0.0 10.3.0.0/16 *[IS-IS/165] 02:36:31, metric 73 > to 10.0.0.13 via fe-1/2/0.0 192.168.0.1/32 *[IS-IS/18] 03:40:28, metric 30 > to 10.0.0.13 via fe-1/2/0.0 192.168.0.2/32 *[IS-IS/18] 22:30:53, metric 20 > to 10.0.0.13 via fe-1/2/0.0 192.168.0.3/32 *[IS-IS/18] 22:30:53, metric 10 > to 10.0.0.13 via fe-1/2/0.0 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Bedeutung
Wie erwartet, sind die Routen 10.2.0.0/16 und 10.3.0.0/16 in der Routing-Tabelle von Gerät D als externe IS-IS-Routen mit einer Metrik von 73 enthalten. Wenn Gerät C der Metrik nicht 63 hinzugefügt hätte, hätte Gerät D eine Metrik von 10 für diese Routen.
Beispiel: Konfigurieren einer Routing-Richtlinie, die BGP-Communitys entfernt
In diesem Beispiel wird gezeigt, wie eine Richtlinie erstellt wird, die BGP-Routen akzeptiert, aber BGP-Communities aus den Routen entfernt.
Anforderungen
Über die Geräteinitialisierung hinaus ist keine spezielle Konfiguration erforderlich, bevor Sie dieses Beispiel konfigurieren.
Überblick
Dieses Beispiel zeigt zwei Routing-Geräte mit einer externen BGP-Verbindung (EBGP). Gerät R2 verwendet die BGP-Sitzung, um zwei statische Routen an Gerät R1 zu senden. Auf Gerät R1 gibt eine Importrichtlinie an, dass alle BGP-Communities aus den Routen entfernt werden müssen.
Wenn Communities auf EBGP-Peers konfiguriert sind, werden sie standardmäßig gesendet und akzeptiert. Um die Annahme von Communitys zu unterdrücken, die Sie von einem Nachbarn erhalten haben, können Sie alle Communitys oder eine bestimmte Gruppe von Communitys entfernen. Wenn das Ergebnis einer Richtlinie eine leere Gruppe von Communitys ist, wird das Community-Attribut nicht berücksichtigt. Um alle Communities zu entfernen, definieren Sie zunächst einen Platzhaltersatz von Communities (hier heißt die Community):wild
[edit policy-options] community wild members "* : *";
Geben Sie dann in der Routingrichtlinienanweisung die Aktion an:community delete
[edit policy-options] policy-statement policy-name { term term-name { then community delete wild; } }
Um eine bestimmte Community von einem autonomen System (AS) zu unterdrücken, definieren Sie die Community als .community wild members "*:community-value"
Topologie
Abbildung 2 zeigt das Beispielnetzwerk an.
Konfiguration
CLI-Schnellkonfiguration
Um dieses Beispiel schnell zu konfigurieren, kopieren Sie die folgenden Befehle, fügen Sie sie in eine Textdatei ein, entfernen Sie alle Zeilenumbrüche, ändern Sie alle Details, die für Ihre Netzwerkkonfiguration erforderlich sind, und kopieren Sie dann die Befehle und fügen Sie sie in die CLI auf Hierarchieebene ein.[edit]
Gerät R1
set interfaces fe-1/1/0 unit 0 description to-R2 set interfaces fe-1/1/0 unit 0 family inet address 10.0.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols bgp group external-peers type external set protocols bgp group external-peers peer-as 2 set protocols bgp group external-peers neighbor 10.0.0.2 import remove-communities set policy-options policy-statement remove-communities term 1 from protocol bgp set policy-options policy-statement remove-communities term 1 then community delete wild set policy-options policy-statement remove-communities term 1 then accept set policy-options policy-statement remove-communities term 2 then reject set policy-options community wild members *:* set routing-options router-id 192.168.0.1 set routing-options autonomous-system 1
Gerät R2
set interfaces fe-1/1/0 unit 0 description to-R1 set interfaces fe-1/1/0 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols bgp group external-peers type external set protocols bgp group external-peers export statics set protocols bgp group external-peers peer-as 1 set protocols bgp group external-peers neighbor 10.0.0.1 set policy-options policy-statement statics from protocol static set policy-options policy-statement statics then community add 1 set policy-options policy-statement statics then accept set policy-options community 1 members 2:1 set policy-options community 1 members 2:2 set policy-options community 1 members 2:3 set policy-options community 1 members 2:4 set policy-options community 1 members 2:5 set policy-options community 1 members 2:6 set policy-options community 1 members 2:7 set policy-options community 1 members 2:8 set policy-options community 1 members 2:9 set policy-options community 1 members 2:10 set routing-options static route 10.2.0.0/16 reject set routing-options static route 10.2.0.0/16 install set routing-options static route 10.3.0.0/16 reject set routing-options static route 10.3.0.0/16 install set routing-options router-id 192.168.0.3 set routing-options autonomous-system 2
Verfahren
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im Junos OS CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät R1:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@R1# set fe-1/1/0 unit 0 description to-R2 user@R1# set fe-1/1/0 unit 0 family inet address 10.0.0.1/30 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
Konfigurieren Sie BGP.
Wenden Sie die Importrichtlinie auf die BGP-Peering-Sitzung mit Gerät R2 an.
[edit protocols bgp group external-peers] user@R1# set type external user@R1# set peer-as 2 user@R1# set neighbor 10.0.0.2 import remove-communities
Konfigurieren Sie die Routingrichtlinie, mit der Communitys gelöscht werden.
[edit policy-options policy-statement remove-communities] user@R1# set term 1 from protocol bgp user@R1# set term 1 then community delete wild user@R1# set term 1 then accept user@R1# set term 2 then reject
Konfigurieren Sie die AS-Nummer (Autonomous System) und die Router-ID.
[edit routing-options ] user@R1# set router-id 192.168.0.1 user@R1# set autonomous-system 1
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im Junos OS CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät R2:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@R2# set fe-1/1/0 unit 0 description to-R1 user@R2# set fe-1/1/0 unit 0 family inet address 10.0.0.2/30 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
Konfigurieren Sie die Router-ID und die AS-Nummer (Autonomous System).
[edit routing-options] user@R2# set router-id 192.168.0.3 user@R2# set autonomous-system 2
Konfigurieren Sie BGP.
[edit protocols bgp group external-peers] user@R2# set type external user@R2# set peer-as 1 user@R2# set neighbor 10.0.0.1
Konfigurieren Sie mehrere Communitys oder eine einzelne Community mit mehreren Mitgliedern.
[edit policy-options community 1] user@R2# set members 2:1 user@R2# set members 2:2 user@R2# set members 2:3 user@R2# set members 2:4 user@R2# set members 2:5 user@R2# set members 2:6 user@R2# set members 2:7 user@R2# set members 2:8 user@R2# set members 2:9 user@R2# set members 2:10
Konfigurieren Sie die statischen Routen.
[edit routing-options static] user@R2# set route 10.2.0.0/16 reject user@R2# set route 10.2.0.0/16 install user@R2# set route 10.3.0.0/16 reject user@R2# set route 10.3.0.0/16 install
Konfigurieren Sie eine Routing-Richtlinie, die statische Routen in BGP ankündigt und die BGP-Community zu den Routen hinzufügt.
[edit policy-options policy-statement statics] user@R2# set from protocol static user@R2# set then community add 1 user@R2# set then accept
Wenden Sie die Exportrichtlinie an.
[edit protocols bgp group external-peers] user@R2# set export statics
Ergebnisse
Bestätigen Sie im Konfigurationsmodus Ihre Konfiguration, indem Sie die Befehle , , und eingeben.show interfaces
show protocols
show policy-options
show routing-options
Wenn die Ausgabe nicht die gewünschte Konfiguration anzeigt, wiederholen Sie die Anweisungen in diesem Beispiel, um die Konfiguration zu korrigieren.
Gerät R1
user@R1# show interfaces fe-1/1/0 { unit 0{ description to-R2; family inet { address 10.0.0.1/30; } } } lo0 { unit 0 { family inet { address 192.168.0.1/32; } } }
user@R1# show protocols bgp { group external-peers { type external; peer-as 2; neighbor 10.0.0.2 { import remove-communities; } } }
user@R1# show policy-options policy-statement remove-communities { term 1 { from protocol bgp; then { community delete wild; accept; } } term 2 { then reject; } } community wild members *:*;
user@R1# show routing-options router-id 192.168.0.1; autonomous-system 1;
Gerät R2
user@R2# show interfaces fe-1/1/0 { unit 0 { description to-R1; family inet { address 10.0.0.2/30; } } } lo0 { unit 0 { family inet { address 192.168.0.2/32; } } }
user@R2# show protocols bgp { group external-peers { type external; export statics; peer-as 1; neighbor 10.0.0.1; } }
user@R2# show policy-options policy-statement statics { from protocol static; then { community add 1; accept; } } community 1 members [ 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 ];
user@R2# show routing-options static { route 10.2.0.0/16 { reject; install; } route 10.3.0.0/16 { reject; install; } } router-id 192.168.0.3; autonomous-system 2;
Wenn Sie mit der Konfiguration der Geräte fertig sind, rufen Sie den Konfigurationsmodus auf .commit
Überprüfung
Vergewissern Sie sich, dass die Konfiguration ordnungsgemäß funktioniert.
Überprüfen der BGP-Routen
Zweck
Stellen Sie sicher, dass die Routing-Tabelle auf Gerät R1 keine BGP-Communitys enthält.
Was
Führen Sie den Befehl auf Gerät R1 aus.
show route protocols bgp extensive
user@R1> show route protocols bgp extensive inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) 10.2.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.2.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via lt-1/1/0.5, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 20:39:01 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Accepted Localpref: 100 Router ID: 192.168.0.3 10.3.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.3.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via lt-1/1/0.5, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 20:39:01 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Accepted Localpref: 100 Router ID: 192.168.0.3
Deaktivieren Sie auf Gerät R1 die Konfiguration in der Importrichtlinie.
community remove
[edit policy-options policy-statement remove-communities term 1] user@R1# deactivate then community delete wild user@R1# commit
Führen Sie auf Gerät R1 den Befehl aus, um die angekündigten Communitys anzuzeigen.
show route protocols bgp extensive
user@R1> show route protocols bgp extensive inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) 10.2.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.2.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via lt-1/1/0.5, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 20:40:53 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Communities: 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 Accepted Localpref: 100 Router ID: 192.168.0.3 10.3.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.3.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via lt-1/1/0.5, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 20:40:53 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Communities: 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 Accepted Localpref: 100 Router ID: 192.168.0.3
Bedeutung
Die Ausgabe zeigt, dass in der Routing-Tabelle von Gerät R1 die Communities in den BGP-Routen unterdrückt werden, die von Gerät R2 gesendet werden. Wenn die Einstellung in der Importrichtlinie von Gerät R1 deaktiviert ist, werden die Communities nicht mehr unterdrückt.community remove
Beispiel: Konfigurieren einer Routing-Richtlinie basierend auf der Anzahl der BGP-Communities
In diesem Beispiel wird gezeigt, wie eine Richtlinie erstellt wird, die BGP-Routen basierend auf der Anzahl der BGP-Communities akzeptiert.
Anforderungen
Über die Geräteinitialisierung hinaus ist keine spezielle Konfiguration erforderlich, bevor Sie dieses Beispiel konfigurieren.
Überblick
Dieses Beispiel zeigt zwei Routing-Geräte mit einer externen BGP-Verbindung (EBGP). Gerät R2 verwendet die BGP-Sitzung, um zwei statische Routen an Gerät R1 zu senden. Auf Gerät R1 gibt eine Importrichtlinie an, dass die von BGP empfangenen Routen bis zu fünf Communities enthalten können, um als Übereinstimmung betrachtet zu werden. Wenn eine Route z. B. drei Communities enthält, wird sie als Übereinstimmung betrachtet und akzeptiert. Wenn eine Route sechs oder mehr Gemeinden enthält, wird sie als Nichtübereinstimmung betrachtet und abgelehnt.
Es ist wichtig, sich daran zu erinnern, dass die Standardrichtlinie für EBGP darin besteht, alle Routen zu akzeptieren. Um sicherzustellen, dass die nicht übereinstimmenden Routen zurückgewiesen werden, müssen Sie am Ende der Richtliniendefinition eine Aktion einfügen.then reject
Topologie
Abbildung 3 zeigt das Beispielnetzwerk an.
Konfiguration
CLI-Schnellkonfiguration
Um dieses Beispiel schnell zu konfigurieren, kopieren Sie die folgenden Befehle, fügen Sie sie in eine Textdatei ein, entfernen Sie alle Zeilenumbrüche, ändern Sie alle Details, die für Ihre Netzwerkkonfiguration erforderlich sind, und kopieren Sie dann die Befehle und fügen Sie sie in die CLI auf Hierarchieebene ein.[edit]
Gerät R1
set interfaces fe-1/1/0 unit 0 description to-R2 set interfaces fe-1/1/0 unit 0 family inet address 10.0.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols bgp group external-peers type external set protocols bgp group external-peers peer-as 2 set protocols bgp group external-peers neighbor 10.0.0.2 import import-communities set policy-options policy-statement import-communities term 1 from protocol bgp set policy-options policy-statement import-communities term 1 from community-count 5 orlower set policy-options policy-statement import-communities term 1 then accept set policy-options policy-statement import-communities term 2 then reject set routing-options router-id 192.168.0.1 set routing-options autonomous-system 1
Gerät R2
set interfaces fe-1/1/0 unit 0 description to-R1 set interfaces fe-1/1/0 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols bgp group external-peers type external set protocols bgp group external-peers export statics set protocols bgp group external-peers peer-as 1 set protocols bgp group external-peers neighbor 10.0.0.1 set policy-options policy-statement statics from protocol static set policy-options policy-statement statics then community add 1 set policy-options policy-statement statics then accept set policy-options community 1 members 2:1 set policy-options community 1 members 2:2 set policy-options community 1 members 2:3 set policy-options community 1 members 2:4 set policy-options community 1 members 2:5 set policy-options community 1 members 2:6 set policy-options community 1 members 2:7 set policy-options community 1 members 2:8 set policy-options community 1 members 2:9 set policy-options community 1 members 2:10 set routing-options static route 10.2.0.0/16 reject set routing-options static route 10.2.0.0/16 install set routing-options static route 10.3.0.0/16 reject set routing-options static route 10.3.0.0/16 install set routing-options router-id 192.168.0.3 set routing-options autonomous-system 2
Verfahren
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im Junos OS CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät R1:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@R1# set fe-1/1/0 unit 0 description to-R2 user@R1# set fe-1/1/0 unit 0 family inet address 10.0.0.1/30 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
Konfigurieren Sie BGP.
Wenden Sie die Importrichtlinie auf die BGP-Peering-Sitzung mit Gerät R2 an.
[edit protocols bgp group external-peers] user@R1# set type external user@R1# set peer-as 2 user@R1# set neighbor 10.0.0.2 import import-communities
Konfigurieren Sie die Routingrichtlinie, die direkte Routen sendet.
[edit policy-options policy-statement import-communities] user@R1# set term 1 from protocol bgp user@R1# set term 1 from community-count 5 orlower user@R1# set term 1 then accept user@R1# set term 2 then reject
Konfigurieren Sie die AS-Nummer (Autonomous System) und die Router-ID.
[edit routing-options ] user@R1# set router-id 192.168.0.1 user@R1# set autonomous-system 1
Schritt-für-Schritt-Anleitung
Im folgenden Beispiel müssen Sie durch verschiedene Ebenen in der Konfigurationshierarchie navigieren. Weitere Informationen zum Navigieren in der CLI finden Sie unter Verwenden des CLI-Editors im Konfigurationsmodus im Junos OS CLI-Benutzerhandbuch.Verwenden des CLI-Editors im Konfigurationsmodushttps://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/junos-cli/junos-cli.html
So konfigurieren Sie Gerät R2:
Konfigurieren Sie die Schnittstellen.
[edit interfaces] user@R2# set fe-1/1/0 unit 0 description to-R1 user@R2# set fe-1/1/0 unit 0 family inet address 10.0.0.2/30 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
Konfigurieren Sie die Router-ID und die AS-Nummer (Autonomous System).
[edit routing-options] user@R2# set router-id 192.168.0.3 user@R2# set autonomous-system 2
Konfigurieren Sie BGP.
[edit protocols bgp group external-peers] user@R2# set type external user@R2# set peer-as 1 user@R2# set neighbor 10.0.0.1
Konfigurieren Sie mehrere Communitys oder eine einzelne Community mit mehreren Mitgliedern.
[edit policy-options community 1] user@R2# set members 2:1 user@R2# set members 2:2 user@R2# set members 2:3 user@R2# set members 2:4 user@R2# set members 2:5 user@R2# set members 2:6 user@R2# set members 2:7 user@R2# set members 2:8 user@R2# set members 2:9 user@R2# set members 2:10
Konfigurieren Sie die statischen Routen.
[edit routing-options static] user@R2# set route 10.2.0.0/16 reject user@R2# set route 10.2.0.0/16 install user@R2# set route 10.3.0.0/16 reject user@R2# set route 10.3.0.0/16 install
Konfigurieren Sie eine Routing-Richtlinie, die statische Routen in BGP ankündigt und die BGP-Community zu den Routen hinzufügt.
[edit policy-options policy-statement statics] user@R2# set from protocol static user@R2# set then community add 1 user@R2# set then accept
Wenden Sie die Exportrichtlinie an.
[edit protocols bgp group external-peers] user@R2# set export statics
Ergebnisse
Bestätigen Sie im Konfigurationsmodus Ihre Konfiguration, indem Sie die Befehle , , und eingeben.show interfaces
show protocols
show policy-options
show routing-options
Wenn die Ausgabe nicht die gewünschte Konfiguration anzeigt, wiederholen Sie die Anweisungen in diesem Beispiel, um die Konfiguration zu korrigieren.
Gerät R1
user@R1# show interfaces fe-1/1/0 { unit 0{ description to-R2; family inet { address 10.0.0.1/30; } } } lo0 { unit 0 { family inet { address 192.168.0.1/32; } } } }
user@R1# show protocols bgp { group external-peers { type external; peer-as 2; neighbor 10.0.0.2 { import import-communities; } } }
user@R1# show policy-options policy-statement import-communities { term 1 { from { protocol bgp; community-count 5 orlower; } then accept; } term 2 { then reject; } }
user@R1# show routing-options router-id 192.168.0.1; autonomous-system 1;
Gerät R2
user@R2# show interfaces fe-1/1/0 { unit 0 { description to-R1; family inet { address 10.0.0.2/30; } } } lo0 { unit 0 { family inet { address 192.168.0.2/32; } } }
user@R2# show protocols bgp { group external-peers { type external; export statics; peer-as 1; neighbor 10.0.0.1; } }
user@R2# show policy-options policy-statement statics { from protocol static; then { community add 1; accept; } } community 1 members [ 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 ];
user@R2# show routing-options static { route 10.2.0.0/16 { reject; install; } route 10.3.0.0/16 { reject; install; } } router-id 192.168.0.3; autonomous-system 2;
Wenn Sie mit der Konfiguration der Geräte fertig sind, rufen Sie den Konfigurationsmodus auf .commit
Überprüfung
Vergewissern Sie sich, dass die Konfiguration ordnungsgemäß funktioniert.
Überprüfen der BGP-Routen
Zweck
Stellen Sie sicher, dass die Routing-Tabelle auf Gerät R1 die erwarteten BGP-Routen enthält.
Was
Führen Sie den Befehl auf Gerät R1 aus.
show route protocols bgp
user@R1> show route protocols bgp inet.0: 5 destinations, 5 routes (3 active, 0 holddown, 2 hidden)
Ändern Sie auf Gerät R1 die Konfiguration in der Importrichtlinie.
community-count
[edit policy-options policy-statement import-communities term 1] user@R1# set from community-count 5 orhigher user@R1# commit
Führen Sie den Befehl auf Gerät R1 aus.
show route protocols bgp
user@R1> show route protocols bgp inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.2.0.0/16 *[BGP/170] 18:29:53, localpref 100 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/1/0.0 10.3.0.0/16 *[BGP/170] 18:29:53, localpref 100 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/1/0.0
Führen Sie auf Gerät R1 den Befehl aus, um die angekündigten Communitys anzuzeigen.
show route protocols bgp extensive
user@R1> show route protocols bgp extensive inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) 10.2.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.2.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via fe-1/1/0.0, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 18:56:10 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Communities: 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 Accepted Localpref: 100 Router ID: 192.168.0.3 10.3.0.0/16 (1 entry, 1 announced) TSI: KRT in-kernel 10.3.0.0/16 -> {10.0.0.2} *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 671 Address: 0x9458270 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via fe-1/1/0.0, selected Session Id: 0x100001 State: <Active Ext> Local AS: 1 Peer AS: 2 Age: 18:56:10 Validation State: unverified Task: BGP_2.10.0.0.2+179 Announcement bits (1): 0-KRT AS path: 2 I Communities: 2:1 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 Accepted Localpref: 100 Router ID: 192.168.0.3
Bedeutung
Die Ausgabe zeigt, dass in der Routing-Tabelle von Gerät R1 die von Gerät R2 gesendeten BGP-Routen ausgeblendet sind. Wenn die Einstellung in der Importrichtlinie von Gerät R1 geändert wird, werden die BGP-Routen nicht mehr ausgeblendet.community-count