귀하의 경험을 개선할 수 있도록 도와주십시오.

귀하의 의견을 알려주십시오.

2분이 소요되는 설문 조사에 시간을 내주시겠습니까?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
keyboard_arrow_right

이 기계 번역이 도움이 되었습니까?

starstarstarstarstar
Go to English page
면책 조항:

이 페이지는 타사 기계 번역 소프트웨어를 사용해 번역됩니다. 주니퍼 네트웍스에서는 우수한 품질의 번역을 제공하기 위한 합리적인 수준의 노력을 기울이지만 해당 컨텐츠의 정확성을 보장할 수 없습니다. 본 번역에 포함된 정보의 정확성과 관련해 의문이 있는 경우 영문 버전을 참조하시기 바랍니다. 다운로드 가능한 PDF는 영어로만 제공됩니다.

예: 동적 라우팅 정책 구성

date_range 19-Jan-25

이 예에서는 표준 구성 데이터베이스에서 요구되는 것과 동일한 검증을 거치지 않는 동적 데이터베이스에서 라우팅 정책 객체를 구성하는 방법을 보여줍니다.

요구 사항

이 예를 구성하기 전에 디바이스 초기화를 제외한 특별한 구성은 필요하지 않습니다.

개요

구성 변경을 커밋하는 데 필요한 검증 프로세스에는 상당한 오버헤드와 시간이 수반될 수 있습니다.

동적 데이터베이스에 대한 변경 내용을 커밋하는 데 걸리는 시간은 표준 구성 데이터베이스보다 훨씬 짧습니다. 표준 데이터베이스에서 구성하는 라우팅 정책에서 이러한 정책 및 정책 개체를 참조할 수 있습니다. BGP는 동적 데이터베이스에 구성된 정책 및 정책 개체를 참조하는 라우팅 정책을 적용할 수 있는 유일한 프로토콜입니다. 동적 데이터베이스에 구성된 객체를 기반으로 라우팅 정책을 구성하고 커밋한 후에는 동적 데이터베이스 구성을 변경하여 기존 라우팅 정책을 신속하게 업데이트할 수 있습니다.

경고:

Junos OS는 동적 데이터베이스에 대한 구성 변경을 검증하지 않기 때문에 이 기능을 사용할 때는 커밋하기 전에 모든 구성 변경 사항을 테스트하고 확인해야 합니다.

그림 1은 샘플 네트워크를 표시합니다.

그림 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의 구성은 접두사 목록의 사용을 보여준다는 점에서 디바이스 R0의 구성과 약간 다릅니다.

디바이스 R1의 동적 데이터베이스에서 두 개의 접두사 목록이 정의되는데, 하나는 디바이스 R0에서 학습한 인터페이스 주소에 대한 것이고 다른 하나는 디바이스 R2에서 학습한 인터페이스 주소에 대한 것입니다. 디바이스 R1의 표준 데이터베이스에는 동적 데이터베이스에 정의된 것과 유사한 접두사 목록이 있는 라우팅 정책이 포함되어 있습니다.

디바이스 R0과의 피어 세션에서 디바이스 R1은 정적 데이터베이스 정책을 적용합니다. 대조적으로, 디바이스 R2와의 피어 세션에서 디바이스 R1의 구성은 동적 데이터베이스를 참조합니다.

이러한 다양한 구성의 결과는 섹션에서 분석됩니다 검증 .

CLI 빠른 구성은(는) 그림 1 내 모든 디바이스의 구성을 보여줍니다.

이 섹션에서는 #configuration776__policy-dynamic-st 디바이스 R1의 동적 데이터베이스에 대한 단계를 설명합니다.

이 섹션에서는 #configuration776__policy-standard-st 디바이스 R1의 표준 데이터베이스에 대한 단계를 설명합니다.

구성

절차

CLI 빠른 구성

이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 [edit] 계층 수준에서 명령을 CLI로 복사해 붙여 넣습니다.

디바이스 R0

content_copy zoom_out_map
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 동적 데이터베이스

content_copy zoom_out_map
[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 표준 데이터베이스

content_copy zoom_out_map
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

content_copy zoom_out_map
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의 동적 데이터베이스를 구성하려면 다음과 같이 하십시오.

  1. 동적 데이터베이스에 대한 구성 모드를 입력합니다.

    content_copy zoom_out_map
    user@R1> configure dynamic   
    Entering configuration mode
    [edit dynamic]
    
  2. 디바이스 R0에서 학습한 인터페이스 주소에 대한 접두사 목록을 생성합니다.

    content_copy zoom_out_map
    [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
    
  3. 디바이스 R2에서 학습한 인터페이스 주소에 대한 접두사 목록을 생성합니다.

    content_copy zoom_out_map
    [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
    
  4. 라우팅 정책을 구성합니다.

    content_copy zoom_out_map
    [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의 표준 데이터베이스를 구성하려면 다음을 수행합니다.

  1. 라우터 인터페이스를 생성합니다.

    content_copy zoom_out_map
    [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
    
  2. 동적 데이터베이스의 정책을 참조하는 라우팅 정책을 만듭니다.

    content_copy zoom_out_map
    [edit policy-options]
    user@R1# set policy-statement dyn_policy1 dynamic-db
    user@R1# set policy-statement dyn_policy2 dynamic-db
    
  3. 디바이스 R0으로 BGP 피어링을 구성합니다.

    content_copy zoom_out_map
    [edit protocols bgp group to_r0]
    user@R1# set neighbor 10.0.0.1 peer-as 100
    
  4. 디바이스 R0을 사용하는 BGP 피어링에 동적 데이터베이스 정책을 적용합니다.

    content_copy zoom_out_map
    [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
    
  5. 디바이스 R0에서 학습한 접두사에 대한 접두사 목록을 구성합니다.

    content_copy zoom_out_map
    [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
    
  6. 디바이스 R2에서 학습한 접두사에 대한 접두사 목록을 구성합니다.

    content_copy zoom_out_map
    [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
    
  7. 정적 데이터베이스 정책을 구성합니다.

    content_copy zoom_out_map
    [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
    
  8. 디바이스 R2와의 BGP 피어링을 구성합니다.

    content_copy zoom_out_map
    [edit protocols bgp group to_R2]
    user@R1# set neighbor 10.1.0.2 peer-as 300
    
  9. 디바이스 R2와의 BGP 피어링에 정적 데이터베이스 정책을 적용합니다.

    content_copy zoom_out_map
    [edit protocols bgp group to_R2]
    user@R1# set import static_policy1
    user@R1# set export static_policy2
    
  10. (선택 사항) 지정된 기간 동안 또는 수동으로 세션을 재설정할 때까지 활성 논스톱 라우팅 전환 후 BGP 피어링 세션을 재설정하지 않도록 라우터를 구성합니다.

    이 명령문은 NSR(Nonstop Active Routing)이 활성화될 때 동적 데이터베이스가 백업 라우팅 엔진과 동기화되지 않기 때문에 동적 라우팅 정책에서 특히 유용합니다. 그 결과, 백업 라우팅 엔진으로의 전환이 발생하는 경우, 전환 시점에 기본 라우팅 엔진에서 실행되는 가져오기 및 내보내기 정책을 더 이상 사용하지 못할 수 있습니다. 따라서 전환이 발생하는 즉시 BGP 피어링 세션이 자동으로 다시 설정되지 않도록 할 수 있습니다.

    content_copy zoom_out_map
    [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
    
  11. AS(Autonomous System) 번호를 구성합니다.

    content_copy zoom_out_map
    [edit routing-options]
    user@R1# set routing-options autonomous-system 200
    

결과

동적 데이터베이스의 show interfaces구성 모드에서 명령을 입력하고 표준 데이터베이스의 구성 모드에서 , show protocols, show policy-optionsshow routing-options 명령을 입력하여 show 구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.

디바이스 R1 동적

content_copy zoom_out_map
[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 표준

content_copy zoom_out_map
[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;
        }
    }
}
content_copy zoom_out_map
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;
        }
    }
}
content_copy zoom_out_map
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;
    }
}
content_copy zoom_out_map
user@R1# show routing-options
autonomous-system 200;

디바이스 구성을 마쳤으면 구성 모드에서 commit을(를) 입력합니다.

검증

구성이 올바르게 작동하고 있는지 확인합니다.

디바이스 R1에서 구성된 정책 확인

목적

디바이스 R1에 동적 및 정적 정책이 적용되는지 확인합니다.

작업

디바이스 R1에서 명령을 입력합니다 show policy .

content_copy zoom_out_map
user@R1> show policy
Configured policies:
dyn_policy1
dyn_policy2
static_policy1
static_policy2
dyn_policy1
dyn_policy2

의미

동적 정책은 동적 데이터베이스의 첫 번째이자 중앙 구성인 두 번 구성되므로 두 번 나열됩니다. 보조 구성은 다음과 같이 동적 데이터베이스가 참조되는 정적 데이터베이스에 있습니다.

동적 데이터베이스에 구성

content_copy zoom_out_map
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;
    }
}

정적 데이터베이스에서 참조됨

content_copy zoom_out_map
policy-statement dyn_policy1 {
    dynamic-db;
}
policy-statement dyn_policy2 {
    dynamic-db;
}

디바이스 R0에서 디바이스 R1로 보급된 경로 확인

목적

디바이스 R0의 라우팅 정책이 작동하는지 확인합니다.

작업

디바이스 R0에서 디바이스 R1의 show route advertising-protocol bgp 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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의 가져오기 정책이 다음 경로로 제한된 접두사 목록을 구체적으로 정의하기 때문입니다.

content_copy zoom_out_map
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 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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의 가져오기 정책이 다음 경로로 제한된 접두사 목록을 구체적으로 정의하기 때문입니다.

content_copy zoom_out_map
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 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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에서 BGP를 통해 수신하지 않은 경로(172.16.6.0/24)가 디바이스 R1에서 BGP를 통해 디바이스 R0으로 보급되고 있습니다. 이것은 두 가지 이유로 발생합니다. 첫 번째 이유는 경로 172.16.6.0/24가 다음과 같이 직접 경로이기는 하지만 디바이스 R1의 라우팅 테이블에 있기 때문입니다.

content_copy zoom_out_map
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의 내보내기 정책이 다음 경로로 제한된 접두사 목록을 구체적으로 정의하기 때문입니다.

content_copy zoom_out_map
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 인접 주소를 사용하여 명령을 입력합니다.

content_copy zoom_out_map
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의 내보내기 정책은 다음 경로로 제한된 접두사 목록을 구체적으로 정의합니다.

content_copy zoom_out_map
prefix-list static_prfx2 {
    172.16.1.0/24;
    172.16.2.0/24;
    172.16.3.0/24;
    172.16.4.0/24;
}
footer-navigation