예를 들면 다음과 같습니다. 동적 라우팅 정책 구성
이 예는 표준 구성 데이터베이스에서 필요한 동일한 검증 대상이 아닌 동적 데이터베이스에서 라우팅 정책 개체를 구성하는 방법을 보여줍니다.
요구 사항
이 예를 구성하기 전에 디바이스 초기화를 제외한 특별한 구성은 필요하지 않습니다.
개요
구성 변경을 커밋하는 데 필요한 검증 프로세스는 상당한 오버헤드와 시간을 수반할 수 있습니다.
동적 데이터베이스에 대한 변경을 커밋하는 데 걸리는 시간이 표준 구성 데이터베이스보다 훨씬 짧습니다. 표준 데이터베이스에서 구성하는 라우팅 정책에서 이러한 정책 및 정책 객체를 참조할 수 있습니다. BGP는 동적 데이터베이스에 구성된 정책 및 정책 개체를 참조하는 라우팅 정책을 적용할 수 있는 유일한 프로토콜입니다. 동적 데이터베이스에 구성된 개체를 기반으로 라우팅 정책 구성하고 커밋한 후 동적 데이터베이스 구성을 변경하여 기존 라우팅 정책 빠르게 업데이트할 수 있습니다.
Junos OS 동적 데이터베이스에 대한 구성 변경 사항을 검증하지 않기 때문에 이 기능을 사용할 때 모든 구성 변경 사항을 커밋하기 전에 테스트하고 확인해야 합니다.
그림 1 은 샘플 네트워크를 보여줍니다.

이 예에는 외부 BGP(EBGP) 세션이 설정된 라우터 3개가 포함됩니다. 오직 디바이스 R1만이 동적 데이터베이스를 사용합니다.
디바이스 R0의 fe-1/2/1 인터페이스에서 여러 개의 IPv4 인터페이스가 구성되고, 라우팅 정책 정책 조건을 디바이스 R0의 fe-1/2/1 인터페이스에 구성된 모든 IP 주소를 지정하는 짧은 방법으로 사용하여 from interface fe-1/2/1.0
이러한 접두사들을 BGP에 삽입합니다.
마찬가지로 디바이스 R2의 fe-1/2/3 인터페이스에서 여러 개의 IPv4 주소가 구성되고 라우팅 정책 이러한 접두사들을 BGP에 삽입합니다. 디바이스 R2의 구성은 디바이스 R2의 구성이 접두사 목록의 사용을 보여줍니다.
디바이스 R1에서 동적 데이터베이스에서는 디바이스 R0에서 학습한 인터페이스 주소와 디바이스 R2에서 학습한 인터페이스 주소에 대해 하나씩 두 개의 접두사 목록이 정의됩니다. 디바이스 R1의 표준 데이터베이스에는 동적 데이터베이스에 정의된 것과 유사한 접두사 목록이 있는 라우팅 정책이 포함되어 있습니다.
디바이스 R0과의 피어 세션에서 디바이스 R1은 정적 데이터베이스 정책을 적용합니다. 반대로 디바이스 R2와의 피어 세션에서 디바이스 R1의 구성은 동적 데이터베이스를 참조합니다.
이러한 다양한 구성의 결과는 섹션에서 분석 확인 됩니다.
CLI 빠른 구성 은(는) 의 모든 디바이스 그림 1에 대한 구성을 보여줍니다.
섹션 #configuration776__policy-dynamic-st 은 디바이스 R1의 동적 데이터베이스에 대한 단계를 설명합니다.
섹션에서 #configuration776__policy-standard-st 는 디바이스 R1의 표준 데이터베이스의 단계에 대해 설명합니다.
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
디바이스 R0
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces fe-1/2/1 unit 0 family inet address 172.16.4.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.3.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.2.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.1.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.5.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.6.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.7.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.8.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.9.1/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.10.1/24 set interfaces lo0 unit 0 family inet address 10.255.14.151/32 set protocols bgp group ext type external set protocols bgp group ext neighbor 10.0.0.2 export t2 set protocols bgp group ext neighbor 10.0.0.2 peer-as 200 set policy-options policy-statement t2 from interface fe-1/2/0.0 set policy-options policy-statement t2 from interface fe-1/2/1.0 set policy-options policy-statement t2 then accept set routing-options router-id 10.255.14.151 set routing-options autonomous-system 100
디바이스 R1 동적 데이터베이스
[edit dynamic] set policy-options prefix-list dyn_prfx1 172.16.1.0/24 set policy-options prefix-list dyn_prfx1 172.16.2.0/24 set policy-options prefix-list dyn_prfx1 172.16.3.0/24 set policy-options prefix-list dyn_prfx1 172.16.4.0/24 set policy-options prefix-list dyn_prfx1 172.16.5.0/24 set policy-options prefix-list dyn_prfx1 172.16.6.0/24 set policy-options prefix-list dyn_prfx1 172.16.7.0/24 set policy-options prefix-list dyn_prfx1 172.16.8.0/24 set policy-options prefix-list dyn_prfx2 172.16.2.0/24 set policy-options prefix-list dyn_prfx2 172.16.3.0/24 set policy-options prefix-list dyn_prfx2 172.16.4.0/24 set policy-options prefix-list dyn_prfx2 172.16.5.0/24 set policy-options prefix-list dyn_prfx2 172.16.6.0/24 set policy-options policy-statement dyn_policy1 term t1 from prefix-list dyn_prfx1 set policy-options policy-statement dyn_policy1 term t1 then accept set policy-options policy-statement dyn_policy1 term t2 then reject set policy-options policy-statement dyn_policy2 term t1 from prefix-list dyn_prfx2 set policy-options policy-statement dyn_policy2 term t1 then accept set policy-options policy-statement dyn_policy2 term t2 then reject
디바이스 R1 표준 데이터베이스
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces fe-1/2/2 unit 0 family inet address 10.1.0.1/30 set interfaces fe-1/2/1 unit 0 family inet address 172.16.4.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.3.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.2.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.1.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.5.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.6.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.7.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.8.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.9.2/24 set interfaces fe-1/2/1 unit 0 family inet address 172.16.10.2/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.22.2/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.23.2/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.24.2/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.25.2/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.26.2/24 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols bgp group to_r0 idle-after-switch-over 300 set protocols bgp group to_r0 neighbor 10.0.0.1 import dyn_policy1 set protocols bgp group to_r0 neighbor 10.0.0.1 export dyn_policy2 set protocols bgp group to_r0 neighbor 10.0.0.1 peer-as 100 set protocols bgp group to_R2 import static_policy1 set protocols bgp group to_R2 export static_policy2 set protocols bgp group to_R2 idle-after-switch-over 300 set protocols bgp group to_R2 neighbor 10.1.0.2 peer-as 300 set policy-options prefix-list static_prfx1 172.16.22.0/24 set policy-options prefix-list static_prfx1 172.16.23.0/24 set policy-options prefix-list static_prfx1 172.16.24.0/24 set policy-options prefix-list static_prfx1 172.16.25.0/24 set policy-options prefix-list static_prfx2 172.16.1.0/24 set policy-options prefix-list static_prfx2 172.16.2.0/24 set policy-options prefix-list static_prfx2 172.16.3.0/24 set policy-options prefix-list static_prfx2 172.16.4.0/24 set policy-options policy-statement dyn_policy1 dynamic-db set policy-options policy-statement dyn_policy2 dynamic-db set policy-options policy-statement static_policy1 term t1 from prefix-list static_prfx1 set policy-options policy-statement static_policy1 term t1 then accept set policy-options policy-statement static_policy1 term t2 then reject set policy-options policy-statement static_policy2 term t1 from prefix-list static_prfx2 set policy-options policy-statement static_policy2 term t1 then accept set policy-options policy-statement static_policy2 term t2 then reject set routing-options autonomous-system 200
디바이스 R2
set interfaces fe-1/2/2 unit 0 family inet address 10.1.0.2/30 set interfaces fe-1/2/3 unit 0 family inet address 172.16.22.1/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.23.1/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.24.1/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.25.1/24 set interfaces fe-1/2/3 unit 0 family inet address 172.16.26.1/24 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols bgp group to_vin neighbor 10.1.0.1 export p1 set protocols bgp group to_vin neighbor 10.1.0.1 peer-as 200 set policy-options prefix-list ppx1 172.16.22.0/24 set policy-options prefix-list ppx1 172.16.23.0/24 set policy-options prefix-list ppx1 172.16.24.0/24 set policy-options prefix-list ppx1 172.16.25.0/24 set policy-options prefix-list ppx1 172.16.26.0/24 set policy-options policy-statement p1 term t1 from family inet set policy-options policy-statement p1 term t1 from prefix-list ppx1 set policy-options policy-statement p1 term t1 then accept set routing-options autonomous-system 300
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. 자세한 내용은 Junos OS CLI 사용자 가이드에서 을(를) 참조하십시오구성 모드에서 CLI 편집기 사용.
디바이스 R1의 동적 데이터베이스를 구성하려면 다음을 수행합니다.
동적 데이터베이스에 대한 구성 모드를 입력합니다.
user@R1> configure dynamic Entering configuration mode [edit dynamic]
디바이스 R0에서 학습한 인터페이스 주소에 대한 접두사 목록을 만듭니다.
[edit dynamic policy-options prefix-list dyn_prfx1] user@R1# set 172.16.1.0/24 user@R1# set 172.16.2.0/24 user@R1# set 172.16.3.0/24 user@R1# set 172.16.4.0/24 user@R1# set 172.16.5.0/24 user@R1# set 172.16.6.0/24 user@R1# set 172.16.7.0/24 user@R1# set 172.16.8.0/24
디바이스 R2에서 학습한 인터페이스 주소에 대한 접두사 목록을 생성합니다.
[edit dynamic policy-options prefix-list dyn_prfx2] user@R1# set 172.16.2.0/24 user@R1# set 172.16.3.0/24 user@R1# set 172.16.4.0/24 user@R1# set 172.16.5.0/24 user@R1# set 172.16.6.0/24
라우팅 정책을 구성합니다.
[edit dynamic policy-options policy-statement dyn_policy1] user@R1# set term t1 from prefix-list dyn_prfx1 user@R1# set term t1 then accept user@R1# set term t2 then reject user@R1# set term t1 from prefix-list dyn_prfx2 user@R1# set term t1 then accept user@R1# set term t2 then reject
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. 자세한 내용은 Junos OS CLI 사용자 가이드에서 을(를) 참조하십시오구성 모드에서 CLI 편집기 사용.
디바이스 R1의 표준 데이터베이스를 구성하려면 다음을 수행합니다.
라우터 인터페이스를 생성합니다.
[edit interfaces] user@R1# set fe-1/2/0 unit 0 family inet address 10.0.0.2/30 user@R1# set fe-1/2/2 unit 0 family inet address 10.1.0.1/30 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.4.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.3.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.2.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.1.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.5.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.6.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.7.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.8.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.9.2/24 user@R1# set fe-1/2/1 unit 0 family inet address 172.16.10.2/24 user@R1# set fe-1/2/3 unit 0 family inet address 172.16.2.2/24 user@R1# set fe-1/2/3 unit 0 family inet address 172.16.3.2/24 user@R1# set fe-1/2/3 unit 0 family inet address 172.16.4.2/24 user@R1# set fe-1/2/3 unit 0 family inet address 172.16.5.2/24 user@R1# set fe-1/2/3 unit 0 family inet address 172.16.6.2/24 user@R1# set lo0 unit 0 family inet address 192.168.0.2/32
동적 데이터베이스에서 정책을 참조하는 라우팅 정책을 생성합니다.
[edit policy-options] user@R1# set policy-statement dyn_policy1 dynamic-db user@R1# set policy-statement dyn_policy2 dynamic-db
디바이스 R0으로 BGP 피어링을 구성합니다.
[edit protocols bgp group to_r0] user@R1# set neighbor 10.0.0.1 peer-as 100
동적 데이터베이스 정책을 디바이스 R0의 BGP 피어링에 적용합니다.
[edit protocols bgp group to_r0] user@R1# set neighbor 10.0.0.1 import dyn_policy1 user@R1# set neighbor 10.0.0.1 export dyn_policy2
디바이스 R0에서 학습한 접두사에 대한 접두사 목록을 구성합니다.
[edit policy-options prefix-list static_prfx2] user@R1# set 172.16.1.0/24 user@R1# set 172.16.2.0/24 user@R1# set 172.16.3.0/24 user@R1# set 172.16.4.0/24
디바이스 R2에서 학습한 접두사에 대한 접두사 목록을 구성합니다.
[edit policy-options prefix-list static_prfx1] user@R1# set 172.16.2.0/24 user@R1# set 172.16.3.0/24 user@R1# set 172.16.4.0/24 user@R1# set 172.16.5.0/24
정적 데이터베이스 정책을 구성합니다.
[edit policy-options policy-statement static_policy1] user@R1# set term t1 from prefix-list static_prfx1 user@R1# set term t1 then accept user@R1# set term t2 then reject [edit policy-options policy-statement static_policy2] user@R1# set term t1 from prefix-list static_prfx2 user@R1# set term t1 then accept user@R1# set term t2 then reject
디바이스 R2로 BGP 피어링을 구성합니다.
[edit protocols bgp group to_R2] user@R1# set neighbor 10.1.0.2 peer-as 300
정적 데이터베이스 정책을 디바이스 R2와의 BGP 피어링에 적용합니다.
[edit protocols bgp group to_R2] user@R1# set import static_policy1 user@R1# set export static_policy2
(선택 사항) 지정된 기간 동안 또는 세션을 수동으로 재설정할 때까지 활성 무중단 라우팅 전환 후 BGP 피어링 세션을 다시 설정하지 않도록 라우터를 구성합니다.
이 문은 NSR(Nonstop Active Routing)이 활성화된 경우 동적 데이터베이스가 백업 라우팅 엔진 동기화되지 않기 때문에 동적 라우팅 정책에서 특히 유용합니다. 따라서 백업 라우팅 엔진 전환이 발생하면 전환 시 기본 라우팅 엔진 실행되는 가져오기 및 내보내기 정책을 더 이상 사용할 수 없습니다. 따라서 전환이 발생하는 즉시 BGP 피어링 세션이 자동으로 재설정되는 것을 방지할 수 있습니다.
[edit protocols bgp] user@R1# set group to_r0 idle-after-switch-over 300 user@R1# set group to_R2 idle-after-switch-over 300
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set routing-options autonomous-system 200
결과
동적 데이터베이스의 show
구성 모드에서 명령을 입력하고 표준 데이터베이스의 show interfaces
구성 모드에서 , show protocols
show policy-options
및 show routing-options
명령을 입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
디바이스 R1 동적
[edit dynamic] user@R1# show policy-options { prefix-list dyn_prfx1 { 172.16.1.0/24; 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; 172.16.6.0/24; 172.16.7.0/24; 172.16.8.0/24; } prefix-list dyn_prfx2 { 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; 172.16.6.0/24; } policy-statement dyn_policy1 { term t1 { from { prefix-list dyn_prfx1; } then accept; } term t2 { then reject; } } policy-statement dyn_policy2 { term t1 { from { prefix-list dyn_prfx2; } then accept; } term t2 { then reject; } } }
디바이스 R1 표준
[edit] user@R1# 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 172.16.4.2/24; address 172.16.3.2/24; address 172.16.2.2/24; address 172.16.1.2/24; address 172.16.5.2/24; address 172.16.6.2/24; address 172.16.7.2/24; address 172.16.8.2/24; address 172.16.9.2/24; address 172.16.10.2/24; } } } fe-1/2/2 { unit 0 { family inet { address 10.1.0.1/30; } } } fe-1/2/3 { unit 0 { family inet { address 172.16.2.2/24; address 172.16.3.2/24; address 172.16.4.2/24; address 172.16.5.2/24; address 172.16.6.2/24; } } } lo0 { unit 0 { family inet { address 192.168.0.2/32; } } }
user@R1# show protocols bgp { group to_r0 { idle-after-switch-over 300; neighbor 10.0.0.1 { import dyn_policy1; export dyn_policy2; peer-as 100; } } group to_R2 { import static_policy1; export static_policy2; idle-after-switch-over 300; neighbor 10.1.0.2 { peer-as 300; } } }
user@R1# show policy-options prefix-list static_prfx1 { 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; } prefix-list static_prfx2 { 172.16.1.0/24; 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; } policy-statement dyn_policy1 { dynamic-db; } policy-statement dyn_policy2 { dynamic-db; } policy-statement static_policy1 { term t1 { from { prefix-list static_prfx1; } then accept; } term t2 { then reject; } } policy-statement static_policy2 { term t1 { from { prefix-list static_prfx2; } then accept; } term t2 { then reject; } }
user@R1# show routing-options autonomous-system 200;
디바이스 구성이 완료되면 구성 모드에서 을(를) 입력합니다 commit
.
확인
구성이 제대로 작동하는지 확인합니다.
- 디바이스 R1에서 구성된 정책 확인
- 디바이스 R0에서 디바이스 R1로 보급된 경로 확인
- 디바이스 R1이 디바이스 R0에서 수신하는 경로 확인
- 디바이스 R2에서 디바이스 R1로 보급된 경로 확인
- 디바이스 R1이 디바이스 R2에서 수신하는 경로 확인
- 디바이스 R1이 디바이스 R0에 보급하는 경로 확인
- 디바이스 R1이 디바이스 R2에 보급하는 경로 확인
디바이스 R1에서 구성된 정책 확인
목적
디바이스 R1에 동적 및 정적 정책이 실제로 있는지 확인합니다.
실행
디바이스 R1에서 명령을 입력합니다 show policy
.
user@R1> show policy Configured policies: dyn_policy1 dyn_policy2 static_policy1 static_policy2 dyn_policy1 dyn_policy2
의미
동적 정책은 동적 데이터베이스의 첫 번째 및 중앙 구성인 두 번 구성되기 때문에 두 번 나열됩니다. 보조 구성은 여기에 표시된 대로 동적 데이터베이스가 참조되는 정적 데이터베이스에 있습니다.
동적 데이터베이스에 구성됨
policy-statement dyn_policy1 { term t1 { from { prefix-list dyn_prfx1; } then accept; } term t2 { then reject; } } policy-statement dyn_policy2 { term t1 { from { prefix-list dyn_prfx2; } then accept; } term t2 { then reject; } }
정적 데이터베이스에서 참조
policy-statement dyn_policy1 { dynamic-db; } policy-statement dyn_policy2 { dynamic-db; }
디바이스 R0에서 디바이스 R1로 보급된 경로 확인
목적
디바이스 R0의 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R0에서 디바이스 R1의 show route advertising-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R0> show route advertising-protocol bgp 10.0.0.2 inet.0: 28 destinations, 28 routes (28 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 172.16.1.0/24 Self I * 172.16.2.0/24 Self I * 172.16.3.0/24 Self I * 172.16.4.0/24 Self I * 172.16.5.0/24 Self I * 172.16.6.0/24 Self I * 172.16.7.0/24 Self I * 172.16.8.0/24 Self I * 172.16.9.0/24 Self I * 172.16.10.0/24 Self I * 10.0.0.0/30 Self I
의미
디바이스 R0은 디바이스 R1에 예상 경로를 전송합니다.
디바이스 R1이 디바이스 R0에서 수신하는 경로 확인
목적
디바이스 R1의 가져오기 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R1에서 디바이스 R0의 show route receive-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R1> show route receive-protocol bgp 10.0.0.1 inet.0: 35 destinations, 51 routes (35 active, 0 holddown, 4 hidden) Prefix Nexthop MED Lclpref AS path 172.16.1.0/24 10.0.0.1 100 I 172.16.2.0/24 10.0.0.1 100 I 172.16.3.0/24 10.0.0.1 100 I 172.16.4.0/24 10.0.0.1 100 I 172.16.5.0/24 10.0.0.1 100 I 172.16.6.0/24 10.0.0.1 100 I 172.16.7.0/24 10.0.0.1 100 I 172.16.8.0/24 10.0.0.1 100 I
의미
디바이스 R0에 의해 전송되는 일부 경로는 디바이스 R1에 의해 수신되지 않습니다. 경로 172.16.9.0/24, 172.16.10.0/24 및 10.0.0.0/30이 누락되었습니다. 문을 사용하여 import dyn_policy1
디바이스 R0과의 BGP 피어링 세션에 적용되는 디바이스 R1의 가져오기 정책이 다음 경로로 제한되는 접두사 목록을 구체적으로 정의하기 때문입니다.
prefix-list dyn_prfx1 { 172.16.1.0/24; 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; 172.16.6.0/24; 172.16.7.0/24; 172.16.8.0/24; }
디바이스 R2에서 디바이스 R1로 보급된 경로 확인
목적
디바이스 R2의 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R2에서 디바이스 R1의 show route advertising-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R2> show route advertising-protocol bgp 10.1.0.1 inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 172.16.2.0/24 Self I * 172.16.3.0/24 Self I * 172.16.4.0/24 Self I * 172.16.5.0/24 Self I * 172.16.6.0/24 Self I
의미
디바이스 R2는 디바이스 R1에 예상 경로를 전송합니다.
디바이스 R1이 디바이스 R2에서 수신하는 경로 확인
목적
디바이스 R1의 가져오기 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R1에서 디바이스 R0의 show route receive-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R1> show route receive-protocol bgp 10.1.0.2 inet.0: 35 destinations, 51 routes (35 active, 0 holddown, 4 hidden) Prefix Nexthop MED Lclpref AS path 172.16.2.0/24 10.1.0.2 300 I 172.16.3.0/24 10.1.0.2 300 I 172.16.4.0/24 10.1.0.2 300 I 172.16.5.0/24 10.1.0.2 300 I
의미
디바이스 R2에 의해 전송되는 경로 중 하나는 디바이스 R1에 의해 수신되지 않습니다. 경로 172.16.6.0/24가 누락되었습니다. 문을 사용하여 import static_policy1
디바이스 R2와의 BGP 피어링 세션에 적용되는 디바이스 R1의 가져오기 정책이 다음 경로로 제한되는 접두사 목록을 구체적으로 정의하기 때문입니다.
prefix-list static_prfx1 { 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; }
디바이스 R1이 디바이스 R0에 보급하는 경로 확인
목적
디바이스 R1의 내보내기 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R1에서 디바이스 R0의 show route advertising-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R1> show route advertising-protocol bgp 10.0.0.1 inet.0: 35 destinations, 51 routes (35 active, 0 holddown, 4 hidden) Prefix Nexthop MED Lclpref AS path * 172.16.2.0/24 Self I * 172.16.3.0/24 Self I * 172.16.4.0/24 Self I * 172.16.5.0/24 Self I * 172.16.6.0/24 Self I
의미
아마도 예기치 않게 디바이스 R1이 디바이스 R2(172.16.6.0/24)로부터 BGP를 통해 수신하지 않은 경로는 그럼에도 불구하고 디바이스 R1에서 BGP를 통해 디바이스 R0으로 보급되고 있습니다. 이는 두 가지 이유로 발생합니다. 첫 번째 이유는 여기에 표시된 대로 경로 172.16.6.0/24가 디바이스 R1의 라우팅 테이블 있기 때문입니다.
user@R1> show route 172.16.6.0/24 protocol direct inet.0: 35 destinations, 51 routes (35 active, 0 holddown, 4 hidden) + = Active Route, - = Last Active, * = Both 172.16.6.0/24 *[Direct/0] 2d 22:51:41 > via fe-1/2/3.0
두 번째 이유는 문을 사용하여 export dyn_policy2
디바이스 R0과의 BGP 피어링 세션에 적용되는 디바이스 R1의 내보내기 정책이 다음 경로로 제한되는 접두사 목록을 정의하기 때문입니다.
prefix-list dyn_prfx2 { 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; 172.16.5.0/24; 172.16.6.0/24; }
172.16.6.0/24를 포함하십시오.
디바이스 R1이 디바이스 R2에 보급하는 경로 확인
목적
디바이스 R1의 내보내기 라우팅 정책 작동하는지 확인합니다.
실행
디바이스 R1에서 디바이스 R2의 show route advertising-protocol bgp
인접 주소를 사용하여 명령을 입력합니다.
user@R1> show route advertising-protocol bgp 10.1.0.2 inet.0: 35 destinations, 51 routes (35 active, 0 holddown, 4 hidden) Prefix Nexthop MED Lclpref AS path * 172.16.1.0/24 Self I * 172.16.2.0/24 Self I * 172.16.3.0/24 Self I * 172.16.4.0/24 Self I
의미
디바이스 R1은 예상되는 경로를 디바이스 R2로 전송합니다. 문을 사용하여 export static_policy2
디바이스 R2와의 BGP 피어링 세션에 적용되는 디바이스 R1의 내보내기 정책은 특히 다음 경로로 제한되는 접두사 목록을 정의합니다.
prefix-list static_prfx2 { 172.16.1.0/24; 172.16.2.0/24; 172.16.3.0/24; 172.16.4.0/24; }