BGP 세션 및 경로 플랩
BGP 세션 재설정 이해하기
특정 구성 작업과 이벤트로 인해 BGP 세션이 재설정됩니다(삭제한 다음 다시 설정).
동일한 라우팅 디바이스에서 경로 리플렉션과 VPN을 모두 구성하는 경우, 경로 리플렉션 구성에 대한 다음 수정으로 현재 BGP 세션이 재설정됩니다.
cluster ID 추가 - BGP 세션이 cluster ID를 추가하는 그룹과 동일한 AS(Autonomous System) 번호를 공유하는 경우, BGP 세션이 동일한 그룹에 포함되어 있는지 여부에 관계없이 모든 BGP 세션이 재설정됩니다.
새 경로 리플렉터 생성 - AS 번호가 있는 내부 BGP(IBGP) 그룹이 있고 동일한 AS 번호로 새로운 경로 리플렉터 그룹을 생성하면 IBGP 그룹 및 새 경로 리플렉터 그룹의 모든 BGP 세션이 재설정됩니다.
BGP 그룹 이름 변경과 같은 BGP 피어에 영향을 미치는 구성 문을 변경하면 BGP 세션이 재설정됩니다.
계층 수준에서 지정된 주소 패밀리를 변경할 경우, 라우팅 디바이스의
[edit protocols bgp family]
모든 현재 BGP 세션이 중단된 후 다시 재설정됩니다.
예를 들면 다음과 같습니다. VPN 패밀리가 구성되면 BGP 세션 플랩 방지
이 예는 BGP 세션이 다운된 다음 가상 프라이빗 네트워크(VPN) 패밀리가 구성될 때 다시 켜지는 알려진 문제에 대한 해결 방법을 보여줍니다. 모든 VPN 제품군(예: , inet-vpn
, inet6-vpn
, inet6-mpvn
l2vpn
inet-mpvn
inet-mdt
, iso-vpn
등)이 BGP 마스터 인스턴스에서 구성된 경우, 경로 리플렉터(RR) 내부 BGP(IBGP) 세션 또는 외부 BGP(EBGP) 세션 중 하나에 대한 플랩이 동일한 VPN 패밀리로 구성된 다른 BGP 세션의 플랩을 유발합니다.
요구 사항
시작하기 전에 다음을 수행합니다.
라우터 인터페이스를 구성합니다.
IGP(Interior Gateway Protocol)를 구성합니다.
BGP를 구성합니다.
VPN을 구성합니다.
개요
라우터 또는 스위치가 경로 리플렉터(RR) 또는 AS 경계 라우터(외부 BGP 피어)와 VPN 제품군(예: family inet-vpn unicast
문)으로 구성되면 RR IBGP 세션 또는 EBGP 세션 중 하나에 대한 플랩이 문으로 family inet-vpn unicast
구성된 다른 모든 BGP 세션의 플랩을 발생합니다. 이 예는 이러한 불필요한 세션 플랩을 방지하는 방법을 보여줍니다.
플랩핑 동작의 이유는 VPN 경로를 생성할 때 Junos OS BGP 작업과 관련이 있습니다.
BGP는 원래 VPN 경로와 관련하여 다음과 같은 두 가지 작동 모드를 가지고 있습니다.
세션에 EBGP 피어가 없고 RR 클라이언트가 없기 때문에 BGP가 VPN 경로를 전파할 필요가 없는 경우, BGP는 .inet.0 라우팅 테이블 직접 instanceVPN 경로를 다른 PE 라우터로 내보냅니다. 이 동작은 많은 경로(.inet.0 테이블에 하나 instance, bgp.l3vpn.0 테이블에 하나)의 복사본을 생성하지 않도록 하여 효율적입니다.
세션에 EBGP 피어 또는 RR 클라이언트가 있기 때문에 BGP가 VPN 경로를 전파해야 하는 경우, BGP는 먼저 .inet.0 테이블의 VPN 경로를 instancebgp.l3vpn.0 테이블로 내보냅니다. 그런 다음 BGP는 경로를 다른 PE 라우터로 내보냅니다. 이 시나리오에서는 최적 경로 선택을 활성화하기 위해 경로의 두 복사본이 필요합니다. PE 라우터는 CE 디바이스와 RR 클라이언트 또는 EBGP 피어로부터 동일한 VPN 경로를 수신할 수 있습니다.
.inet.0의 경로가 보조 경로인 경우 경로 instance내보내기가 수행되지 않습니다. Junos OS 경로는 한 라우팅 테이블 기본 경로로 한 번만 내보내고 다른 라우팅 테이블 보조 경로로 내보냅니다. .inet.0의 경로 instance는 이미 보조 경로이므로 광고해야 하는 경우 bgp.l3vpn.0 테이블로 다시 이동할 수 없습니다. 경로가 bgp.l3vpn.0 테이블에 도달하지 않으므로 보급되지 않습니다. 한 가지 해결 방법은 inet.0으로 보급되어야 하는 경로를 보급하도록 하는 것입니다.
구성 변경으로 인해 BGP는 경로의 복사본 2개를 필요로 하지 않고 경로의 두 개 복사본을 필요로 하지 않는 경우(또는 반대) VPN 경로가 교환되는 모든 세션이 중단된 다음 다시 작동합니다. 이 예는 문에 family inet-vpn unicast
초점을 맞추고 있지만 개념은 모든 VPN NLRI(Network Layer Reachability Information) 체계에 적용됩니다. 이 문제는 논리적 시스템에도 영향을 미칩니다. VPN NLRI 패밀리와 관련된 마스터 인스턴스의 모든 BGP 세션은 VPN NLRI 패밀리에 대한 테이블 광고 변경을 구현하기 위해 중단됩니다. RR을 비RR 또는 역으로 변경하면(명령문을 추가하거나 제거함 cluster
) 테이블 광고 변경이 발생합니다. 또한, VPN NLRI 패밀리에 대한 마스터 인스턴스의 구성에서 첫 번째 EBGP 세션을 구성하거나 EBGP 세션을 제거하면 테이블 광고 변경이 발생합니다.
이러한 불필요한 세션 플랩을 방지하는 방법은 존재하지 않는 인접 주소와의 패시브 세션으로 추가 RR 클라이언트 또는 EBGP 세션을 구성하는 것입니다. 이 예는 EBGP 사례에 초점을 맞추고 있지만 RR 사례에도 동일한 해결이 작동합니다.
세션이 수동적일 때, 라우팅 디바이스는 Open 요청을 피어에 전송하지 않습니다. 라우팅 디바이스를 패시브로 구성하면 라우팅 디바이스가 TCP 연결을 시작하지 않습니다. 그러나 라우팅 디바이스가 피어로부터 연결과 Open 메시지를 수신하면 다른 BGP Open 메시지로 응답합니다. 각 라우팅 디바이스는 자체 기능을 선언합니다.
토폴로지
그림 1 은(는) EBGP 케이스의 토폴로지 를 보여줍니다. 라우터 R1은 라우터 R2 및 R3과의 IBGP 세션과 라우터 R4와의 EBGP 세션이 있습니다. 모든 세션에는 명령문이 family inet-vpn unicast
구성됩니다. R1-R4 EBGP 세션이 플랩되면 R1-R2 및 R1-R3 BGP 세션도 플랩됩니다.

그림 2 은(는) RR 케이스의 토폴로지 를 보여줍니다. 라우터 R1은 RR이고, 라우터 R3은 클라이언트입니다. 라우터 R1에는 라우터 R2 및 R3이 있는 IBGP 세션이 있습니다. 모든 세션에는 명령문이 family inet-vpn unicast
구성됩니다. R1-R3 세션이 플랩되면 R1-R2 및 R1-R4 세션도 플랩됩니다.

구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
set protocols bgp family inet-vpn unicast set protocols bgp family l2vpn signaling set protocols bgp group R1-R4 type external set protocols bgp group R1-R4 local-address 4.4.4.2 set protocols bgp group R1-R4 neighbor 4.4.4.1 peer-as 200 set protocols bgp group R1-R2-R3 type internal set protocols bgp group R1-R2-R3 log-updown set protocols bgp group R1-R2-R3 local-address 15.15.15.15 set protocols bgp group R1-R2-R3 neighbor 12.12.12.12 set protocols bgp group R1-R2-R3 neighbor 13.13.13.13 set protocols bgp group Fake type external set protocols bgp group Fake passive set protocols bgp group Fake neighbor 100.100.100.100 peer-as 500
절차
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
EBGP 시나리오를 구성하려면 다음을 수행합니다.
하나 이상의 VPN 패밀리를 구성합니다.
[edit protocols bgp] user@R1# set family inet-vpn unicast user@R1# set family l2vpn signaling
EBGP 세션을 구성합니다.
[edit protocols bgp] user@R1# set group R1-R4 type external user@R1# set group R1-R4 local-address 4.4.4.2 user@R1# set group R1-R4 neighbor 4.4.4.1 peer-as 200
IBGP 세션을 구성합니다.
[edit protocols bgp] user@R1# set group R1-R2-R3 type internal user@R1# set group R1-R2-R3 local-address 15.15.15.15 user@R1# set group R1-R2-R3 neighbor 12.12.12.12 user@R1# set group R1-R2-R3 neighbor 13.13.13.13
(선택 사항) BGP 피어가 상태를 전환할 때마다 메시지를 생성
syslog
할 수 있도록 BGP를 구성합니다.[edit protocols bgp] user@R1# set group R1-R2-R3 log-updown
문을 활성화하면
log-updown
BGP 상태 전환이 수준에서 기록됩니다warning
.
절차
단계별 절차
불필요한 세션 플랩이 발생하는지 확인하기 위해 다음을 수행합니다.
show bgp summary
명령을 실행하여 세션이 설정되었는지 확인합니다.user@R1> show bgp summary Groups: 2 Peers: 3 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 inet.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 4.4.4.1 200 6 5 0 0 1:08 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0 12.12.12.12 100 3 7 0 0 1:18 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0 13.13.13.13 100 3 6 0 0 1:14 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0
EBGP 세션을 비활성화합니다.
user@R1# deactivate group R1-R4 user@R1# commit
Mar 10 18:27:40 R1: rpd[1464]: bgp_peer_delete:6589: NOTIFICATION sent to 4.4.4.1 (External AS 200): code 6 (Cease) subcode 3 (Peer Unconfigured), Reason: Peer Deletion Mar 10 18:27:40 R1: rpd[1464]: bgp_adv_main_update:7253: NOTIFICATION sent to 12.12.12.12 (Internal AS 100): code 6 (Cease) subcode 6 (Other Configuration Change), Reason: Configuration change - VPN table advertise Mar 10 18:27:40 R1: rpd[1464]: bgp_adv_main_update:7253: NOTIFICATION sent to 13.13.13.13 (Internal AS 100): code 6 (Cease) subcode 6 (Other Configuration Change), Reason: Configuration change - VPN table advertise
show bgp summary
명령을 실행하여 세션 플랩을 확인합니다.user@R1> show bgp summary Groups: 1 Peers: 2 Down peers: 2 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 inet.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 12.12.12.12 100 4 9 0 1 19 Active 13.13.13.13 100 4 8 0 1 19 Active
user@R1> show bgp summary Groups: 1 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 inet.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 12.12.12.12 100 2 3 0 1 0 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0 13.13.13.13 100 2 3 0 1 0 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0
절차
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
불필요한 BGP 세션 플랩을 방지하기 위해 다음을 수행합니다.
피어 AS(Autonomous System)에 존재하지 않는 이웃 주소와 패시브 EBGP 세션을 추가합니다.
[edit protocols bgp] user@R1# set group Fake type external user@R1# set group Fake passive user@R1# set neighbor 100.100.100.100 peer-as 500
show bgp summary
명령을 실행하여 실제 세션이 설정되었고 패시브 세션이 유휴 상태인지 확인합니다.user@R1> show bgp summary Groups: 3 Peers: 4 Down peers: 1 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 4.4.4.1 200 9500 9439 0 0 2d 23:14:23 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0 12.12.12.12 100 10309 10239 0 0 3d 5:17:49 Establ bgp.l3vpn.0: 0/0/0/0 13.13.13.13 100 10306 10241 0 0 3d 5:18:25 Establ bgp.l3vpn.0: 0/0/0/0 100.100.100.100 500 0 0 0 0 2d 23:38:52 Idle
확인
구성이 제대로 작동하는지 확인합니다.
IBGP 세션이 계속 유지되는지 확인
목적
EBGP 세션이 비활성화된 후 IBGP 세션이 플랩되지 않도록 합니다.
실행
user@R1> show bgp summary Groups: 2 Peers: 3 Down peers: 1 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 12.12.12.12 100 10312 10242 0 0 3d 5:19:01 Establ bgp.l3vpn.0: 0/0/0/0 13.13.13.13 100 10309 10244 0 0 3d 5:19:37 Establ bgp.l3vpn.0: 0/0/0/0 100.100.100.100 500 0 0 0 0 2d 23:40:04 Idle
user@R1> show bgp summary Groups: 3 Peers: 4 Down peers: 1 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 0 0 0 0 0 0 bgp.l2vpn.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 4.4.4.1 200 5 4 0 0 28 Establ bgp.l3vpn.0: 0/0/0/0 bgp.l2vpn.0: 0/0/0/0 12.12.12.12 100 10314 10244 0 0 3d 5:19:55 Establ bgp.l3vpn.0: 0/0/0/0 13.13.13.13 100 10311 10246 0 0 3d 5:20:31 Establ bgp.l3vpn.0: 0/0/0/0 100.100.100.100 500 0 0 0 0 2d 23:40:58 Idle
감쇠 매개 변수 이해하기
BGP 경로 플래핑 은 BGP 시스템이 네트워크 연결성 정보를 보급하기 위해 과도한 수의 업데이트 메시지를 보내는 상황을 설명합니다. BGP 플랩 감쇠 는 BGP 피어 간에 전송되는 업데이트 메시지의 수를 줄여 안정적인 경로의 경로 컨버전스 시간에 부정적인 영향을 주지 않으면서 이러한 피어의 부하를 줄이는 방법입니다.
플랩 감쇠는 활성 또는 선호 경로로 선택을 부적격으로 경로를 표시하여 업데이트 메시지의 수를 줄입니다. 이러한 방식으로 경로를 표시하면 경로 정보 전파에 약간의 지연이 발생하거나 suppression, 그 결과 네트워크 안정성이 향상됩니다. 일반적으로 외부 BGP(EBGP) 경로(다른 AS의 경로)에 플랩 감쇠를 적용합니다. 또한 페더레이션 멤버 AS 간에 페더레이션 내에서 플랩 감쇠를 적용할 수 있습니다. AS 내 라우팅 일관성이 중요하므로 내부 BGP(IBGP) 경로에 플랩 감쇠를 적용하지 마십시오. (그렇게 하면 무시됩니다.)
이 규칙에는 예외가 있습니다. Junos OS 릴리스 12.2부터 주소 패밀리 수준에서 플랩 감쇠를 적용할 수 있습니다. Junos OS 릴리스 12.2 이상 설치에서 주소 패밀리 수준에서 플랩 감쇠를 적용하면 IBGP와 EBGP 모두에서 작동합니다.
기본적으로 경로 플랩 감쇠는 활성화되지 않습니다. 감쇠는 외부 피어와 페더레이션 경계의 피어에 적용됩니다.
감쇠를 활성화하면 에 요약된 표 1대로 기본 매개 변수가 적용됩니다.
감쇠 매개 변수 |
설명 |
기본값 |
가능한 값 |
---|---|---|---|
half-life minutes |
반감기 감소 - 경로가 안정적으로 유지되면 임의의 값이 반으로 줄인 분 수. |
15(분) |
1 통해 45 |
max-suppress minutes |
경로의 최대 홀드 다운 시간(분). |
60 (분) |
1 통해 720 |
reuse |
재사용 임계값 - 억제된 경로를 다시 사용할 수 있는 아래 임의의 값입니다. |
750 |
1 통해 20,000 |
suppress |
차단(억제) 임계값 - 경로가 더 이상 광고에서 사용되거나 포함될 수 없는 위의 임의 값. |
3000 |
1 통해 20,000 |
기본 BGP 플랩 감쇠 값을 변경하려면 감쇠 매개 변수의 명명된 집합을 생성하고 감쇠 작업을 사용하는 라우팅 정책 포함하여 작업을 정의합니다. 감쇠 라우팅 정책 작동하려면 BGP 경로 플랩 감쇠도 활성화해야 합니다.
참조
예를 들면 다음과 같습니다. BGP 경로 플랩 감쇠 매개 변수 구성
이 예는 감쇠 매개 변수를 구성하는 방법을 보여줍니다.
요구 사항
시작하기 전에 라우터 인터페이스를 구성하고 라우팅 프로토콜을 구성합니다.
개요
이 예에는 3개의 라우팅 디바이스가 있습니다. 디바이스 R2는 디바이스 R1 및 디바이스 R3과의 외부 BGP(EBGP) 연결을 가지고 있습니다.
디바이스 R1 및 디바이스 R3에는 테스트 목적으로 구성된 일부 정적 경로가 있으며, 이러한 정적 경로는 BGP를 통해 디바이스 R2로 보급됩니다.
디바이스 R2는 다음 기준에 따라 디바이스 R1 및 디바이스 R3에서 수신한 경로를 감쇠합니다.
마스크 길이가 9에서 16 사이인 경로보다 마스크 길이가 17 이상인 모든 접두사도 더 적극적으로 감쇠합니다.
마스크 길이가 0에서 8 사이인 축축한 경로(포함) 마스크 길이가 8보다 큰 경로보다 적습니다.
10.128.0.0/9 접두사도 전혀 감쇠하지 마십시오.
라우팅 정책 라우팅 테이블 포워딩 테이블 경로가 내보낼 때 평가됩니다. 활성 경로만 라우팅 테이블 내보냅니다.
그림 3 은 샘플 네트워크를 보여줍니다.

CLI 빠른 구성 은(는) 의 모든 디바이스 그림 3에 대한 구성을 보여줍니다.
섹션 #d179e76__d179e263 은 디바이스 R2의 단계를 설명합니다.
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
디바이스 R1
set interfaces fe-1/2/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 ext type external set protocols bgp group ext export send-direct-and-static set protocols bgp group ext peer-as 200 set protocols bgp group ext neighbor 10.0.0.2 set policy-options policy-statement send-direct-and-static term 1 from protocol direct set policy-options policy-statement send-direct-and-static term 1 from protocol static set policy-options policy-statement send-direct-and-static term 1 then accept set routing-options static route 172.16.0.0/16 reject set routing-options static route 172.16.128.0/17 reject set routing-options static route 172.16.192.0/20 reject set routing-options static route 10.0.0.0/9 reject set routing-options static route 172.16.233.0/7 reject set routing-options static route 10.224.0.0/11 reject set routing-options static route 0.0.0.0/0 reject set routing-options autonomous-system 100
디바이스 R2
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces fe-1/2/1 unit 0 family inet address 10.1.0.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols bgp damping set protocols bgp group ext type external set protocols bgp group ext import damp set protocols bgp group ext export send-direct set protocols bgp group ext neighbor 10.0.0.1 peer-as 100 set protocols bgp group ext neighbor 10.1.0.2 peer-as 300 set policy-options policy-statement damp term 1 from route-filter 10.128.0.0/9 exact damping dry set policy-options policy-statement damp term 1 from route-filter 0.0.0.0/0 prefix-length-range /0-/8 damping timid set policy-options policy-statement damp term 1 from route-filter 0.0.0.0/0 prefix-length-range /17-/32 damping aggressive set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set policy-options damping aggressive half-life 30 set policy-options damping aggressive suppress 2500 set policy-options damping timid half-life 5 set policy-options damping dry disable set routing-options autonomous-system 200
디바이스 R3
set interfaces fe-1/2/1 unit 0 family inet address 10.1.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols bgp group ext type external set protocols bgp group ext export send-direct-and-static set protocols bgp group ext peer-as 200 set protocols bgp group ext neighbor 10.1.0.1 set policy-options policy-statement send-direct-and-static term 1 from protocol direct set policy-options policy-statement send-direct-and-static term 1 from protocol static set policy-options policy-statement send-direct-and-static term 1 then accept set routing-options static route 10.128.0.0/9 reject set routing-options autonomous-system 300
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
감쇠 매개 변수를 구성하려면 다음을 수행합니다.
인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/0 unit 0 family inet address 10.0.0.2/30 user@R2# set fe-1/2/1 unit 0 family inet address 10.1.0.1/30 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
BGP neighbor를 구성합니다.
[edit protocols bgp group ext] user@R2# set type external user@R2# set neighbor 10.0.0.1 peer-as 100 user@R2# set neighbor 10.1.0.2 peer-as 300
감쇠 매개변수 그룹을 생성하고 구성합니다.
[edit policy-options] user@R2# set damping aggressive half-life 30 user@R2# set damping aggressive suppress 2500 user@R2# set damping timid half-life 5 user@R2# set damping dry disable
감쇠 정책을 구성합니다.
[edit policy-options policy-statement damp term 1] user@R2# set from route-filter 10.128.0.0/9 exact damping dry user@R2# set from route-filter 0.0.0.0/0 prefix-length-range /0-/8 damping timid user@R2# set from route-filter 0.0.0.0/0 prefix-length-range /17-/32 damping aggressive
BGP에 대한 감쇠를 활성화합니다.
[edit protocols bgp] user@R2# set damping
정책을 BGP neighbor에 대한 가져오기 정책으로 적용합니다.
[edit protocols bgp group ext] user@R2# set import damp
주:동일하거나 다른
import
문에서 동일한 라우팅 정책 한 번 이상 참조할 수 있습니다.내보내기 정책을 구성합니다.
[edit policy-options policy-statement send-direct term 1] user@R2# set from protocol direct user@R2# set then accept
내보내기 정책을 적용합니다.
[edit protocols bgp group ext] user@R2# set export send-direct
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R2# set autonomous-system 200
결과
구성 모드에서 , , show protocols
show policy-options
및 show routing-options
명령을 실행하여 show interfaces
구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R2# show interfaces fe-1/2/0 { unit 0 { family inet { address 10.0.0.2/30; } } } fe-1/2/1 { unit 0 { family inet { address 10.1.0.1/30; } } } lo0 { unit 0 { family inet { address 192.168.0.2/32; } } }
user@R2# show protocols bgp { damping; group ext { type external; import damp; export send-direct; neighbor 10.0.0.1 { peer-as 100; } neighbor 10.1.0.2 { peer-as 300; } } }
user@R2# show policy-options policy-statement damp { term 1 { from { route-filter 10.128.0.0/9 exact damping dry; route-filter 0.0.0.0/0 prefix-length-range /0-/8 damping timid; route-filter 0.0.0.0/0 prefix-length-range /17-/32 damping aggressive; } } } policy-statement send-direct { term 1 { from protocol direct; then accept; } } damping aggressive { half-life 30; suppress 2500; } damping timid { half-life 5; } damping dry { disable; }
user@R2# show routing-options autonomous-system 200;
디바이스 구성이 완료되면 구성 모드에서 을(를) 입력합니다 commit
.
확인
구성이 제대로 작동하는지 확인합니다.
플랩에 일부 경로 발생
목적
경로 플랩 감쇠 정책을 확인하려면 일부 경로가 플랩해야 합니다. 라이브 인터넷 피드를 사용하면 특정 수의 경로 플랩이 존재할 수 있습니다. 경로를 광고하는 원격 시스템을 제어할 수 있는 경우 광고 라우터의 정책을 수정하여 모든 경로 또는 지정된 접두사의 광고 및 철회에 영향을 미칠 수 있습니다. 테스트 환경에서는 여기와 같이 BGP 이웃을 지우거나 BGP neighbor에서 라우팅 프로세스를 다시 시작하여 경로가 플랩되는 원인이 될 수 있습니다.
실행
디바이스 R1 및 디바이스 R3의 운영 모드에서 명령을 입력합니다 restart routing
.
프로덕션 네트워크에서 이 명령을 신중하게 사용합니다.
user@R1> restart routing R1 started, pid 10474
user@R3> restart routing R3 started, pid 10478
의미
디바이스 R2에서 이웃의 모든 경로가 철회되고 다시 보급됩니다.
경로 플랩 확인하기
목적
이웃 플랩 수를 확인합니다.
실행
운영 모드에서 명령을 입력합니다 show bgp summary
.
user@R2> show bgp summary Groups: 1 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 12 1 11 0 11 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 10.0.0.1 100 10 10 0 4 2:50 0/9/0/9 0/0/0/0 10.1.0.2 300 10 10 0 4 2:53 1/3/1/2 0/0/0/0
의미
이 출력은 디바이스 R2의 이웃에서 라우팅 프로세스가 네 번 다시 시작된 후 캡처되었습니다.
경로 플랩 감쇠 확인
목적
감쇠로 인해 경로가 숨겨지는지 확인합니다.
실행
운영 모드에서 명령을 입력합니다 show route damping suppressed
.
user@R2> show route damping suppressed inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 10.0.0.0/9 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 10.0.0.0/30 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 10.1.0.0/30 [BGP ] 00:00:15, localpref 100 AS path: 300 I, validation-state: unverified > to 10.1.0.2 via fe-1/2/1.0 10.224.0.0/11 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 172.16.0.0/16 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 172.16.128.0/17 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 172.16.192.0/20 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 192.168.0.1/32 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0 192.168.0.3/32 [BGP ] 00:00:15, localpref 100 AS path: 300 I, validation-state: unverified > to 10.1.0.2 via fe-1/2/1.0 172.16.233.0/7 [BGP ] 00:00:12, localpref 100 AS path: 100 I, validation-state: unverified > to 10.0.0.1 via fe-1/2/0.0
의미
출력은 일부 라우팅 불안정성을 보여줍니다. 감쇠로 인해 11개의 경로가 숨겨집니다.
감쇠된 경로의 세부 정보 표시
목적
감쇠된 경로의 세부 정보를 표시합니다.
실행
운영 모드에서 명령을 입력합니다 show route damping suppressed 172.16.192.0/20 detail
.
user@R2> show route damping suppressed 172.16.192.0/20 detail inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden) 172.16.192.0/20 (1 entry, 0 announced) BGP /-101 Next hop type: Router, Next hop index: 758 Address: 0x9414484 Next-hop reference count: 9 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.0, selected Session Id: 0x100201 State: <Hidden Ext> Local AS: 200 Peer AS: 100 Age: 52 Validation State: unverified Task: BGP_100.10.0.0.1+55922 AS path: 100 I Localpref: 100 Router ID: 192.168.0.1 Merit (last update/now): 4278/4196 damping-parameters: aggressive Last update: 00:00:52 First update: 01:01:55 Flaps: 8 Suppressed. Reusable in: 01:14:40 Preference will be: 170
의미
이 출력은 표시된 경로에 /17보다 크거나 큰 마스크 길이가 있고, 이 경로가 적극적인 감쇠 프로파일에 올바르게 매핑되었음을 확인합니다. 또한 경로의 현재(그리고 마지막) merit 값 수치를 볼 수 있으며, 경로가 안정적으로 유지되면 경로가 활성화될 것으로 예상되는 경우 를 볼 수 있습니다.
기본 감쇠 매개 변수가 작동하는지 확인
목적
/16 마스크로 감쇠된 경로를 찾는 것은 기본 매개 변수가 유효하다는 것을 확인합니다.
실행
운영 모드에서 명령을 입력합니다 show route damping suppressed detail | match 0/16
.
user@R2> show route damping suppressed detail | match 0/16 172.16.0.0/16 (1 entry, 0 announced)
user@R2> show route damping suppressed 172.16.0.0/16 detail inet.0: 15 destinations, 17 routes (6 active, 0 holddown, 11 hidden) 172.16.0.0/16 (1 entry, 0 announced) BGP /-101 Next hop type: Router, Next hop index: 758 Address: 0x9414484 Next-hop reference count: 9 Source: 10.0.0.1 Next hop: 10.0.0.1 via fe-1/2/0.0, selected Session Id: 0x100201 State: <Hidden Ext> Local AS: 200 Peer AS: 100 Age: 1:58 Validation State: unverified Task: BGP_100.10.0.0.1+55922 AS path: 100 I Localpref: 100 Router ID: 192.168.0.1 Merit (last update/now): 3486/3202 Default damping parameters used Last update: 00:01:58 First update: 01:03:01 Flaps: 8 Suppressed. Reusable in: 00:31:40 Preference will be: 170
의미
/16 마스크가 있는 경로는 사용자 지정 감쇠 규칙에 영향을 받지 않습니다. 따라서 기본 감쇠 규칙이 적용됩니다.
반복하려면 다음과 같이 사용자 정의 규칙이 적용됩니다.
마스크 길이가 9에서 16 사이인 경로보다 마스크 길이가 17 이상인 모든 접두사도 더 적극적으로 감쇠합니다.
마스크 길이가 0에서 8 사이인 축축한 경로(포함) 마스크 길이가 8보다 큰 경로보다 적습니다.
10.128.0.0/9 접두사도 전혀 감쇠하지 마십시오.
감쇠 정보 필터링
목적
OR 그룹화 또는 연속 배관을 사용하여 주어진 마스크 길이가 있는 경로에 사용 중인 감쇠 프로파일의 결정을 단순화합니다.
실행
운영 모드에서 명령을 입력합니다 show route damping suppressed
.
user@R2> show route damping suppressed detail | match "0 announced | damp" 0.0.0.0/0 (1 entry, 0 announced) damping-parameters: timid 10.0.0.0/9 (1 entry, 0 announced) Default damping parameters used damping-parameters: aggressive damping-parameters: aggressive 10.224.0.0/11 (1 entry, 0 announced) Default damping parameters used 172.16.0.0/16 (1 entry, 0 announced) Default damping parameters used 172.16.128.0/17 (1 entry, 0 announced) damping-parameters: aggressive 172.16.192.0/20 (1 entry, 0 announced) damping-parameters: aggressive 192.168.0.1/32 (1 entry, 0 announced) damping-parameters: aggressive 192.168.0.3/32 (1 entry, 0 announced) damping-parameters: aggressive 172.16.233.0/7 (1 entry, 0 announced) damping-parameters: timid
의미
EBGP 경로가 감쇠 프로파일과 올바르게 연결되어 있음을 만족하는 경우 운영 모드 명령을 실행 clear bgp damping
하여 감쇠된 경로에 활성 상태를 복원할 수 있으며, 이를 통해 정상 작동으로 연결이 반환됩니다.
예를 들면 다음과 같습니다. MBGP MVPN 주소 패밀리를 기반으로 하는 BGP 경로 플랩 감쇠 구성
이 예는 BGP 경로 플랩 감쇠를 사용하여 멀티프로토콜 BGP 멀티캐스트 VPN(차세대 MVPN이라고도 함)을 구성하는 방법을 보여줍니다.
요구 사항
이 예는 Junos OS 릴리스 12.2를 사용합니다. 특히 주소 패밀리를 기준으로 MBGP MVPN에 대한 BGP 경로 플랩 감쇠 지원이 Junos OS 릴리스 12.2에 도입되었습니다.
개요
BGP 경로 플랩 감쇠는 링크가 간헐적으로 실패할 때 경로가 반복적으로 철회되고 재보급되는 경로로 인한 경로 불안정성을 줄이는 데 도움이 됩니다.
이 예는 기본 감쇠 매개 변수를 사용하고 3개의 프로바이더 에지(PE) 라우팅 디바이스, 3개의 고객 에지(CE) 라우팅 디바이스 및 1개의 프로바이더(P) 라우팅 디바이스가 있는 MBGP MVPN 시나리오를 보여줍니다.
토폴로지
그림 4 은(는) 이 예에서 사용되는 토폴로지 를 보여줍니다.

PE 디바이스 R4에서 BGP 경로 플랩 감쇠는 주소 패밀리 inet-mvpn
를 위해 구성됩니다. 라는 dampPolicy
라우팅 정책 일치 조건을 사용하여 nlri-route-type
MVPN 경로 유형 3, 4 및 5만 감쇠합니다. 다른 모든 MVPN 경로 유형은 감쇠되지 않습니다.
이 예는 섹션의 모든 디바이스에 대한 전체 구성을 CLI 빠른 구성 보여줍니다. 섹션 은 디바이스 R4 구성 (는) PE 디바이스 R4에 대한 단계별 구성을 보여줍니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
디바이스 R1
set interfaces ge-1/2/0 unit 1 family inet address 10.1.1.1/30 set interfaces ge-1/2/0 unit 1 family mpls set interfaces lo0 unit 1 family inet address 172.16.1.1/32 set protocols ospf area 0.0.0.0 interface lo0.1 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.1 set protocols pim rp static address 172.16.100.1 set protocols pim interface all set routing-options router-id 172.16.1.1
디바이스 R2
set interfaces ge-1/2/0 unit 2 family inet address 10.1.1.2/30 set interfaces ge-1/2/0 unit 2 family mpls set interfaces ge-1/2/1 unit 5 family inet address 10.1.1.5/30 set interfaces ge-1/2/1 unit 5 family mpls set interfaces vt-1/2/0 unit 2 family inet set interfaces lo0 unit 2 family inet address 172.16.1.2/32 set interfaces lo0 unit 102 family inet address 172.16.100.1/32 set protocols mpls interface ge-1/2/1.5 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.2 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 172.16.1.4 set protocols bgp group ibgp neighbor 172.16.1.5 set protocols ospf area 0.0.0.0 interface lo0.2 passive set protocols ospf area 0.0.0.0 interface ge-1/2/1.5 set protocols ldp interface ge-1/2/1.5 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface ge-1/2/0.2 set routing-instances vpn-1 interface vt-1/2/0.2 set routing-instances vpn-1 interface lo0.102 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 provider-tunnel ldp-p2mp set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.102 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/0.2 set routing-instances vpn-1 protocols pim rp static address 172.16.1.2 with 172.16.4.1100.1 set routing-instances vpn-1 protocols pim interface ge-1/2/0.2 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.2 set routing-options autonomous-system 1001
디바이스 R3
set interfaces ge-1/2/0 unit 6 family inet address 10.1.1.6/30 set interfaces ge-1/2/0 unit 6 family mpls set interfaces ge-1/2/1 unit 9 family inet address 10.1.1.9/30 set interfaces ge-1/2/1 unit 9 family mpls set interfaces ge-1/2/2 unit 13 family inet address 10.1.1.13/30 set interfaces ge-1/2/2 unit 13 family mpls set interfaces lo0 unit 3 family inet address 172.16.1.3/32 set protocols mpls interface ge-1/2/0.6 set protocols mpls interface ge-1/2/1.9 set protocols mpls interface ge-1/2/2.13 set protocols ospf area 0.0.0.0 interface lo0.3 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.6 set protocols ospf area 0.0.0.0 interface ge-1/2/1.9 set protocols ospf area 0.0.0.0 interface ge-1/2/2.13 set protocols ldp interface ge-1/2/0.6 set protocols ldp interface ge-1/2/1.9 set protocols ldp interface ge-1/2/2.13 set protocols ldp p2mp set routing-options router-id 172.16.1.3
디바이스 R4
set interfaces ge-1/2/0 unit 10 family inet address 10.1.1.10/30 set interfaces ge-1/2/0 unit 10 family mpls set interfaces ge-1/2/1 unit 17 family inet address 10.1.1.17/30 set interfaces ge-1/2/1 unit 17 family mpls set interfaces vt-1/2/0 unit 4 family inet set interfaces lo0 unit 4 family inet address 172.16.1.4/32 set interfaces lo0 unit 104 family inet address 172.16.100.1/32 set protocols rsvp interface all aggregate set protocols mpls interface all set protocols mpls interface ge-1/2/0.10 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.4 set protocols bgp group ibgp family inet-vpn unicast set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling damping set protocols bgp group ibgp neighbor 172.16.1.2 import dampPolicy set protocols bgp group ibgp neighbor 172.16.1.5 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface lo0.4 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.10 set protocols ldp interface ge-1/2/0.10 set protocols ldp p2mp set policy-options policy-statement dampPolicy term term1 from family inet-mvpn set policy-options policy-statement dampPolicy term term1 from nlri-route-type 3 set policy-options policy-statement dampPolicy term term1 from nlri-route-type 4 set policy-options policy-statement dampPolicy term term1 from nlri-route-type 5 set policy-options policy-statement dampPolicy term term1 then accept set policy-options policy-statement dampPolicy then damping no-damp set policy-options policy-statement dampPolicy then accept set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set policy-options damping no-damp disable set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/2/0.4 set routing-instances vpn-1 interface ge-1/2/1.17 set routing-instances vpn-1 interface lo0.104 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.104 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.17 set routing-instances vpn-1 protocols pim rp static address 172.16.100.1 set routing-instances vpn-1 protocols pim interface ge-1/2/1.17 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.4 set routing-options autonomous-system 64501
디바이스 R5
set interfaces ge-1/2/0 unit 14 family inet address 10.1.1.14/30 set interfaces ge-1/2/0 unit 14 family mpls set interfaces ge-1/2/1 unit 21 family inet address 10.1.1.21/30 set interfaces ge-1/2/1 unit 21 family mpls set interfaces vt-1/2/0 unit 5 family inet set interfaces lo0 unit 5 family inet address 172.16.1.5/32 set interfaces lo0 unit 105 family inet address 172.16.100.5/32 set protocols mpls interface ge-1/2/0.14 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 172.16.1.5 set protocols bgp group ibgp family inet-vpn any set protocols bgp group ibgp family inet-mvpn signaling set protocols bgp group ibgp neighbor 172.16.1.2 set protocols bgp group ibgp neighbor 172.16.1.4 set protocols ospf area 0.0.0.0 interface lo0.5 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.14 set protocols ldp interface ge-1/2/0.14 set protocols ldp p2mp set policy-options policy-statement parent_vpn_routes from protocol bgp set policy-options policy-statement parent_vpn_routes then accept set routing-instances vpn-1 instance-type vrf set routing-instances vpn-1 interface vt-1/2/0.5 set routing-instances vpn-1 interface ge-1/2/1.21 set routing-instances vpn-1 interface lo0.105 set routing-instances vpn-1 route-distinguisher 100:100 set routing-instances vpn-1 vrf-target target:1:1 set routing-instances vpn-1 protocols ospf export parent_vpn_routes set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface lo0.105 passive set routing-instances vpn-1 protocols ospf area 0.0.0.0 interface ge-1/2/1.21 set routing-instances vpn-1 protocols pim rp static address 172.16.100.2 set routing-instances vpn-1 protocols pim interface ge-1/2/1.21 mode sparse set routing-instances vpn-1 protocols mvpn set routing-options router-id 172.16.1.5 set routing-options autonomous-system 1001
디바이스 R6
set interfaces ge-1/2/0 unit 18 family inet address 10.1.1.18/30 set interfaces ge-1/2/0 unit 18 family mpls set interfaces lo0 unit 6 family inet address 172.16.1.6/32 set protocols sap listen 233.1.1.1 set protocols ospf area 0.0.0.0 interface lo0.6 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.18 set protocols pim rp static address 172.16.100.2 set protocols pim interface all set routing-options router-id 172.16.1.6
디바이스 R7
set interfaces ge-1/2/0 unit 22 family inet address 10.1.1.22/30 set interfaces ge-1/2/0 unit 22 family mpls set interfaces lo0 unit 7 family inet address 172.16.1.7/32 set protocols ospf area 0.0.0.0 interface lo0.7 passive set protocols ospf area 0.0.0.0 interface ge-1/2/0.22 set protocols pim rp static address 172.16.100.2 set protocols pim interface all set routing-options router-id 172.16.1.7
디바이스 R4 구성
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R4 구성:
인터페이스를 구성합니다.
[edit interfaces] user@R4# set ge-1/2/0 unit 10 family inet address 10.1.1.10/30 user@R4# set ge-1/2/0 unit 10 family mpls user@R4# set ge-1/2/1 unit 17 family inet address 10.1.1.17/30 user@R4# set ge-1/2/1 unit 17 family mpls user@R4# set vt-1/2/0 unit 4 family inet user@R4# set lo0 unit 4 family inet address 172.16.1.4/32 user@R4# set lo0 unit 104 family inet address 172.16.100.4/32
인터페이스에서 MPLS 및 신호 전송 프로토콜을 구성합니다.
[edit protocols] user@R4# set mpls interface all user@R4# set mpls interface ge-1/2/0.10 user@R4# set rsvp interface all aggregate user@R4# set ldp interface ge-1/2/0.10 user@R4# set ldp p2mp
BGP를 구성합니다.
BGP 구성은 주소 패밀리에 대한 BGP 경로 플랩 감쇠를
inet-mvpn
활성화합니다. BGP 구성은 또한 라는dampPolicy
라우팅 정책 라우팅 테이블 가져옵니다. 이 정책은 인접 PE 디바이스 R2에 적용됩니다.[edit protocols bgp group ibgp] user@R4# set type internal user@R4# set local-address 172.16.1.4 user@R4# set family inet-vpn unicast user@R4# set family inet-vpn any user@R4# set family inet-mvpn signaling damping user@R4# set neighbor 172.16.1.2 import dampPolicy user@R4# set neighbor 172.16.1.5
내부 게이트웨이 프로토콜을 구성합니다.
[edit protocols ospf] user@R4# set traffic-engineering [edit protocols ospf area 0.0.0.0] user@R4# set interface all user@R4# set interface lo0.4 passive user@R4# set interface ge-1/2/0.10
일치 조건을 사용하여
nlri-route-type
MVPN 경로 유형 3, 4 및 5만 감쇠하는 감쇠 정책을 구성합니다.[edit policy-options policy-statement dampPolicy term term1] user@R4# set from family inet-mvpn user@R4# set from nlri-route-type 3 user@R4# set from nlri-route-type 4 user@R4# set from nlri-route-type 5 user@R4# set then accept
damping
BGP 경로 플랩 감쇠를 비활성화하도록 정책을 구성합니다.정책(
damping no-damp disable
)은no-damp
라우팅 테이블 존재하는 모든 감쇠 상태를 삭제합니다. 문은then damping no-damp
정책을 작업으로 적용no-damp
하며 일치 조건이 없습니다from
. 따라서 와(과) 일치하지term1
않는 모든 경로가 이 용어와 일치하며, 그 결과 다른 모든 MVPN 경로 유형이 감쇠되지 않습니다.[edit policy-options policy-statement dampPolicy] user@R4# set then damping no-damp user@R4# set then accept [edit policy-options] user@R4# set damping no-damp disable
parent_vpn_routes
주소 패밀리가 아닌 다른 모든 BGP 경로를 수락하도록 을inet-mvpn
구성합니다.이 정책은 라우팅 인스턴스에서 OSPF 내보내기 정책으로 적용됩니다.
[edit policy-options policy-statement parent_vpn_routes] user@R4# set from protocol bgp user@R4# set then accept
VPN 라우팅 및 포워딩(VRF) 인스턴스를 구성합니다.
[edit routing-instances vpn-1] user@R4# set instance-type vrf user@R4# set interface vt-1/2/0.4 user@R4# set interface ge-1/2/1.17 user@R4# set interface lo0.104 user@R4# set route-distinguisher 100:100 user@R4# set vrf-target target:1:1 user@R4# set protocols ospf export parent_vpn_routes user@R4# set protocols ospf area 0.0.0.0 interface lo0.104 passive user@R4# set protocols ospf area 0.0.0.0 interface ge-1/2/1.17 user@R4# set protocols pim rp static address 172.16.100.2 user@R4# set protocols pim interface ge-1/2/1.17 mode sparse user@R4# set protocols mvpn
라우터 ID 및 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R4# set router-id 172.16.1.4 user@R4# set autonomous-system 1001
디바이스 구성이 완료되면 구성을 커밋합니다.
user@R4# commit
결과
구성 모드에서 , , show protocols
, show policy-options
show routing-instances
및 show routing-options
명령을 입력show interfaces
하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R4# show interfaces ge-1/2/0 { unit 10 { family inet { address 10.1.1.10/30; } family mpls; } } ge-1/2/1 { unit 17 { family inet { address 10.1.1.17/30; } family mpls; } } vt-1/2/0 { unit 4 { family inet; } } lo0 { unit 4 { family inet { address 172.16.1.4/32; } } unit 104 { family inet { address 172.16.100.4/32; } } }
user@R4# show protocols rsvp { interface all { aggregate; } } mpls { interface all; interface ge-1/2/0.10; } bgp { group ibgp { type internal; local-address 172.16.1.4; family inet-vpn { unicast; any; } family inet-mvpn { signaling { damping; } } neighbor 172.16.1.2 { import dampPolicy; } neighbor 172.16.1.5; } } ospf { traffic-engineering; area 0.0.0.0 { interface all; interface lo0.4 { passive; } interface ge-1/2/0.10; } } ldp { interface ge-1/2/0.10; p2mp; }
user@R4# show policy-options policy-statement dampPolicy { term term1 { from { family inet-mvpn; nlri-route-type [ 3 4 5 ]; } then accept; } then { damping no-damp; accept; } } policy-statement parent_vpn_routes { from protocol bgp; then accept; } damping no-damp { disable; }
user@R4# show routing-instances vpn-1 { instance-type vrf; interface vt-1/2/0.4; interface ge-1/2/1.17; interface lo0.104; route-distinguisher 100:100; vrf-target target:1:1; protocols { ospf { export parent_vpn_routes; area 0.0.0.0 { interface lo0.104 { passive; } interface ge-1/2/1.17; } } pim { rp { static { address 172.16.100.2; } } interface ge-1/2/1.17 { mode sparse; } } mvpn; } }
user@R4# show routing-optons router-id 172.16.1.4; autonomous-system 1001;
확인
구성이 제대로 작동하는지 확인합니다.
경로 플랩 감쇠가 비활성화되었는지 확인
목적
3, 4, 5 이외의 MVPN 경로 유형에 대한 감쇠를 비활성화하는 정책의 no-damp
존재를 확인합니다.
실행
운영 모드에서 명령을 입력합니다 show policy damping
.
user@R4> show policy damping Default damping information: Halflife: 15 minutes Reuse merit: 750 Suppress/cutoff merit: 3000 Maximum suppress time: 60 minutes Computed values: Merit ceiling: 12110 Maximum decay: 6193 Damping information for "no-damp": Damping disabled
의미
출력은 기본 감쇠 매개 변수가 유효하며 지정된 경로 유형에도 no-damp
정책이 적용된다는 것을 보여줍니다.
경로 플랩 감쇠 확인
목적
BGP 경로가 감쇠되었는지 확인합니다.
실행
운영 모드에서 명령을 입력합니다 show bgp summary
.
user@R4> show bgp summary Groups: 1 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending bgp.l3vpn.0 6 6 0 0 0 0 bgp.l3vpn.2 0 0 0 0 0 0 bgp.mvpn.0 2 2 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 172.16.1.2 1001 3159 3155 0 0 23:43:47 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0 172.16.1.5 1001 3157 3154 0 0 23:43:40 Establ bgp.l3vpn.0: 3/3/3/0 bgp.l3vpn.2: 0/0/0/0 bgp.mvpn.0: 1/1/1/0 vpn-1.inet.0: 3/3/3/0 vpn-1.mvpn.0: 1/1/1/0
의미
감쇠 상태 필드는 bgp.mvpn.0 라우팅 테이블 0 경로가 감쇠되었음을 보여줍니다. 또한 상태 필드의 마지막 숫자는 BGP 피어 172.16.1.2에 대해 0 경로가 감쇠되었음을 보여줍니다.
경로 플랩 방지를 위한 BGP-정적 경로 이해
BGP-static 경로는 접두사 플랩이 발생하지 않도록 구성할 수 있습니다. BGP-static 경로는 수동으로 삭제되지 않는 한 플랩되지 않습니다. BGP 정적 경로가 전역으로 구성된 경우, 각 이웃, 그룹 또는 모든 이웃을 수신하도록 명시적으로 구성해야 합니다. 피어 라우터는 해당 접두사에 대한 광고 라우터에서 학습한 동적 라우팅 정보에 관계없이 이러한 경로에 대한 광고를 받습니다. 활성 경로임에도 불구하고 BGP-정적 경로는 구성되지 않은 BGP neighbor에 보급되지 않습니다. 구성에서 BGP-정적 경로의 수를 지정할 수 있습니다. 또한 BGP 보급에 보급하고 포함해야 하는 BGP 정적 경로를 지정하는 정책을 정의할 수 있습니다.
BGP-정적 경로는 라우팅 테이블 배치됩니다. BGP-정적 경로가 활성 경로인 경우(해당 접두사에 대한 다른 경로가 없는 경우), 포워딩 테이블 배치됩니다. 이러한 경로는 수신하도록 구성된 BGP 호스트에만 보급됩니다. 구성된 BGP 정적 경로는 BGP 외에 다른 프로토콜에 의해 보급되지 않습니다. 하나 이상의 단일 홈 고객이 있는 서비스 프로바이더는 BGP 네트워크에서 BGP 정적 경로를 구성하여 이러한 고객을 위한 정적 경로를 보급할 수 있습니다.
neighbor 수준에서 BGP-static 경로 보급을 구성하면 내부 그룹 분할이 발생합니다. 구성을 단순하게 유지하기 위해 전역 및 그룹 수준에서만 BGP-static 경로 보급을 구성합니다. 구성된 BGP 정적 경로는 보급되는 VPN 경로에 영향을 미치지 않습니다.
BGP 정적 경로가 이웃에 보급되면 접두사에 보급된 유일한 경로입니다. BGP-정적 경로는 BGP multipath 또는 프로토콜 독립 multipath에 대한 후보 경로로 간주되지 않습니다. 집계 또는 생성된 경로가 라우팅 테이블 추가되지 않습니다.
여러 경로에서 액세스할 수 있고 모든 경로에 대한 유일한 액세스 지점이 아닌 네트워크에서 BGP 정적 경로를 구성하면 트래픽이 자동으로 삭제되거나 삭제될 수 있습니다. 멀티홈 네트워크에서 BGP-정적 경로는 다른 경로에 대한 유일한 액세스 포인트인 디바이스에서 구성할 수 있습니다. 기본적으로 내부 피어에 보급되는 모든 BGP-정적 경로에는 멀티호밍 네트워크에 대한 null 경로의 위험을 완화하기 위한 값 0
이 포함 local-pref
됩니다. BGP-정적 경로에서 명시적 preference2
값을 설정하여 이 기본값을 재정의할 수 있습니다.
참조
경로 플랩 방지를 위한 BGP-정적 경로 구성
BGP-static 경로는 고객 네트워크에 대한 경로가 플랩되지 않도록 구성됩니다. 구성된 BGP 정적 경로는 BGP 외에 다른 프로토콜에 의해 보급되지 않습니다. BGP-static 경로는 전역으로 구성되지만 각 이웃, 그룹 또는 모든 이웃을 수신하도록 명시적으로 구성해야 합니다. 피어 라우터는 해당 접두사에 대한 광고 라우터에서 학습한 동적 라우팅 정보에 관계없이 이러한 경로에 대한 광고를 수신합니다. 구성에서 BGP-정적 경로의 수를 지정할 수 있습니다. 또한 어떤 BGP-정적 경로를 보급해야 하는지 지정하는 정책을 정의할 수 있습니다.
BGP-정적 경로를 구성하기 전에 다음을 수행합니다.
IGP 및 BGP 프로토콜이 구성되고 작동하는지 확인합니다.
구성하는 BGP 정적 경로가 고객 라우터 뒤에 있는지 확인합니다.
BGP가 BGP neighbor에 도달하는 데 사용하는 접두사에 BGP 정적 경로를 사용하지 마십시오.
BGP-정적 경로를 구성하려면 다음을 수행합니다.
참조
예를 들면 다음과 같습니다. 경로 플랩을 방지하기 위해 BGP-정적 경로 구성
이 예는 BGP-정적 경로를 구성하는 방법을 보여줍니다. BGP 호스트는 이러한 경로를 수신하도록 구성된 이웃에게만 이러한 BGP-정적 경로를 보급합니다. BGP 정적 경로는 접두사 플랩이 플랩되지 않도록 구성됩니다. 그러나 BGP-정적 경로가 전역으로 구성된 경우 각 이웃, 그룹 또는 모든 이웃을 수신하도록 명시적으로 구성해야 합니다.
요구 사항
이 예는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
연결된 인터페이스에서 BGP가 활성화된 MX 시리즈 라우터 7개
Junos OS 모든 디바이스에서 릴리스 14.2 이상 실행
개요
Junos OS 릴리스 14.2부터 BGP 네트워크에서 BGP-정적 경로를 구성하고 보급할 수 있습니다. 접두사의 활성 경로가 아니더라도 BGP 네트워크에서 BGP 정적 경로를 보급할 수 있습니다. BGP-static 경로는 수동으로 삭제되지 않는 한 플랩되지 않습니다. 보급 및 광고에 포함해야 하는 BGP 정적 경로를 결정하는 정책을 정의할 수 있습니다. 피어 라우터는 광고 라우터에서 학습한 동적 라우팅 정보에 관계없이 이러한 BGP-정적 경로에 대한 광고를 수신합니다.
샘플 BGP 네트워크에서 디바이스 CE1, CE2 및 CE3는 라우터 PE1, PE2 및 PE3에 직접 연결됩니다. PE1과 PE2는 모두 라우터 P에 연결되어 있습니다. 라우터 P는 라우터 PE3에 직접 연결됩니다. EBGP는 프로바이더 에지 및 고객 에지 라우터에서 구성됩니다. IBGP는 직접 연결된 프로바이더 에지 라우터에서 구성됩니다. IGP 프로토콜 IS-IS는 모든 프로바이더 라우터에서 구성됩니다. CE1 뒤에 있는 고객 경로 10.0.0.28이 플랩되지 않도록 라우터 PE1에서 BGP 정적 경로를 구성합니다. 프로바이더 라우터 PE2는 BGP-정적 경로를 수신하도록 구성됩니다. 목표는 CE3가 아닌 CE2에 BGP 정적 경로를 보급하고 구성된 BGP 정적 경로가 플랩되지 않는다는 것을 입증하는 것입니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 계층 수준에서 명령을 CLI [edit] 로 복사해 붙여 넣은 다음, 구성 모드에서 을(를) 입력 commit
합니다.
라우터 P
set interfaces ge-1/0/0 unit 2 description P->PE1 set interfaces ge-1/0/0 unit 2 family inet address 10.0.0.2/29 set interfaces ge-1/0/0 unit 2 family iso set interfaces ge-1/0/1 unit 5 description P->PE2 set interfaces ge-1/0/1 unit 5 family inet address 10.0.0.5/29 set interfaces ge-1/0/1 unit 5 family iso set interfaces ge-1/1/2 unit 3 description P->PE3 set interfaces ge-1/1/2 unit 3 family inet address 10.0.0.3/29 set interfaces ge-1/1/2 unit 3 family iso set interfaces lo0 unit 0 family inet address 10.255.102.146/32 primary set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.1050.00 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.102.146 set protocols bgp group ibgp neighbor 10.255.102.128 description PE1 set protocols bgp group ibgp neighbor 10.255.102.178 description PE2 set protocols bgp group ibgp neighbor 10.255.102.156 description PE3 set protocols isis interface ge-1/0/0.2 set protocols isis interface ge-1/0/1.5 set protocols isis interface ge-1/1/2.3 set protocols isis interface lo0.0 passive set routing-options router-id 10.255.102.146 set routing-options autonomous-system 64496
라우터 PE1
set interfaces ge-1/0/0 unit 1 description PE1->P set interfaces ge-1/0/0 unit 1 family inet address 10.0.0.1/29 set interfaces ge-1/0/0 unit 1 family iso set interfaces ge-1/1/0 unit 10 description PE1->CE1 set interfaces ge-1/1/0 unit 10 family inet address 10.0.0.10/30 set interfaces lo0 unit 0 family inet address 10.255.102.128/32 set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.1010.00 set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp neighbor 10.0.0.9 description CE1 set protocols bgp group ebgp neighbor 10.0.0.9 local-address 10.0.0.10 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.102.128 set protocols bgp group ibgp export export-self set protocols bgp group ibgp neighbor 10.255.102.146 description P set protocols bgp group ibgp neighbor 10.255.102.178 description PE2 set protocols bgp group ibgp neighbor 10.255.102.178 advertise-bgp-static set protocols bgp group ibgp neighbor 10.255.102.156 description PE3 set protocols isis interface ge-1/0/0.1 set protocols isis interface lo0.0 passive set policy-options policy-statement export-self then next-hop self set routing-options bgp-static route 10.0.0.28/32 preference2 4294967195 set routing-options bgp-static route 10.0.0.28/32 as-path path 64497 set routing-options router-id 10.255.102.128 set routing-options autonomous-system 64496
라우터 PE2
set interfaces ge-1/0/1 unit 6 description PE2->P set interfaces ge-1/0/1 unit 6 family inet address 10.0.0.6/29 set interfaces ge-1/0/1 unit 6 family iso set interfaces ge-1/1/2 unit 14 description PE2->CE2 set interfaces ge-1/1/2 unit 14 family inet address 10.0.0.14/30 set interfaces lo0 unit 0 family inet address 10.255.102.178/32 set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.1030.00 set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64498 set protocols bgp group ebgp neighbor 10.0.0.13 description CE2 set protocols bgp group ebgp neighbor 10.0.0.13 local-address 10.0.0.14 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.102.178 set protocols bgp group ibgp export export-self set protocols bgp group ibgp neighbor 10.255.102.146 description P set protocols bgp group ibgp neighbor 10.255.102.128 description PE1 set protocols bgp group ibgp neighbor 10.255.102.156 description PE3 set protocols isis interface ge-1/0/1.6 set protocols isis interface lo0.0 passive set policy-options policy-statement export-self then next-hop self set routing-options router-id 10.255.102.178 set routing-options autonomous-system 64496
라우터 PE3
set interfaces ge-2/0/1 unit 4 description PE3->P set interfaces ge-2/0/1 unit 4 family inet address 10.0.0.4/29 set interfaces ge-2/0/5 unit 18 description PE3->CE3 set interfaces ge-2/0/5 unit 18 family inet address 10.0.0.18/30 set interfaces lo0 unit 0 family inet address 10.255.102.156/32 set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.1070.00 set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64499 set protocols bgp group ebgp neighbor 10.0.0.17 description CE3 set protocols bgp group ebgp neighbor 10.0.0.17 local-address 10.0.0.18 set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.255.102.156 set protocols bgp group ibgp export export-self set protocols bgp group ibgp neighbor 10.255.102.146 description P set protocols bgp group ibgp neighbor 10.255.102.128 description PE1 set protocols bgp group ibgp neighbor 10.255.102.178 description PE2 set protocols isis interface ge-2/0/1.4 set protocols isis interface lo0.0 passive set policy-options policy-statement export-self then next-hop self set routing-options router-id 10.255.102.156 set routing-options autonomous-system 64496
라우터 CE1
set interfaces ge-2/0/8 unit 9 description CE1->PE1 set interfaces ge-2/0/8 unit 9 family inet address 10.0.0.9/30 set interfaces lo0 unit 0 family inet address 127.255.102.166/32 set interfaces lo0 unit 0 family inet address 10.0.0.28/32 set protocols bgp group ebgp type external set protocols bgp group ebgp export export-direct set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp neighbor 10.0.0.10 description PE1 set protocols bgp group ebgp neighbor 10.0.0.10 local-address 10.0.0.9 set policy-options policy-statement export-direct from protocol direct route-filter 10.0.0.0/29 or longer set policy-options policy-statement export-direct then accept set routing-options autonomous-system 64497
라우터 CE2
set interfaces ge-2/0/0 unit 13 description CE2->PE2 set interfaces ge-2/0/0 unit 13 family inet address 10.0.0.13/30 set interfaces lo0 unit 0 family inet address 127.255.102.176/32 set protocols bgp group ebgp type external set protocols bgp export export-direct set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp neighbor 10.0.0.14 description PE2 set protocols bgp group ebgp neighbor 10.0.0.14 local-address 10.0.0.13 set policy-options policy-statement export-direct from protocol direct route-filter 10.0.0.0/29 or longer set policy-options policy-statement export-direct then accept set routing-options router-id 127.255.102.176 set routing-options autonomous-system 64498
라우터 CE3
set interfaces ge-2/0/5 unit 17 description CE3->PE3 set interfaces ge-2/0/5 unit 17 family inet address 10.0.0.17/30 set interfaces lo0 unit 0 family inet address 127.255.102.186/32 set protocols bgp group ebgp type external set protocols bgp export export-direct set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp neighbor 10.0.0.18 description PE3 set protocols bgp group ebgp neighbor 10.0.0.18 local-address 10.0.0.17 set policy-options policy-statement export-direct from protocol direct route-filter 10.0.0.0/29 or longer set policy-options policy-statement export-direct then accept set routing-options router-id 127.255.102.186 set routing-options autonomous-system 64499
절차
단계별 절차
다음 예는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
다음을 참조하여 라우터 PE1을 구성하십시오.
IPv4 주소로 인터페이스를 구성합니다.
[edit interfaces] user@PE1# set ge-1/0/0 unit 1 description PE1->P user@PE1# set ge-1/0/0 unit 1 family inet address 10.0.0.1/29 user@PE1# set ge-1/1/0 unit 10 description PE1->CE1 user@PE1# set ge-1/1/0 unit 10 family inet address 10.0.0.10/30
학습하고 학습된 경로를 교환하기 위해 프로바이더 라우터에 연결된 인터페이스에서 IS-IS 프로토콜을 활성화합니다.
[edit interfaces] user@PE1# set ge-1/0/0 unit 1 family iso
inet 및 IS-IS에 대한 루프백 주소를 구성합니다.
[edit interfaces lo0 unit 0] user@PE1# set family inet address 10.255.102.128/32 user@PE1# set family iso address 49.0001.1720.1600.1010.00
IS-IS 인터페이스를 구성합니다.
[edit protocols isis] user@PE1# set interface ge-1/0/0.1 user@PE1# set interface lo0.0 passive
EBGP를 구성합니다.
[edit protocols bgp group ebgp] user@PE1# set type external user@PE1# set peer-as 64497 user@PE1# set neighbor 10.0.0.9 description CE1 user@PE1# set neighbor 10.0.0.9 local-address 10.0.0.10
공급자 네트워크에 연결된 내부 라우터에서 IBGP neighbor를 구성합니다.
[edit protocols bgp group ibgp] user@PE1# set type internal user@PE1# set local-address 10.255.102.128 user@PE1# set export export-self user@PE1# set neighbor 10.255.102.146 description P user@PE1# set neighbor 10.255.102.178 description PE2 user@PE1# set neighbor 10.255.102.156 description PE3
BGP 정적 경로를 구성합니다.
[edit routing-options] user@PE1# set bgp-static route 10.0.0.28/32 preference2 4294967195 user@PE1# set bgp-static route 10.0.0.28/32 as-path path 64497
BGP 정적 광고를 수신하도록 BGP 인접 PE2를 구성합니다.
[edit protocols bgp group ibgp neighbor 10.255.102.178] user@PE1# set advertise-bgp-static
BGP 네트워크로 경로를 내보내는 정책을 정의합니다.
[edit policy-options policy-statement export-self] user@PE1# set then next-hop self
IBGP 그룹에 정책을 적용합니다.
[edit protocols bgp group ibgp] user@PE1# set export export-self
라우터 id 및 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@PE1# set router-id 10.255.102.128 user@PE1# set autonomous-system 64496
결과
구성 모드에서 , , show policy-optionsshow protocols및 show routing-options 명령을 입력show interfaces하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit] user@PE1> show interfaces ge-1/0/0 { unit 1 { description PE1->P; family inet { address 10.0.0.1/29; } family iso; } ge-1/1/0 { unit 10 { description PE1->CE1; family inet { address 10.0.0.10/30; } } } } lo0 { unit 0{ family inet { address 10.255.102.128/32; } family iso { address 49.0001.1720.1600.1010.00; } } }
[edit] user@PE1> show protocols bgp { group ebgp { type external; peer-as 64497; neighbor 10.0.0.9 { description CE1; local-address 10.0.0.10; } } group ibgp { type internal; local-address 10.255.102.128; export export-self; neighbor 10.255.102.146 { description P; } neighbor 10.255.102.178 { description PE2; advertise-bgp-static; } neighbor 10.255.102.156 { description PE3; } } } isis { interface ge-1/0/0.1; interface lo0.0 { passive; } }
[edit] user@PE1> show routing-options bgp-static { route 10.0.0.28/32 { preference2 4294967195; as-path { path 64497; } } } router-id 10.255.102.128; autonomous-system 64496;
[edit] user@PE1> show policy-options policy-statement export-self { then { next-hop self; } }
디바이스 구성이 완료되면 구성 모드에서 을(를) 입력합니다 commit
.
[edit] user@PE1# commit
확인
구성이 제대로 작동하는지 확인합니다.
BGP 이웃 확인
목적
BGP가 구성된 인터페이스에서 실행되고 BGP 세션이 각 neighbor 주소에 대해 활성화되는지 확인합니다.
실행
운영 모드에서 라우터 PE1에서 명령을 실행 show bgp neighbor 합니다.
user@PE1> show bgp neighbor Peer: 10.0.0.9+34260 AS 64497 Local: 10.0.0.10+45824 AS 64496 Description: CE1 Type: External State: Established Flags: <sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: Cease Options: <Preference LocalAddress PeerAS Refresh> LocalAddress: 10.0.0.10 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 127.255.102.166 Local ID: 10.255.102.128 Active Holdtime: 90 Keepalive Interval: 30 Group index: 0 Peer index: 0 BFD: disabled, down Local Interface: ge-1/1/0.0 NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer supports 4 byte AS extension (peer-as 64497) Peer does not support Addpath Table inet.0 Bit: 10000 RIB State: BGP restart is complete Send state: in sync Active prefixes: 1 Received prefixes: 1 Accepted prefixes: 1 Suppressed due to damping: 0 Advertised prefixes: 2 Last traffic (seconds): Received 14 Sent 13 Checked 4 Input messages: Total 249 Updates 2 Refreshes 0 Octets 4764 Output messages: Total 250 Updates 2 Refreshes 0 Octets 4883 Peer: 10.255.102.146+179 AS 64496 Local: 10.255.102.128+53460 AS 64496 Description: P Type: Internal State: Established Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ export-self ] Options: <Preference LocalAddress Refresh> Local Address: 10.255.102.128 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 10.255.102.146 Local ID: 10.255.102.128 Active Holdtime: 90 Keepalive Interval: 30 Group index: 0 Peer index: 0 BFD: disabled, down NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality Restart flag received from the peer: Notification NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 64496) Peer does not support Addpath Table inet.0 Bit: 10001 RIB State: BGP restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Accepted prefixes: 0 Suppressed due to damping: 0 Advertised prefixes: 1 Last traffic (seconds): Received 12 Sent 1 Checked 63 Input messages: Total 246 Updates 1 Refreshes 0 Octets 4678 Output messages: Total 249 Updates 1 Refreshes 0 Octets 4834 Output Queue[0]: 0 (inet.0, inet-unicast) Peer: 10.255.102.178+53463 AS 64496 Local: 10.255.102.128+179 AS 64496 Description: PE2 Type: Internal State: Established Flags: <Synch> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ export-self ] Options: <Preference LocalAddress Refresh> Options: <AdvertiseBGPStatic> Local Address: 10.255.102.128 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 10.255.102.178 Local ID: 10.255.102.128 Active Holdtime: 90 Keepalive Interval: 30 Group index: 1 Peer index: 0 BFD: disabled, down NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality Restart flag received from the peer: Notification NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 64496) Peer does not support Addpath Table inet.0 Bit: 10002 RIB State: BGP restart is complete Send state: in sync Active prefixes: 1 Received prefixes: 1 Accepted prefixes: 1 Suppressed due to damping: 0 Advertised prefixes: 1 Last traffic (seconds): Received 9 Sent 10 Checked 22 Input messages: Total 247 Updates 2 Refreshes 0 Octets 4777 Output messages: Total 248 Updates 1 Refreshes 0 Octets 4815 Output Queue[0]: 0 (inet.0, inet-unicast) Peer: 10.255.102.156+179 AS 64496 Local: 10.255.102.128+53462 AS 64496 Description: PE3 Type: Internal State: Established Flags: <Synch> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ export-self ] Options: <Preference LocalAddress Refresh> Local Address: 10.255.255.11 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 10.255.102.156 Local ID: 10.255.102.128 Active Holdtime: 90 Keepalive Interval: 30 Group index: 0 Peer index: 1 BFD: disabled, down NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Stale routes from peer are kept for: 300 Peer does not support Restarter functionality Restart flag received from the peer: Notification NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 64496) Peer does not support Addpath Table inet.0 Bit: 10001 RIB State: BGP restart is complete Send state: in sync Active prefixes: 1 Received prefixes: 1 Accepted prefixes: 1 Suppressed due to damping: 0 Advertised prefixes: 1 Last traffic (seconds): Received 21 Sent 10 Checked 10 Input messages: Total 245 Updates 2 Refreshes 0 Octets 4695 Output messages: Total 247 Updates 1 Refreshes 0 Octets 4796 Output Queue[0]: 0 (inet.0, inet-unicast)
의미
출력은 라우터 PE1의 BGP neighbor와 이웃이 BGP 정적 경로를 수신하도록 구성되었는지 여부와 같은 구성된 BGP 옵션을 표시합니다. 라우터 PE2는 BGP-정적 경로 광고를 수신하도록 구성됩니다.
BGP 그룹 확인
목적
의도된 BGP 그룹 또는 neighbor가 BGP-정적 경로를 수신하도록 구성되었는지 확인합니다.
실행
운영 모드에서 명령을 실행합니다 show bgp group .
user@PE1> show bgp group Group Type: External Local AS: 64496 Name: ebgp Index: 3 Flags: <Export Eval> Holdtime: 0 Local AS: 64496 Local System AS: 64496 Total peers: 1 Established: 1 10.0.0.9+179 inet.0: 0/1/1/0 Group Type: Internal AS: 64496 Local AS: 64496 Name: ibgp Index: 0 Flags: <Export Eval> Export: [ export-self ] Options: <AdvertiseBGPStatic> Holdtime: 0 Total peers: 1 Established: 1 10.255.102.178+179 inet.0: 0/0/0/0 Group Type: Internal AS: 64496 Local AS: 64496 Name: ibgp Index: 0 Flags: <Export Eval> Export: [ export-self ] Holdtime: 0 Total peers: 2 Established: 2 10.255.102.156+179 10.255.102.146+179 inet.0: 0/3/2/0 Groups: 3 Peers: 4 External: 1 Internal: 3 Down peers: 0 Flaps: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 3 3 0 0 0 0
의미
출력은 BGP 정적 광고를 수신하도록 구성된 BGP neighbor를 보여줍니다.
경로 확인
목적
구성된 BGP 정적 경로가 구성된 BGP neighbor의 라우팅 테이블 저장되는지 확인합니다.
실행
운영 모드에서 명령을 실행 show route protocol bgp-static 하여 라우팅 테이블 표시합니다.
user@PE1> show route protocol bgp-static inet.0: 13 destinations, 14 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.28/32 *[BGP-Static/4294967292/-101] 00:43:15 Discard iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) inet6.0: 15 destinations, 15 routes (15 active, 0 holddown, 0 hidden)
User@PE1> show route 10.0.0.28/32 inet.0: 13 destinations, 14 routes (13 active, 1 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.28/32 *[BGP/170] 00:00:15, localpref 100 AS path: 64497 I, validation-state: unverified > to 10.0.0.9 via ge-2/1/8.0 [BGP-Static/4294967292/-101] 02:42:51 Discard
의미
출력은 디바이스에 구성된 BGP-정적 경로를 보여줍니다. CE1에서 활성 경로가 학습되고 BGP-정적 경로가 비활성입니다.
구성된 호스트가 BGP-정적 경로를 수신할 수 있는지 확인
목적
BGP-정적 경로가 수신하도록 구성된 호스트에 보급되고 있는지 확인합니다.
실행
디바이스 CE2 및 CE3에서 작동 모드에서 명령을 실행 show route protocol bgp 하여 라우팅 테이블 학습된 경로를 표시합니다.
user@CE2> show route protocol bgp inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.28/32 *[BGP/170] 01:52:10, localpref 100 AS path: 64496 64497 I, validation-state: unverified > to 10.0.0.14 via ge-2/0/0.13 1.0.0.29/32 *[BGP/170] 01:52:06, localpref 100 AS path: 64496 64499 I, validation-state: unverified > to 10.0.0.14 via ge-2/0/0.13 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) inet6.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) user@CE3> show route protocol bgp inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1.0.0.28/32 *[BGP/170] 01:52:19, localpref 100 AS path: 64496 64497 I, validation-state: unverified > to 10.0.0.18 via ge-2/0/5.17 1.0.0.29/32 *[BGP/170] 01:52:15, localpref 100 AS path: 64496 64498 I, validation-state: unverified > to 10.0.0.18 via ge-2/0/5.17 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) inet6.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
의미
디바이스 CE2와 CE3 모두 10.0.0.28/32로의 경로가 있습니다. CE2는 BGP-static 경로를 수신했으며 CE3은 동적으로 학습된 경로를 받았지만 차이점을 알 수는 없습니다.
구성된 BGP-정적 경로가 플랩되지 않는지 확인
목적
라우터 PE1과 디바이스 CE1 간의 BGP 피어링 세션이 중단되더라도 BGP 정적 경로가 플랩되지 않는지 확인합니다.
실행
라우터 PE1과 디바이스 CE1 간의 BGP 피어링 세션을 비활성화합니다. PE1은 10.0.0.28/32에 대해 동적으로 학습된 경로가 없지만 구성된 BGP-정적 경로가 여전히 있습니다.
[edit] user@PE1# deactivate protocols bgp group ebgp user@PE1# commit
user@PE1> show route 10.0.0.28/32 inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.28/32 *[BGP-Static/4294967292/-101] 02:46:21 Discard user@CE2> show route protocol bgp inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.28/32 *[BGP/170] 01:52:48, localpref 100 AS path: 64496 64497 I, validation-state: unverified > to 10.0.0.18 via ge-2/0/5.17 1.0.0.29/32 *[BGP/170] 01:52:44, localpref 100 AS path: 64496 64499 I, validation-state: unverified > to 10.0.0.18 via ge-2/0/5.17 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) inet6.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) user@CE3> show route protocol bgp inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.29/32 *[BGP/170] 01:52:47, localpref 100 AS path: 64496 64498 I, validation-state: unverified > to 10.0.0.18 via ge-2/0/5.17 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) inet6.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
의미
라우터 PE1 및 디바이스 CE2는 여전히 구성된 BGP 정적 경로를 갖습니다. 그러나 이 접두사 플랩이 펄럭이기 때문에 디바이스 CE3은 10.0.0.28/32로의 경로가 없습니다. BGP 정적 경로는 수동으로 삭제되지 않는 한 플랩되지 않습니다.