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

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

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는 영어로만 제공됩니다.

예: BGP 경로 보급 활성화

date_range 19-Jan-25

Junos OS는 한 EBGP 피어에서 학습한 경로를 동일한 외부 BGP(EBGP) 피어로 다시 알리지 않습니다. 또한 소프트웨어는 라우팅 인스턴스에 관계없이 원래 피어와 동일한 AS(Autonomous System)에 있는 EBGP 피어에 이러한 경로를 다시 알리지 않습니다. 구성에 advertise-peer-as 문을 포함시켜 이 동작을 수정할 수 있습니다.

구성에 advertise-peer-as 문을 포함하면, BGP는 이 확인에 관계없이 경로를 보급합니다.

기본 동작을 복원하려면 구성에 no-advertise-peer-as 문을 포함합니다.

content_copy zoom_out_map

구성에 as-override 문이 포함된 경우 경로 억제 기본 동작이 비활성화됩니다. 구성에 as-override 문과 no-advertise-peer-as 문을 모두 포함하면 no-advertise-peer-as 문은 무시됩니다.

요구 사항

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

주:

이 예는 Junos 릴리스 21.2R1에서 업데이트되고 재검증되었습니다.

개요

이 예는 외부 BGP(EBGP) 연결이 있는 3개의 라우팅 디바이스를 보여줍니다. 디바이스 R2는 디바이스 R1에 대한 EBGP 연결과 디바이스 R3에 대한 또 다른 EBGP 연결을 가지고 있습니다. AS 64511에 있는 디바이스 R2에 의해 분리되지만, 디바이스 R1과 디바이스 R3은 동일한 AS(AS 64512)에 있습니다. 디바이스 R1 및 디바이스 R3은 자체 루프백 인터페이스 주소로 BGP 직접 경로를 보급합니다.

디바이스 R2는 이러한 루프백 인터페이스 경로를 수신하고, 명령문은 advertise peer-as 디바이스 R2가 이를 보급하도록 허용합니다. 구체적으로 디바이스 R1은 디바이스 R2에 192.168.0.1 경로를 전송하고, 디바이스 R2에 구성된 기능이 있으므로 디바이스 R2는 advertise peer-as 디바이스 R3에 192.168.0.1 경로를 전송할 수 있습니다. 마찬가지로, 디바이스 R3은 192.168.0.3 경로를 디바이스 R2로 전송하고 advertise peer-as , 디바이스 R2가 경로를 디바이스 R1로 전달할 수 있도록 합니다.

디바이스 R1 및 디바이스 R3가 AS 경로에 loops 2 자체 AS 번호가 포함된 경로를 수락하도록 하려면 디바이스 R1 및 디바이스 R3에 문이 필요합니다.

토폴로지

그림 1: advertise-peer-as를 위한 BGP 토폴로지advertise-peer-as를 위한 BGP 토폴로지

구성

CLI 빠른 구성

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

디바이스 R1

content_copy zoom_out_map
set interfaces xe-0/2/0 description R1-to-R2
set interfaces xe-0/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 family inet unicast loops 2
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.0.0.2
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64512

디바이스 R2

content_copy zoom_out_map
set interfaces xe-0/2/0 description R2-to-R1
set interfaces xe-0/2/0 unit 0 family inet address 10.0.0.2/30
set interfaces xe-0/2/1 description R2-to-R3
set interfaces xe-0/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 group ext type external
set protocols bgp group ext advertise-peer-as
set protocols bgp group ext export send-direct
set protocols bgp group ext neighbor 10.0.0.1 peer-as 64512
set protocols bgp group ext neighbor 10.1.0.2 peer-as 64512
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64511

디바이스 R3

content_copy zoom_out_map
set interfaces xe-0/2/0 description R3-to-R2
set interfaces xe-0/2/0 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 family inet unicast loops 2
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.1.0.1
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64512

절차

단계별 절차

다음 예는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색 관련 정보는 Junos OS CLI 사용자 가이드구성 모드에서의 CLI 편집기 사용을 참조하십시오.

디바이스 R1 구성

  1. 디바이스 인터페이스를 구성합니다.

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set xe-0/2/0 description R1-to-R2
    user@R1# set xe-0/2/0 unit 0 family inet address 10.0.0.1/30
    user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
    
  2. BGP를 구성합니다.

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set type external
    user@R1# set peer-as 64511
    user@R1# set neighbor 10.0.0.2
    
  3. 문을 포함하여 디바이스 R3의 경로가 디바이스 R1에 숨겨지지 않도록 합니다 loops 2 .

    명령문은 loops 2 로컬 디바이스의 자체 AS 번호가 경로를 숨기지 않고 AS 경로에 최대 한 번까지 나타날 수 있음을 의미합니다. 로컬 디바이스의 AS 번호가 경로에서 두 번 이상 감지되면 경로가 숨겨집니다.

    content_copy zoom_out_map
    [edit protocols bgp family inet unicast]
    user@R1# set loops 2
    
  4. 직접 경로를 전송하는 라우팅 정책을 구성합니다.

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R1# set from protocol direct
    user@R1# set then accept
    
  5. 디바이스 R2와의 BGP 피어링 세션에 내보내기 정책을 적용합니다.

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set export send-direct
    
  6. AS(Autonomous System) 번호를 구성합니다.

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

단계별 절차

디바이스 R2 구성:

  1. 디바이스 인터페이스를 구성합니다.

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set xe-0/2/0 description R2-to-R1
    user@R2# set xe-0/2/0 unit 0 family inet address 10.0.0.2/30
    user@R2# set xe-0/2/1 description R2-to-R3
    user@R2# set xe-0/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
    
  2. BGP를 구성합니다.

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# set type external
    user@R2# set neighbor 10.0.0.1 peer-as 64512
    user@R2# set neighbor 10.1.0.2 peer-as 64512
    
  3. 하나의 EBGP 피어에서 학습한 경로를 동일한 AS의 다른 EBGP 피어로 보급하도록 디바이스 R2를 구성합니다.

    즉, 디바이스 R1과 디바이스 R3이 동일한 AS에 있더라도 디바이스 R3에서 학습한 디바이스 R1 경로에 보급합니다(또는 그 반대).

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# set advertise-peer-as
    
  4. 직접 경로를 전송하는 라우팅 정책을 구성합니다.

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R2# set from protocol direct
    user@R2# set then accept
    
  5. 내보내기 정책을 적용합니다.

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R2# set export send-direct
    
  6. AS 번호를 구성합니다.

    content_copy zoom_out_map
    [edit routing-options]
    user@R2# set autonomous-system 64511
    

결과

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

디바이스 R1

content_copy zoom_out_map
user@R1# show interfaces
xe-0/2/0 {
    description R1-to-R2;
    unit 0 {
        family inet {
            address 10.0.0.1/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.1/32;
        }
    }
}
content_copy zoom_out_map
user@R1# show protocols
bgp {
    family inet {
        unicast {
            loops 2;
        }
    }
    group ext {
        type external;
        export send-direct;
        peer-as 64511;
        neighbor 10.0.0.2;
    }
}
content_copy zoom_out_map
user@R1# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@R1# show routing-options
autonomous-system 64512;

디바이스 R2

content_copy zoom_out_map
user@R2# show interfaces
xe-0/2/0 {
    description R2-to-R1;
    unit 0 {
        family inet {
            address 10.0.0.2/30;
        }
    }
}
xe-0/2/1 {
    description R2-to-R3;
    unit 0 {
        family inet {
            address 10.1.0.1/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.2/32;
        }
    }
}
content_copy zoom_out_map
user@R2# show protocols
bgp {
    group ext {
        type external;
        advertise-peer-as;
        export send-direct;
        neighbor 10.0.0.1 {
            peer-as 64512;
        }
        neighbor 10.1.0.2 {
            peer-as 64512;
        }
    }
}
content_copy zoom_out_map
user@R2# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@R2# show routing-options
autonomous-system 64511;

디바이스 구성이 완료되면 구성모드에서 commit을(를) 입력합니다.

검증

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

BGP 경로 확인

목적

디바이스 R1 및 디바이스 R3의 라우팅 테이블에 예상 경로가 포함되어 있는지 확인합니다.

작업

  1. 디바이스 R2에서 BGP 구성의 문을 비활성화 advertise-peer-as 합니다.

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# deactivate advertise-peer-as
    user@R2# commit
    
  2. 디바이스 R3에서 BGP 구성의 문을 비활성화 loops 합니다.

    content_copy zoom_out_map
    [edit  protocols bgp family inet unicast ]
    user@R3# deactivate unicast loops 
    user@R3# commit
    
  3. 디바이스 R1에서 디바이스 R2에 보급되는 경로를 확인합니다.

    content_copy zoom_out_map
    user@R1> show route advertising-protocol bgp 10.0.0.2
    inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 192.168.0.1/32          Self                                    I
    
  4. 디바이스 R2에서 디바이스 R1에서 수신되는 경로를 확인합니다.

    content_copy zoom_out_map
    user@R2> show route receive-protocol bgp 10.0.0.1
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
      10.0.0.0/30             10.0.0.1                                64512 I
    * 192.168.0.1/32          10.0.0.1                                64512 I
  5. 디바이스 R2에서 디바이스 R3에 보급되는 경로를 확인합니다.

    content_copy zoom_out_map
    user@R2> show route advertising-protocol bgp 10.1.0.2
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 10.1.0.0/30             Self                                    I
    * 192.168.0.2/32          Self                                    I
    
  6. 디바이스 R2의 BGP 구성에서 문을 활성화합니다 advertise-peer-as .

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# activate advertise-peer-as
    user@R2# commit
    
  7. 디바이스 R2에서 디바이스 R3에 보급된 경로를 다시 확인합니다.

    content_copy zoom_out_map
    user@R2> show route advertising-protocol bgp 10.1.0.2
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 10.1.0.0/30             Self                                    I
    * 192.168.0.1/32          Self             64512 I
    * 192.168.0.2/32          Self                                    I
    * 192.168.0.3/32          10.1.0.2         64512 I
  8. 디바이스 R3에서, 디바이스 R2에서 수신된 경로를 확인합니다.

    content_copy zoom_out_map
    user@R3> show route receive-protocol bgp 10.1.0.1
    inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             10.1.0.1                                64511 I
      10.1.0.0/30             10.1.0.1                                64511 I
    * 192.168.0.2/32          10.1.0.1                                64511 I
  9. 디바이스 R3에서 BGP 구성의 문을 활성화합니다 loops .

    content_copy zoom_out_map
    [edit  protocols bgp family inet unicast ]
    user@R3# activate unicast loops 
    user@R3# commit
    
  10. 디바이스 R3에서, 디바이스 R2에서 수신된 경로를 다시 확인합니다.

    content_copy zoom_out_map
    user@R3> show route receive-protocol bgp 10.1.0.1
    inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 1 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             10.1.0.1                                64511 I
      10.1.0.0/30             10.1.0.1                                64511 I
    * 192.168.0.1/32          10.1.0.1                                64511 64512 I
    * 192.168.0.2/32          10.1.0.1                                64511 I
    

의미

advertise-peer-as 먼저 명령문과 loops 명령문이 비활성화되어 기본 동작을 검사할 수 있습니다. 디바이스 R1은 디바이스 R1의 루프백 인터페이스 주소인 192.168.0.1/32에 대한 경로를 디바이스 R2에 전송합니다. 디바이스 R2는 이 경로를 디바이스 R3에 알리지 않습니다. 문을 활성화 advertise-peer-as 한 후 디바이스 R2는 디바이스 R3에 192.168.0.1/32 경로를 보급합니다. 디바이스 R3은 문이 활성화될 때까지 loops 이 경로를 수락하지 않습니다.

footer-navigation