이 페이지의 내용
BGP 세션을 위한 로드 밸런싱
BGP 다중 경로 이해하기
BGP 다중 경로는 여러 내부 BGP 경로 및 여러 외부 BGP 경로를 포워딩 테이블에 설치할 수 있도록 해줍니다. 여러 경로를 선택하면 BGP가 여러 링크에서 트래픽 로드 밸런싱을 수행할 수 있습니다.
BGP 경로 선택 프로세스가 IGP 비용을 다음 홉과 비교한 후 타이 브레이크를 수행하는 경우 경로는 BGP equal-cost 경로로 간주되고 IGP 비용은 포워딩에 사용됩니다. 기본적으로 다중 경로 활성화된 BGP neighbor에 의해 학습된 동일한 neighbor AS를 가진 모든 경로는 다중 경로 선택 프로세스에서 고려됩니다.
BGP는 일반적으로 각 접두사에 대해 단 하나의 최적 경로를 선택하고 해당 경로를 포워딩 테이블에 설치합니다. BGP 다중 경로가 활성화되면 디바이스는 여러 개의 equal-cost BGP 경로를 선택하여 지정된 목적지에 도달하고 이러한 모든 경로는 포워딩 테이블에 설치됩니다. BGP는 add-path가 사용되지 않는 한 해당 neighbor에 활성 경로만 보급합니다.
Junos OS BGP 다중 경로 기능은 다음 애플리케이션을 지원합니다.
서로 다른 AS(Autonomous System)에 속하는 두 라우팅 디바이스 간의 다중 링크를 통한 로드 밸런싱
공통 서브넷 또는 여러 서브넷에서 동일한 피어 AS에 속한 다른 라우팅 디바이스로 로드 밸런싱
서로 다른 외부 연합 피어에 속한 두 라우팅 디바이스 간의 다중 링크를 통한 로드 밸런싱
공통 서브넷 또는 여러 서브넷에서 외부 연합 피어에 속한 다른 라우팅 디바이스로 로드 밸런싱
로드 밸런싱을 위한 일반적인 시나리오에서 고객은 POP(points of presence)의 여러 라우터 또는 스위치에 대해 멀티호밍됩니다. 기본 동작은 사용 가능한 링크 중 하나의 링크를 통해 모든 트래픽을 전송하는 것입니다. 로드 밸런싱으로 트래픽이 두 개 이상의 링크를 사용할 수 있습니다.
BGP 다중 경로는 동일한 MED-plus-IGP 비용을 공유하지만 IGP 비용이 다른 경로에는 적용되지 않습니다. 다중 경로 경로 선택은 두 경로의 MED-plus-IGP 비용이 동일한 경우에도 IGP 비용 메트릭을 기반으로 합니다.
Junos OS 릴리스 18.1R1부터 BGP 다중 경로는 계층 수준에서 [edit protocols bgp] 전 세계적으로 지원됩니다. 일부 BGP 그룹 및 neighbor에서 다중 경로를 선택적으로 비활성화할 수 있습니다. 그룹 또는 특정 BGP neighbor에 대한 다중 경로 옵션을 비활성화하려면 계층 수준에 [edit protocols bgp group group-name multipath] 포함 disable 합니다.
Junos OS 릴리스 18.1R1부터는 모든 BGP 경로가 수신될 때까지 다중 경로 계산을 연기할 수 있습니다. 다중 경로가 활성화되면 BGP는 새 경로가 추가되거나 기존 경로가 변경될 때마다 경로를 다중 경로 대기열에 삽입합니다. BGP add-path 기능을 통해 여러 경로가 수신되면 BGP는 하나의 다중 경로 경로를 여러 번 계산할 수 있습니다. 다중 경로 계산은 RIB(라우팅 테이블이라고도 함) 학습 속도를 늦춥니다. RIB 학습 속도를 높이려면 BGP 경로가 수신될 때까지 다중 경로 계산을 연기하거나 BGP 경로가 확인될 때까지 요구 사항에 따라 다중 경로 빌드 작업의 우선 순위를 낮출 수 있습니다. 다중 경로 계산을 연기하려면 계층 수준에서 [edit protocols bgp] 구성 defer-initial-multipath-build 합니다. 또는 계층 수준에서 [edit protocols bgp] 구성 문을 사용하여 multipath-build-priority BGP 다중 경로 빌드 작업 우선 순위를 낮추고 RIB 학습을 가속화할 수 있습니다.
또한보십시오
예: 로드 밸런싱 BGP 트래픽
이 예는 여러 개의 equal-cost 외부 BGP(EBGP) 또는 내부 BGP(IBGP) 경로를 활성 경로로 선택하도록 BGP를 구성하는 방법을 보여줍니다.
요구 사항
시작하기 전에:
디바이스 인터페이스를 구성합니다.
내부 게이트웨이 프로토콜(IGP)을 구성합니다.
BGP를 구성합니다.
라우팅 라우팅 테이블에서 BGP로 경로(예: 직접 경로 또는 IGP 경로)를 내보내는 라우팅 정책을 구성합니다.
개요
다음 단계는 패킷당 로드 밸런싱을 구성하는 방법을 보여줍니다.
계층 수준에서
[edit policy-options]하나 이상의policy-statement문을 포함하여 로드 밸런싱 라우팅 정책을 정의하고 다음 작업을 정의합니다.load-balance per-packetpolicy-statement policy-name { from { match-conditions; route-filter destination-prefix match-type <actions>; prefix-list name; } then { load-balance per-packet; } }참고:여러 EBGP 경로 및 여러 IBGP 경로 간 로드밸런싱을 활성화하려면 계층 수준에서
[edit protocols bgp]전 세계적으로 문을 포함multipath합니다. 전역적으로 문을 포함multipath하지 않거나 계층 수준에서[edit protocols bgp group group-nameBGP 그룹을 위해 또는 계층 수준에서[edit protocols bgp group group-name neighbor address]특정 BGP neighbor에 대해 BGP 트래픽의 로드 밸런싱을 활성화할 수 없습니다.라우팅 테이블에서 포워딩 테이블로 내보낸 경로에 정책을 적용합니다. 이를 위해 and
export문을 포함forwarding-table합니다.forwarding-table { export policy-name; }
VRF 라우팅 인스턴스에는 내보내기 정책을 적용할 수 없습니다.
보급되는 경로에 대응하는 레이블을 할당할 때 다음 홉이 하나 이상 존재하는 경우 해당 경로의 모든 다음 홉을 지정합니다.
IP 페이로드를 포함하도록 MPLS에 대한 forwarding-options 해시 키를 구성합니다.
일부 플랫폼에서는 chassis maximum-ecmp 문을 사용하여 로드 밸런싱된 경로 수를 늘릴 수 있습니다.
이 문을 사용하여 균등 비용 로드 밸런싱 경로의 최대 수를 32, 64, 128, 256 또는 512로 변경할 수 있습니다(최대 수는 플랫폼마다 다름, 최대 ecmp 참조).
다중 경로 기능은 BGP를 지원하는 모든 플랫폼에서 지원됩니다. QFX 플랫폼에 대한 몇 가지 개선 사항이 있습니다.
-
- Junos OS 릴리스 19.1R1부터 QFX10000 스위치에서 최대 128개의 equal-cost 경로를 지정할 수 있습니다.
-
- Junos OS 릴리스 19.2R1부터 QFX10000 스위치에서 최대 512개의 동일 비용 경로를 지정할 수 있습니다( 선택적 일관된 로드 밸런싱을 통한 최대 512개 동일 비용 경로 구성 이해 참조).
이 예에서 디바이스 R1은 AS 64500에 있으며 AS 64501에 있는 디바이스 R2와 디바이스 R3 모두에 연결되어 있습니다. 이 예는 디바이스 R1의 구성을 보여줍니다.
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
set protocols bgp group external type external set protocols bgp group external peer-as 64501 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set routing-options forwarding-table export loadbal set routing-options autonomous-system 64500
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
BGP 피어 세션 구성:
BGP 그룹을 구성합니다.
[edit protocols bgp group external] user@R1# set type external user@R1# set peer-as 64501 user@R1# set neighbor 10.0.1.1 user@R1# set neighbor 10.0.0.2
BGP 그룹이 여러 경로를 사용하도록 활성화합니다.
참고:BGP 다중 경로에서 허용된 경로에 동일한 neighbor AS(Autonomous System)가 있어야 하는 기본 확인을 비활성화하려면 옵션을 포함
multiple-as합니다.[edit protocols bgp group external] user@R1# set multipath
로드 밸런싱 정책을 구성합니다.
[edit policy-options policy-statement loadbal] user@R1# set from route-filter 10.0.0.0/16 orlonger user@R1# set then load-balance per-packet
로드 밸런싱 정책을 적용합니다.
[edit routing-options] user@R1# set forwarding-table export loadbal
로컬 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 64500
결과
구성 모드에서 , show policy-options및 show routing-options 명령을 show protocols입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit]
user@R1# show protocols
bgp {
group external {
type external;
peer-as 64501;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
}
[edit]
user@R1# show policy-options
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
[edit]
user@R1# show routing-options
autonomous-system 64500;
forwarding-table {
export loadbal;
}
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 올바르게 작동하고 있는지 확인합니다.
경로 확인
목적
neighbor AS의 두 라우터에서 학습된 경로를 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route .
user@R1> show route 10.0.2.0
inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.2.0/30 *[BGP/170] 03:12:32, localpref 100
AS path: 64501 I
to 10.0.1.1 via ge-1/2/0.0
> to 10.0.0.2 via ge-1/2/1.0
[BGP/170] 03:12:32, localpref 100
AS path: 64501 I
> to 10.0.1.1 via ge-1/2/0.0
user@R1> show route 10.0.2.0 detail
inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden)
10.0.2.0/30 (2 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 262142
Next-hop reference count: 3
Source: 10.0.0.2
Next hop: 10.0.1.1 via ge-1/2/0.0
Next hop: 10.0.0.2 via ge-1/2/1.0, selected
State: <Active Ext>
Local AS: 64500 Peer AS: 64501
Age: 3:18:30
Task: BGP_64501.10.0.0.2+55402
Announcement bits (1): 2-KRT
AS path: 64501 I
Accepted Multipath
Localpref: 100
Router ID: 192.168.2.1
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 602
Next-hop reference count: 5
Source: 10.0.1.1
Next hop: 10.0.1.1 via ge-1/2/0.0, selected
State: <NotBest Ext>
Inactive reason: Not Best in its group - Active preferred
Local AS: 64500 Peer AS: 64501
Age: 3:18:30
Task: BGP_64501.10.0.1.1+53135
AS path: 64501 I
Accepted
Localpref: 100
Router ID: 192.168.3.1
의미
별표(*)로 표시된 활성 경로에는 10.0.2.0 목적지에 대한 두 개의 다음 홉인 10.0.1.1 및 10.0.0.2가 있습니다. 10.0.1.1 다음 홉은 비활성 경로에서 활성 경로로 복사됩니다.
명령 출력은 show route detail 하나의 게이트웨이를 로 지정합니다. selected 이 출력은 잠재적으로 로드 밸런싱의 맥락에서 혼란을 초래할 수 있습니다. 선택한 게이트웨이는 Junos OS가 패킷당 로드 밸런싱을 수행하지 않을 때 커널에 어떤 게이트웨이를 설치할지 결정하는 것 외에도 많은 목적으로 사용됩니다. 예를 들어, 명령은 ping mpls 패킷을 전송할 때 선택한 게이트웨이를 사용합니다. 멀티캐스트 프로토콜은 일부 경우 선택한 게이트웨이를 사용하여 업스트림 인터페이스를 결정합니다. 따라서 Junos OS가 forwarding-table 정책을 통해 패킷당 로드 밸런싱을 수행하는 경우에도 선택한 게이트웨이 정보가 다른 목적에 여전히 필요합니다. 문제 해결 목적으로 선택한 게이트웨이를 표시하는 것이 유용합니다. 또한 forwarding-table 정책을 사용하여 커널에 설치된 항목을 재정의할 수 있습니다(예: action 사용 install-nexthop ). 이 경우 포워딩 테이블에 설치된 다음 홉 게이트웨이는 명령에 show route 표시된 총 게이트웨이의 하위 집합일 수 있습니다.
포워딩 확인
목적
다음 홉이 모두 포워딩 테이블에 설치되었는지 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route forwarding-table .
user@R1> show route forwarding-table destination 10.0.2.0
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
10.0.2.0/30 user 0 ulst 262142 2
10.0.1.1 ucst 602 5 ge-1/2/0.0
10.0.0.2 ucst 522 6 ge-1/2/1.0
일관된 선택적 로드 밸런싱을 통한 최대 512개의 Equal-Cost 경로 구성 이해
외부 BGP 피어에 대해 최대 512개의 경로로 ECMP(Equal-cost 다중 경로) 기능을 구성할 수 있습니다. 최대 512개의 ECMP 다음 홉을 구성할 수 있어 지정된 라우팅 디바이스와의 직접 BGP 피어 연결 수를 늘려 대기 시간을 개선하고 데이터 흐름을 최적화할 수 있습니다. 선택적으로 해당 ECMP 구성에 일관된 로드 밸런싱을 포함할 수 있습니다. 일관된 로드 밸런싱은 ECMP 멤버(즉, 경로)가 실패할 경우, 실패한 멤버를 통해 흐르는 플로우만 다른 활성 ECMP 멤버에 재분배되도록 합니다. 또한 일관된 로드 밸런싱은 ECMP 멤버가 추가되는 경우 기존 EMC 멤버에서 새 ECMP 멤버로의 플로우 재분배가 최소화되도록 합니다.
- 일관된 로드 밸런싱을 사용하여 256개에서 512개까지 equal-cost 경로를 구성하기 위한 지침 및 제한 사항
- 최대 512개의 ECMP 다음 홉을 구성하고 일관된 로드 밸런싱을 선택적으로 구성하기 위한 지침
일관된 로드 밸런싱을 사용하여 256개에서 512개까지 equal-cost 경로를 구성하기 위한 지침 및 제한 사항
이 기능은 단일 홉 외부 BGP 피어에만 적용됩니다. (이 기능은 MPLS 경로에는 적용되지 않습니다.)
디바이스의 라우팅 프로세스(RPD)는 64비트 모드를 지원해야 합니다. 32비트 RPD는 지원되지 않습니다.
이 기능은 유니캐스트 트래픽에만 적용됩니다.
트래픽 분포는 모든 그룹 멤버에게 균일하지 않을 수 있습니다. 이는 트래픽 패턴과 하드웨어의 해싱 flow 세트 테이블 구성에 따라 달라집니다. 일관된 해싱 은 멤버가 그룹에 추가되거나 그룹에서 삭제될 때 목적지 링크에 대한 flow 재매핑을 최소화합니다.
,
inet,inet6또는layer2중 하나로hash-mode구성set forwarding-options enhanced-hash-key하는 경우, 일부 flow는 목적지 링크를 변경할 수 있습니다. 새 해시 매개 변수가 flow에 대한 새 해시 인덱스를 생성하여 새로운 목적지 링크가 생성될 수 있기 때문입니다.이 기능은 최상의 해싱 정확도를 달성하기 위해 연속 토폴로지를 사용하여 128개 이상의 다음 홉 구성에 대해 다음 홉 구조를 구현합니다. 따라서 해싱 정확도는 연속 토폴로지가 필요하지 않은 128개 이하의 ECMP 다음 홉 구성에 비해 다소 낮습니다.
영향을 받은 ECMP 경로의 기존 flow와 영향을 받은 해당 ECMP 경로로 흐르는 새 flow는 로컬 경로 복구 중에 경로를 전환할 수 있으며 트래픽 왜곡이 두드러질 수 있습니다. 그러나 이러한 왜곡은 후속 전역 경로 복구 중에 수정됩니다.
값을 늘리
maximum-ecmp면 경로 접두사에 대한 다음 다음 홉 변경 이벤트 중에 일관성 해싱이 손실됩니다.기존 ECMP 그룹에 새 경로를 추가하는 경우, 영향을 받지 않은 경로를 통한 일부 flow는 새로 추가된 경로로 이동할 수 있습니다.
FRR(Fast reroute)은 일관된 해싱에서 작동하지 않을 수 있습니다.
ECMP와 같은 완벽한 트래픽 분포는 달성할 수 없습니다. 다른 경로보다 버킷이 많은 경로는 버킷이 적은 경로보다 트래픽 흐름이 더 많습니다( 버킷 은 ECMP 멤버 인덱스에 매핑되는 로드 밸런싱 테이블의 배포 목록에 있는 항목임).
네트워크 토폴로지 변경 이벤트 중에 네트워크 접두사의 일관된 해싱이 손실되는 경우가 있습니다. 이는 해당 접두사가 접두사의 이전 ECMP 다음 홉의 일부 속성을 갖지 않는 새로운 ECMP 다음 홉을 가리키기 때문입니다.
여러 네트워크 접두사가 동일한 ECMP 다음 홉을 가리키고 이러한 접두사 중 하나 이상이 문
consistent-hash으로 활성화된 경우, 동일한 ECMP 다음 홉을 가리키는 모든 네트워크 접두사가 consistent–hashing 동작을 표시합니다.일관된 해싱은 equal-cost BGP 경로 기반 ECMP 그룹에서만 지원됩니다. BGP 경로보다 우선하는 다른 프로토콜 또는 정적 경로가 구성된 경우, 일관된 해싱은 지원되지 않습니다.
일관된 해싱은 구성이 다음 기능에 대한 구성과 결합될 때 제한 사항이 있을 수 있습니다. 이는 해당 기능에 경로 선택을 위해 해싱을 사용하지 않는 터널 종료 또는 트래픽 엔지니어링이 있기 때문입니다. BUM 트래픽; EVPN-VXLAN; 및 MPLS TE, 자동 대역폭.
최대 512개의 ECMP 다음 홉을 구성하고 일관된 로드 밸런싱을 선택적으로 구성하기 위한 지침
최대 512개의 다음 홉을 구성할 준비가 되면 다음 구성 지침을 사용하십시오.
ECMP 다음 홉의 최대 수를 구성합니다(예: 512개의 ECMP 다음 홉 구성).
[edit] user@host# set chassis maximum-ecmp 512
라우팅 정책을 생성하고 패킷당 로드 밸런싱을 활성화하여 시스템에서 전역적으로 ECMP를 활성화합니다.
[edit] user@host# set routing-options forwarding-table export load-balancing-policy user@host# set policy-options policy-statement load-balancing-policy then load-balance per-packet
수신 경로를 하나 이상의 목적지 접두사와 일치시키는 별도의 라우팅 정책을 생성하여 선택한 접두사에서 복원력을 활성화합니다. 예:
[edit] user@host# set policy-options policy-statement c-hash from route-filter 20.0.0.0/24 orlonger user@host# set policy-options policy-statement c-hash then load-balance consistent-hash
eBGP 가져오기 정책(예: "c-hash")을 외부 피어의 BGP 그룹에 적용합니다.
[edit] user@host# set protocols bgp import c-hash
Equal-Cost 경로 구성에 대한 자세한 내용은 이 문서의 앞부분에 나타나는 예: BGP 트래픽 로드 밸런싱을 참조하십시오.
(선택 사항) 일관된 로드 밸런싱(일관된 해싱이라고도 함) 구성에 대한 자세한 내용은 ECMP 그룹에 대한 일관된 로드 밸런싱 구성을 참조하십시오.
또한보십시오
예: 원격 다음 홉을 수락하도록 단일 홉 EBGP 피어 구성
이 예는 단일 홉 외부 BGP(EBGP) 피어가 공통 서브넷을 공유하지 않는 원격 다음 홉을 수락하도록 구성하는 방법을 보여줍니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
개요
어떤 경우에는 단일 홉 EBGP 피어가 공통 서브넷을 공유하지 않는 원격 다음 홉을 수락하도록 구성해야 합니다. 기본 동작은 공통 서브넷을 공유하는 것으로 인식되지 않는 삭제되어야 하는 단일 홉 EBGP 피어에서 수신된 모든 다음 홉 주소에 대한 것입니다. 단일 홉 EBGP 피어가 직접 연결되지 않은 원격 다음 홉을 수용하도록 하는 기능 덕분에 단일 홉 EBGP 이웃을 멀티홉 세션으로 구성하지 않아도 됩니다. 이 상황에서 멀티홉 세션을 구성할 경우, 이 EBGP 피어를 통해 학습된 모든 다음 홉 경로는 공통 서브넷을 공유하는 경우에도 간접 레이블이 지정됩니다. 이 상황은 이러한 다음 홉 주소를 포함하는 경로를 통해 재귀적으로 확인되는 경로에 대한 다중 경로 기능을 중단합니다. 명령 accept-remote-nexthop 문을 구성하면 단일 홉 EBGP 피어가 원격 다음 홉을 수락할 수 있으며, 이는 이러한 다음 홉 주소로 확인된 경로에 대한 다중 경로 기능을 복원합니다. BGP에 대한 전역, 그룹 및 이웃 계층 수준에서 이 문을 구성할 수 있습니다. 또한 문은 논리 시스템 및 VPN 라우팅 및 포워딩(VRF) 라우팅 인스턴스 유형에서도 지원됩니다. 원격 다음 홉과 EBGP 피어 모두 RFC 2918, BGP-4의 경로 새로 고침 기능에 정의된 대로 BGP 경로 새로 고침을 지원해야 합니다. 원격 피어가 BGP 경로 새로 고침을 지원하지 않으면 세션이 재설정됩니다.
단일 홉 EBGP 피어는 기본적으로 자체 주소를 다음 홉으로 알립니다. 다른 다음 홉을 알리려면 EBGP 피어에서 가져오기 라우팅 정책을 정의해야 합니다. 단일 홉 EBGP 피어가 원격 다음 홉을 수락하도록 활성화하면 EBGP 피어에서 가져오기 라우팅 정책을 구성할 수도 있습니다. 그러나 원격 다음 홉을 구성한 경우에는 라우팅 정책이 필요하지 않습니다.
이 예에는 단일 홉 외부 BGP 피어(디바이스 R1)가 10.1.230.0/23 네트워크에 대한 경로에 대해 원격 다음 홉 10.1.10.10을 수락할 수 있도록 하는 가져오기 라우팅 정책 agg_route이 포함되어 있습니다. 계층 수준에서 [edit protocols bgp] 이 예는 외부 BGP 피어에 정책을 적용하는 문을 포함 import agg_route 하고 단일 홉 EBGP 피어가 원격 다음 홉을 수락할 수 있도록 하는 문을 포함 accept-remote-nexthop 합니다.
그림 2는 샘플 토폴로지를 보여줍니다.
수락을 위한 토폴로지
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R0
set interfaces fe-1/2/0 unit 0 family inet address 10.1.0.1/30 set interfaces fe-1/2/1 unit 0 family inet address 10.1.1.1/30 set interfaces lo0 unit 0 family inet address 10.255.14.179/32 set protocols bgp group ext type external set protocols bgp group ext export test_route set protocols bgp group ext export agg_route set protocols bgp group ext peer-as 65000 set protocols bgp group ext multipath set protocols bgp group ext neighbor 10.1.0.2 set protocols bgp group ext neighbor 10.1.1.2 set policy-options policy-statement agg_route term 1 from protocol static set policy-options policy-statement agg_route term 1 from route-filter 10.1.230.0/23 exact set policy-options policy-statement agg_route term 1 then accept set policy-options policy-statement test_route term 1 from protocol static set policy-options policy-statement test_route term 1 from route-filter 10.1.10.10/32 exact set policy-options policy-statement test_route term 1 then accept set routing-options static route 10.1.10.10/32 reject set routing-options static route 10.1.230.0/23 reject set routing-options autonomous-system 65500
디바이스 R1
set interfaces fe-1/2/0 unit 0 family inet address 10.1.0.2/30 set interfaces fe-1/2/1 unit 0 family inet address 10.1.1.2/30 set interfaces fe-1/2/2 unit 0 family inet address 10.12.0.1/30 set interfaces lo0 unit 2 family inet address 10.255.71.24/32 set protocols bgp accept-remote-nexthop set protocols bgp group ext type external set protocols bgp group ext import agg_route set protocols bgp group ext peer-as 65500 set protocols bgp group ext multipath set protocols bgp group ext neighbor 10.1.0.1 set protocols bgp group ext neighbor 10.1.1.1 set protocols bgp group int type internal set protocols bgp group int local-address 10.255.71.24 set protocols bgp group int neighbor 10.255.14.177 set protocols ospf area 0.0.0.0 interface fe-1/2/1.4 set protocols ospf area 0.0.0.0 interface 10.255.71.24 set policy-options policy-statement agg_route term 1 from protocol bgp set policy-options policy-statement agg_route term 1 from route-filter 10.1.230.0/23 exact set policy-options policy-statement agg_route term 1 then next-hop 10.1.10.10 set policy-options policy-statement agg_route term 1 then accept set routing-options autonomous-system 65000
디바이스 R2
set interfaces fe-1/2/0 unit 0 family inet address 10.12.0.2/30 set interfaces lo0 unit 0 family inet address 10.255.14.177/32 set protocols bgp group int type internal set protocols bgp group int local-address 10.255.14.177 set protocols bgp group int neighbor 10.255.71.24 set protocols ospf area 0.0.0.0 interface fe-1/2/0.6 set protocols ospf area 0.0.0.0 interface 10.255.14.177 set routing-options autonomous-system 65000
디바이스 R0
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R0 구성:
-
인터페이스를 구성합니다.
[edit interfaces fe-1/2/0 unit 0] user@R0# set family inet address 10.1.0.1/30 [edit interfaces fe-1/2/1 unit 0] user@R0# set family inet address 10.1.1.1/30 [edit interfaces lo0 unit 0] user@R0# set family inet address 10.255.14.179/32
-
EBGP를 구성합니다.
[edit protocols bgp group ext] user@R0# set type external user@R0# set peer-as 65000 user@R0# set neighbor 10.1.0.2 user@R0# set neighbor 10.1.1.2
-
디바이스 R0과 디바이스 R1 간의 다중 경로 BGP를 활성화합니다.
[edit protocols bgp group ext] user@R0# set multipath
-
원격 네트워크에 대한 정적 경로를 구성합니다. 이러한 경로는 토폴로지의 일부가 아닙니다. 이러한 경로의 목적은 이 예의 기능을 입증하는 것입니다.
[edit routing-options] user@R0# set static route 10.1.10.10/32 reject user@R0# set static route 10.1.230.0/23 reject
-
정적 경로를 수용하는 라우팅 정책을 구성합니다.
[edit policy-options policy-statement agg_route term 1] user@R0# set from protocol static user@R0# set from route-filter 10.1.230.0/23 exact user@R0# set then accept [edit policy-options policy-statement test_route term 1] user@R0# set from protocol static user@R0# set from route-filter 10.1.10.10/32 exact user@R0# set then accept
-
라우팅 테이블에서 BGP로 and
test_route정책을 내보냅니다agg_route.[edit protocols bgp group ext] user@R0# set export test_route user@R0# set export agg_route
-
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R0# set autonomous-system 65500
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R0# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.1.0.1/30;
}
}
}
fe-1/2/1 {
unit 0 {
family inet {
address 10.1.1.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.255.14.179/32;
}
}
}
user@R0# show policy-options
policy-statement agg_route {
term 0 {
from {
protocol static;
route-filter 10.1.230.0/23 exact;
}
then accept;
}
}
policy-statement test_route {
term 1 {
from {
protocol static;
route-filter 10.1.10.10/32 exact;
}
then accept;
}
}
user@R0# show protocols
bgp {
group ext {
type external;
export [ test_route agg_route ];
peer-as 65000;
multipath;
neighbor 10.1.0.2;
neighbor 10.1.1.2;
}
}
user@R0# show routing-options
static {
route 10.1.10.10/32 reject;
route 10.1.230.0/23 reject;
}
autonomous-system 65500;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
디바이스 R1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성:
-
인터페이스를 구성합니다.
[edit interfaces fe-1/2/0 unit 0] user@R1# set family inet address 10.1.0.2/30 [edit interfaces fe-1/2/1 unit 0] user@R1# set family inet address 10.1.1.2/30 [edit interfaces fe-1/2/2 unit 0] user@R1# set family inet address 10.12.0.1/30 [edit interfaces lo0 unit 0] user@R1# set family inet address 10.255.71.24/32
-
OSPF를 구성합니다.
[edit protocols ospf area 0.0.0.0] user@R1# set interface fe-1/2/1.0 user@R1# set interface 10.255.71.24
-
원격 다음 홉을 수락하도록 디바이스 R1을 활성화합니다.
[edit protocols bgp] user@R1# set accept-remote-nexthop
-
IBGP를 구성합니다.
[edit protocols bgp group int] user@R1# set type internal user@R1# set local-address 10.255.71.24 user@R1# set neighbor 10.255.14.177
-
EBGP를 구성합니다.
[edit protocols bgp group ext] user@R1# set type external user@R1# set peer-as 65500 user@R1# set neighbor 10.1.0.1 user@R1# set neighbor 10.1.1.1
-
디바이스 R0과 디바이스 R1 간의 다중 경로 BGP를 활성화합니다.
[edit protocols bgp group ext] user@R1# set multipath
-
단일 홉 외부 BGP 피어(디바이스 R1)가 10.1.230.0/23 네트워크에 대한 경로에 대해 원격 다음 홉 10.1.10.10을 수락할 수 있도록 라우팅 정책을 구성합니다.
[edit policy-options policy-statement agg_route term 1] user@R1# set from protocol bgp user@R1# set from route-filter 10.1.230.0/23 exact user@R1# set then next-hop 10.1.10.10 user@R1# set then accept
-
정책을 디바이스 R1의 라우팅 테이블로 가져옵니다
agg_route.[edit protocols bgp group ext] user@R1# set import agg_route
-
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 65000
결과
구성 모드에서 , show policy-options, show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R1# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.1.0.2/30;
}
}
}
fe-1/2/1 {
unit 0 {
family inet {
address 10.1.1.2/30;
}
}
}
fe-1/2/2 {
unit 0 {
family inet {
address 10.12.0.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.255.71.24/32;
}
}
}
user@R1# show policy-options
policy-statement agg_route {
term 1 {
from {
protocol bgp;
route-filter 10.1.230.0/23 exact;
}
then {
next-hop 10.1.10.10;
accept;
}
}
}
user@R1# show protocols
bgp {
accept-remote-nexthop;
group ext {
type external;
import agg_route;
peer-as 65500;
multipath;
neighbor 10.1.0.1;
neighbor 10.1.1.1;
}
group int {
type internal;
local-address 10.255.71.24;
neighbor 10.255.14.177;
}
}
ospf {
area 0.0.0.0 {
interface fe-1/2/1.0;
interface 10.255.71.24;
}
}
user@R1# show routing-options autonomous-system 65000;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
디바이스 R2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R2 구성:
-
인터페이스를 구성합니다.
[edit interfaces fe-1/2/0 unit 0] user@R2# set family inet address 10.12.0.2/30 [edit interfaces lo0 unit 0] user@R2# set family inet address 10.255.14.177/32
-
OSPF를 구성합니다.
[edit protocols ospf area 0.0.0.0] user@R2# set interface fe-1/2/0.0 user@R2# set interface 10.255.14.177
-
IBGP를 구성합니다.
[edit protocols bgp group int] user@R2# set type internal user@R2# set local-address 10.255.14.177 user@R2# set neighbor 10.255.71.24
-
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 65000
결과
구성 모드에서 , show protocols및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R2# show interfaces
fe-1/2/0 {
unit 0 {
family inet {
address 10.12.0.2/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.255.14.177/32;
}
}
}
user@R2# show protocols
bgp {
group int {
type internal;
local-address 10.255.14.177;
neighbor 10.255.71.24;
}
}
ospf {
area 0.0.0.0 {
interface fe-1/2/0.0;
interface 10.255.14.177;
}
}
user@R2# show routing-options autonomous-system 65000;
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 제대로 작동하고 있는지 확인합니다.
간접 다음 홉이 있는 다중 경로 라우팅이 라우팅 테이블에 있는지 확인
목적
디바이스 R1에 10.1.230.0/23 네트워크에 대한 경로가 있는지 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show route 10.1.230.0 extensive
user@R1> show route 10.1.230.0 extensive
inet.0: 11 destinations, 13 routes (11 active, 0 holddown, 0 hidden)
Restart Complete
10.1.230.0/23 (2 entries, 1 announced)
TSI:
KRT in-kernel 10.1.230.0/23 -> {indirect(262142)}
Page 0 idx 1 Type 1 val 9168f6c
Nexthop: 10.1.10.10
Localpref: 100
AS path: [65000] 65500 I
Communities:
Path 10.1.230.0 from 10.1.0.1 Vector len 4. Val: 1
*BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x90c44d8
Next-hop reference count: 4
Source: 10.1.0.1
Next hop type: Router, Next hop index: 262143
Next hop: 10.1.0.1 via fe-1/2/0.0, selected
Next hop: 10.1.1.1 via fe-1/2/2.0
Protocol next hop: 10.1.10.10
Indirect next hop: 91c0000 262142
State: <Active Ext>
Local AS: 65000 Peer AS: 65500
Age: 2:55:31 Metric2: 0
Task: BGP_65500.10.1.0.1+64631
Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 1
AS path: 65500 I
Accepted Multipath
Localpref: 100
Router ID: 10.255.14.179
Indirect next hops: 1
Protocol next hop: 10.1.10.10
Indirect next hop: 91c0000 262142
Indirect path forwarding next hops: 2
Next hop type: Router
Next hop: 10.1.0.1 via fe-1/2/0.0
Next hop: 10.1.1.1 via fe-1/2/2.0
10.1.10.10/32 Originating RIB: inet.0
Node path count: 1
Forwarding nexthops: 2
Nexthop: 10.1.0.1 via fe-1/2/0.0
Nexthop: 10.1.1.1 via fe-1/2/2.0
BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x90c44d8
Next-hop reference count: 4
Source: 10.1.1.1
Next hop type: Router, Next hop index: 262143
Next hop: 10.1.0.1 via fe-1/2/0.0, selected
Next hop: 10.1.1.1 via fe-1/2/2.0
Protocol next hop: 10.1.10.10
Indirect next hop: 91c0000 262142
State: <NotBest Ext>
Inactive reason: Not Best in its group - Update source
Local AS: 65000 Peer AS: 65500
Age: 2:55:27 Metric2: 0
Task: BGP_65500.10.1.1.1+53260
AS path: 65500 I
Accepted
Localpref: 100
Router ID: 10.255.14.179
Indirect next hops: 1
Protocol next hop: 10.1.10.10
Indirect next hop: 91c0000 262142
Indirect path forwarding next hops: 2
Next hop type: Router
Next hop: 10.1.0.1 via fe-1/2/0.0
Next hop: 10.1.1.1 via fe-1/2/2.0
10.1.10.10/32 Originating RIB: inet.0
Node path count: 1
Forwarding nexthops: 2
Nexthop: 10.1.0.1 via fe-1/2/0.0
Nexthop: 10.1.1.1 via fe-1/2/2.0
의미
출력은 디바이스 R1이 다중 경로 기능이 활성화된 10.1.230.0 네트워크에 대한 경로를 가지고 있음을 보여줍니다(Accepted Multipath). 또한 출력은 경로에 10.1.10.10의 간접 다음 홉이 있음을 보여줍니다.
accept-remote-nexthop 문 비활성화 및 재활성화
목적
문을 비활성화 accept-remote-nexthop 할 때 간접 다음 홉이 있는 다중 경로 경로가 라우팅 테이블에서 제거되는지 확인합니다.
작업
-
구성 모드에서 명령을 입력합니다.
deactivate protocols bgp accept-remote-nexthopuser@R1# deactivate protocols bgp accept-remote-nexthop user@R1# commit
-
운영 모드에서 명령을 입력합니다.
show route 10.1.230.0user@R1> show route 10.1.230.0
-
구성 모드에서 명령을 입력하여 문을 다시 활성화합니다.
activate protocols bgp accept-remote-nexthopuser@R1# activate protocols bgp accept-remote-nexthop user@R1# commit
-
운영 모드에서 명령을 다시 입력합니다.
show route 10.1.230.0user@R1> show route 10.1.230.0 inet.0: 11 destinations, 13 routes (11 active, 0 holddown, 0 hidden) Restart Complete + = Active Route, - = Last Active, * = Both 10.1.230.0/23 *[BGP/170] 03:13:19, localpref 100 AS path: 65500 I > to 10.1.0.1 via fe-1/2/0.0 to 10.1.1.1 via fe-1/2/2.0 [BGP/170] 03:13:15, localpref 100, from 10.1.1.1 AS path: 65500 I > to 10.1.0.1 via fe-1/2/0.0 to 10.1.1.1 via fe-1/2/2.0
의미
문이 accept-remote-nexthop 비활성화되면 10.1.230.0 네트워크에 대한 다중 경로 경로가 라우팅 테이블에서 제거됩니다.
경로에 동일하지 않은 대역폭이 할당된 BGP 트래픽에 대한 로드 밸런싱 이해하기
이 다중 경로 옵션은 활성 경로 결정 프로세스에서 타이브레이커를 제거하므로 여러 소스에서 학습된 equal-cost BGP 경로가 포워딩 테이블에 설치될 수 있습니다. 그러나 사용 가능한 경로가 equal-cost이 아닌 경우에는 트래픽에 대한 비대칭 로드 밸런싱이 필요할 수 있습니다.
여러 다음 홉이 포워딩 포워딩 테이블에 설치되면 Junos OS 접두사별 로드 밸런싱 알고리즘에 의해 특정 포워딩 다음 홉이 선택됩니다. 이 프로세스는 패킷의 소스 및 대상 주소에 대해 해시하여 사용 가능한 다음 홉 중 하나에 접두사 페어링을 확정적으로 매핑합니다. 접두사별 매핑은 인터넷 피어링 교환에서와 같이 해시 기능에 접두사가 많이 제공될 때 가장 효과적이며, 통신 노드 쌍 간 패킷 순서 변경을 방지하는 역할도 합니다.
엔터프라이즈 네트워크는 일반적으로 패킷당 로드 밸런싱 알고리즘을 유발하기 위해 기본 동작을 변경하려고 합니다. 여기서 패킷당이 강조된 이유는 원래 인터넷 프로세서 ASIC의 기존 동작에서 비롯된 잘못된 명칭으로 사용되기 때문입니다. 실제로 현재 주니퍼 네트웍스 라우터는 접두사별(기본값) 및 플로우별 로드 밸런싱을 지원합니다. 후자의 경우 소스 주소, 목적지 주소, 전송 프로토콜, 수신 인터페이스 및 애플리케이션 포트의 일부를 포함하여 다양한 레이어 3 및 레이어 4 헤더에 대한 해시가 수반됩니다. 그 결과 이제 개별 flow가 특정 다음 홉에 해시되므로, 특히 더 적은 수의 원본 및 목적지 쌍 간에 라우팅할 때 사용 가능한 다음 홉 전체에 더욱 균일한 배포가 가능합니다.
패킷당 로드 밸런싱을 사용하면 두 엔드포인트 간의 통신 스트림을 구성하는 패킷이 재배열될 수 있지만 개별 흐름 내의 패킷은 올바른 순서를 유지합니다. 접두사별 또는 패킷당 로드 밸런싱 중 어떤 것을 선택하든지 액세스 링크의 비대칭으로 인해 기술적 문제가 발생할 수 있습니다. 어느 쪽이든, 예를 들어 T1 링크로 매핑되는 접두사 또는 flow는 고속 이더넷 액세스 링크로 매핑되는 flow에 비해 성능이 저하됩니다. 더 심한 경우 트래픽 부하가 많은 경우 동일한 로드 밸런싱을 시도할 경우 T1 링크가 완전히 포화 상태가 되고 패킷 손실로 인해 세션이 중단될 가능성이 높습니다.
다행히 주니퍼 네트웍스 BGP 구현은 대역폭 커뮤니티라는 개념을 지원합니다. 이 확장 커뮤니티는 특정 다음 홉의 대역폭을 인코딩하며, 다중 경로와 결합될 경우 로드 밸런싱 알고리즘은 상대적 대역폭에 비례하여 다음 홉 세트에 flow를 배포합니다. 또 다르게 표현하자면, 10Mbps 및 1Mbps 다음 홉이 있는 경우, 평균 9개의 flow가 저속을 사용하는 모든 다음 홉에 대해 고속 다음 홉에 매핑됩니다.
BGP 대역폭 community 사용은 패킷당 로드 밸런싱에서만 지원됩니다.
구성 작업은 다음 두 부분으로 이루어집니다.
외부 BGP(EBGP) 피어링 세션을 구성하고, 다중 경로를 활성화하며, 링크 속도를 반영하는 대역폭 커뮤니티로 경로에 태그를 지정하는 가져오기 정책을 정의합니다.
최적의 트래픽 배포를 위해 패킷당(실제로 per-flow) 로드 밸런싱을 활성화합니다.
또한보십시오
BGP 링크 대역폭 커뮤니티
개요
BGP 구현 내에서 링크 대역폭 확장 커뮤니티는 주어진 다음 홉의 대역폭을 인코딩합니다. BGP는 BGP 링크의 속도를 원격 피어에 전달하여 트래픽 로드 밸런싱을 지원합니다. 네트워크 관리자가 링크 대역폭 커뮤니티를 다중 경로와 결합하면 선택한 로드 밸런싱 알고리즘이 상대적 대역폭에 비례하여 다음 홉 세트에 트래픽 플로우를 분산합니다.
BGP 링크 대역폭 확장 커뮤니티가 AS(Autonomous System) 전반에서 전이적 속성인 경우 BGP 그룹은 링크 대역폭 확장 커뮤니티를 인접 AS에 보급합니다. BGP 링크 대역폭 커뮤니티를 비전이적 속성으로 사용하도록 선택하여 라우터가 AS 경계에서 링크 대역폭 커뮤니티를 삭제하도록 선택할 수 있습니다. BGP 그룹은 외부 BGP(EBGP) 이웃에 비전이적 링크 대역폭 커뮤니티를 광고하지 않습니다.
또한 BGP를 구성하여 대역폭을 자동으로 감지하고 그룹 또는 이웃 수준에서 커뮤니티를 가져올 수 있습니다. 이 링크 대역폭 자동 감지 기능을 사용하면 네트워크는 디바이스가 BGP 경로를 수신한 인터페이스의 속도로 링크 대역폭 값을 자동으로 설정할 수 있습니다.
패킷당 로드 밸런싱만 BGP 링크 대역폭 커뮤니티를 지원합니다.
이점
-
다중 경로가 활성화되면 링크 대역폭은 불평등한 로드 밸런싱을 위해 가중 다중 경로(WECMP)를 제공합니다.
-
고대역폭 링크가 저대역폭 링크보다 더 많은 플로우를 전달하도록 보장합니다.
-
트래픽 혼잡 가능성을 줄입니다.
구성
대역폭
기본적으로 링크 대역폭 커뮤니티는 전이적입니다. 다음 문 중 하나를 사용하여 링크 대역폭 커뮤니티를 전이적으로 구성할 수 있습니다.
set policy-options community name members bandwidth:value
set policy-options community name members bandwidth-transitive:value
비전이적으로 만들려면 다음 구성을 사용합니다.
set policy-options community policy-name members bandwidth-non-transitive:value
비전이적 재정의
링크 대역폭이 비전이적인 경우에도 BGP 그룹이 EBGP 세션을 통해 링크 대역폭 확장 커뮤니티를 전송하도록 비전이적 구성을 재정의할 수 있습니다. EBGP 이웃을 통해 비전이적 링크 대역폭 커뮤니티를 전송하려면 다음 구성을 포함합니다.
set protocols bgp group group-name send-non-transitive-link-bandwidth
이 send-non-transitive-link-bandwidth 문은 생성된 링크 대역폭 커뮤니티와 수신되어 재보급된 커뮤니티를 구별하지 않습니다. 이 옵션을 활성화하면 BGP는 모든 비전이적 링크 대역폭 커뮤니티를 EBGP 인접 라우터에 보급합니다.
총 대역폭
기본적으로 집계 링크 대역폭 커뮤니티는 전이적입니다. 다음 문 중 하나를 사용하여 링크 대역폭 커뮤니티를 전이적으로 구성할 수 있습니다.
set policy-options policy-statement name then aggregate-bandwidth
set policy-options policy-statement name then aggregate-bandwidth transitive
비전이적으로 만들려면 다음 구성을 사용합니다.
set policy-options policy-statement policy-name then aggregate-bandwidth non-transitive
총 링크 대역폭을 광고 그룹의 피어 수로 나누려면 다음과 같은 명령문을 활성화합니다.divide-equal
set policy-options policy-statement policy-name then aggregate-bandwidth divide-equal
오토센스
단일 홉 EBGP 세션에 대해서만 자동 감지를 활성화할 수 있습니다.
BGP 그룹에 대한 autosense를 구성합니다.
해당 BGP neighbor에 대한 대역폭을 감지하고 저장하도록 계층에서
neighbor문을 구성auto-sense합니다. 해당 BGP 그룹 아래의group모든 이웃에 대한 대역폭을 감지하고 저장하도록 계층에서 구성합니다.set protocols bgp group group-name link-bandwith auto-sense set protocols bgp group group-name neighbor link-bandwith auto-sense
to 또는
non-transitive로 설정transitive하여auto-link-bandwidth가져오기 정책을 구성합니다. 지정하지 않으면 기본적으로auto-link-bandwidth전이적입니다.set protocols bgp group group-name import policy-name set policy-options policy-statement policy-name then auto-link-bandwidth non-transitive
(선택 사항) 대역폭이 증가할 때 링크 대역폭 값의 빈번한 변화를 억제하기 위해 자동 감지 홀드다운 타이머를 구성할 수 있습니다. 홀드다운 타이머는 대역폭이 증가할 때만 트리거됩니다. 기본적으로 타이머는 60초로 설정됩니다.
set protocols bgp group group-name link-bandwith auto-sense hold-down time-in-seconds
검증
다음 명령을 사용하여 구성이 성공했는지 확인합니다.
-
show route receive-protocol bgp peer-ip-address extensive -
show route advertising-protocol bgp peer-ip-address extensive -
show route address extensive -
show bgp neighbor address
예: 경로에 동일하지 않은 대역폭이 할당된 BGP 트래픽 로드 밸런싱
이 예는 동일하지 않은 비용의 여러 경로를 활성 경로로 선택하도록 BGP를 구성하는 방법을 보여줍니다.
BGP 커뮤니티는 라우팅 정책을 제어하는 데 도움이 될 수 있습니다. BGP 커뮤니티의 좋은 용례 중 하나는 동일하지 않은 로드 밸런싱입니다. ASBR(autonomous system border 라우터)이 직접 연결된 외부 BGP(EBGP) neighbor로부터 경로를 수신하면 ASBR은 IBGP 광고를 사용하여 해당 경로를 내부 neighbor에 광고합니다. IBGP 광고에서는 link-bandwidth community를 첨부하여 광고된 외부 링크의 대역폭을 전달할 수 있습니다. 이는 여러 외부 링크를 사용할 수 있고 링크에 대해 동일하지 않은 로드 밸런싱을 수행하려는 경우에 유용합니다. AS의 모든 수신 링크에서 link-bandwidth 확장 community를 구성합니다. link-bandwidth 확장 community의 대역폭 정보는 EBGP 링크의 구성된 대역폭을 기반으로 합니다. 링크의 트래픽 양을 기반으로 하는 것이 아닙니다. Junos OS는 인터넷 초안 draft-ietf-idr-link-bandwidth-06, BGP 링크 대역폭 확장 커뮤니티에 설명된 대로 BGP 링크 대역폭 및 다중 경로 로드 밸런싱을 지원합니다.
요구 사항
시작하기 전에:
디바이스 인터페이스를 구성합니다.
내부 게이트웨이 프로토콜(IGP)을 구성합니다.
BGP를 구성합니다.
라우팅 라우팅 테이블에서 BGP로 경로(예: 직접 경로 또는 IGP 경로)를 내보내는 라우팅 정책을 구성합니다.
개요
이 예에서 디바이스 R1은 AS 64500에 있으며 AS 64501에 있는 디바이스 R2와 디바이스 R3 모두에 연결되어 있습니다.
이 예에서는 대역폭 확장 community를 사용합니다.
기본적으로 BGP 다중 경로가 사용되는 경우 트래픽은 계산된 여러 경로 간에 균등하게 분산됩니다. 대역폭 확장 community를 사용하면 BGP 경로에 추가 속성을 추가할 수 있으므로 트래픽이 균등하지 않게 분산될 수 있습니다. 기본 응용 시나리오는 비대칭 대역폭 기능을 갖춘 특정 네트워크에 대해 여러 외부 경로가 존재하는 시나리오입니다. 이런 시나리오에서는 수신된 경로를 대역폭 확장 community로 태깅할 수 있습니다. BGP 다중 경로(내부 또는 외부)가 대역폭 속성을 포함하는 경로 중에서 작동하면 포워딩 엔진이 각 경로에 해당하는 대역폭에 따라 트래픽을 균등하지 않게 분산할 수 있습니다.
BGP에 다중 경로에 사용할 수 있는 여러 후보 경로가 있는 경우, 모든 후보 경로가 이 속성을 갖고 있지 않는 한 BGP는 대역폭 커뮤니티에 따라 동일하지 않은 비용의 로드 밸런싱을 수행하지 않습니다.
대역폭 확장 커뮤니티의 적용 가능성은 BGP 다중 경로가 고려 대상으로 여러 경로를 허용할 때 적용되는 제한 사항에 의해 제한됩니다. 명시적으로, BGP에 관한 한 로드 밸런싱을 수행하는 라우터와 여러 출구점 사이의 IGP 거리는 동일해야 합니다. 이는 해당 IGP 메트릭을 추적하지 않는 LSP(Label-Switched Path)의 풀 메시를 사용하여 달성할 수 있습니다. 그러나 회로의 전파 지연이 중요한 네트워크에서는(예: 장거리 회로가 존재하는 경우) 다른 경로의 지연 특성을 고려하는 것이 종종 중요합니다.
다음과 같이 대역폭 커뮤니티를 구성합니다.
[edit policy-options] user@host# set community members bandwidth:[1-65535]:[0-4294967295]
첫 16비트 숫자는 로컬 AS(Autonomous System)를 나타냅니다. 두 번째 32비트 숫자는 초당 바이트의 링크 대역폭을 나타냅니다.
예를 들면 다음과 같습니다.
[edit policy-options] user@host# show community bw-t1 members bandwidth:10458:193000; community bw-t3 members bandwidth:10458:5592000; community bw-oc3 members bandwidth:10458:19440000;
여기서 10458은 로컬 AS 번호입니다. 이러한 값은 T1, T3 및 OC-3 경로의 초당 바이트 단위 대역폭에 해당합니다. 대역폭 값으로 지정된 값은 특정 인터페이스의 실제 대역폭에 해당할 필요는 없습니다. 사용되는 균형 요소는 지정된 총 대역폭의 함수로 계산됩니다. 이 확장 community로 경로를 태깅하려면 다음과 같이 정책 문을 정의하십시오.
[edit policy-options]
user@host# show
policy-statement link-bw-t1 {
then {
community set bw-t1;
}
accept;
}
비대칭 대역폭 링크를 마주하는 BGP 피어링 세션에서 이 정책을 가져오기 정책으로 적용합니다. 이론적으로는 네트워크의 어떤 지점에서든 community 속성을 추가하거나 제거할 수 있지만, 위에 나온 시나리오에서는 외부 링크를 마주하는 EBGP 피어링 세션에서 커뮤니티를 가져오기 정책으로 적용하면 해당 속성이 로컬 다중 경로 결정에 영향을 미칠 수 있으며 잠재적으로 관리가 더 쉽습니다.
토폴로지
그림 3 은 이 예에서 사용되는 토폴로지를 보여줍니다.
CLI 빠른 구성 은 그림 3의 모든 디바이스에 대한 구성을 보여줍니다. 섹션#d15e120__d15e383 에서는 디바이스 R1의 단계를 설명합니다.
구성
절차
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
디바이스 R1
set interfaces ge-1/2/0 unit 0 description R1->R3 set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-1/2/1 unit 0 description R1->R2 set interfaces ge-1/2/1 unit 0 family inet address 10.0.1.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols bgp group external type external set protocols bgp group external import bw-dis set protocols bgp group external peer-as 64501 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set policy-options policy-statement bw-dis term a from protocol bgp set policy-options policy-statement bw-dis term a from neighbor 10.0.1.1 set policy-options policy-statement bw-dis term a then community add bw-high set policy-options policy-statement bw-dis term a then accept set policy-options policy-statement bw-dis term b from protocol bgp set policy-options policy-statement bw-dis term b from neighbor 10.0.0.2 set policy-options policy-statement bw-dis term b then community add bw-low set policy-options policy-statement bw-dis term b then accept set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set policy-options community bw-high members bandwidth:65000:60000000 set policy-options community bw-low members bandwidth:65000:40000000 set routing-options autonomous-system 64500 set routing-options forwarding-table export loadbal
디바이스 R2
set interfaces ge-1/2/0 unit 0 description R2->R1 set interfaces ge-1/2/0 unit 0 family inet address 10.0.1.1/30 set interfaces ge-1/2/1 unit 0 description R2->R3 set interfaces ge-1/2/1 unit 0 family inet address 10.0.2.2/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0002.00 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 64500 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.2 set protocols isis interface ge-1/2/1.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept 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 static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 64501
디바이스 R3
set interfaces ge-1/2/0 unit 0 description R3->R2 set interfaces ge-1/2/0 unit 0 family inet address 10.0.2.1/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/1 unit 0 description R3->R1 set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0003.00 set protocols bgp group external type external set protocols bgp group external export send-direct set protocols bgp group external export bgp-default set protocols bgp group external peer-as 64500 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.0.1 set protocols isis interface ge-1/2/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept 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 static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 64501
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
BGP 피어 세션 구성:
인터페이스를 구성합니다.
user@R1# set ge-1/2/0 unit 0 description R1->R3 user@R1# set ge-1/2/0 unit 0 family inet address 10.0.0.1/30 user@R1# set ge-1/2/1 unit 0 description R1->R2 user@R1# set ge-1/2/1 unit 0 family inet address 10.0.1.2/30 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
BGP 그룹을 구성합니다.
[edit protocols bgp group external] user@R1# set type external user@R1# set import bw-dis user@R1# set peer-as 64501 user@R1# set neighbor 10.0.1.1 user@R1# set neighbor 10.0.0.2
BGP 그룹이 여러 경로를 사용하도록 활성화합니다.
참고:BGP 다중 경로에서 허용된 경로에 동일한 neighbor AS(Autonomous System)가 있어야 하는 기본 확인을 비활성화하려면 옵션을 포함
multiple-as합니다. neighbor가 다른 AS에 있는 경우 이multiple-as옵션을 사용합니다.[edit protocols bgp group external] user@R1# set multipath
로드 밸런싱 정책을 구성합니다.
[edit policy-options policy-statement loadbal] user@R1# set from route-filter 10.0.0.0/16 orlonger user@R1# set then load-balance per-packet
로드 밸런싱 정책을 적용합니다.
[edit routing-options] user@R1# set forwarding-table export loadbal
BGP 커뮤니티 멤버를 구성합니다.
이 예에서는 대역폭을 1Gbps로 가정하고 고대역폭에 60%, 저대역폭에 40%를 할당합니다. 참조 대역폭이 링크 대역폭과 동일할 필요는 없습니다.
[edit policy-options] user@R1# set community bw-high members bandwidth:65000:60000000 user@R1# set community bw-low members bandwidth:65000:40000000
대역폭 분산 정책을 구성합니다.
[edit policy-options bw-dis] user@R1# set term a from protocol bgp user@R1# set term a from neighbor 10.0.1.1 user@R1# set term a then community add bw-high user@R1# set term a then accept user@R1# set term b from protocol bgp user@R1# set term b from neighbor 10.0.0.2 user@R1# set term b then community add bw-low user@R1# set term b then accept
로컬 AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 64500
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R1# show interfaces
ge-1/2/0 {
unit 0 {
description R1->R3;
family inet {
address 10.0.0.1/30;
}
}
}
ge-1/2/1 {
unit 0 {
description R1->R2;
family inet {
address 10.0.1.2/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
user@R1# show protocols
bgp {
group external {
type external;
import bw-dis;
peer-as 64501;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
}
user@R1# show policy-options
policy-statement bw-dis {
term a {
from {
protocol bgp;
neighbor 10.0.1.1;
}
then {
community add bw-high;
accept;
}
}
term b {
from {
protocol bgp;
neighbor 10.0.0.2;
}
then {
community add bw-low;
accept;
}
}
}
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
community bw-high members bandwidth:65000:60000000;
community bw-low members bandwidth:65000:40000000;
user@R1# show routing-options
autonomous-system 64500;
forwarding-table {
export loadbal;
}
디바이스 구성이 완료되면 구성 모드에서 들어갑니다 commit .
검증
구성이 올바르게 작동하고 있는지 확인합니다.
경로 확인
목적
두 경로가 모두 선택되었고 경로의 다음 홉이 60%/40% 균형을 보이는지 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route protocol bgp detail .
user@R1> show route 172.16/16 protocol bgp detail
inet.0: 9 destinations, 13 routes (9 active, 0 holddown, 0 hidden)
172.16.0.0/16 (2 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 262143
Address: 0x93fc078
Next-hop reference count: 3
Source: 10.0.0.2
Next hop: 10.0.0.2 via ge-1/2/0.0 balance 40%
Next hop: 10.0.1.1 via ge-1/2/1.0 balance 60%, selected
State: **Active Ext>
Local AS: 64500 Peer AS: 64501
Age: 3:22:55
Task: BGP_64501.10.0.0.2+55344
Announcement bits (1): 0-KRT
AS path: 64501 I
Communities: bandwidth:65000:40000000
Accepted Multipath
Localpref: 100
Router ID: 192.168.0.3
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 658
Address: 0x9260520
Next-hop reference count: 4
Source: 10.0.1.1
Next hop: 10.0.1.1 via ge-1/2/1.0, selected
State: <NotBest Ext>
Inactive reason: Not Best in its group - Active preferred
Local AS: 64500 Peer AS: 64501
Age: 3:22:55
Task: BGP_65001.10.0.1.1+62586
AS path: 64501 I
Communities: bandwidth:65000:60000000
Accepted MultipathContrib
Localpref: 100
Router ID: 192.168.0.2
user@R1> show route 10.0.2.0 protocol bgp detail
inet.0: 9 destinations, 13 routes (9 active, 0 holddown, 0 hidden)
10.0.2.0/30 (2 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 262143
Address: 0x93fc078
Next-hop reference count: 3
Source: 10.0.1.1
Next hop: 10.0.0.2 via ge-1/2/0.0 balance 40%
Next hop: 10.0.1.1 via ge-1/2/1.0 balance 60%, selected
State: <Active Ext>
Local AS: 64500 Peer AS: 64501
Age: 3:36:37
Task: BGP_65001.10.0.1.1+62586
Announcement bits (1): 0-KRT
AS path: 64501 I
Communities: bandwidth:65000:60000000
Accepted Multipath
Localpref: 100
Router ID: 192.168.0.2
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 657
Address: 0x92604d8
Next-hop reference count: 4
Source: 10.0.0.2
Next hop: 10.0.0.2 via ge-1/2/0.0, selected
State: <NotBest Ext>
Inactive reason: Not Best in its group - Active preferred
Local AS: 64500 Peer AS: 65001
Age: 3:36:36
Task: BGP_65001.10.0.0.2+55344
AS path: 64501 I
Communities: bandwidth:65000:40000000
Accepted MultipathContrib
Localpref: 100
Router ID: 192.168.0.3
의미
별표(*)로 표시된 활성 경로에는 172.16/16 목적지에 대한 두 개의 다음 홉인 10.0.1.1 및 10.0.0.2가 있습니다.
마찬가지로 별표(*)로 표시된 활성 경로에는 10.0.2.0 목적지에 대한 10.0.1.1 및 10.0.0.2의 두 가지 다음 홉이 있습니다.
두 경우 모두 10.0.1.1 다음 홉은 비활성 경로에서 활성 경로로 복사됩니다.
출력에 40% 및 60% 균형이 표시됩니다. show route 이는 트래픽이 두 개의 다음 홉 간에 분산되고 있으며, 트래픽의 60%는 첫 번째 경로를 따르고 40%는 두 번째 경로를 따르고 있음을 나타냅니다.
로드 밸런싱을 위한 외부 BGP 링크 간 총 대역폭 보급 개요
내부 피어로부터 여러 경로를 수신하는 BGP 피어는 이러한 경로 간에 트래픽을 로드 밸런싱합니다. Junos OS 릴리스 17.4 이전 릴리스에서는 내부 피어로부터 여러 경로를 수신하는 BGP 스피커가 활성 경로와 연관된 링크 대역폭만 보급했습니다. BGP는 링크 대역폭 확장 커뮤니티를 사용하여 외부 링크에 걸쳐 여러 경로의 집계된 대역폭을 보급합니다. BGP는 대역폭 할당이 불평등한 다중 경로의 집계 대역폭을 계산하고 집계된 대역폭을 외부 BGP 피어에 보급합니다. BGP 그룹의 대역폭 사용을 제한하도록 집계 대역폭에 대한 임계값을 구성할 수 있습니다. 애니캐스트 주소를 포함한 IPv4 및 IPv6 경로 모두 집계 대역폭을 지원합니다.
다중 경로 라우팅의 총 대역폭을 보급하고 최대 임계값을 설정하려면 [edit policy-options policy-statement name then] 계층 수준에서 작업을 사용하여 정책을 limit-bandwidth 구성 aggregate-bandwidth 합니다.
그림 4에서 AS1(Autonomous System 1)은 3개의 다중 경로 라우팅의 대역폭을 원격 접두사로 집계하고 링크 대역폭 확장 커뮤니티를 사용하여 대역폭이 30인 AS4(Autonomous System 4)에 보급합니다. AS3와 AS4 사이의 링크 장애가 발생할 경우 AS4는 AS6에 광고하는 대역폭에서 60을 뺀 후 보급하는 대역폭을 130에서 70으로 수정합니다.
다중 경로 링크 중 하나에 장애가 발생하면 BGP는 발신 링크 대역폭 커뮤니티에서 장애가 발생한 링크의 대역폭을 뺀 경로를 다시 보급합니다. 집계 링크 대역폭이 구성된 제한을 초과하는 것으로 확인되면 보급된 집계 대역폭은 두 피어 간에 구성된 링크 대역폭 제한으로 잘립니다.
BGP 피어가 집계 대역폭 커뮤니티로 구성된 다중 경로 경로를 전파할 때, 수신 대역폭 커뮤니티 또는 해당 접두사의 대역폭 합계와 함께 새 링크 대역폭 커뮤니티가 추가됩니다. 사용 가능한 링크 대역폭은 인터페이스 속도에서 동적으로 파생됩니다. 링크 대역폭은 전이적 확장 커뮤니티로 전송됩니다.
BGP는 원격 피어에 링크 속도를 전달하여 로드 밸런싱을 위한 트래픽 분산의 최적화를 향상할 수 있습니다. BGP 그룹은 링크 대역폭 확장 커뮤니티를 시작하거나 수신 및 재보급된 EBGP 세션을 통해 링크 대역폭 비전이적 확장 커뮤니티를 전송할 수 있습니다. 비전이적 링크 대역폭 확장 커뮤니티를 구성하려면 다음을 수행합니다.
-
계층 수준에서
[edit policy-options community name members community-ids]내보내기 정책에 포함합니다bandwidth-non-transitive:value. -
링크 대역폭 커뮤니티에 대해서만 EBGP 이웃으로 non-transitive-link-bandwidth-extended-community를 전송하는 옵션을 계층 수준에
[edit protocols bgp group (Protocols BGP) group-name]포함send-non-transitive-link-bandwidth합니다.
디바이스가 링크 대역폭 커뮤니티를 자동으로 감지하고 가져오기 시 경로에 연결할 수 있도록 하려면 계층 수준에서 [edit protocols bgp group link-bandwidth] auto-sense 문을 포함합니다. 이 기능은 네트워크 내에서 전송 속도가 다른 디바이스의 통합을 용이하게 하여 링크 속도를 기반으로 효율적인 트래픽 분산이 가능합니다.
또한보십시오
예: 로드 밸런싱을 위한 외부 BGP 링크에 총 대역폭을 광고하는 정책 구성
이 예는 로드 밸런싱을 위해 외부 BGP 링크에 총 대역폭을 광고하고 구성된 총 대역폭에 대한 임계값을 지정하는 정책을 구성하는 방법을 보여줍니다. BGP는 multipath에서 사용 가능한 링크 대역폭을 추가하고 집계된 대역폭을 계산합니다. 링크 장애의 경우 집계된 대역폭은 사용 가능한 대역폭의 현재 상태를 반영하여 조정됩니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
로드 밸런싱 기능이 있는 라우터 4개
-
모든 디바이스에서 실행되는 Junos OS 릴리스 17.4 이상
개요
Junos OS 릴리스 17.4R1부터 내부 피어로부터 여러 경로를 수신하는 BGP 스피커는 이러한 경로 간에 트래픽을 로드 밸런싱합니다. 이전 Junos OS 릴리스에서는 내부 피어로부터 여러 경로를 수신하는 BGP 스피커가 활성 경로와 연관된 링크 대역폭만 보급했습니다. BGP는 multipath를 태그하기 위해 집계된 대역폭으로 새로운 링크 대역폭 확장 커뮤니티를 사용하고 DMZ 링크에서 이러한 여러 경로에 대한 집계된 대역폭을 보급합니다. 집계된 여러 경로를 보급하려면 [edit policy-options policy-statement name then] 계층 수준에서 작업을 수행하는 limit bandwidth 정책을 구성 aggregate-bandwidth 합니다.
토폴로지
그림 5에서 라우터 R1은 초당 60,000,000바이트로 라우터 R2의 다음 홉 10.0.1.1을 통해 그리고 초당 40,000,000바이트로 라우터 R3의 10.0.0.2를 통해 원격 목적지으로 트래픽을 로드 밸런싱합니다. 라우터 R1은 라우터 R4에 목적지 10.0.2.0을 광고합니다. 라우터 R1은 초당 10,000,000바이트인 사용 가능한 대역폭의 총합을 계산합니다. 그러나 라우터 R1에 구성된 정책은 총 대역폭의 임계값을 초당 80,000,000바이트로 설정합니다. 따라서 R1은 초당 10,000,000바이트가 아닌 초당 80,000,000바이트를 광고합니다.
다중 경로 링크 중 하나가 중단되면, 실패한 링크의 대역폭은 BGP neighbor에 광고되는 총 대역폭에 추가되지 않습니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 들어갑니다 commit .
라우터 R1
set interfaces ge-0/0/0 unit 0 description R1->R3 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-0/0/1 unit 0 description R1->R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.2/30 set interfaces ge-0/0/2 unit 0 description R1->R4 set interfaces ge-0/0/2 unit 0 family inet address 10.0.4.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set routing-options autonomous-system 65000 set protocols bgp group external type external set protocols bgp group external import bw-dis set protocols bgp group external peer-as 65001 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set protocols bgp group external2 type external set protocols bgp group external2 peer-as 65002 set policy-options policy-statement bw-dis term a from protocol bgp set policy-options policy-statement bw-dis term a from neighbor 10.0.1.1 set policy-options policy-statement bw-dis term a then community add bw-high set policy-options policy-statement bw-dis term a then accept set policy-options policy-statement bw-dis term b from protocol bgp set policy-options policy-statement bw-dis term b from neighbor 10.0.0.2 set policy-options policy-statement bw-dis term b then community add bw-low set policy-options policy-statement bw-dis term b then accept set policy-options policy-statement aggregate_bw_and_limit_capacity then aggregate-bandwidth set policy-options policy-statement aggregate_bw_and_limit_capacity then limit-bandwidth 80000000 set policy-options policy-statement aggregate_bw_and_limit_capacity then accept set protocols bgp group external2 neighbor 10.0.4.2 export aggregate_bw_and_limit_capacity set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set routing-options forwarding-table export loadbal set policy-options community bw-high members bandwidth:65000:60000000 set policy-options community bw-low members bandwidth:65000:40000000
라우터 R2
set interfaces ge-0/0/0 unit 0 description R2->R3 set interfaces ge-0/0/0 unit 0 family inet address 10.0.2.2/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description R2->R1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0002.00 set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 65001 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 65000 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.2 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept
라우터 R3
set interfaces ge-0/0/0 description R3->R2 set interfaces ge-0/0/0 unit 0 family inet address 10.0.2.1/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description R3->R1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0003.00 set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 65001 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 65000 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.0.1 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept
라우터 R4
set interfaces ge-0/0/0 unit 0 description R4->R1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.4.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set routing-options autonomous-system 65002 set protocols bgp group external type external set protocols bgp group external peer-as 65000 set protocols bgp group external neighbor 10.0.4.1
R1에서 시작하는 라우터 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
BGP 피어에 집계된 대역폭을 광고하는 정책을 구성하려면(라우터 R1부터 시작):
적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 라우터 R2, R3 및 R4에서 이 절차를 반복합니다.
-
IPv4 주소로 인터페이스를 구성합니다.
>[edit interfaces] user@R1# set ge-0/0/0 unit 0 description R1->R3 user@R1# set ge-0/0/0 unit 0 family inet address 10.0.0.1/30 user@R1# set ge-0/0/1 unit 0 description R1->R2 user@R1# set ge-0/0/1 unit 0 family inet address 10.0.1.2/30 user@R1# set ge-0/0/2 unit 0 description R1->R4 user@R1# set ge-0/0/2 unit 0 family inet address 10.0.4.1/30
-
루프백 주소를 구성합니다.
[edit interfaces] user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
-
BGP 호스트를 위한 AS(Autonomous System)를 구성합니다.
[edit routing-options] user@R1# set autonomous-system 65000
-
외부 에지 라우터에서 EBGP를 구성합니다.
[edit protocols] user@R1# set bgp group external type external user@R1# set bgp group external import bw-dis user@R1# set bgp group external peer-as 65001 user@R1# set bgp group external multipath user@R1# set bgp group external neighbor 10.0.1.1 user@R1# set bgp group external neighbor 10.0.0.2 user@R1# set bgp group external2 type external user@R1# set bgp group external2 peer-as 65002
-
대역폭 배포 정책을 정의하여 라우터 R3으로 향하는 트래픽에 높은 대역폭 community를 할당합니다.
[edit policy-options] user@R1# set policy-statement bw-dis term a from protocol bgp user@R1# set policy-statement bw-dis term a from neighbor 10.0.1.1 user@R1# set policy-statement bw-dis term a then community add bw-high user@R1# set policy-statement bw-dis term a then accept
-
대역폭 배포 정책을 정의하여 라우터 R2로 향하는 트래픽에 낮은 대역폭 community를 할당합니다.
[edit policy-options] user@R1# set policy-statement bw-dis term b from protocol bgp user@R1# set policy-statement bw-dis term b from neighbor 10.0.0.2 user@R1# set policy-statement bw-dis term b then community add bw-low user@R1# set policy-statement bw-dis term b then accept
-
BGP 세션을 통해 EBGP 라우터 R4에 80,000,000바이트의 집계된 대역폭을 광고하는 기능을 활성화합니다.
[edit policy-options] user@R1# set policy-statement aggregate_bw_and_limit_capacity then aggregate-bandwidth user@R1# set policy-statement aggregate_bw_and_limit_capacity then limit-bandwidth 80000000 user@R1# set policy-statement aggregate_bw_and_limit_capacity then accept
-
EBGP 그룹
external2에 aggregate_bw_and limit_capacity 정책을 적용합니다.[edit protocols] user@R1# set bgp group external2 neighbor 10.0.4.2 export aggregate_bw_and_limit_capacity
-
로드 밸런싱 정책을 정의합니다.
[edit policy-options] user@R1# set policy-statement loadbal from route-filter 10.0.0.0/16 orlonger user@R1# set policy-statement loadbal then load-balance per-packet
-
로드 밸런싱 정책을 적용합니다.
[edit routing-options] user@R1# set forwarding-table export loadbal
-
BGP 커뮤니티 멤버를 구성합니다. 첫 16비트 숫자는 로컬 AS(Autonomous System)를 나타냅니다. 두 번째 32비트 숫자는 초당 바이트의 링크 대역폭을 나타냅니다. 1Gbps 링크의 60%로 커뮤니티를 구성하고 1Gbps 링크의 40%로 다른 커뮤니티
bw-low를 구성bw-high합니다.bw-high community에 1Gbps 링크의 60%, bw-low community에 40%를 구성합니다.
[edit policy-options] user@R1# set community bw-high members bandwidth:65000:60000000 user@R1# set community bw-low members bandwidth:65000:40000000
결과
구성 모드에서 , show protocols, show routing-options및 show policy-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit]
user@R1# show interfaces
interfaces {
ge-0/0/0 {
unit 0 {
description R1->R3;
family inet {
address 10.0.0.1/30;
}
}
}
ge-0/0/1 {
unit 0 {
description R1->R2;
family inet {
address 10.0.1.2/30;
}
}
}
ge-0/0/2 {
unit 0 {
description R1->R4;
family inet {
address 10.0.4.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
}
[edit]
user@R1# show protocols
protocols {
bgp {
group external {
type external;
import bw-dis;
peer-as 65001;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
group external2 {
type external;
peer-as 65002;
neighbor 10.0.4.2 {
export aggregate_bw_and_limit_capacity;
}
}
}
}
[edit]
user@R1# show routing-options
routing-options {
autonomous-system 65000;
forwarding-table {
export loadbal;
}
}
[edit]
user@R1# show policy-options
policy-options {
policy-statement bw-dis {
term a {
from {
protocol bgp;
neighbor 10.0.1.1;
}
then {
community add bw-high;
accept;
}
}
term b {
from {
protocol bgp;
neighbor 10.0.0.2;
}
then {
community add bw-low;
accept;
}
}
}
policy-statement aggregate_bw_and_limit_capacity {
then {
aggregate-bandwidth;
limit-bandwidth 80000000;
accept;
}
}
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
community bw-high members bandwidth:65000:60000000;
community bw-low members bandwidth:65000:40000000;
}
검증
BGP 세션 설정 확인
목적
BGP 피어링이 완료되고 라우터 간에 BGP 세션이 설정되었는지 확인하려면,
작업
user@R1> show bgp summary
Groups: 2 Peers: 3 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
12 8 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.0.0.2 65001 153 149 0 0 1:07:23 4/6/6/0 0/0/0/0
10.0.1.1 65001 229 226 0 0 1:41:44 4/6/6/0 0/0/0/0
10.0.4.2 65002 1227 1227 0 0 9:10:27 0/0/0/0 0/0/0/0
의미
라우터 R1은 라우터 R2, R3 및 R4와의 피어링을 완료했습니다.
각 경로에 총 대역폭이 존재하는지 확인
목적
각 경로에 확장된 community가 존재하는지 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route protocol bgp detail .
user@R1> show route 10.0.2.0 protocol bgp detail
inet.0: 20 destinations, 26 routes (20 active, 0 holddown, 0 hidden)
10.0.2.0/30 (2 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 0
Address: 0xb618990
Next-hop reference count: 3
Source: 10.0.1.1
Next hop: 10.0.0.2 via ge-0/0/0.0 balance 40%
Session Id: 0x0
Next hop: 10.0.1.1 via ge-0/0/1.0 balance 60%, selected
Session Id: 0x0
State: <Active Ext>
Local AS: 65000 Peer AS: 65001
Age: 20:33
Validation State: unverified
Task: BGP_65001.10.0.1.1
Announcement bits (3): 0-KRT 2-BGP_Listen.0.0.0.0+179 3-BGP_RT_Background
AS path: 65001 I
Communities: bandwidth:65000:60000000
Accepted Multipath
Localpref: 100
Router ID: 128.49.121.137
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 595
Address: 0xb7a1330
Next-hop reference count: 9
Source: 10.0.0.2
Next hop: 10.0.0.2 via ge-0/0/0.0, selected
Session Id: 0x141
State: <NotBest Ext>
Inactive reason: Not Best in its group - Active preferred
Local AS: 65000 Peer AS: 65001
Age: 20:33
Validation State: unverified
Task: BGP_65001.10.0.0.2
AS path: 65001 I
Communities: bandwidth:65000:40000000
Accepted MultipathContrib
Localpref: 100
Router ID: 128.49.121.132
의미
라우터 R1이 주변 라우터 R4에 총 대역폭을 광고하는지 확인
목적
라우터 R1이 외부 neighbor에 총 대역폭을 광고하는지 확인합니다.
작업
user@R1> show route advertising-protocol bgp 10.0.4.2 10.0.2.0/30 detail
inet.0: 20 destinations, 26 routes (20 active, 0 holddown, 0 hidden)
* 10.0.2.0/30 (2 entries, 1 announced)
BGP group external2 type External
Nexthop: Self
AS path: [65000] 65001 I
Communities: bandwidth:65000:80000000
의미
라우터 R1은 80,000,000바이트의 집계된 대역폭을 neighbor에 광고합니다.
BGP에서 단일 목적지에 대한 여러 경로 보급 이해
BGP 피어는 업데이트 메시지에서 서로에 대한 경로를 보급합니다. BGP는 경로를 Junos OS 라우팅 테이블(inet.0)에 저장합니다. 라우팅 테이블의 각 접두사에 대해 라우팅 프로토콜 프로세스는 활성 경로라고 하는 단일 최적 경로를 선택합니다. 동일한 목적지에 대한 여러 경로를 보급하도록 BGP를 구성하지 않는 한 BGP는 활성 경로만 보급합니다.
목적지에 대한 활성 경로만 보급하는 대신 목적지에 대한 여러 경로를 보급하도록 BGP를 구성할 수 있습니다. AS(Autonomous System) 내에서 목적지에 도달하기 위한 여러 출구점의 가용성은 다음과 같은 이점을 제공합니다.
내결함성—경로 다양성으로 인해 고장 후 복원 시간이 단축됩니다. 예를 들어, 동일한 목적지에 대한 여러 경로를 수신한 후 경계는 백업 경로를 미리 계산하여 기본 경로가 잘못되었을 때 경계 라우팅 디바이스가 백업을 사용하여 연결을 빠르게 복원할 수 있도록 할 수 있습니다. 백업 경로가 없으면 복원 시간은 BGP 재컨버전스에 따라 달라지며, 여기에는 새로운 최상의 경로를 학습하기 전에 네트워크에서 철수 및 광고 메시지가 포함됩니다.
로드 밸런싱 - AS 내의 라우팅이 특정 제약 조건을 충족하는 경우 동일한 목적지에 도달할 수 있는 여러 경로를 사용할 수 있으므로 트래픽 로드 밸런싱이 가능합니다.
유지 관리—대체 종료 지점을 사용할 수 있으므로 라우터의 정상적인 유지 관리 작업을 수행할 수 있습니다.
BGP에서 여러 경로를 보급하는 데는 다음과 같은 제한이 적용됩니다.
-
지원되는 주소 패밀리:
-
IPv4 유니캐스트(
family inet unicast) -
IPv6 유니캐스트(
family inet6 unicast) -
IPv4 레이블링된 유니캐스트(
family inet labeled-unicast) -
IPv6 레이블링 유니캐스트(
family inet6 labeled-unicast) -
IPv4 VPN 유니캐스트(
family inet-vpn unicast) -
IPv6 VPN 유니캐스트(
family inet6-vpn unicast)
다음 예는 IPv4 VPN 유니캐스트 및 IPv6 VPN 유니캐스트 패밀리의 구성을 보여줍니다.
bgp { group <group-name> { family inet-vpn unicast { add-path { send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } receive; } family inet6-vpn unicast { add-path { send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } receive; } } } -
-
내부 BGP(IBGP) 및 외부 BGP(EBGP) 피어를 지원합니다
add-path.참고:-
IBGP 및 EBGP 피어에 대한 추가 경로 수신 을 지원합니다.
-
IBGP 피어에 대해서만 경로 추가 전송을 지원합니다.
-
EBGP 피어에 대한 경로 추가 전송 은 지원되지 않습니다. EBGP 피어에 대한 추가 경로 전송 에 대한 구성을 시도하면 CLI가 커밋 오류가 발생합니다.
-
-
마스터 인스턴스만 해당됩니다. 라우팅 인스턴스를 지원하지 않습니다.
-
Graceful restart 및 NSR(nonstop active routing)이 지원됩니다.
-
BMP(BGP Monitoring Protocol)가 지원되지 않습니다.
-
접두사 정책을 사용하면 목적지에 대한 여러 경로를 보급하도록 구성된 라우터에서 경로를 필터링할 수 있습니다. 접두사 정책은 접두사만 일치시킬 수 있습니다. 경로 특성을 일치시킬 수 없으며 경로의 특성을 변경할 수 없습니다.
Junos OS 릴리스 18.4R1부터 BGP는 여러 ECMP 경로 외에 최대 2개의 add-path 경로를 보급할 수 있습니다.
최대 64개의 add-path 또는 equal-cost-paths만 제공하는 모든 add-path를 보급하려면 계층 수준에서 [edit protocols bgp group group-name family name addpath send] 포함 path-selection-mode 합니다. 두 가지를 동시에 multipath 활성화 path-selection-mode 할 수는 없습니다.
또한보십시오
예: BGP에서 여러 경로 보급
이 예에서 BGP 라우터는 활성 경로만 보급하는 대신 여러 경로를 보급하도록 구성됩니다. BGP에서 여러 경로를 보급하는 것은 RFC 7911, BGP에서 여러 경로 보급에 명시되어 있습니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
BGP 지원 디바이스 8개.
BGP 지원 디바이스 중 5개는 라우터일 필요는 없습니다. 예를 들어, EX 시리즈 이더넷 스위치가 될 수 있습니다.
BGP 지원 디바이스 중 3개는 여러 경로를 전송하거나 수신하도록 (또는 전송 및 수신을 모두 수행하도록) 구성됩니다. 이러한 3개의 BGP 지원 디바이스는 멀티서비스 에지 라우터, MX 시리즈 5G 유니버설 라우팅 플랫폼 또는 T 시리즈 코어 라우터M Series되어야 합니다.
라우터 3개는 Junos OS 릴리스 11.4 이상을 실행해야 합니다.
개요
다음 문은 목적지에 대한 여러 경로를 구성하는 데 사용됩니다.
[edit protocols bgp group group-name family family] add-path { receive; send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } }
이 예에서 라우터 R5, 라우터 R6, 라우터 R7은 정적 경로를 BGP에 재배포합니다. 라우터 R1 및 라우터 R4는 경로 리플렉터입니다. 라우터 R2 및 라우터 R3은 경로 리플렉터 R1의 클라이언트입니다. 라우터 R8은 경로 리플렉터 R4의 클라이언트입니다.
경로 리플렉션은 BGP에서 다중 경로 보급이 활성화되면 선택 사항입니다.
이 add-path send path-count 6 구성을 통해 라우터 R1은 라우터 R4에 (목적지당) 최대 6개의 경로를 전송하도록 구성됩니다.
이 add-path receive 구성을 통해 라우터 R4는 라우터 R1로부터 여러 경로를 수신하도록 구성됩니다.
이 add-path send path-count 6 구성을 통해 라우터 R4는 라우터 R8에 최대 6개의 경로를 보내도록 구성됩니다.
이 add-path receive 구성을 통해 라우터 R8은 라우터 R4로부터 여러 경로를 수신하도록 구성됩니다.
정책 구성은 add-path send prefix-policy allow_199 (해당 경로 필터와 함께) 라우터 R4가 172.16.199.1/32 경로에 대해서만 여러 경로를 전송하도록 제한합니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣습니다.
라우터 R1
set interfaces fe-0/0/0 unit 12 family inet address 10.0.12.1/24 set interfaces fe-0/0/1 unit 13 family inet address 10.0.13.1/24 set interfaces fe-1/0/0 unit 14 family inet address 10.0.14.1/24 set interfaces fe-1/2/0 unit 15 family inet address 10.0.15.1/24 set interfaces lo0 unit 10 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 2 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface fe-0/0/0.12 set protocols ospf area 0.0.0.0 interface fe-0/0/1.13 set protocols ospf area 0.0.0.0 interface fe-1/0/0.14 set protocols ospf area 0.0.0.0 interface fe-1/2/0.15 set routing-options router-id 10.0.0.10 set routing-options autonomous-system 1
라우터 R2
set interfaces fe-1/2/0 unit 21 family inet address 10.0.12.2/24 set interfaces fe-1/2/1 unit 26 family inet address 10.0.26.1/24 set interfaces lo0 unit 20 family inet address 10.0.0.20/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 2 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface fe-1/2/0.21 set protocols ospf area 0.0.0.0 interface fe-1/2/1.28 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 1
라우터 R3
set interfaces fe-1/0/1 unit 31 family inet address 10.0.13.2/24 set interfaces fe-1/0/2 unit 37 family inet address 10.0.37.1/24 set interfaces lo0 unit 30 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 2 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface fe-1/0/1.31 set protocols ospf area 0.0.0.0 interface fe-1/0/2.37 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 1
라우터 R4
set interfaces fe-1/2/0 unit 41 family inet address 10.0.14.2/24 set interfaces fe-1/2/1 unit 48 family inet address 10.0.48.1/24 set interfaces lo0 unit 40 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy allow_199 set protocols ospf area 0.0.0.0 interface fe-1/2/0.41 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface fe-1/2/1.48 set policy-options policy-statement allow_199 from route-filter 172.16.199.1/32 exact set policy-options policy-statement allow_199 term match_199 from prefix-list match_199 set policy-options policy-statement allow_199 then add-path send-count 20 set policy-options policy-statement allow_199 then accept set routing-options autonomous-system 1
라우터 R5
set interfaces fe-1/2/0 unit 51 family inet address 10.0.15.2/24 set interfaces lo0 unit 50 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject set routing-options static route 172.16.198.1/32 reject
라우터 R6
set interfaces fe-1/2/0 unit 62 family inet address 10.0.26.2/24 set interfaces lo0 unit 60 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject set routing-options static route 172.16.198.1/32 reject
라우터 R7
set interfaces fe-1/2/0 unit 73 family inet address 10.0.37.2/24 set interfaces lo0 unit 70 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject
라우터 R8
set interfaces fe-1/2/0 unit 84 family inet address 10.0.48.2/24 set interfaces lo0 unit 80 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.80 passive set protocols ospf area 0.0.0.0 interface fe-1/2/0.84 set routing-options autonomous-system 1
라우터 R1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 R1을 구성하려면 다음을 수행합니다.
라우터 R2, 라우터 R3, 라우터 R4 및 라우터 R5에 대한 인터페이스를 구성하고 루프백(lo0) 인터페이스를 구성합니다.
[edit interfaces] user@R1# set fe-0/0/0 unit 12 family inet address 10.0.12.1/24 user@R1# set fe-0/0/1 unit 13 family inet address 10.0.13.1/24 user@R1# set fe-1/0/0 unit 14 family inet address 10.0.14.1/24 user@R1# set fe-1/2/0 unit 15 family inet address 10.0.15.1/24 user@R1#set lo0 unit 10 family inet address 10.0.0.10/32
인터페이스에 BGP를 구성하고 IBGP 경로 리플렉션을 구성합니다.
[edit protocols bgp] user@R1# set group rr type internal user@R1# set group rr local-address 10.0.0.10 user@R1# set group rr cluster 10.0.0.10 user@R1# set group rr neighbor 10.0.0.20 user@R1# set group rr neighbor 10.0.0.30 user@R1# set group rr_rr type internal user@R1# set group rr_rr local-address 10.0.0.10 user@R1# set group e1 type external user@R1# set group e1 neighbor 10.0.15.2 local-address 10.0.15.1 user@R1# set group e1 neighbor 10.0.15.2 peer-as 2
라우터 R1이 주변 라우터인 라우터 R4에 최대 6개의 경로를 전송하도록 구성합니다.
경로의 목적지는 라우터 R1이 여러 경로를 통해 도달할 수 있는 모든 목적지가 될 수 있습니다.
[edit protocols bgp] user@R1# set group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6
인터페이스에 OSPF를 구성합니다.
[edit protocols ospf] user@R1# set area 0.0.0.0 interface lo0.10 passive user@R1# set area 0.0.0.0 interface fe-0/0/0.12 user@R1# set area 0.0.0.0 interface fe-0/0/1.13 user@R1# set area 0.0.0.0 interface fe-1/0/0.14 user@R1# set area 0.0.0.0 interface fe-1/2/0.15
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@R1# set router-id 10.0.0.10 user@R1# set autonomous-system 1
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R1# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R1# show interfaces
fe-0/0/0 {
unit 12 {
family inet {
address 10.0.12.1/24;
}
}
}
fe-0/0/1 {
unit 13 {
family inet {
address 10.0.13.1/24;
}
}
}
fe-1/0/0 {
unit 14 {
family inet {
address 10.0.14.1/24;
}
}
}
fe-1/2/0 {
unit 15 {
family inet {
address 10.0.15.1/24;
}
}
}
lo0 {
unit 10 {
family inet {
address 10.0.0.10/32;
}
}
}
user@R1# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.10;
cluster 10.0.0.10;
neighbor 10.0.0.20;
neighbor 10.0.0.30;
}
group e1 {
type external;
neighbor 10.0.15.2 {
local-address 10.0.15.1;
peer-as 2;
}
}
group rr_rr {
type internal;
local-address 10.0.0.10;
neighbor 10.0.0.40 {
family inet {
unicast {
add-path {
send {
path-count 6;
}
}
}
}
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.10 {
passive;
}
interface fe-0/0/0.12;
interface fe-0/0/1.13;
interface fe-1/0/0.14;
interface fe-1/2/0.15;
}
}
user@R1# show routing-options router-id 10.0.0.10; autonomous-system 1;
라우터 R2 구성
단계별 절차
라우터 R2를 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스와 라우터 R6 및 라우터 R1에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R2# set fe-1/2/0 unit 21 family inet address 10.0.12.2/24 user@R2# set fe-1/2/1 unit 26 family inet address 10.0.26.1/24 user@R2# set lo0 unit 20 family inet address 10.0.0.20/32
라우터 R2의 인터페이스에서 BGP 및 OSPF를 구성합니다.
[edit protocols] user@R2# set bgp group rr type internal user@R2# set bgp group rr local-address 10.0.0.20 user@R2# set bgp group e1 type external user@R2# set bgp group e1 neighbor 10.0.26.2 peer-as 2 user@R2# set ospf area 0.0.0.0 interface lo0.20 passive user@R2# set ospf area 0.0.0.0 interface fe-1/2/0.21 user@R2# set ospf area 0.0.0.0 interface fe-1/2/1.28
라우터 R2에서 라우터 R1로 전송되는 경로의 경우, 라우터 R1은 10.0.26.0/24 네트워크에서 라우터 R6의 주소에 대한 경로가 없기 때문에 라우터 R2를 다음 홉으로 보급합니다.
[edit] user@R2# set policy-options policy-statement set_nh_self then next-hop self user@R2# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
AS(Autonomous System) 번호를 구성합니다.
[edit] user@R2# set routing-options autonomous-system 1
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R2# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R2# show interfaces
fe-1/2/0 {
unit 21 {
family inet {
address 10.0.12.2/24;
}
}
}
fe-1/2/1 {
unit 26 {
family inet {
address 10.0.26.1/24;
}
}
}
lo0 {
unit 20 {
family inet {
address 10.0.0.20/32;
}
}
}
user@R2# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.20;
neighbor 10.0.0.10 {
export set_nh_self;
}
}
group e1 {
type external;
neighbor 10.0.26.2 {
peer-as 2;
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.20 {
passive;
}
interface fe-1/2/0.21;
interface fe-1/2/1.28;
}
}
user@R2# show policy-options
policy-statement set_nh_self {
then {
next-hop self;
}
}
user@R2# show routing-options autonomous-system 1;
라우터 R3 구성
단계별 절차
라우터 R3을 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스와 라우터 R7 및 라우터 R1에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R3# set fe-1/0/1 unit 31 family inet address 10.0.13.2/24 user@R3# set fe-1/0/2 unit 37 family inet address 10.0.37.1/24 user@R3# set lo0 unit 30 family inet address 10.0.0.30/32
라우터 R3의 인터페이스에서 BGP 및 OSPF를 구성합니다.
[edit protocols] user@R3# set bgp group rr type internal user@R3# set bgp group rr local-address 10.0.0.30 user@R3# set bgp group e1 type external user@R3# set bgp group e1 neighbor 10.0.37.2 peer-as 2 user@R3# set ospf area 0.0.0.0 interface lo0.30 passive user@R3# set ospf area 0.0.0.0 interface fe-1/0/1.31 user@R3# set ospf area 0.0.0.0 interface fe-1/0/2.37
라우터 R3에서 라우터 R1로 전송된 경로의 경우, 라우터 R1이 10.0.37.0/24 네트워크에서 라우터 R7의 주소에 대한 경로를 갖지 않기 때문에 라우터 R3을 다음 홉으로 보급합니다.
[edit] user@R3# set policy-options policy-statement set_nh_self then next-hop self user@R3# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
AS(Autonomous System) 번호를 구성합니다.
[edit] user@R3# set routing-options autonomous-system 1
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R3# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R3# show interfaces
fe-1/0/1 {
unit 31 {
family inet {
address 10.0.13.2/24;
}
}
}
fe-1/0/2 {
unit 37 {
family inet {
address 10.0.37.1/24;
}
}
}
lo0 {
unit 30 {
family inet {
address 10.0.0.30/32;
}
}
}
user@R3# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.30;
neighbor 10.0.0.10 {
export set_nh_self;
}
}
group e1 {
type external;
neighbor 10.0.37.2 {
peer-as 2;
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.30 {
passive;
}
interface fe-1/0/1.31;
interface fe-1/0/2.37;
}
}
user@R3# show policy-options
policy-statement set_nh_self {
then {
next-hop self;
}
}
user@R3# show routing-options autonomous-system 1;
라우터 R4 구성
단계별 절차
라우터 R4를 구성하려면 다음을 수행합니다.
라우터 R1 및 라우터 R8에 대한 인터페이스를 구성하고 루프백(lo0) 인터페이스를 구성합니다.
[edit interfaces] user@R4# set fe-1/2/0 unit 41 family inet address 10.0.14.2/24 user@R4# set fe-1/2/1 unit 48 family inet address 10.0.48.1/24 user@R4# set lo0 unit 40 family inet address 10.0.0.40/32
인터페이스에 BGP를 구성하고 IBGP 경로 리플렉션을 구성합니다.
[edit protocols bgp] user@R4# set group rr type internal user@R4# set group rr local-address 10.0.0.40 user@R4# set group rr neighbor 10.0.0.10 user@R4# set group rr_client type internal user@R4# set group rr_client local-address 10.0.0.40 user@R4# set group rr_client cluster 10.0.0.40
라우터 R4가 주변 라우터인 라우터 R8에 최대 6개의 경로를 전송하도록 구성합니다.
경로의 목적지는 라우터 R4가 여러 경로를 통해 도달할 수 있는 모든 목적지가 될 수 있습니다.
[edit protocols bgp] user@R4# set group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6
라우터 R4가 주변 라우터인 라우터 R1에서 여러 경로를 수신하도록 구성합니다.
경로의 목적지는 라우터 R1이 여러 경로를 통해 도달할 수 있는 모든 목적지가 될 수 있습니다.
[edit protocols bgp group rr family inet unicast] user@R4# set add-path receive
인터페이스에 OSPF를 구성합니다.
[edit protocols ospf area 0.0.0.0] user@R4# set interface fe-1/2/0.41 user@R4# set interface lo0.40 passive user@R4# set interface fe-1/2/1.48
라우터 R4가 라우터 R8에 172.16.199.1/32 경로에 대한 여러 경로를 전송하도록 허용하는 정책을 구성합니다.
라우터 R4는 172.16.198.1/32 경로 및 172.16.199.1/32 경로에 대한 여러 경로를 수신합니다. 그러나 이 정책으로 인해 라우터 R4는 172.16.199.1/32 경로에 대한 여러 경로만 보냅니다.
[edit protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast] user@R4# set add-path send prefix-policy allow_199 [edit policy-options policy-statement allow_199] user@R4# set from route-filter 172.16.199.1/32 exact user@R4# set then accept
또한 라우터 R4는 add-path 보급 접두사 하위 집합에 대해 최대 20개의 BGP
add-path경로를 전송하도록 구성할 수 있습니다.[edit policy-options policy-statement allow_199] user@R4# set term match_199 from prefix-list match_199 user@R4# set then add-path send-count 20
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R4# set autonomous-system 1
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R4# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R4# show interfaces
fe-1/2/0 {
unit 41 {
family inet {
address 10.0.14.2/24;
}
}
}
fe-1/2/1 {
unit 48 {
family inet {
address 10.0.48.1/24;
}
}
}
lo0 {
unit 40 {
family inet {
address 10.0.0.40/32;
}
}
}
user@R4# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.40;
family inet {
unicast {
add-path {
receive;
}
}
}
neighbor 10.0.0.10;
}
group rr_client {
type internal;
local-address 10.0.0.40;
cluster 10.0.0.40;
neighbor 10.0.0.80 {
family inet {
unicast {
add-path {
send {
path-count 6;
prefix-policy allow_199;
}
}
}
}
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.40 {
passive;
}
interface fe-1/2/0.41;
interface fe-1/2/1.48;
}
}
user@R4# show policy-options
policy-statement allow_199 {
from {
route-filter 172.16.199.1/32 exact;
}
from term match_199 {
prefix-list match_199;
}
then add-path send-count 20;
then accept;
}
user@R4# show routing-options autonomous-system 1;
라우터 R5 구성
단계별 절차
라우터 R5를 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스 및 라우터 R1에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R5# set fe-1/2/0 unit 51 family inet address 10.0.15.2/24 user@R5# set lo0 unit 50 family inet address 10.0.0.50/32
라우터 R5의 인터페이스에 BGP를 구성합니다.
[edit protocols bgp group e1] user@R5# set type external user@R5# set neighbor 10.0.15.1 peer-as 1
BGP에 재배포할 정적 경로를 생성합니다.
[edit routing-options] user@R5# set static route 172.16.199.1/32 reject user@R5# set static route 172.16.198.1/32 reject
정적 및 직접 경로를 BGP로 재배포합니다.
[edit protocols bgp group e1 neighbor 10.0.15.1] user@R5# set export s2b [edit policy-options policy-statement s2b] user@R5# set from protocol static user@R5# set from protocol direct user@R5# set then as-path-expand 2 user@R5# set then accept
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R5# set autonomous-system 2
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R5# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R5# show interfaces
fe-1/2/0 {
unit 51 {
family inet {
address 10.0.15.2/24;
}
}
}
lo0 {
unit 50 {
family inet {
address 10.0.0.50/32;
}
}
}
user@R5# show protocols
bgp {
group e1 {
type external;
neighbor 10.0.15.1 {
export s2b;
peer-as 1;
}
}
}
user@R5# show policy-options
policy-statement s2b {
from protocol [ static direct ];
then {
as-path-expand 2;
accept;
}
}
user@R5# show routing-options
static {
route 172.16.198.1/32 reject;
route 172.16.199.1/32 reject;
}
autonomous-system 2;
라우터 R6 구성
단계별 절차
라우터 R6을 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스 및 라우터 R2에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R6# set fe-1/2/0 unit 62 family inet address 10.0.26.2/24 user@R6# set lo0 unit 60 family inet address 10.0.0.60/32
라우터 R6의 인터페이스에 BGP를 구성합니다.
[edit protocols] user@R6# set bgp group e1 type external user@R6# set bgp group e1 neighbor 10.0.26.1 peer-as 1
BGP에 재배포할 정적 경로를 생성합니다.
[edit] user@R6# set routing-options static route 172.16.199.1/32 reject user@R6# set routing-options static route 172.16.198.1/32 reject
라우터 R6의 라우팅 테이블에서 BGP로 정적 및 직접 라우팅 테이블을 재배포합니다.
[edit protocols bgp group e1 neighbor 10.0.26.1] user@R6# set export s2b [edit policy-options policy-statement s2b] user@R6# set from protocol static user@R6# set from protocol direct user@R6# set then accept
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R6# set autonomous-system 2
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R6# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R6# show interfaces
fe-1/2/0 {
unit 62 {
family inet {
address 10.0.26.2/24;
}
}
}
lo0 {
unit 60 {
family inet {
address 10.0.0.60/32;
}
}
}
user@R6# show protocols
bgp {
group e1 {
type external;
neighbor 10.0.26.1 {
export s2b;
peer-as 1;
}
}
}
user@R6# show policy-options
policy-statement s2b {
from protocol [ static direct ];
then accept;
}
user@R6# show routing-options
static {
route 172.16.198.1/32 reject;
route 172.16.199.1/32 reject;
}
autonomous-system 2;
라우터 R7 구성
단계별 절차
라우터 R7을 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스 및 라우터 R3에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R7# set fe-1/2/0 unit 73 family inet address 10.0.37.2/24 user@R7# set lo0 unit 70 family inet address 10.0.0.70/32
라우터 R7의 인터페이스에 BGP를 구성합니다.
[edit protocols bgp group e1] user@R7# set type external user@R7# set neighbor 10.0.37.1 peer-as 1
BGP로 재배포할 정적 경로를 생성합니다.
[edit] user@R7# set routing-options static route 172.16.199.1/32 reject
라우터 R7의 라우팅 테이블에서 BGP로 정적 및 직접 경로를 재배포합니다.
[edit protocols bgp group e1 neighbor 10.0.37.1] user@R7# set export s2b [edit policy-options policy-statement s2b] user@R7# set from protocol static user@R7# set from protocol direct user@R7# set then accept
AS(Autonomous System) 번호를 구성합니다.
[edit routing-options] user@R7# set autonomous-system 2
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R7# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R7# show interfaces
fe-1/2/0 {
unit 73 {
family inet {
address 10.0.37.2/24;
}
}
}
lo0 {
unit 70 {
family inet {
address 10.0.0.70/32;
}
}
}
user@R7# show protocols
bgp {
group e1 {
type external;
neighbor 10.0.37.1 {
export s2b;
peer-as 1;
}
}
}
user@R7# show policy-options
policy-statement s2b {
from protocol [ static direct ];
then accept;
}
user@R7# show routing-options
static {
route 172.16.199.1/32 reject;
}
autonomous-system 2;
라우터 R8 구성
단계별 절차
라우터 R8을 구성하려면 다음을 수행합니다.
루프백(lo0) 인터페이스 및 라우터 R4에 대한 인터페이스를 구성합니다.
[edit interfaces] user@R8# set fe-1/2/0 unit 84 family inet address 10.0.48.2/24 user@R8# set lo0 unit 80 family inet address 10.0.0.80/32
라우터 R8의 인터페이스에 BGP 및 OSPF를 구성합니다.
[edit protocols] user@R8# set bgp group rr type internal user@R8# set bgp group rr local-address 10.0.0.80 user@R8# set ospf area 0.0.0.0 interface lo0.80 passive user@R8# set ospf area 0.0.0.0 interface fe-1/2/0.84
라우터 R8가 주변 라우터인 라우터 R4로부터 여러 경로를 수신하도록 구성합니다.
경로의 목적지는 라우터 R4가 여러 경로를 통해 도달할 수 있는 모든 목적지가 될 수 있습니다.
[edit protocols] user@R8# set bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive
AS(Autonomous System) 번호를 구성합니다.
[edit] user@R8# set routing-options autonomous-system 1
디바이스 구성을 완료하면 구성을 커밋합니다.
user@R8# commit
결과
구성 모드에서 , show protocols, show policy-options및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@R8# show interfaces
fe-1/2/0 {
unit 84 {
family inet {
address 10.0.48.2/24;
}
}
}
lo0 {
unit 80 {
family inet {
address 10.0.0.80/32;
}
}
}
user@R8# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.80;
neighbor 10.0.0.40 {
family inet {
unicast {
add-path {
receive;
}
}
}
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.80 {
passive;
}
interface fe-1/2/0.84;
}
}
user@R8# show routing-options autonomous-system 1;
검증
구성이 제대로 작동하고 있는지 확인합니다.
- BGP 피어에 여러 경로를 보내고 받을 수 있는 기능이 있는지 확인
- 라우터 R1이 여러 경로를 보급하는지 확인
- 라우터 R4가 여러 경로를 수신 및 보급하는지 확인
- 라우터 R8이 다중 경로를 수신하는지 확인
- 경로 ID 확인
BGP 피어에 여러 경로를 보내고 받을 수 있는 기능이 있는지 확인
목적
명령 출력 show bgp neighbor 에 다음 문자열 중 하나 또는 둘 다가 나타나는지 확인합니다.
NLRI's for which peer can receive multiple paths: inet-unicastNLRI's for which peer can send multiple paths: inet-unicast
작업
user@R1> show bgp neighbor 10.0.0.40 Peer: 10.0.0.40+179 AS 1 Local: 10.0.0.10+64227 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can receive multiple paths: inet-unicast ...
user@R4> show bgp neighbor 10.0.0.10 Peer: 10.0.0.10+64227 AS 1 Local: 10.0.0.40+179 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can send multiple paths: inet-unicast ...
user@R4> show bgp neighbor 10.0.0.80 Peer: 10.0.0.80+55416 AS 1 Local: 10.0.0.40+179 AS 1 Type: Internal State: Established (route reflector client)Flags: <Sync> ,,, NLRI's for which peer can receive multiple paths: inet-unicast ...
user@R8> show bgp neighbor 10.0.0.40 Peer: 10.0.0.40+179 AS 1 Local: 10.0.0.80+55416 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can send multiple paths: inet-unicast ...
라우터 R1이 여러 경로를 보급하는지 확인
목적
172.16.198.1/32 목적지에 대한 여러 경로와 172.16.199.1/32 목적지에 대한 여러 경로가 라우터 R4에 보급되는지 확인합니다.
작업
user@R1> show route advertising-protocol bgp 10.0.0.40
inet.0: 21 destinations, 25 routes (21 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 172.16.198.1/32 10.0.0.20 100 2 I
10.0.15.2 100 2 2 I
* 172.16.199.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
* 172.16.200.0/30 10.0.0.20 100 2 I
의미
하나의 접두사와 둘 이상의 다음 홉이 표시되는 경우, 라우터 R4에 여러 경로가 보급됨을 의미합니다.
라우터 R4가 여러 경로를 수신 및 보급하는지 확인
목적
172.16.199.1/32 목적지에 대한 여러 경로가 라우터 R1에서 수신되고 라우터 R8에 보급되는지 확인합니다. 172.16.198.1/32 목적지에 대한 여러 경로가 라우터 R1에서 수신되되, 이 목적지에 대한 하나의 경로만 라우터 R8에 보급되는지 확인합니다.
작업
user@R4> show route receive-protocol bgp 10.0.0.10
inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 172.16.198.1/32 10.0.0.20 100 2 I
10.0.15.2 100 2 2 I
* 172.16.199.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
* 172.16.200.0/30 10.0.0.20 100 2 I
user@R4> show route advertising-protocol bgp 10.0.0.80
inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 172.16.198.1/32 10.0.0.20 100 2 I
* 172.16.199.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
* 172.16.200.0/30 10.0.0.20 100 2 I
의미
이 명령은 show route receive-protocol 라우터 R4가 172.16.198.1/32 목적지에 대한 2개의 경로와 172.16.199.1/32 목적지에 대한 3개의 경로를 수신하는 것을 보여줍니다. 이 명령은 show route advertising-protocol 라우터 R4가 172.16.198.1/32 목적지에 대한 하나의 경로만 보급하고 172.16.199.1/32 목적지에 대한 3개 경로를 모두 보급하는 것을 보여줍니다.
라우터 R4에 적용되는 접두사 정책으로 인해, 라우터 R4는 172.16.198.1/32 목적지에 대한 다중 경로를 보급하지 않습니다. 라우터 R4는 이 목적지에 대한 여러 경로를 수신하더라도 172.16.198.1/32 목적지에 대한 하나의 경로만 보급합니다.
라우터 R8이 다중 경로를 수신하는지 확인
목적
라우터 R8이 라우터 R4를 통해 172.16.199.1/32 목적지에 대한 다중 경로를 수신하는지 확인합니다. 라우터 R8이 라우터 R4를 통해 172.16.198.1/32 목적지에 대한 하나의 경로만 수신하는지 확인합니다.
작업
user@R8> show route receive-protocol bgp 10.0.0.40
inet.0: 18 destinations, 20 routes (18 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 172.16.198.1/32 10.0.0.20 100 2 I
* 172.16.199.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
* 200.1.1.0/30 10.0.0.20 100 2 I
경로 ID 확인
목적
다운스트림 디바이스(라우터 R4 및 라우터 R8)에서 경로 ID가 해당 경로를 고유하게 식별하는지 확인합니다. 문자열을 Addpath Path ID: 찾습니다.
작업
user@R4> show route 172.16.199.1/32 detail
inet.0: 18 destinations, 20 routes (18 active, 0 holddown, 0 hidden)
172.16.199.1/32 (3 entries, 3 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 9
Source: 10.0.0.10
Next hop type: Router, Next hop index: 676
Next hop: 10.0.14.1 via lt-1/2/0.41, selected
Protocol next hop: 10.0.0.20
Indirect next hop: 92041c8 262146
State: <Active Int Ext>
Local AS: 1 Peer AS: 1
Age: 1:44:37 Metric2: 2
Task: BGP_1.10.0.0.10+64227
Announcement bits (3): 2-KRT 3-BGP RT Background 4-Resolve tree 1
AS path: 2 I (Originator) Cluster list: 10.0.0.10
AS path: Originator ID: 10.0.0.20
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 1
BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 4
Source: 10.0.0.10
Next hop type: Router, Next hop index: 676
Next hop: 10.0.14.1 via lt-1/2/0.41, selected
Protocol next hop: 10.0.0.30
Indirect next hop: 92042ac 262151
State: <NotBest Int Ext>
Inactive reason: Not Best in its group - Router ID
Local AS: 1 Peer AS: 1
Age: 1:44:37 Metric2: 2
Task: BGP_1.10.0.0.10+64227
Announcement bits (1): 3-BGP RT Background
AS path: 2 I (Originator) Cluster list: 10.0.0.10
AS path: Originator ID: 10.0.0.30
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 2
BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 4
Source: 10.0.0.10
Next hop type: Router, Next hop index: 676
Next hop: 10.0.14.1 via lt-1/2/0.41, selected
Protocol next hop: 10.0.15.2
Indirect next hop: 92040e4 262150
State: <Int Ext>
Inactive reason: AS path
Local AS: 1 Peer AS: 1
Age: 1:44:37 Metric2: 2
Task: BGP_1.10.0.0.10+64227
Announcement bits (1): 3-BGP RT Background
AS path: 2 2 I
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 3
user@R8> show route 172.16.199.1/32 detail
inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden)
172.16.199.1/32 (3 entries, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 9
Source: 10.0.0.40
Next hop type: Router, Next hop index: 1045
Next hop: 10.0.48.1 via lt-1/2/0.84, selected
Protocol next hop: 10.0.0.20
Indirect next hop: 91fc0e4 262148
State: <Active Int Ext>
Local AS: 1 Peer AS: 1
Age: 1:56:51 Metric2: 3
Task: BGP_1.10.0.0.40+179
Announcement bits (2): 2-KRT 4-Resolve tree 1
AS path: 2 I (Originator) Cluster list: 10.0.0.40 10.0.0.10
AS path: Originator ID: 10.0.0.20
Accepted
Localpref: 100
Router ID: 10.0.0.40
Addpath Path ID: 1
BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 4
Source: 10.0.0.40
Next hop type: Router, Next hop index: 1045
Next hop: 10.0.48.1 via lt-1/2/0.84, selected
Protocol next hop: 10.0.0.30
Indirect next hop: 91fc1c8 262152
State: <NotBest Int Ext>
Inactive reason: Not Best in its group - Router ID
Local AS: 1 Peer AS: 1
Age: 1:56:51 Metric2: 3
Task: BGP_1.10.0.0.40+179
AS path: 2 I (Originator) Cluster list: 10.0.0.40 10.0.0.10
AS path: Originator ID: 10.0.0.30
Accepted
Localpref: 100
Router ID: 10.0.0.40
Addpath Path ID: 2
BGP Preference: 170/-101
Next hop type: Indirect
Next-hop reference count: 4
Source: 10.0.0.40
Next hop type: Router, Next hop index: 1045
Next hop: 10.0.48.1 via lt-1/2/0.84, selected
Protocol next hop: 10.0.15.2
Indirect next hop: 91fc2ac 262153
State: <Int Ext>
Inactive reason: AS path
Local AS: 1 Peer AS: 1
Age: 1:56:51 Metric2: 3
Task: BGP_1.10.0.0.40+179
AS path: 2 2 I (Originator) Cluster list: 10.0.0.40
AS path: Originator ID: 10.0.0.10
Accepted
Localpref: 100
Router ID: 10.0.0.40
Addpath Path ID: 3
예: 로드 밸런싱을 위한 BGP 다중 경로의 선택적 광고 구성
이 예는 BGP 다중 경로의 선택적 광고를 구성하는 방법을 보여줍니다. 사용 가능한 모든 다중 경로를 보급하면 디바이스 메모리에 대규모 처리 오버헤드가 발생할 수 있으므로 확장도 고려합니다. 로드 밸런싱을 위해 기여자 multipath만 광고하도록 BGP 경로 리플렉터를 구성할 수 있습니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
M Series, MX 시리즈 또는 T 시리즈 라우터의 조합이 가능한 라우터 8개
-
디바이스의 Junos OS 릴리스 16.1R2 이상
개요
Junos OS 릴리스 16.1R2부터 기여자 다중 경로만 광고하도록 BGP add-path 를 제한할 수 있습니다. BGP multipath 알고리즘이 선택하는 접두사 최대 6개를 제한하고 구성할 수 있습니다. 다중 경로의 선택적 광고는 IBGP에서 경로 리플렉터를 사용하여 경로 다양성을 구축하는 인터넷 서비스 제공업체와 데이터 센터를 촉진합니다. BGP 경로 리플렉터를 활성화하여 로드 밸런싱을 위한 기여자 경로인 multipath를 보급할 수 있습니다.
토폴로지
그림 7에서 RR1과 RR4는 경로 리플렉터입니다. 라우터 R2 및 R3은 경로 리플렉터 RR1에 클라이언트입니다. 라우터 R8은 경로 리플렉터 RR4에 클라이언트입니다. 인접 라우터 R2 및 R3과 함께 RR1 그룹은 다중 경로에 대해 구성됩니다. 라우터 R5, R6 및 라우터 R7은 정적 경로 199.1.1.1/32 및 198.1.1.1/32를 BGP에 재배포합니다.
로드 밸런싱 정책은 라우터 RR1에서 구성되어 199.1.1.1/32 경로가 계산된 다중 경로가 있습니다. 다중 경로 기능은 neighbor RR4에 대한 add-path 아래에 구성됩니다. 그러나 라우터 RR4에는 구성된 로드 밸런싱 다중 경로가 없습니다. 라우터 RR1은 다중 경로 후보 경로에서 선택된 199.1.1.1/32로 연결되는 추가 경로 최대 6개를 라우터 RR4로 전송하도록 구성됩니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 commit을 입력합니다.
라우터 RR1
set interfaces ge-1/0/10 unit 0 description RR1->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.1/24 set interfaces ge-1/0/11 unit 0 description RR1->RR4 set interfaces ge-1/0/11 unit 0 family inet address 10.0.14.1/24 set interfaces ge-1/0/12 unit 0 description RR1->R5 set interfaces ge-1/0/12 unit 0 family inet address 10.0.15.1/24 set interfaces ge-1/0/13 unit 0 description RR1->R3 set interfaces ge-1/0/13 unit 0 family inet address 10.0.13.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr multipath set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 64502 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send multipath set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set protocols ospf area 0.0.0.0 interface ge-1/0/12 set policy-options prefix-list match_199 199.1.1.1/32 set policy-options policy-statement loadbal_199 term match_100 from prefix-list match_199 set policy-options policy-statement loadbal_199 from route-filter 199.1.1.1/32 exact set policy-options policy-statement loadbal_199 then load-balance per-packet set routing-options router-id 10.0.0.10 set routing-options autonomous-system 64501 set routing-options forwarding-table export loadbal_199
라우터 R2
set interfaces ge-1/0/10 unit 0 description R2->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.2/24 set interfaces ge-1/0/11 unit 0 description R2->R6 set interfaces ge-1/0/11 unit 0 family inet address 10.0.26.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.20/32 set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
라우터 R3
set interfaces ge-1/0/10 unit 0 description R3->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.13.2/24 set interfaces ge-1/0/11 unit 0 description R3->R7 set interfaces ge-1/0/11 unit 0 family inet address 10.0.37.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
라우터 RR4
set interfaces ge-1/0/10 unit 0 description RR4->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.14.2/24 set interfaces ge-1/0/11 unit 0 description RR4->R8 set interfaces ge-1/0/11 unit 0 family inet address 10.0.48.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 2 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send multipath set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options prefix-list match_199 199.1.1.1/32 set routing-options autonomous-system 64501
라우터 R5
set interfaces ge-1/0/10 unit 0 description R5->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.15.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R6
set interfaces ge-1/0/10 unit 0 description R6->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.26.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R7
set interfaces ge-1/0/10 unit 0 description R7->R3 set interfaces ge-1/0/10 unit 0 family inet address 10.0.37.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R8
set interfaces ge-1/0/10 unit 0 description R8->RR4 set interfaces ge-1/0/10 unit 0 family inet address 10.0.48.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10.8 set routing-options autonomous-system 64501 set chassis fpc 1 pic 0 tunnel-services bandwidth 1g
라우터 RR1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 RR1을 구성하려면 다음을 수행합니다.
적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 다른 라우터에 이 절차를 반복합니다.
-
IPv4 주소로 인터페이스를 구성합니다.
[edit interfaces] user@RR1# set ge-1/0/10 unit 0 description RR1->R2 user@RR1# set ge-1/0/10 unit 0 family inet address 10.0.12.1/24 user@RR1# set ge-1/0/11 unit 0 description RR1->RR4 user@RR1# set ge-1/0/11 unit 0 family inet address 10.0.14.1/24 user@RR1# set ge-1/0/12 unit 0 description RR1->R5 user@RR1# set ge-1/0/12 unit 0 family inet address 10.0.15.1/24 user@RR1# set ge-1/0/13 unit 0 description RR1->R3 user@RR1# set ge-1/0/13 unit 0 family inet address 10.0.13.1/24
-
루프백 주소를 구성합니다.
[edit interfaces] user@RR1# set lo0 unit 0 family inet address 10.0.0.10/32
-
OSPF 또는 IS-IS와 같은 내부 게이트웨이 프로토콜(IGP)을 구성합니다.
[edit protocols] user@RR1# set ospf area 0.0.0.0 interface lo0.10 passive user@RR1# set ospf area 0.0.0.0 interface ge-1/0/10 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/13 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/11 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/12
-
내부 라우터 R2 및 R3에 연결된 인터페이스를 위한 내부 그룹 rr을 구성합니다.
[edit protocols] user@RR1# set bgp group rr type internal user@RR1# set bgp group rr local-address 10.0.0.10 user@RR1# set bgp group rr cluster 10.0.0.10 user@RR1# set bgp group rr neighbor 10.0.0.20 user@RR1# set bgp group rr neighbor 10.0.0.30
-
내부 BGP 그룹 rr에 대한 로드 밸런싱을 구성합니다.
[edit protocols] user@RR1# set bgp group rr multipath
-
경로 리플렉터에 대한 내부 그룹 rr_rr 구성합니다.
[edit protocols] user@RR1# set bgp group rr_rr type internal user@RR1# set bgp group rr_rr local-address 10.0.0.10
-
addpath 다중 경로 기능을 구성하여 기여자 다중 경로만 광고하고 광고되는 다중 경로의 수를 6개로 제한합니다.
[edit protocols] user@RR1# set bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send multipath user@RR1# set bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6
-
외부 에지 라우터에 연결된 인터페이스에서 EBGP를 구성합니다.
[edit protocols] user@RR1# set bgp group e1 type external user@RR1# set bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 user@RR1# set bgp group e1 neighbor 10.0.15.2 peer-as 64502
-
패킷 로드 밸런싱당 정책 loadbal_199 정의합니다.
[edit policy-options] user@RR1# set prefix-list match_199 199.1.1.1/32 user@RR1# set policy-statement loadbal_199 term match_100 from prefix-list match_199 user@RR1# set policy-statement loadbal_199 from route-filter 199.1.1.1/32 exact user@RR1# set policy-statement loadbal_199 then load-balance per-packet
-
정의된 내보내기 정책 loadbal_199 적용합니다.
[edit routing-options] user@RR1# set forwarding-table export loadbal_199
-
BGP 호스트에 대한 라우터 ID 및 AS(Autonomous System)를 구성합니다.
[edit routing-options] user@RR1# set router-id 10.0.0.10 user@RR1# set autonomous-system 64501
결과
구성 모드에서 , show protocols, show routing-options및 show policy-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit]
user@RR1# show interfaces
ge-1/0/10 {
unit 0 {
description RR1->R2;
family inet {
address 10.0.12.1/24;
}
}
}
ge-1/0/11 {
unit 0 {
description RR1->RR4;
family inet {
address 10.0.14.1/24;
}
}
}
ge-1/0/12 {
unit 0 {
description RR1->R5;
family inet {
address 10.0.15.1/24;
}
}
}
ge-1/0/13 {
unit 0 {
description RR1->R3;
family inet {
address 10.0.13.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.0.10/32;
}
}
}
[edit]
user@RR1# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.10;
cluster 10.0.0.10;
multipath;
neighbor 10.0.0.20;
neighbor 10.0.0.30;
}
group e1 {
type external;
neighbor 10.0.15.2 {
local-address 10.0.15.1;
peer-as 64502;
}
}
group rr_rr {
type internal;
local-address 10.0.0.10;
neighbor 10.0.0.40 {
family inet {
unicast {
add-path {
send {
path-count 6;
multipath;
}
}
}
}
}
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.10 {
passive;
}
interface ge-1/0/10;
interface ge-1/0/13;
interface ge-1/0/11;
interface ge-1/0/12;
}
}
[edit]
user@RR1# show routing-options
router-id 10.0.0.10;
autonomous-system 64501;
forwarding-table {
export load-bal_199;
}
[edit]
user@RR1# show policy-options
prefix-list match_199 {
199.1.1.1/32;
}
policy-statement loadbal_199 {
term match_100 {
from {
prefix-list match_199;
}
}
from {
route-filter 199.1.1.1/32 exact;
}
then {
load-balance per-packet;
}
}
디바이스 구성을 완료하면 구성을 커밋합니다.
user@RR1# commit
검증
구성이 제대로 작동하고 있는지 확인합니다.
- 정적 경로 199.1.1.1/32에 대한 다중 경로 확인
- 라우터 RR1에서 라우터 RR4로 보급되는 다중 경로 경로 확인
- 라우터 RR4가 라우터 R8에 199.1.1.1/32를 위한 하나의 경로를 광고하는지 확인
정적 경로 199.1.1.1/32에 대한 다중 경로 확인
목적
목적지 199.1.1.1/32에 대한 사용 가능한 다중 경로 경로를 확인합니다.
작업
운영 모드의 라우터 RR1에서 명령을 실행합니다 show route 199.1.1.1/32 detail .
user@RR1> show route 199.1.1.1/32 detail
inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden)
199.1.1.1/32 (3 entries, 2 announced)
*BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xae5cc90
Next-hop reference count: 1
Source: 10.0.0.20
Next hop type: Router, Next hop index: 1118
Next hop: 10.0.12.2 via lt-1/0/10.1, selected
Session Id: 0x0
Next hop type: Router, Next hop index: 1115
Next hop: 10.0.13.2 via lt-1/0/10.9
Session Id: 0x0
Protocol next hop: 10.0.0.20
Indirect next hop: 0xc409410 1048574 INH Session ID: 0x0
Protocol next hop: 10.0.0.30
Indirect next hop: 0xc409520 1048575 INH Session ID: 0x0
State: <Active Int Ext>
Local AS: 1 Peer AS: 1
Age: 4:03:29 Metric2: 1
Validation State: unverified
Task: BGP_1.10.0.0.20
Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 2
AS path: 2 I
Communities: 4713:100
Accepted Multipath
Localpref: 100
Router ID: 10.0.0.20
BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xae0ec10
Next-hop reference count: 4
Source: 10.0.0.30
Next hop type: Router, Next hop index: 1115
Next hop: 10.0.13.2 via lt-1/0/10.9, selected
Session Id: 0x0
Protocol next hop: 10.0.0.30
Indirect next hop: 0xc409520 1048575 INH Session ID: 0x0
State: <NotBest Int Ext>
Inactive reason: Not Best in its group - Router ID
Local AS: 64501 Peer AS: 64501
Age: 4:03:29 Metric2: 1
Validation State: unverified
Task: BGP_1.10.0.0.30
Announcement bits (1): 3-BGP_RT_Background
AS path: 2 I
Communities: 4713:100
Accepted MultipathContrib
Localpref: 100
Router ID: 10.0.0.30
BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1105
Address: 0xae0e970
Next-hop reference count: 5
Source: 10.0.15.2
Next hop: 10.0.15.2 via lt-1/0/10.6, selected
Session Id: 0x0
State: <Ext>
Inactive reason: AS path
Local AS: 1 Peer AS: 2
Age: 4:05:01
Validation State: unverified
Task: BGP_2.10.0.15.2
AS path: 2 2 I
Communities: 4713:100
Accepted
Localpref: 100
Router ID: 10.0.0.50
의미
선택적 광고 다중 경로 기능은 라우터 RR1에서 활성화되고 경로 199.1.1.1/32에 사용할 수 있는 다음 홉이 두 개 이상 있습니다. 경로 199.1.1.1/32에 사용 가능한 다음 홉 두 개는 10.0.0.20 및 10.0.0.30입니다.
라우터 RR1에서 라우터 RR4로 보급되는 다중 경로 경로 확인
목적
라우터 RR1이 다중 경로 경로를 광고하는지 확인합니다.
작업
운영 모드의 라우터 RR1에서 명령을 실행합니다 show route advertising-protocol bgp 10.0.0.40 .
user@RR1> show route advertising-protocol bgp 10.0.0.40
inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 198.1.1.1/32 10.0.0.20 100 2 I
* 199.1.1.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
user@RR1> show route advertising-protocol bgp 10.0.0.40 detail
inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden)
* 10.0.0.50/32 (1 entry, 1 announced)
BGP group rr_rr type Internal
Nexthop: 10.0.15.2
Localpref: 100
AS path: [1] 2 2 I
Communities: 4713:100
Addpath Path ID: 1
….* 199.1.1.1/32 (3 entries, 2 announced)
BGP group rr_rr type Internal
Nexthop: 10.0.0.20
Localpref: 100
AS path: [1] 2 I
Communities: 4713:100
Cluster ID: 10.0.0.10
Originator ID: 10.0.0.20
Addpath Path ID: 1
BGP group rr_rr type Internal
Nexthop: 10.0.0.30
Localpref: 100
AS path: [1] 2 I
Communities: 4713:100
Cluster ID: 10.0.0.10
Originator ID: 10.0.0.30
Addpath Path ID: 2
의미
라우터 RR1은 라우터 RR4에 경로 199.1.1.1/32에 대한 두 가지 다음 홉 10.0.0.20 및 10.0.0.30을 광고합니다.
라우터 RR4가 라우터 R8에 199.1.1.1/32를 위한 하나의 경로를 광고하는지 확인
목적
Multipath가 라우터 RR4에 구성되지 않으므로 경로 199.1.1.1/32는 add-path 자격이 없습니다. 라우터 RR4가 라우터 R8에 199.1.1.1/32를 위한 하나의 경로만 광고하는지 확인합니다.
작업
운영 모드에서 라우터 RR4에 명령을 실행합니다 show route advertising-protocol bgp 10.0.0.80 .
user@RR4> show route advertising-protocol bgp 10.0.0.80 detail
inet.0: 20 destinations, 21 routes (20 active, 0 holddown, 0 hidden)
* 10.0.0.50/32 (1 entry, 1 announced)
BGP group rr_client type Internal
Nexthop: 10.0.15.2
Localpref: 100
AS path: [1] 2 2 I
Communities: 4713:100
Cluster ID: 10.0.0.40
Originator ID: 10.0.0.10
Addpath Path ID: 1
…
* 198.1.1.1/32 (1 entry, 1 announced)
BGP group rr_client type Internal
Nexthop: 10.0.0.20
Localpref: 100
AS path: [1] 2 I (Originator)
Cluster list: 10.0.0.10
Originator ID: 10.0.0.20
Communities: 4713:100
Cluster ID: 10.0.0.40
Addpath Path ID: 1
* 199.1.1.1/32 (2 entries, 1 announced)
BGP group rr_client type Internal
Nexthop: 10.0.0.20
Localpref: 100
AS path: [1] 2 I (Originator)
Cluster list: 10.0.0.10
Originator ID: 10.0.0.20
Communities: 4713:100
Cluster ID: 10.0.0.40
Addpath Path ID: 1
의미
라우터 RR4에서 다중 경로가 활성화되지 않으므로 라우터 R8에는 단 하나의 경로 10.0.0.20만 보급됩니다.
예: BGP Community 값을 기반으로 Multipath를 선택 및 보급하는 라우팅 정책 구성
사용 가능한 모든 다중 경로를 보급하면 디바이스 메모리에서 대규모 처리 오버헤드가 발생할 수 있습니다. 접두사를 실제로 미리 알지 못한 상태에서 제한된 접두사 하위 집합을 보급하려는 경우, BGP community 값을 사용하여 BGP 인접 라우터에 보급해야 하는 접두사 경로를 식별할 수 있습니다. 이 예는 알려진 BGP community 값을 기반으로 여러 경로를 필터링하고 보급하는 라우팅 정책을 정의하는 방법을 보여줍니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
M Series, MX 시리즈 또는 T 시리즈 라우터의 조합이 가능한 라우터 8개
-
디바이스의 Junos OS 릴리스 16.1R2 이상
개요
Junos OS 16.1R2부터는 community 값을 기반으로 적격한 다중 경로 접두사를 식별하는 정책을 정의할 수 있습니다. BGP는 지정된 목적지에 대한 활성 경로와 함께 이러한 커뮤니티 태그가 지정된 경로를 보급합니다. 경로의 community 값이 정책에 정의된 community 값과 일치하지 않으면 BGP는 해당 경로를 보급하지 않습니다. 이 기능을 통해 BGP는 지정된 목적지에 20개 이상의 경로를 보급할 수 있습니다. 접두사를 실제로 미리 알지 못한 상태에서 BGP가 여러 경로에 대해 고려하는 접두사 수를 제한하고 구성할 수 있습니다. 대신 알려진 BGP community 값이 접두사 보급 여부를 결정합니다.
토폴로지
그림 8에서 RR1과 RR4는 경로 리플렉터입니다. 라우터 R2 및 R3은 경로 리플렉터 RR1에 클라이언트입니다. 라우터 R8은 경로 리플렉터 RR4에 클라이언트입니다. 라우터 R5, R6, 라우터 R7은 정적 경로를 BGP에 재배포합니다. 라우터 R5는 community 값이 4713:100인 정적 경로 199.1.1.1/32 및 198.1.1.1/32를 보급합니다.
라우터 RR1은 라우터 RR4에 목적지당 최대 6개의 경로를 보내도록 구성됩니다. 라우터 RR4는 라우터 R8에 최대 6개의 경로를 보내도록 구성됩니다. 라우터 R8은 라우터 RR4에서 여러 경로를 수신하도록 구성됩니다. add-path community 구성은 라우터 RR4가 4713:100 community 값만 포함하는 경로에 대해 여러 경로를 보내도록 제한합니다. 라우터 RR4는 4714:100 community 값만 포함하는 multipath를 필터링하고 보급합니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 commit을 입력합니다.
라우터 RR1
set interfaces ge-1/0/10 unit 0 description RR1->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.1/24 set interfaces ge-1/0/11 unit 0 description RR1->RR4 set interfaces ge-1/0/11 unit 0 family inet address 10.0.14.1/24 set interfaces ge-1/0/12 unit 0 description RR1->R5 set interfaces ge-1/0/12 unit 0 family inet address 10.0.15.1/24 set interfaces ge-1/0/13 unit 0 description RR1->R3 set interfaces ge-1/0/13 unit 0 family inet address 10.0.13.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr multipath set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 64502 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set protocols ospf area 0.0.0.0 interface ge-1/0/12 set routing-options router-id 10.0.0.10 set routing-options autonomous-system 64501
라우터 R2
set interfaces ge-1/0/10 unit 0 description R2->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.2/24 set interfaces ge-1/0/11 unit 0 description R2->R6 set interfaces ge-1/0/11 unit 0 family inet address 10.0.26.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.20/32 set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
라우터 R3
set interfaces ge-1/0/10 unit 0 description R3->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.13.2/24 set interfaces ge-1/0/11 unit 0 description R3->R7 set interfaces ge-1/0/11 unit 0 family inet address 10.0.37.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
라우터 RR4
set interfaces ge-1/0/10 unit 0 description RR4->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.14.2/24 set interfaces ge-1/0/11 unit 0 description RR4->R8 set interfaces ge-1/0/11 unit 0 family inet address 10.0.48.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options community addpath-communities-send members 4713:100 set policy-options policy-statement addpath-communities-send-4713-100 term term1 from protocol bgp set policy-options policy-statement addpath-communities-send-4713-100 term term1 from community addpath-communities-send set policy-options policy-statement addpath-communities-send-4713-100 term term1 then add-path send-count 16 set policy-options policy-statement addpath-communities-send-4713-100 term term1 then accept set routing-options autonomous-system 64501
라우터 R5
set interfaces ge-1/0/10 unit 0 description R5->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.15.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R6
set interfaces ge-1/0/10 unit 0 description R6->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.26.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R7
set interfaces ge-1/0/10 unit 0 description R7->R3 set interfaces ge-1/0/10 unit 0 family inet address 10.0.37.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options autonomous-system 64502
라우터 R8
set interfaces ge-1/0/10 unit 0 description R8->RR4 set interfaces ge-1/0/10 unit 0 family inet address 10.0.48.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10.8 set routing-options autonomous-system 64501 set chassis fpc 1 pic 0 tunnel-services bandwidth 1g
라우터 RR4 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 RR4를 구성하려면 다음을 수행합니다.
적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 다른 라우터에 이 절차를 반복합니다.
-
IPv4 주소로 인터페이스를 구성합니다.
[edit interfaces] user@RR4# set ge-1/0/10 unit 0 description RR4->RR1 user@RR4# set ge-1/0/10 unit 0 family inet address 10.0.14.2/24 user@RR4# set ge-1/0/11 unit 0 description RR4->R8 user@RR4# set ge-1/0/11 unit 0 family inet address 10.0.48.1/24
-
루프백 주소를 구성합니다.
[edit interfaces] user@RR4# set lo0 unit 0 family inet address 10.0.0.40/32
-
OSPF 또는 기타 내부 게이트웨이 프로토콜(IGP)을 구성합니다.
[edit protocols] user@RR4# set ospf area 0.0.0.0 interface lo0.40 passive user@RR4# set ospf area 0.0.0.0 interface ge-1/0/10 user@RR4# set ospf area 0.0.0.0 interface ge-1/0/11
-
경로 리플렉터에 대해 2개의 IBGP 그룹 rr, 경로 리플렉터 클라이언트에 대해 rr_client를 구성합니다.
[edit protocols] user@RR4# set bgp group rr type internal user@RR4# set bgp group rr local-address 10.0.0.40 user@RR4# set bgp group rr family inet unicast add-path receive user@RR4# set bgp group rr neighbor 10.0.0.10 user@RR4# set bgp group rr_client type internal user@RR4# set bgp group rr_client local-address 10.0.0.40 user@RR4# set bgp group rr_client cluster 10.0.0.40
-
4713:100 community 값만 포함하는 다중 경로를 전송하고 보급된 multipath 수를 6으로 제한하도록 기능을 구성합니다.
[edit protocols] user@RR4# set bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 user@RR4# set bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6
-
커뮤니티 값 4713:100으로 접두사를 필터링하는 정책을
addpath-community-members 4713:100정의하고 디바이스가 라우터 R8에 최대 16개의 경로를 보내도록 제한합니다. 이 제한은 BGP 그룹 계층 수준에서 이전에 구성된 add-path send path-count 6보다 우선합니다.[edit policy-options] user@RR4# set community addpath-communities-send members 4713:100 user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 from protocol bgp user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 from community addpath-communities-send user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 then add-path send-count 16 user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 then accept
-
BGP 호스트에 대한 라우터 ID 및 AS(Autonomous System)를 구성합니다.
[edit routing-options] user@RR4# set router-id 10.0.0.40 user@RR4# set autonomous-system 64501
결과
구성 모드에서 , show protocols, show routing-options및 show policy-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit]
user@RR4# show interfaces
ge-1/0/10 {
unit 0 {
description RR4->RR1;
family inet {
address 10.0.14.2/24;
}
}
}
ge-1/0/11 {
unit 0 {
description RR4->R8;
family inet {
address 10.0.48.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.0.10/32;
}
}
}
[edit]
user@RR4# show protocols
bgp {
group rr {
type internal;
local-address 10.0.0.40;
family inet {
unicast {
add-path {
receive;
}
}
}
neighbor 10.0.0.10;
}
group rr_client {
type internal;
local-address 10.0.0.40;
cluster 10.0.0.40;
neighbor 10.0.0.80 {
family inet {
unicast {
add-path {
send {
prefix-policy addpath-communities-send-4713-100;
path-count 6;
}
}
}
}
}
}
}
ospf {
area 0.0.0.0 {
interface ge-1/0/10.0;
interface lo0.40 {
passive;
}
interface ge-1/0/11.0;
}
}
[edit]
user@RR4# show policy-options
policy-statement addpath-communities-send-4713-100 {
term term1 {
from {
protocol bgp;
community addpath-communities-send;
}
then {
add-path send-count 16;
accept;
}
}
}
community addpath-communities-send members 4713:100;
[edit] user@RR4# show routing-options router-id 10.0.0.40; autonomous-system 64501;
디바이스 구성을 완료하면 구성을 커밋합니다.
user@RR4# commit
검증
구성이 제대로 작동하고 있는지 확인합니다.
- 라우터 RR4에서 라우터 R8로 보급되는 Multipath 경로 확인
- 라우터 R8이 라우터 RR4가 보급하는 multipath 경로를 수신하는지 확인
- 라우터 RR4가 community 값 4713:100으로 라우터 R8에 Multipath 경로만 보급하는지 확인
라우터 RR4에서 라우터 R8로 보급되는 Multipath 경로 확인
목적
라우터 RR4가 라우터 R8에 여러 경로를 보낼 수 있는지 확인합니다.
작업
운영 모드에서 라우터 RR4에 명령을 실행합니다 show route advertising-protocol bgp neighbor-address .
user@RR4> show route advertising-protocol bgp 10.0.0.80
inet.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 198.1.1.1/32 10.0.0.20 100 2 I
10.0.15.2 100 2 2 I
* 199.1.1.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
의미
라우터 RR4는 라우터 R8에 다중 경로 10.0.0.20, 10.0.0.30 및 10.0.15.2를 보급합니다.
라우터 R8이 라우터 RR4가 보급하는 multipath 경로를 수신하는지 확인
목적
라우터 R8이 라우터 RR4에서 다중 경로 경로를 수신하고 있는지 확인합니다.
작업
운영 모드의 라우터 R8에서 명령을 실행합니다 show route receive-protocol bgp neighbor-address .
user@R8> show route receive-protocol bgp 10.0.0.40
inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 10.0.0.50/32 10.0.15.2 100 2 2 I
* 10.0.0.60/32 10.0.0.20 100 2 I
* 10.0.0.70/32 10.0.0.30 100 2 I
* 198.1.1.1/32 10.0.0.20 100 2 I
10.0.15.2 100 2 2 I
* 199.1.1.1/32 10.0.0.20 100 2 I
10.0.0.30 100 2 I
10.0.15.2 100 2 2 I
의미
라우터 R8은 라우터 RR4에서 경로 199.1.1.1/32에 대해 여러 개의 다음 홉 10.0.0.20, 10.0.0.30, 10.0.15.2를 수신하고 있습니다.
라우터 RR4가 community 값 4713:100으로 라우터 R8에 Multipath 경로만 보급하는지 확인
목적
라우터 RR4는 community 값이 4713:100인 다중 경로 경로만 라우터 R8에 보급해야 합니다.
작업
운영 모드에서 라우터 RR4에 명령을 실행합니다 show route 199.1.1.1/32 detail .
user@RR4> show route 199.1.1.1/32 detail
inet.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)
199.1.1.1/32 (3 entries, 3 announced)
*BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xae0ea90
Next-hop reference count: 6
Source: 10.0.0.10
Next hop type: Router, Next hop index: 1115
Next hop: 10.0.14.1 via ge-1/0/10.4, selected
Session Id: 0x0
Protocol next hop: 10.0.0.20
Indirect next hop: 0xc4091f0 1048581 INH Session ID: 0x0
State: <Active Int Ext>
Local AS: 1 Peer AS: 1
Age: 4d 20:56:53 Metric2: 2
Validation State: unverified
Task: BGP_1.10.0.0.10
Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 2
AS path: 2 I (Originator)
Cluster list: 10.0.0.10
Originator ID: 10.0.0.20
Communities: 4713:100
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 1
BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xae0eb50
Next-hop reference count: 3
Source: 10.0.0.10
Next hop type: Router, Next hop index: 1115
Next hop: 10.0.14.1 via lt-1/0/10.4, selected
Session Id: 0x0
Protocol next hop: 10.0.0.30
Indirect next hop: 0xc409300 1048582 INH Session ID: 0x0
State: <NotBest Int Ext>
Inactive reason: Not Best in its group - Router ID
Local AS: 1 Peer AS: 1
Age: 4d 20:56:53 Metric2: 2
Validation State: unverified
Task: BGP_1.10.0.0.10
Announcement bits (1): 3-BGP_RT_Background
AS path: 2 I (Originator)
Cluster list: 10.0.0.10
Originator ID: 10.0.0.30
Communities: 4713:100
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 2
BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xae0e9d0
Next-hop reference count: 4
Source: 10.0.0.10
Next hop type: Router, Next hop index: 1115
Next hop: 10.0.14.1 via lt-1/0/10.4, selected
Session Id: 0x0
Protocol next hop: 10.0.15.2
Indirect next hop: 0xc4090e0 1048580 INH Session ID: 0x0
State: <Int Ext>
Inactive reason: AS path
Local AS: 1 Peer AS: 1
Age: 4d 20:56:53 Metric2: 2
Validation State: unverified
Task: BGP_1.10.0.0.10
Announcement bits (1): 3-BGP_RT_Background
AS path: 2 2 I
Communities: 4713:100
Accepted
Localpref: 100
Router ID: 10.0.0.10
Addpath Path ID: 3
의미
라우터 RR4는 community 값이 4713:100인 3개의 경로를 라우터 R8에 보급합니다.
BGP multipath에 대한 재귀적 해결 구성
Junos OS 릴리스 17.3R1부터는 단일 프로토콜 다음 홉이 있는 BGP 접두사가 여러 해결된 경로가 있는 다른 BGP 접두사를 통해 해결되면(unilist), 프로토콜 다음 홉 해결을 위해 모든 경로가 선택됩니다. 이전 Junos OS 릴리스에서는 리졸버가 IBGP 다중 경로 라우팅의 모든 경로에서 로드 밸런싱을 지원하지 않았기 때문에 프로토콜 다음 홉 해결을 위해 경로 중 하나만 다중 경로가 선택되었습니다. 라우팅 프로토콜 프로세스(rpd)의 리졸버는 프로토콜 다음 홉 주소(PNH)를 바로 포워딩 다음 홉으로 해결합니다. BGP 재귀적 해결 기능은 리졸버를 향상시켜 IBGP 다중 경로 경로를 통해 경로를 해결하고 실행 가능한 모든 경로를 다음 홉으로 사용할 수 있도록 해줍니다. 이 기능은 높은 equal-cost 다중 경로 및 원활한 MPLS 토폴로지를 통해 WAN 네트워크와 같은 인프라 연결을 설정하는 데 BGP를 사용하는 밀집 연결 네트워크에 유용합니다.
BGP 다중 경로의 재귀적 해결을 구성하기 전에 다음을 수행해야 합니다.
디바이스 인터페이스를 구성합니다.
OSPF 또는 기타 IGP 프로토콜을 구성합니다.
MPLS 및 LDP를 구성합니다.
BGP를 구성합니다.
다중 경로에 대한 재귀적 해결을 구성하려면,
또한보십시오
로드 밸런싱을 위해 RSVP 및 LDP LSP에 ECMP 다음 홉 구성
Junos OS는 RSVP 및 LDP LSP에 대해 16개, 32개, 64개 또는 128개의 ECMP(Equal-cost 다중 경로) 다음 홉 구성을 지원합니다. 대용량 트래픽이 있는 네트워크의 경우, 이를 통해 최대 128개의 LSP에 걸쳐 트래픽을 로드 밸런싱할 수 있는 유연성이 향상됩니다.
ECMP 다음 홉에 대한 최대 제한을 구성하려면 계층 수준에서 [edit chassis] 문을 포함 maximum-ecmp next-hops 합니다.
[edit chassis] maximum-ecmp next-hops;
이 문을 사용하여 최대 ECMP 다음 홉 제한을 16개, 32개, 64개 또는 128개로 구성할 수 있습니다. 기본 제한은 16개입니다.
하나 이상의 MPC(Modular Port Concentrator) 카드가 장착되어 있고 Junos OS 11.4 이하가 설치된 MX 시리즈 라우터는 다음 홉이 16개인 문 구성 maximum-ecmp 만 지원합니다. 다음 홉이 maximum-ecmp 32개 또는 64개인 문을 구성해서는 안 됩니다. 다음 홉이 32개 또는 64개인 구성을 커밋하면 다음과 같은 경고 메시지가 나타납니다.
Error: Number of members in Unilist NH exceeds the maximum supported 16 on Trio.
다음 유형의 경로는 최대 128개의 ECMP 게이트웨이에 대해 ECMP 최대 다음 홉 구성을 지원합니다.
-
직접 및 간접 다음 홉 ECMP를 사용하는 정적 IPv4 및 IPv6 경로
-
연결된 IGP 경로를 통해 학습된 LDP 수신 및 전송 경로
-
LSP에 대해 생성된 RSVP ECMP 다음 홉
-
OSPF IPv4 및 IPv6 경로 ECMP
-
IS-IS IPv4 및 IPv6 경로 ECMP
-
EBGP IPv4 및 IPv6 경로 ECMP
-
IBGP(IGP 경로를 통해 확인) IPv4 및 IPv6 경로 ECMP
최대 128개의 ECMP 다음 홉의 향상된 ECMP 제한은 MPLS 경로를 통해 확인되는 레이어 3 VPN, 레이어 2 VPN, 레이어 2 회로 및 VPLS 서비스에도 적용됩니다. MPLS 경로에서 사용 가능한 ECMP 경로도 이러한 트래픽에서 사용될 수 있기 때문입니다.
RSVP LSP가 대역폭 할당으로 구성된 경우, LSP가 16개 이상인 ECMP 다음 홉의 경우 구성된 대역폭을 기반으로 트래픽이 최적으로 분산되지 않습니다. 할당된 대역폭이 더 적은 일부 LSP는 더 높은 대역폭으로 구성된 LSP보다 더 많은 트래픽을 수신합니다. 트래픽 분배는 구성된 대역폭 할당을 엄격하게 준수하지는 않습니다. 이 주의 사항은 다음 라우터에 적용됩니다.
-
MPC를 제외한 모든 유형의 FPC 및 DPC를 갖춘 MX 시리즈 라우터. 이 주의 사항은 Junos Trio 칩셋 기반의 라인 카드가 있는 MX 시리즈 라우터에는 적용되지 않습니다 .
ECMP 다음 홉에 대한 자세한 내용을 보려면 명령을 실행합니다.show route 또한 show route summary command 최대 ECMP 제한에 대한 현재 구성을 보여줍니다. ECMP LDP 경로에 대한 자세한 내용을 보려면 명령을 실행합니다.traceroute mpls ldp
또한보십시오
ECMP 그룹에 대한 일관된 로드 밸런싱 구성
패킷별 로드 밸런싱을 사용하면 여러 equal-cost 경로로 트래픽을 분산시킬 수 있습니다. 기본적으로 하나 이상의 경로에 장애가 발생하면 해싱 알고리즘이 모든 경로에 대한 다음 홉을 다시 계산하여 일반적으로 모든 흐름이 재배포됩니다. 일관된 로드 밸런싱을 사용하면 이 동작을 재정의하여 비활성 링크에 대한 플로우만 리디렉션되도록 할 수 있습니다. 기존의 모든 활성 플로우는 중단 없이 유지됩니다. 데이터 센터 환경에서 링크가 실패할 때 모든 플로우를 재분배하면 링크가 활성 상태로 유지되는 서버에 대한 트래픽 손실 또는 서비스 손실이 발생할 수 있습니다. 일관된 로드 밸런싱은 모든 활성 링크를 유지하고 대신 하나 이상의 링크 장애의 영향을 받는 흐름만 다시 매핑합니다. 이 기능을 사용하면 활성 상태로 유지되는 링크에 연결된 흐름이 중단되지 않고 계속됩니다.
이 기능은 ECMP(Equal-Cost 다중 경로) 그룹의 구성원이 단일 홉 BGP 세션에서 외부 BGP neighbor인 토폴로지에 적용됩니다. 새 ECMP 경로를 추가하거나 기존 경로를 수정할 때 일관된 로드 밸런싱은 적용되지 않습니다. 중단을 최소화하면서 새 경로를 추가하려면 기존 경로를 수정하지 않고 새 ECMP 그룹을 정의하십시오. 이러한 방식으로 클라이언트는 기존 연결을 종료하지 않고 점차적으로 새 그룹으로 이동할 수 있습니다.
(MX 시리즈에서) MPC(Modular Port Concentrator)만 지원됩니다.
IPv4 및 IPv6 경로가 모두 지원됩니다.
VRF(Virtual Routing and Forwarding) 인스턴스 또는 다른 라우팅 인스턴스의 일부인 ECMP 그룹도 지원됩니다.
멀티캐스트 트래픽은 지원되지 않습니다.
집계된 인터페이스는 지원되지만 LAG(Link Aggregation Group) 번들의 구성원 간에 일관된 로드 밸런싱은 지원되지 않습니다. 하나 이상의 멤버 링크가 실패할 경우 LAG 번들의 활성 멤버에서 전송된 트래픽이 다른 활성 멤버로 이동될 수 있습니다. 하나 이상의 LAG 멤버 링크에 장애가 발생하면 플로우가 다시 해시됩니다.
라우터 또는 스위치당 최대 1,000개의 IP 접두사에 일관된 로드 밸런싱을 적용하는 것이 좋습니다.
통합 라우팅 및 브리징(IRB) 인터페이스를 통한 레이어 3 인접이 지원됩니다.
BGP add-path 기능을 구성하여 ECMP 그룹에서 하나 이상의 경로가 실패할 때 장애가 발생한 경로를 새 활성 경로로 교체할 수 있습니다. 실패한 경로의 교체를 구성하면 실패한 경로의 트래픽 플로우만 리디렉션됩니다. 활성 경로의 트래픽 플로우는 변경되지 않은 상태로 유지됩니다.
GRE(Generic routing 캡슐화) 터널 인터페이스에 일관된 로드 밸런싱 구성하는 경우 GRE 터널 인터페이스를 통한 레이어 3 인접이 포워딩 테이블에 올바르게 설치되도록 원단 GRE 인터페이스의 inet 주소를 지정해야 합니다. 그러나 일관된 로드 밸런싱 중에는 GRE 터널 인터페이스를 통한 ECMP FRR(ECMP Fast Reroute)이 지원되지 않습니다. 계층 수준에서
[edit interfaces interface name unit unit name family inet address address]일관된 로드 밸런싱으로 구성된 라우터에서 목적지 주소를 지정할 수 있습니다. 예를 들면 다음과 같습니다.[edit interfaces] user@host# set interfaces gr-4/0/0 unit 21 family inet address 10.10.31.2/32 destination 10.10.31.1
일반 라우팅 캡슐화에 대한 자세한 내용은 일반 라우팅 캡슐화 터널링 구성을 참조하십시오.
일관된 로드 밸런싱은 EBGP 인접 라우터에 대한 BGP 멀티홉을 지원하지 않습니다. 따라서 일관된 로드 밸런싱으로 구성된 디바이스에서 옵션을
multihop활성화하지 마십시오.
ECMP 그룹에 대해 일관된 로드 밸런싱을 구성하려면:
여러 ECMP BGP 피어를 사용하여 네트워크 복원력 향상
개요
ECMP(Equal-cost 다중 경로)는 동일한 세션 또는 플로우의 트래픽이 동일한 비용의 여러 경로를 통해 전송되도록 허용하는 네트워크 라우팅 전략입니다. 플로우는 소스와 대상이 동일한 트래픽입니다. ECMP 프로세스는 플로우의 대상을 향해 합법적인 equal-cost 다음 홉인 라우터를 식별합니다. 그런 다음 디바이스는 로드 밸런싱을 사용하여 이러한 여러 개의 동일 비용 다음 홉에 트래픽을 균등하게 분산합니다. ECMP는 네트워크 관리자가 트래픽의 부하를 분산하고 동일한 대상에 대한 링크에서 사용되지 않는 대역폭을 최대한 활용하여 대역폭을 늘릴 수 있도록 하는 메커니즘입니다.
BGP와 함께 ECMP를 자주 사용합니다. 각 BGP 경로에는 여러 개의 ECMP 다음 홉이 있을 수 있습니다. BGP 내보내기 정책은 BGP 경로를 이러한 다음 홉에 보급할지 여부를 결정합니다. 네트워크 관리자는 이러한 ECMP 피어와 주고받는 BGP 접두사의 보급 및 철회를 제어할 수 있습니다. BGP 내보내기 정책은 정책이 접두사를 수신하는 ECMP BGP 피어 수를 기반으로 BGP 접두사를 보급할지 여부를 결정합니다.
최소 수의 ECMP BGP 피어로부터 BGP 경로 접두사를 수신하지 않는 한 BGP 경로를 철회하도록 BGP 내보내기 정책을 구성할 수 있습니다. BGP 경로에 여러 ECMP BGP 피어가 있어야 하면 링크 장애 시 복원력이 향상됩니다.
이점
-
네트워크 복원력 향상
-
우발적인 링크 오버로드 방지
-
로드 밸런싱 지원
구성
BGP 내보내기 정책은 BGP 경로에 대한 ECMP 다음 홉의 수를 다음 계층 중 하나에서 문으로 from nexthop-ecmp 구성한 값과 비교합니다. [edit policy-options policy-statement policy-name] [edit policy-options policy-statement policy-name term term-name]
이 명령문의 옵션은 다음과 같습니다.
-
value: 조건을 충족하는 데 필요한 ECMP 게이트웨이의 정확한 수(1에서 512까지)입니다. -
equal: 게이트웨이 수는 구성된 값과 같아야 합니다. -
greater-than: 게이트웨이 수는 구성된 값보다 커야 합니다. -
greater-than-equal: 게이트웨이 수는 구성된 값보다 크거나 같아야 합니다. -
less-than: 게이트웨이 수는 구성된 값보다 적어야 합니다. -
less-than-equal: 게이트웨이 수는 구성된 값보다 작거나 같아야 합니다.
BGP Labeled Unicast LSP의 엔트로피 레이블 이해
엔트로피 레이블이란 무엇입니까?
엔트로피 레이블은 ECMP(equal-cost 다중 경로) 또는 LAG(link aggregation groups) 간에 로드 밸런싱 트래픽을 하는 라우터의 능력을 향상시키는 특별한 로드 밸런싱 레이블입니다. 엔트로피 레이블을 사용하면 라우터가 심층 패킷 검사(DPI)가 아닌 레이블 스택만 사용하여 트래픽을 효율적으로 로드 밸런싱할 수 있습니다. DPI는 더 많은 라우터의 처리 능력이 필요하며 모든 라우터가 공유하는 기능은 아닙니다.
IP 패킷에 목적지에 도달하는 경로가 여러 개 있는 경우 Junos OS는 패킷 헤더의 특정 필드를 사용하여 패킷을 확정적 경로에 해시합니다. 패킷의 소스 또는 목적지 주소와 포트 번호는 주어진 흐름의 패킷 순서 변경을 방지하기 위해 해시하는 데 사용됩니다. 코어 LSR(레이블 스위칭 라우터)이 흐름을 식별하기 위한 DPI를 수행할 수 없거나 회선 속도로 그렇게 할 수 없는 경우 레이블 스택만 ECMP 해싱에 사용됩니다. 이를 위해서는 flow 정보를 전달할 수 있는 특수한 로드 밸런싱 레이블인 엔트로피 레이블이 필요합니다. 수신 LSR은 전송 LSR보다 수신 패킷에 대한 컨텍스트와 정보가 더 많습니다. 따라서 수신 레이블 에지 라우터(LER)는 패킷의 흐름 정보를 검사하고 엔트로피 레이블에 매핑한 후 레이블 스택에 삽입할 수 있습니다. 코어의 LSR은 엔트로피 레이블을 키로 사용하여 패킷을 올바른 경로로 해시합니다.
엔트로피 레이블은 16에서 1048575(일반 20비트 레이블 범위) 사이의 모든 레이블 값이 될 수 있습니다. 이 범위는 기존의 정규 레이블 범위와 겹치기 때문에 엔트로피 레이블 앞에 엔트로피 레이블 표시기(ELI)라는 특수 레이블을 삽입합니다. ELI는 IANA가 지정했으며, 값이 7인 특수 레이블입니다.
그림 9 는 RSVP LSP(label-switched path) 패킷 레이블 스택의 엔트로피 레이블을 보여줍니다. 레이블 스택은 ELI(entropy label indicator), 엔트로피 레이블 및 IP 패킷으로 구성됩니다.
에 대한 엔트로피 레이블
BGP Labeled Unicast에 대한 엔트로피 레이블
BGP labeled unicast는 여러 내부 게이트웨이 프로토콜(IGP) 영역 또는 여러 Autonomous System(Inter-AS LSP)에 걸쳐 RSVP 또는 LDP LSP를 연결합니다. 입력 PE와 출력 PE가 서로 다른 IGP 영역에 있을 때 영역 간 BGP 레이블링된 유니캐스트 LSP는 일반적으로 VPN 및 IP 트래픽을 전송합니다. BGP labeled unicast가 RSVP 또는 LDP LSP를 연결할 때, Junos OS는 BGP labeled 유니캐스트 LSP 수신에 엔트로피 레이블을 삽입하여 엔드 투 엔드 엔트로피 레이블 로드 밸런싱을 달성합니다. RSVP 또는 LDP 엔트로피 레이블은 일반적으로 RSVP 또는 LDP 레이블과 함께 두 번째 최종 홉 노드에서 나타나며, 연결 지점, 즉 두 영역 또는 두 AS 사이의 라우터에는 엔트로피 레이블이 없기 때문입니다. 따라서 엔트로피 레이블이 없는 경우, 연결 지점의 라우터는 BGP 레이블을 사용하여 패킷을 전달합니다. 그림 10 은 RSVP 레이블 스택에서 엔트로피 레이블이 있는 BGP 레이블 유니캐스트 패킷 레이블 스택을 보여줍니다. RSVP 레이블 스택은 ELI(entropy label indicator), 엔트로피 레이블, BGP 레이블 및 IP 패킷으로 구성됩니다. RSVP 엔트로피 레이블은 두 번째 최종 홉 노드에서 나타납니다.
BGP 레이블이 지정된 유니캐스트 스티칭 노드는 스티칭 노드가 BGP 출력에서 엔트로피 레이블 기능을 신호하지 않는 한 로드 밸런싱에 엔트로피 레이블을 사용할 수 없습니다. BGP 레이블 유니캐스트 스티칭 노드가 공급자 에지 라우터에 BGP 엔트로피 레이블 기능(ELC)을 신호하는 경우, BGP 레이블 유니캐스트 LSP 입력은 BGP 레이블 유니캐스트 LSP 출력이 엔트로피 레이블을 처리할 수 있다는 것을 인식하고 BGP 레이블 아래에 엔트로피 레이블 표시기와 엔트로피 레이블을 삽입합니다. 모든 LSR은 로드 밸런싱을 위해 엔트로피 레이블을 사용할 수 있습니다. BGP 레이블링 유니캐스트 LSP는 다른 영역과 AS의 많은 라우터를 교차할 수 있지만, 일부 세그먼트는 엔트로피 레이블을 지원하는 반면 다른 세그먼트는 지원하지 않을 수 있습니다. 그림 11 은 BGP 레이블 스택의 엔트로피 레이블을 보여줍니다. 연결 노드의 레이블 스택은 ELI, 엔트로피 레이블 및 IP 패킷으로 구성됩니다.
송신 노드에서 BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블 기능을 사용하지 않으려면 계층 수준에서 옵션 no-entropy-label-capability 으로 정책을 정의합니다.[edit policy-options policy-statement policy-name then]
[edit policy-options policy-statement policy-name then]user@PE#no-entropy-label-capability
기본적으로 엔트로피 레이블을 지원하는 라우터는 계층 수준에서 [edit forwarding-options] load-balance-label-capability 문으로 구성되어 LSP 단위로 레이블을 신호합니다. 피어 라우터에 로드 밸런싱 레이블을 처리할 수 있는 장치가 없는 경우 계층 수준에서 [edit forwarding-options] 문을 구성 no-load-balance-label-capability 하여 엔트로피 레이블 기능의 신호 전송을 방지할 수 있습니다.
[edit forwarding-options]user@PE#no-load-balance-label-capability
기본적으로 BGP 스피커는 로드 밸런싱을 위해 IETF BGP 라우터 기능 속성(RCA)에 정의된 엔트로피 레이블 기능(ELCv3) 속성을 사용합니다. ELCv3 속성만 송수신합니다. RCA 초안과 상호 운용 가능한 ELCv2 속성을 사용해야 하는 경우 레이블링된 유니캐스트 엔트로피-레이블 계층에서 노브를 elc-v2-compatible 명시적으로 구성합니다. 이러한 시나리오에서는 ELCv3 및 ELCv2 모두 전송 및 수신됩니다.
지원 및 비지원 기능
Junos OS는 다음과 같은 시나리오에서 BGP labeled 유니캐스트에 대한 엔트로피 레이블을 지원합니다.
-
LSP의 모든 노드는 엔트로피 레이블 기능을 갖습니다.
-
LSP의 노드 중 일부는 엔트로피 레이블 기능을 갖습니다.
-
LSP는 다른 통신사의 VPN을 통해 터널링됩니다.
-
수신 시 엔트로피 레이블을 삽입할 BGP labeled 유니캐스트 LSP의 하위 집합을 선택하는 수신 정책을 정의합니다.
-
엔트로피 레이블 기능 보급을 비활성화하는 송신 정책을 정의합니다.
Junos OS는 BGP 레이블이 지정된 유니캐스트의 엔트로피 레이블에 대해 다음 기능을 지원하지 않습니다.
-
BGP 레이블이 지정된 유니캐스트 LSP가 다른 통신사의 VPN을 통해 터널링되고 있을 때, Junos OS는 통신사 네트워크의 VPN 레이블 아래에 엔트로피 레이블 표시기 또는 엔트로피 레이블을 삽입하지 않기 때문에 진정한 엔드 투 엔드 엔트로피 레이블이 없습니다.
-
현재 Junos OS는 자체 엔트로피 레이블이 있는 IPv6 BGP labeled 유니캐스트 LSP를 지원하지 않습니다. 그러나 IPv6 BGP labeled 유니캐스트 LSP는 기본 RSVP, LDP 또는 BGP LSP의 엔트로피 레이블을 사용할 수 있습니다.
또한보십시오
BGP Labeled Unicast LSP를 위한 엔트로피 레이블 구성
종단 간 엔트로피 레이블 로드 로드 밸런싱을 달성하기 위해 BGP 레이블 유니캐스트 LSP의 엔트로피 레이블을 구성합니다. 엔트로피 레이블은 패킷의 흐름 정보를 전달할 수 있는 특수 로드 밸런싱 레이블입니다. BGP labeled unicast는 일반적으로 여러 IGP 영역 또는 여러 AS(Autonomous System)에 걸쳐 RSVP 또는 IGP LSP를 연결합니다. RSVP 또는 LDP 엔트로피 레이블은 RSVP 또는 LDP 레이블과 함께 두 번째 최종 홉 노드에서 표시됩니다. 이 기능을 사용하면 연결 지점, 즉 두 영역 또는 AS 사이의 라우터에서 엔트로피 레이블을 사용하여 BGP 트래픽에 대한 엔드 투 엔드 엔트로피 레이블 로드 밸런싱을 달성할 수 있습니다. 이 기능을 사용하면 BGP labeled 유니캐스트 LSP 수신 시 엔트로피 레이블을 삽입할 수 있습니다.
엔트로피 레이블은 16에서 1048575(일반 20비트 레이블 범위) 사이의 모든 레이블 값이 될 수 있습니다. 이 범위는 기존의 정규 레이블 범위와 겹치기 때문에 엔트로피 레이블 앞에 엔트로피 레이블 표시기(ELI)라는 특수 레이블을 삽입합니다. ELI는 IANA가 지정했으며, 값이 7인 특수 레이블입니다.
BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블을 구성하기 전에 다음을 확인하십시오.
디바이스 인터페이스를 구성합니다.
OSPF 또는 기타 IGP 프로토콜을 구성합니다.
BGP를 구성합니다.
LDP를 구성합니다.
RSVP를 구성합니다.
MPLS를 구성합니다.
BGP 레이블이 지정된 유니캐스트 LSP에 대한 엔트로피 레이블을 구성하려면 다음을 수행합니다.
또한보십시오
예: BGP Labeled Unicast LSP에 대한 엔트로피 레이블 구성
이 예는 엔트로피 레이블을 사용하여 엔드 투 엔드 로드 로드 밸런싱을 달성하기 위해 BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블을 구성하는 방법을 보여줍니다. IP 패킷에 목적지에 도달하는 경로가 여러 개 있는 경우 Junos OS는 패킷 헤더의 특정 필드를 사용하여 패킷을 확정적 경로에 해시합니다. 이를 위해서는 flow 정보를 전달할 수 있는 특수한 로드 밸런싱 레이블인 엔트로피 레이블이 필요합니다. 코어의 LSR은 엔트로피 레이블을 키로 사용하여 패킷을 올바른 경로로 해시합니다. 엔트로피 레이블은 16에서 1048575(일반 20비트 레이블 범위) 사이의 모든 레이블 값이 될 수 있습니다. 이 범위는 기존의 정규 레이블 범위와 겹치기 때문에 엔트로피 레이블 앞에 엔트로피 레이블 표시기(ELI)라는 특수 레이블을 삽입합니다. ELI는 IANA가 지정했으며, 값이 7인 특수 레이블입니다.
BGP labeled unicast는 일반적으로 여러 IGP 영역 또는 여러 AS(Autonomous System)에 걸쳐 RSVP 또는 LDP LSP를 연결합니다. RSVP 또는 LDP 엔트로피 레이블은 RSVP 또는 LDP 레이블과 함께 두 번째 최종 홉 노드에서 표시됩니다. 이 기능을 사용하면 BGP 트래픽에 대한 엔드 투 엔드 엔트로피 레이블 로드 밸런싱을 달성하기 위해 연결 지점에서 엔트로피 레이블을 사용하여 두 번째 홉 노드와 연결 지점 사이의 공백을 메울 수 있습니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
MPC가 있는 MX 시리즈 라우터 7개
-
모든 디바이스에서 실행되는 Junos OS 릴리스 15.1 이상
-
Junos OS 릴리스 22.4를 사용하여 재검증됨
-
BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블을 구성하기 전에 다음을 확인하십시오.
-
디바이스 인터페이스를 구성합니다.
-
OSPF 또는 기타 IGP 프로토콜을 구성합니다.
-
BGP를 구성합니다.
-
RSVP를 구성합니다.
-
MPLS를 구성합니다.
개요
BGP labeled unicast가 여러 IGP 영역이나 여러 AS(Autonomous System)에서 RSVP 또는 IGP LSP를 연결하면 RSVP 또는 LDP 엔트로피 레이블이 RSVP 또는 LDP 레이블과 함께 두 번째 홉 노드에 표시됩니다. 그러나 연결 지점, 즉 두 영역 사이의 라우터에는 엔트로피 레이블이 없습니다. 따라서 연결 지점의 라우터는 BGP 레이블을 사용하여 패킷을 전달했습니다.
Junos OS 릴리스 15.1부터 BGP labeled 유니캐스트에 엔트로피 레이블을 구성하여 엔드 투 엔드 엔트로피 레이블 로드 밸런싱을 달성할 수 있습니다. 이 기능을 사용하면 BGP 트래픽에 대한 엔드 투 엔드 엔트로피 레이블 로드 밸런싱을 달성하기 위해 연결 지점에서 엔트로피 레이블을 사용할 수 있습니다. Junos OS를 사용하면 BGP labeled 유니캐스트 LSP 수신 시 엔트로피 레이블을 삽입할 수 있습니다.
기본적으로 엔트로피 레이블을 지원하는 라우터는 계층 수준에서 [edit forwarding-options] 문으로 구성 load-balance-label-capability 되어 LSP 기준으로 레이블에 신호를 보냅니다. 피어 라우터에 로드 밸런싱 레이블을 처리할 수 있는 장치가 없는 경우 계층 수준에서 [edit forwarding-options] 구성 no-load-balance-label-capability 하여 엔트로피 레이블 기능의 신호 전송을 방지할 수 있습니다.
[edit forwarding-options]user@PE#no-load-balance-label-capability
계층 수준에서 [edit policy-options policy-statement policy name then] 옵션을 사용하여 no-entropy-label-capability 정책에 지정된 경로에 대해 송신될 때 엔트로피 레이블 보급 기능을 명시적으로 비활성화할 수 있습니다.
[edit policy-options policy-statement policy-name then]user@PE#no-entropy-label-capability
토폴로지
그림 12에서 라우터 PE1은 수신 라우터이고 라우터 PE2는 송신 라우터입니다. 라우터 P1과 P2는 전송 라우터입니다. 라우터 ABR은 영역 0과 영역 1 사이의 영역 브리지 라우터입니다. 트래픽 로드 밸런싱을 위해 ABR에서 PE2로 두 개의 LSP가 구성됩니다. BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블 기능은 수신 라우터 PE1에서 활성화됩니다. 호스트 1은 패킷 캡처를 위해 P1에 연결되어 엔트로피 레이블을 표시할 수 있습니다.
에 대한 엔트로피 레이블 구성
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 들어갑니다 commit .
라우터 CE1
set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.1/30 set interfaces lo0 unit 0 family inet address 172.16.255.1/32 primary set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set routing-options router-id 172.16.255.1 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
라우터 PE1
set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.2/30 set interfaces ge-0/0/2 unit 0 family inet address 10.1.23.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.2/32 primary set interfaces lo0 unit 1 family inet address 10.1.255.22/32 set policy-options policy-statement bgp-to-ospf from protocol bgp set policy-options policy-statement bgp-to-ospf then accept set policy-options policy-statement pplb then load-balance per-packet set routing-instances VPN-l3vpn instance-type vrf set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf set routing-instances VPN-l3vpn interface ge-0/0/0.0 set routing-instances VPN-l3vpn interface lo0.1 set routing-instances VPN-l3vpn route-distinguisher 10.1.255.2:1 set routing-instances VPN-l3vpn vrf-target target:65000:1 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.2 set protocols bgp group ibgp family inet labeled-unicast entropy-label set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.6 family inet-vpn unicast set protocols mpls icmp-tunneling set protocols mpls label-switched-path pe1-abr to 10.1.255.4 set protocols mpls label-switched-path pe1-abr entropy-label set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface lo0.0
라우터 P1
set interfaces ge-0/0/0 unit 0 family inet address 10.1.23.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.34.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.3/32 primary set routing-options router-id 10.1.255.3 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/2.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/2.0
라우터 ABR
set interfaces ge-0/0/0 unit 0 family inet address 10.1.34.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.45.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 unit 0 family inet address 10.1.45.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.4/32 primary set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement send-inet3-pe1 from route-filter 10.1.255.2/32 exact set policy-options policy-statement send-inet3-pe1 then accept set policy-options policy-statement send-inet3-pe2 from route-filter 10.1.255.6/32 exact set policy-options policy-statement send-inet3-pe2 then accept set routing-options router-id 10.1.255.4 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.4 set protocols bgp group ibgp family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.2 export send-inet3-pe2 set protocols bgp group ibgp neighbor 10.1.255.6 export send-inet3-pe1 set protocols mpls icmp-tunneling set protocols mpls label-switched-path abr-pe1 to 10.1.255.2 set protocols mpls label-switched-path abr-pe1 entropy-label set protocols mpls label-switched-path abr-pe2 to 10.1.255.6 set protocols mpls label-switched-path abr-pe2 entropy-label set protocols mpls label-switched-path abr-pe2 primary to-r6-1 set protocols mpls label-switched-path abr-pe2-2 to 10.1.255.6 set protocols mpls label-switched-path abr-pe2-2 entropy-label set protocols mpls label-switched-path abr-pe2-2 primary to-r6-2 set protocols mpls path to-r6-1 10.1.45.2 strict set protocols mpls path to-r6-1 10.1.56.2 strict set protocols mpls path to-r6-2 10.1.45.6 strict set protocols mpls path to-r6-2 10.1.56.6 strict set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 set protocols ospf area 0.0.0.1 interface ge-0/0/3.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface ge-0/0/3.0
라우터 P2
set interfaces ge-0/0/0 unit 0 family inet address 10.1.45.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 10.1.45.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.56.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 unit 0 family inet address 10.1.56.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.5/32 primary set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement pplb then load-balance per-packet set routing-options router-id 10.1.255.5 set routing-options forwarding-table export pplb set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.1 interface lo0.0 passive set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 set protocols ospf area 0.0.0.1 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface ge-0/0/1.0 set protocols ospf area 0.0.0.1 interface ge-0/0/3.0 set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/3.0
라우터 PE2
set interfaces ge-0/0/0 unit 0 family inet address 10.1.56.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 10.1.56.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 172.16.67.2/30 set interfaces lo0 unit 0 family inet address 10.1.255.6/32 primary set interfaces lo0 unit 1 family inet address 10.1.255.66/32 set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement bgp-to-ospf from protocol bgp set policy-options policy-statement bgp-to-ospf then accept set policy-options policy-statement pplb then load-balance per-packet set routing-instances VPN-l3vpn instance-type vrf set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf set routing-instances VPN-l3vpn interface ge-0/0/2.0 set routing-instances VPN-l3vpn interface lo0.1 set routing-instances VPN-l3vpn route-distinguisher 10.1.255.6:1 set routing-instances VPN-l3vpn vrf-target target:65000:1 set routing-options router-id 10.1.255.6 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.6 set protocols bgp group ibgp family inet labeled-unicast entropy-label set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.2 family inet-vpn unicast set protocols mpls icmp-tunneling set protocols mpls label-switched-path pe2-abr to 10.1.255.4 set protocols mpls label-switched-path pe2-abr entropy-label set protocols mpls interface ge-0/0/0.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.1 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface lo0.0 passive set protocols ospf area 0.0.0.1 interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/1.0
라우터 CE2
set interfaces ge-0/0/0 unit 0 family inet address 172.16.67.1/30 set interfaces lo0 unit 0 family inet address 172.16.255.7/32 primary set interfaces lo0 unit 0 family inet address 192.168.255.7/32 set routing-options router-id 172.16.255.7 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
라우터 PE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 PE1을 구성하려면 다음을 수행합니다.
적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 라우터 PE2에 대해 이 절차를 반복합니다.
-
물리적 인터페이스를 구성합니다. 코어 페이싱 인터페이스에서 구성
family mpls해야 합니다.[edit] user@PE1# set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.2/30 user@PE1# set interfaces ge-0/0/2 unit 0 family inet address 10.1.23.1/30 user@PE1# set interfaces ge-0/0/2 unit 0 family mpls
-
루프백 인터페이스를 구성합니다. 보조 루프백은 선택 사항이며 이후 단계에서 라우팅 인스턴스 아래에 적용됩니다.
[edit] user@PE1# set interfaces lo0 unit 0 family inet address 10.1.255.2/32 primary user@PE1# set interfaces lo0 unit 1 family inet address 10.1.255.22/32
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit] user@PE1# set routing-options router-id 10.1.255.2 user@PE1# set routing-options autonomous-system 65000
-
OSPF 프로토콜을 구성합니다.
[edit] user@PE1# set protocols ospf traffic-engineering user@PE1# set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 user@PE1# set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
RSVP 프로토콜을 구성합니다.
[edit] user@PE1# set protocols rsvp interface ge-0/0/2.0 user@PE1# set protocols rsvp interface lo0.0
-
ABR을 향한 MPLS 프로토콜 및 LSP를 구성합니다. 엔트로피 레이블을 MPLS 레이블 스택에 추가하는 옵션을 포함
entropy-label합니다.[edit protocols] user@PE1# set protocols mpls icmp-tunneling user@PE1# set protocols mpls label-switched-path pe1-abr to 10.1.255.4 user@PE1# set protocols mpls label-switched-path pe1-abr entropy-label user@PE1# set protocols mpls interface ge-0/0/2.0 user@PE1# set protocols mpls interface lo0.0
-
ABR 피어링 및
family inet-vpnPE2 피어링에 대해 IBGPfamily inet labeled-unicast를 구성합니다. BGP 레이블이 지정된 유니캐스트에 대한 엔트로피 레이블 기능을 활성화합니다.[edit] user@PE1# set protocols bgp group ibgp type internal user@PE1# set protocols bgp group ibgp local-address 10.1.255.2 user@PE1# set protocols bgp group ibgp family inet labeled-unicast entropy-label user@PE1# set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 user@PE1# set protocols bgp group ibgp neighbor 10.1.255.6 family inet-vpn unicast
-
BGP VPN 경로를 OSPF로 내보내는 정책을 정의합니다. 이 정책은 라우팅 인스턴스의 최단 경로 우선(OSPF) 아래에 적용됩니다.
[edit] user@PE1# set policy-options policy-statement bgp-to-ospf from protocol bgp user@PE1# set policy-options policy-statement bgp-to-ospf then accept
-
로드 밸런싱 정책을 정의하고
routing-options forwarding-table. PE1은 예시에서 하나의 경로만 있으므로 이 단계는 필요하지 않지만 이 예시에서는 모든 디바이스에 동일한 로드 밸런싱 정책을 적용합니다.[edit] user@PE1# set policy-options policy-statement pplb then load-balance per-packet user@PE1# set routing-options forwarding-table export pplb
-
레이어 3 VPN 라우팅 인스턴스를 구성합니다.
[edit] user@PE1# set routing-instances VPN-l3vpn instance-type vrf
-
라우팅 인스턴스에 인터페이스를 할당합니다.
[edit] user@PE1# set routing-instances VPN-l3vpn interface ge-0/0/0.0 user@PE1# set routing-instances VPN-l3vpn interface lo0.1
-
라우팅 인스턴스에 대한 경로 식별자를 구성합니다.
[edit] user@PE1# set routing-instances VPN-l3vpn route-distinguisher 10.1.255.2:1
-
라우팅 인스턴스에 대한 VPN 라우팅 및 포워딩(VRF) 대상을 구성합니다.
[edit] user@PE1# set routing-instances VPN-l3vpn vrf-target target:65000:1
-
라우팅 인스턴스 아래에 프로토콜 OSPF를 구성하고 이전에 구성된
bgp-to-ospf정책을 적용합니다.[edit] user@PE1# set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@PE1# set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive user@PE1# set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf
라우터 P1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 P1 구성:
적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 라우터 P2에 대해 이 절차를 반복합니다.
-
물리적 인터페이스를 구성합니다.
[edit] user@P1# set interfaces ge-0/0/0 unit 0 family inet address 10.1.23.2/30 user@P1# set interfaces ge-0/0/0 unit 0 family mpls user@P1# set interfaces ge-0/0/2 unit 0 family inet address 10.1.34.1/30 user@P1# set interfaces ge-0/0/2 unit 0 family mpls
-
루프백 인터페이스를 구성합니다.
[edit] user@P1# set interfaces lo0 unit 0 family inet address 10.1.255.3/32 primary
-
라우터 ID를 구성합니다.
[edit] user@P1# set routing-options router-id 10.1.255.3
-
OSPF 프로토콜을 구성합니다.
[edit] user@P1# set protocols ospf traffic-engineering user@P1# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@P1# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@P1# set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
-
RSVP 프로토콜을 구성합니다.
[edit] user@P1# set protocols rsvp interface ge-0/0/0.0 user@P1# set protocols rsvp interface lo0.0 user@P1# set protocols rsvp interface ge-0/0/2.0
-
MPLS 프로토콜을 구성합니다.
[edit] user@P1# set protocols mpls icmp-tunneling user@P1# set protocols mpls interface ge-0/0/0.0 user@P1# set protocols mpls interface lo0.0 user@P1# set protocols mpls interface ge-0/0/2.0
라우터 ABR 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 ABR을 구성하려면 다음을 수행합니다.
-
물리적 인터페이스를 구성합니다.
[edit] user@ABR# set interfaces ge-0/0/0 unit 0 family inet address 10.1.34.2/30 user@ABR# set interfaces ge-0/0/0 unit 0 family mpls user@ABR# set interfaces ge-0/0/2 unit 0 family inet address 10.1.45.1/30 user@ABR# set interfaces ge-0/0/2 unit 0 family mpls user@ABR# set interfaces ge-0/0/3 unit 0 family inet address 10.1.45.5/30 user@ABR# set interfaces ge-0/0/3 unit 0 family mpls
-
루프백 인터페이스를 구성합니다.
[edit] user@ABR# set interfaces lo0 unit 0 family inet address 10.1.255.4/32 primary
-
라우터가 로드 밸런싱을 위해 패킷을 대상으로 해싱하는 데 사용하는 MPLS 레이블을 구성합니다.
[edit] user@ABR# set forwarding-options hash-key family mpls label-1 user@ABR# set forwarding-options hash-key family mpls label-2 user@ABR# set forwarding-options hash-key family mpls label-3 user@ABR# set forwarding-options enhanced-hash-key family mpls no-payload
-
라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit] user@ABR# set routing-options router-id 10.1.255.4 user@ABR# set routing-options autonomous-system 65000
-
OSPF 프로토콜을 구성합니다.
[edit] user@ABR# set protocols ospf traffic-engineering user@ABR# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@ABR# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@ABR# set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 user@ABR# set protocols ospf area 0.0.0.1 interface ge-0/0/3.0
-
RSVP 프로토콜을 구성합니다.
[edit] user@ABR# set protocols rsvp interface lo0.0 user@ABR# set protocols rsvp interface ge-0/0/0.0 user@ABR# set protocols rsvp interface ge-0/0/2.0 user@ABR# set protocols rsvp interface ge-0/0/3.0
-
MPLS 프로토콜을 구성하고 PE1 및 PE2에 대한 LSP를 지정합니다. 서로 다른 LSP와 인터페이스가 사용되고 있음을 보여주기 위해 트래픽 로드 밸런싱을 위해 PE2를 향해 두 개의 LSP가 생성됩니다.
[edit] user@ABR# set protocols mpls icmp-tunneling user@ABR# set protocols mpls label-switched-path abr-pe1 to 10.1.255.2 user@ABR# set protocols mpls label-switched-path abr-pe1 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2 to 10.1.255.6 user@ABR# set protocols mpls label-switched-path abr-pe2 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2 primary to-r6-1 user@ABR# set protocols mpls label-switched-path abr-pe2-2 to 10.1.255.6 user@ABR# set protocols mpls label-switched-path abr-pe2-2 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2-2 primary to-r6-2 user@ABR# set protocols mpls path to-r6-1 10.1.45.2 strict user@ABR# set protocols mpls path to-r6-1 10.1.56.2 strict user@ABR# set protocols mpls path to-r6-2 10.1.45.6 strict user@ABR# set protocols mpls path to-r6-2 10.1.56.6 strict user@ABR# set protocols mpls interface lo0.0 user@ABR# set protocols mpls interface ge-0/0/0.0 user@ABR# set protocols mpls interface ge-0/0/2.0 user@ABR# set protocols mpls interface ge-0/0/3.0
-
을 사용하여
family inet labeled-unicastPE1 및 PE2 모두에 IBGP를 구성합니다. PE1 및 PE2 모두에서 inet.3 루프백 경로를 알리기 위해 정책을 적용합니다. 다음 단계에서 정책을 보여줍니다.[edit] user@ABR# set protocols bgp group ibgp type internal user@ABR# set protocols bgp group ibgp local-address 10.1.255.4 user@ABR# set protocols bgp group ibgp family inet labeled-unicast rib inet.3 user@ABR# set protocols bgp group ibgp neighbor 10.1.255.2 export send-inet3-pe2 user@ABR# set protocols bgp group ibgp neighbor 10.1.255.6 export send-inet3-pe1
-
PE1 및 PE2의 루프백 주소에서 일치하는 정책을 정의합니다.
[edit] user@ABR# set policy-options policy-statement send-inet3-pe1 from route-filter 10.1.255.2/32 exact user@ABR# set policy-options policy-statement send-inet3-pe1 then accept user@ABR# set policy-options policy-statement send-inet3-pe2 from route-filter 10.1.255.6/32 exact user@ABR# set policy-options policy-statement send-inet3-pe2 then accept
-
로드 밸런싱을 위한 정책을 정의하고 아래에 적용합니다.
routing-options forwarding-table[edit] user@ABR# set policy-options policy-statement pplb then load-balance per-packet user@ABR# set routing-options forwarding-table export pplb
(선택 사항) 포트 미러링 구성
적용된 엔트로피 레이블을 보려면 트래픽을 캡처할 수 있습니다. 이 예에서는 P1의 PE1 페이싱 인터페이스에 필터가 적용되어 CE1에서 CE2 간 트래픽을 캡처합니다. 트래픽은 보기 위해 호스트 1로 전송됩니다. 이 예시에서 사용하는 것과는 다른 트래픽 캡처 방법이 있습니다. 자세한 정보는 포트 미러링 및 분석기를 참조하십시오.
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
라우터 P1 구성:
-
인터페이스를 구성합니다. 이 예에서는 브리지 도메인에 Host1에 연결된 인터페이스를 넣고 Host1에 대한 연결을 확인하기 위해 IRB 인터페이스를 생성합니다.
[edit] user@P1# set interfaces ge-0/0/4 unit 0 family bridge interface-mode access user@P1# set interfaces ge-0/0/4 unit 0 family bridge vlan-id 100 user@P1# set interfaces irb unit 0 family inet address 10.1.31.1/30
-
브리지 도메인을 구성합니다.
[edit] user@P1# set bridge-domains v100 vlan-id 100 user@P1# set bridge-domains v100 routing-interface irb.0
-
트래픽을 캡처할 필터를 구성합니다. 이 예시에서는 모든 트래픽을 캡처합니다.
[edit] user@P1# set firewall family any filter test term 1 then count test user@P1# set firewall family any filter test term 1 then port-mirror user@P1# set firewall family any filter test term 1 then accept
-
PE1 페이싱 인터페이스에 필터를 적용합니다.
[edit] user@P1# set interfaces ge-0/0/0 unit 0 filter input test
-
포트 미러링 옵션을 구성합니다. 이 예시에서는 모든 트래픽을 미러링하고 인터페이스 ge-0/0/4에 연결된 Host1로 보냅니다.
[edit] user@P1# set forwarding-options port-mirroring input rate 1 user@P1# set forwarding-options port-mirroring family any output interface ge-0/0/4.0
검증
구성이 제대로 작동하고 있는지 확인합니다.
- 엔트로피 레이블 기능이 보급되고 있는지 확인
- 라우터 PE1이 엔트로피 레이블 보급을 수신하는지 확인
- ABR에서 PE2로 ECMP 확인
- PE1에서 CE2에 대한 경로 표시
- CE1에서 CE2 ping
- 로드 밸런싱 확인
- 엔트로피 레이블 확인
엔트로피 레이블 기능이 보급되고 있는지 확인
목적
PE2에 대한 경로에 대해 엔트로피 레이블 기능 경로 속성이 ABR에서 PE1로 보급되고 있는지 확인합니다.
작업
운영 모드의 라우터 ABR에서 명령을 실행합니다 show route advertising-protocol bgp 10.1.255.2 detail .
user@ABR> show route advertising-protocol bgp 10.1.255.2 detail
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
* 10.1.255.6/32 (1 entry, 1 announced)
BGP group ibgp type Internal
Route Label: 299952
Nexthop: Self
Flags: Nexthop Change
MED: 2
Localpref: 4294967294
AS path: [65000] I
Entropy label capable
의미
출력은 IP 주소가 10.1.255.6인 호스트 PE2가 엔트로피 레이블 기능과 사용되는 경로 레이블을 가지고 있음을 보여줍니다. 호스트는 BGP 인접 라우터에 엔트로피 레이블 기능을 보급합니다.
라우터 PE1이 엔트로피 레이블 보급을 수신하는지 확인
목적
라우터 PE1이 라우터 PE2에 대한 엔트로피 레이블 보급을 수신하는지 확인합니다.
작업
운영 모드의 라우터 PE1에서 명령을 실행합니다 show route protocol bgp 10.1.255.6 extensive .
user@PE1> show route protocol bgp 10.1.255.6 extensive
inet.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden)
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
10.1.255.6/32 (1 entry, 1 announced)
*BGP Preference: 170/1
Next hop type: Indirect, Next hop index: 0
Address: 0x7b3ffd4
Next-hop reference count: 2, key opaque handle: 0x0, non-key opaque handle: 0x0
Source: 10.1.255.4
Next hop type: Router, Next hop index: 0
Next hop: 10.1.23.2 via ge-0/0/2.0, selected
Label-switched-path pe1-abr
Label operation: Push 299952, Push 299808(top)
Label TTL action: prop-ttl, prop-ttl(top)
Load balance label: Label 299952: Entropy label; Label 299808: None;
Label element ptr: 0x93d6bf8
Label parent element ptr: 0x93d6c20
Label element references: 3
Label element child references: 2
Label element lsp id: 0
Session Id: 0
Protocol next hop: 10.1.255.4
Label operation: Push 299952
Label TTL action: prop-ttl
Load balance label: Label 299952: Entropy label;
Indirect next hop: 0x758c05c - INH Session ID: 0
State: <Active Int Ext>
Local AS: 65000 Peer AS: 65000
Age: 1:33:11 Metric: 2 Metric2: 2
Validation State: unverified
Task: BGP_65000.10.1.255.4
Announcement bits (2): 3-Resolve tree 1 4-Resolve_IGP_FRR task
AS path: I
Accepted
Route Label: 299952
Localpref: 4294967294
Router ID: 10.1.255.4
Session-IDs associated:
Session-id: 324 Version: 3
Thread: junos-main
Indirect next hops: 1
Protocol next hop: 10.1.255.4 Metric: 2 ResolvState: Resolved
Label operation: Push 299952
Label TTL action: prop-ttl
Load balance label: Label 299952: Entropy label;
Indirect next hop: 0x758c05c - INH Session ID: 0
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 10.1.23.2 via ge-0/0/2.0
Session Id: 0
10.1.255.4/32 Originating RIB: inet.3
Metric: 2 Node path count: 1
Forwarding nexthops: 1
Next hop type: Router
Next hop: 10.1.23.2 via ge-0/0/2.0
Session Id: 0
의미
라우터 PE1은 BGP 인접 라우터로부터 엔트로피 레이블 기능 보급을 수신합니다.
ABR에서 PE2로 ECMP 확인
목적
PE2에 대한 ECMP(Equal-cost 다중 경로)를 확인합니다.
작업
운영 모드의 라우터 ABR에서 및 show route forwarding-table label <label>명령을 실행 show route table mpls.0 합니다.
user@ABR> show route table mpls.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2w1d 23:02:11, metric 1
Receive
1 *[MPLS/0] 2w1d 23:02:11, metric 1
Receive
2 *[MPLS/0] 2w1d 23:02:11, metric 1
Receive
13 *[MPLS/0] 2w1d 23:02:11, metric 1
Receive
299936 *[VPN/170] 2d 21:47:02
> to 10.1.34.1 via ge-0/0/0.0, label-switched-path abr-pe1
299952 *[VPN/170] 2d 21:47:02
> to 10.1.45.2 via ge-0/0/2.0, label-switched-path abr-pe2
to 10.1.45.6 via ge-0/0/3.0, label-switched-path abr-pe2-2
ruser@ABR> show route forwarding-table label 299952
Routing table: default.mpls
MPLS:
Destination Type RtRef Next hop Type Index NhRef Netif
299952 user 0 ulst 1048575 2
10.1.45.2 Swap 299824 516 2 ge-0/0/2.0
10.1.45.6 Swap 299840 572 2 ge-0/0/3.0
...
의미
출력은 BGP 레이블이 지정된 유니캐스트 경로에 사용되는 레이블에 대한 ECMP를 보여줍니다.
PE1에서 CE2에 대한 경로 표시
목적
CE2에 대한 경로를 확인합니다.
작업
운영 모드의 라우터 PE1에서 및 show route table VPN-l3vpn.inet.0 192.168.255.7 extensive명령을 실행 show route table VPN-l3vpn.inet.0 172.16.255.7 extensive 합니다.
user@PE1> show route table VPN-l3vpn.inet.0 172.16.255.7 extensive
VPN-l3vpn.inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
172.16.255.7/32 (1 entry, 1 announced)
TSI:
OSPF area : 0.0.0.0, LSA ID : 172.16.255.7, LSA type : Summary
KRT in-kernel 172.16.255.7/32 -> {indirect(1048574)}
*BGP Preference: 170/-101
Route Distinguisher: 10.1.255.6:1
Next hop type: Indirect, Next hop index: 0
Address: 0x7b40434
Next-hop reference count: 9, key opaque handle: 0x0, non-key opaque handle: 0x0
Source: 10.1.255.6
Next hop type: Router, Next hop index: 515
Next hop: 10.1.23.2 via ge-0/0/2.0, selected
Label-switched-path pe1-abr
Label operation: Push 299824, Push 299952, Push 299808(top)
Label TTL action: prop-ttl, prop-ttl, prop-ttl(top)
Load balance label: Label 299824: None; Label 299952: Entropy label; Label 299808: None;
Label element ptr: 0x93d6c98
Label parent element ptr: 0x93d6bf8
Label element references: 1
Label element child references: 0
Label element lsp id: 0
Session Id: 140
Protocol next hop: 10.1.255.6
Label operation: Push 299824
Label TTL action: prop-ttl
Load balance label: Label 299824: None;
...
user@PE1> show route table VPN-l3vpn.inet.0 192.168.255.7 extensive
VPN-l3vpn.inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
192.168.255.7/32 (1 entry, 1 announced)
TSI:
OSPF area : 0.0.0.0, LSA ID : 192.168.255.7, LSA type : Summary
KRT in-kernel 192.168.255.7/32 -> {indirect(1048574)}
*BGP Preference: 170/-101
Route Distinguisher: 10.1.255.6:1
Next hop type: Indirect, Next hop index: 0
Address: 0x7b40434
Next-hop reference count: 9, key opaque handle: 0x0, non-key opaque handle: 0x0
Source: 10.1.255.6
Next hop type: Router, Next hop index: 515
Next hop: 10.1.23.2 via ge-0/0/2.0, selected
Label-switched-path pe1-abr
Label operation: Push 299824, Push 299952, Push 299808(top)
Label TTL action: prop-ttl, prop-ttl, prop-ttl(top)
Load balance label: Label 299824: None; Label 299952: Entropy label; Label 299808: None;
Label element ptr: 0x93d6c98
Label parent element ptr: 0x93d6bf8
Label element references: 1
Label element child references: 0
Label element lsp id: 0
Session Id: 140
Protocol next hop: 10.1.255.6
Label operation: Push 299824
Label TTL action: prop-ttl
Load balance label: Label 299824: None;
...
의미
출력은 두 경로 모두에 대해 동일한 레이블이 사용되는 것을 보여줍니다.
CE1에서 CE2 ping
목적
연결을 확인하고 로드 밸런싱을 확인하는 데 사용합니다.
작업
운영 모드의 라우터 PE1에서 및 ping 192.168.255.7 source 192.168.255.1 rapid count 200명령을 실행 ping 172.16.255.7 source 172.16.12.1 rapid count 100 합니다.
user@CE1> ping 172.16.255.7 source 172.16.12.1 rapid count 100 PING 172.16.255.7 (172.16.255.7): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 172.16.255.7 ping statistics --- 100 packets transmitted, 100 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.369/6.070/8.828/0.612 ms user@CE1> ping 192.168.255.7 source 192.168.255.1 rapid count 200 PING 192.168.255.7 (192.168.255.7): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 192.168.255.7 ping statistics --- 200 packets transmitted, 200 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.086/5.994/10.665/0.649 ms
의미
출력은 ping이 성공적으로 수행되었음을 보여줍니다.
로드 밸런싱 확인
목적
로드 밸런싱을 확인합니다.
작업
운영 모드의 ABR에서 명령을 실행 show mpls lsp ingress statistics 합니다.
user@ABR> show mpls lsp ingress statistics Ingress LSP: 3 sessions To From State Packets Bytes LSPname 10.1.255.2 10.1.255.4 Up 300 30000 abr-pe1 10.1.255.6 10.1.255.4 Up 200 20000 abr-pe2 10.1.255.6 10.1.255.4 Up 100 10000 abr-pe2-2 Total 3 displayed, Up 3, Down 0
의미
출력은 LSP abr-pe2-2 를 사용한 이전 명령의 첫 번째 ping과 LSP abr-pe2를 사용한 두 번째 ping을 보여줍니다.
엔트로피 레이블 확인
목적
사용된 ping 간에 엔트로피 레이블이 다른지 확인합니다.
작업
호스트 1 tcpdump -i eth1 -n에서 .
user@Host1# tcpdump -i eth1 -n ... 13:42:31.993274 MPLS (label 299808, exp 0, ttl 63) (label 299952, exp 0, ttl 63) (label 7, exp 0, ttl 63) (label 1012776, exp 0, ttl 0) (label 299824, exp 0, [S], ttl 63) IP 172.16.12.1 > 172.16.255.7: ICMP echo request, id 32813, seq 9, length 64 ... 13:43:19.570260 MPLS (label 299808, exp 0, ttl 63) (label 299952, exp 0, ttl 63) (label 7, exp 0, ttl 63) (label 691092, exp 0, ttl 0) (label 299824, exp 0, [S], ttl 63) IP 192.168.255.1 > 192.168.255.7: ICMP echo request, id 46381, seq 9, length 64
의미
출력은 두 개의 다른 ping 명령에 대한 엔트로피 레이블에 대해 다른 값을 보여줍니다.
inet, inet6 또는 labeled unicast에 대한 BGP 접두사 독립 컨버전스 사용 사례
라우터 장애의 경우 BGP 네트워크는 네트워크 크기 또는 라우터 성능과 같은 매개 변수에 따라 복구하는 데 몇 초에서 몇 분 정도 걸릴 수 있습니다. BGP PIC(Prefix Independent Convergence) 기능이 라우터에서 활성화되면 BGP는 목적지에 대해 계산된 최적의 경로 외에 두 번째로 적합한 경로를 패킷 포워딩 엔진에 설치합니다. 라우터는 네트워크에서 송신 라우터에 장애가 발생할 때 이 백업 경로를 사용하여 중단 시간을 대폭 줄입니다. 이 기능을 활성화하면 송신 라우터에 장애가 발생할 경우 네트워크 다운타임을 줄일 수 있습니다.
네트워크의 송신 라우터에 대한 도달 가능성이 실패하면 IGP는 이 중단을 감지하고 링크 상태는 이 정보를 네트워크 전체에 전파하고 해당 접두사에 대한 BGP 다음 홉을 도달 불가능 상태로 보급합니다. BGP는 대체 경로를 재평가하고 대체 경로를 사용할 수 있는 경우 이 대체 다음 홉을 패킷 포워딩 엔진에 다시 설치합니다. 이러한 종류의 송신 장애는 일반적으로 동시에 여러 접두사에 영향을 미치며, BGP는 이러한 접두사를 한 번에 하나씩 업데이트해야 합니다. 수신 라우터에서 IGP는 최단 경로 우선(SPF)을 완료하고 다음 홉을 업데이트합니다. 그런 다음 Junos OS는 연결할 수 없게 된 접두사를 결정하고 이를 업데이트해야 한다는 신호를 프로토콜에 보냅니다. BGP는 알림을 받고 현재 유효하지 않은 모든 접두사에 대해 다음 홉을 업데이트합니다. 이 프로세스는 연결에 영향을 줄 수 있으며 운영 중단에서 복구하는 데 몇 분 정도 걸릴 수 있습니다. BGP PIC는 백업 경로가 패킷 포워딩 엔진에 이미 설치되어 있으므로 이 다운타임을 줄일 수 있습니다.
Junos OS 릴리스 15.1부터는 레이어 3 VPN 라우터에서 처음에 지원되었던 BGP PIC 기능이 inet 및 inet6 유니캐스트, inet 및 inet6 labeled 유니캐스트와 같은 글로벌 테이블의 여러 경로를 통해 BGP로 확장되었습니다. BGP PIC 지원 라우터에서 Junos OS는 라우팅 엔진에 간접 다음 홉을 위한 백업 경로를 설치하고 이 경로를 패킷 포워딩 엔진 및 IGP에 제공합니다. IGP는 하나 이상의 경로가 있는 접두사에 대한 도달 가능성을 잃으면 라우팅 테이블을 업데이트하기 전에 단일 메시지로 라우팅 엔진에 신호를 보냅니다. 라우팅 엔진은 간접 다음 홉이 실패했음을 패킷 포워딩 엔진에 신호를 보내며, 트래픽은 백업 경로를 사용하여 다시 라우팅해야 합니다. 영향을 받는 목적지 접두사로의 라우팅은 BGP가 BGP 접두사에 대한 새 다음 홉 계산을 시작하기 전에도 백업 경로를 계속 사용합니다. 라우터는 BGP를 통한 글로벌 컨버전스가 해결될 때까지 이 백업 경로를 사용하여 트래픽 손실을 줄입니다.
도달 가능성 상실이 신호로 전송될 때까지 가동 중단이 발생하는 시간은 실제로 가장 가까운 라우터의 고장 감지 시간과 IGP 컨버전스 시간에 따라 달라집니다. 로컬 라우터가 중단을 감지하면 BGP PIC 기능이 활성화되지 않은 경로 컨버전스는 영향을 받는 접두사의 수와 영향을 받는 각 접두사의 재계산으로 인한 라우터의 성능에 크게 좌우됩니다. 그러나 BGP PIC 기능이 활성화된 상태에서 BGP가 영향을 받는 접두사에 대한 최적의 경로를 다시 계산하기 전에도 라우팅 엔진은 데이터 평면에 신호를 보내 대기 중인 차선 경로로 전환합니다. 따라서 트래픽 손실이 최소화됩니다. 트래픽이 전달되는 동안에도 새 경로가 계산되고 이러한 새 경로는 데이터 플레인으로 푸시됩니다. 따라서, 영향을 받는 BGP 접두사의 수는 트래픽 중단이 발생한 시점부터 BGP가 도달 가능성 상실을 알리는 시점까지 걸리는 시간에 영향을 미치지 않습니다.
또한보십시오
Inet에 대한 BGP 접두사 독립 컨버전스 구성
BGP PIC(Prefix Independent Convergence) 지원 라우터에서 Junos OS는 라우팅 엔진에 간접 다음 홉을 위한 백업 경로를 설치하고 이 경로를 패킷 포워딩 엔진 및 IGP에 제공합니다. IGP는 하나 이상의 경로가 있는 접두사에 대한 도달 가능성을 잃으면 라우팅 테이블을 업데이트하기 전에 단일 메시지로 라우팅 엔진에 신호를 보냅니다. 라우팅 엔진은 간접 다음 홉이 실패했음을 패킷 포워딩 엔진에 신호를 보내며, 트래픽은 백업 경로를 사용하여 다시 라우팅해야 합니다. 영향을 받는 목적지 접두사로의 라우팅은 BGP가 BGP 접두사에 대한 새 다음 홉 계산을 시작하기 전에도 백업 경로를 계속 사용합니다. 라우터는 BGP를 통한 글로벌 컨버전스가 해결될 때까지 이 백업 경로를 사용하여 트래픽 손실을 줄입니다. 처음에 레이어 3 VPN 라우터에서 지원되었던 BGP PIC 기능은 inet 및 inet6 유니캐스트, inet 및 inet6 레이블 유니캐스트와 같은 글로벌 테이블의 여러 경로를 통해 BGP로 확장됩니다.
시작하기 전에:
디바이스 인터페이스를 구성합니다.
OSPF 또는 기타 IGP 프로토콜을 구성합니다.
MPLS 및 LDP를 구성합니다.
BGP를 구성합니다.
BGP PIC 기능은 MPC 인터페이스가 있는 라우터에서만 지원됩니다.
MPC(Modular Port Concentrator)가 있는 라우터에서 다음과 같이 향상된 IP 네트워크 서비스를 활성화합니다.
[edit chassis network-services] user@host# set enhanced-ip
inet을 위한 BGP PIC 구성:
또한보십시오
예: Inet에 대한 BGP 접두사 독립 컨버전스 구성
이 예에서는 inet에 대한 BGP PIC를 구성하는 방법을 보여줍니다. 라우터 장애의 경우 BGP 네트워크는 네트워크 크기 또는 라우터 성능과 같은 매개 변수에 따라 복구하는 데 몇 초에서 몇 분 정도 걸릴 수 있습니다. BGP PIC(Prefix Independent Convergence) 기능이 라우터에서 활성화되어 있으면 inet 및 inet6 유니캐스트, inet 및 inet6 labeled 유니캐스트와 같은 글로벌 테이블에 여러 경로가 있는 BGP는 목적지에 대해 계산된 최적의 경로 외에 두 번째로 적합한 경로를 패킷 포워딩 엔진에 설치합니다. 라우터는 네트워크에서 송신 라우터에 장애가 발생할 때 이 백업 경로를 사용하여 중단 시간을 대폭 줄입니다.
요구 사항
이 예제를 구성하기 전에 디바이스 초기화 이외의 특별한 구성은 필요하지 않습니다.
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
BGP PIC 기능을 구성하기 위한 MPC 장착 MX 시리즈 라우터 1개
-
M Series, MX 시리즈, T 시리즈 또는 PTX 시리즈 라우터의 조합이 가능한 라우터 7개
-
BGP PIC가 구성된 디바이스의 Junos OS 릴리스 15.1 이상
개요
Junos OS 릴리스 15.1부터는 레이어 3 VPN 라우터에 대해 처음에 지원되었던 BGP PIC가 inet 및 inet6 유니캐스트, inet 및 inet6 labeled 유니캐스트와 같은 글로벌 테이블의 여러 경로를 통해 BGP로 확장됩니다. BGP는 목적지에 대해 계산된 최적 경로 외에 두 번째로 최적 경로를 패킷 포워딩 엔진에 설치합니다. IGP에서 접두사에 대한 도달 가능성이 손실되면 라우터는 BGP를 통한 글로벌 컨버전스가 해결될 때까지 이 백업 경로를 사용하여 트래픽 손실을 줄이므로 서비스 중단 시간이 줄어듭니다.
BGP PIC 기능은 MPC가 장착된 라우터에서만 지원됩니다.
토폴로지
이 예는 디바이스 CE0, CE1 및 CE2의 세 가지 고객 에지(CE) 라우터를 보여줍니다. 라우터 PE0, PE1 및 PE2는 프로바이더 에지(PE) 라우터입니다. 라우터 P0 및 P1은 프로바이더 코어 라우터입니다. BGP PIC는 라우터 PE0에서 구성됩니다. 테스트를 위해 주소 192.168.1.5는 디바이스 CE1에 두 번째 루프백 인터페이스 주소로 추가됩니다. 이 주소는 라우터 PE1 및 PE2에 공지되고 내부 BGP(IBGP)가 라우터 PE0에 전달합니다. 라우터 PE0에는 192.168.1.5 네트워크에 대한 경로가 두 개 있습니다. 이는 기본 경로와 백업 경로입니다. 그림 13 은 샘플 네트워크를 보여줍니다.
에 대한 BGP PIC 구성
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 commit을 입력합니다.
라우터 PE0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE0->P0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.5/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::1/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 description PE0->P1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::2/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces ge-0/0/2 unit 0 description PE0->CE0 set interfaces ge-0/0/2 unit 0 family inet address 172.16.0.1/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::10/32 set interfaces ge-0/0/2 unit 0 family mpls set protocols mpls ipv6-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.168.0.1 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.1 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp neighbor 172.16.0.2 description CE0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement lb then load-balance per-packet set policy-options policy-statement nhself then next-hop self set routing-options protect core set routing-options forwarding-table export lb set routing-options router-id 192.168.0.1 set routing-options autonomous-system 64496
라우터 P0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description P0->PE0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.6/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::3/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 description P0->PE1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.9/24 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::4/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.1 set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set routing-options router-id 192.168.0.2 set routing-options autonomous-system 64496
라우터 P1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 unit 0 description P1->PE0 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.2/24 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::5/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/0 unit 0 description P1->PE2 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.13/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::6/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.3 set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set routing-options router-id 192.168.0.3 set routing-options autonomous-system 64496
라우터 PE1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE1->P0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.10/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::7/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description PE1->CE1 set interfaces ge-0/0/1 unit 0 family inet address 172.16.1.1/30 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::12/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.4 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.4 set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp neighbor 172.16.1.2 description CE1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/0.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement PE1-v6-nh_CE1 from family inet6 set policy-options policy-statement PE1-v6-nh_CE1 then next-hop 2001:DB8::13 set policy-options policy-statement nhself then next-hop self set routing-options router-id 192.168.0.4 set routing-options autonomous-system 64496 set routing-options static route 192.168.1.2 next-hop 172.16.1.2
라우터 PE2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE2->P1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.14/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::8/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description PE2->CE2 set interfaces ge-0/0/1 unit 0 family inet address 172.16.2.1/30 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::14/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.5/32 set protocols mpls ipv6-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.5 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.5 set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp neighbor 172.16.2.2 description CE2 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/0.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement nhself then next-hop self set routing-options router-id 192.168.0.5 set routing-options autonomous-system 64496 set routing-options static route 192.168.1.3 next-hop 172.16.2.2
디바이스 CE0
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE0->PE0 set interfaces ge-0/0/2 unit 0 family inet address 172.16.0.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::11/32 set interfaces lo0 unit 0 family inet address 192.168.1.1/32 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp neighbor 172.16.0.1 description PE0 set protocols bgp group ebgp local-address 192.168.1.1 set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.1
디바이스 CE1
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE1->PE1 set interfaces ge-0/0/2 unit 0 family inet address 172.16.1.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::13/32 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.1.2/32 set interfaces lo0 unit 0 family inet address 192.168.1.5/24 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp export send-direct set protocols bgp group ebgp neighbor 172.16.1.1 description PE1 set policy-options policy statement send-direct from protocol direct then accept set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.2
디바이스 CE2
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE2->PE2 set interfaces ge-0/0/2 unit 0 family inet address 172.16.2.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::15/32 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.1.3/32 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp export send-direct set protocols bgp group ebgp neighbor 172.16.2.1 description PE2 set policy-options policy statement send-direct from protocol direct then accept set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.3
디바이스 PE0 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE0 구성:
-
MPC(Modular Port Concentrator)가 있는 라우터에서 향상된 IP 네트워크 서비스를 활성화합니다.
[edit chassis] usr@PE0# set network-services enhanced-ip -
디바이스 인터페이스를 구성합니다.
[edit interfaces] user@PE0# set ge-0/0/0 unit 0 description PE0->P0 user@PE0# set ge-0/0/0 unit 0 family inet address 10.0.0.5/24 user@PE0# set ge-0/0/0 unit 0 family iso user@PE0# set ge-0/0/0 unit 0 family inet6 address 2001:db8::1/32 user@PE0# set ge-0/0/0 unit 0 family mpls user@PE0# set ge-0/0/1 unit 0 description PE0->P1 user@PE0# set ge-0/0/1 unit 0 family inet address 10.0.0.1/24 user@PE0# set ge-0/0/1 unit 0 family iso user@PE0# set ge-0/0/1 unit 0 family inet6 address 2001:db8::2/32 user@PE0# set ge-0/0/1 unit 0 family mpls user@PE0# set ge-0/0/2 unit 0 description PE0->CE0 user@PE0# set ge-0/0/2 unit 0 family inet address 172.16.0.1/30 user@PE0# set ge-0/0/2 unit 0 family inet6 address 2001:db8::10/32 user@PE0# set ge-0/0/2 unit 0 family mpls
-
루프백 인터페이스를 구성합니다.
[edit interfaces] user@PE0# set lo0 unit 0 family inet address 192.168.0.1/32
-
관리 인터페이스를 제외한 모든 인터페이스에서 MPLS 및 LDP를 구성합니다.
[edit protocols] user@PE0# set mpls ipv6-tunneling user@PE0# set mpls interface all user@PE0# set mpls interface fxp0.0 disable user@PE0# set ldp track-igp-metric user@PE0# set ldp interface all user@PE0# set ldp interface fxp0.0 disable
-
코어 대면 인터페이스에서 IGP를 구성합니다.
[edit protocols] user@PE0# set ospf area 0.0.0.0 interface all user@PE0# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE0# set ospf area 0.0.0.0 interface lo0.0 passive user@PE0# set ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 user@PE0# set ospf3 area 0.0.0.0 interface all user@PE0# set ospf3 area 0.0.0.0 interface fxp0.0 disable user@PE0# set ospf3 area 0.0.0.0 interface lo0.0 passive user@PE0# set ospf3 area 0.0.0.0 interface ge-0/0/1.0 metric 1000
-
다른 PE 디바이스와의 IBGP 연결을 구성합니다.
[edit protocols] user@PE0# set bgp group ibgp type internal user@PE0# set bgp group ibgp local-address 192.168.0.1 user@PE0# set bgp group ibgp family inet labeled-unicast per-prefix-label user@PE0# set bgp group ibgp family inet6 labeled-unicast explicit-null user@PE0# set bgp group ibgp export nhself user@PE0# set bgp group ibgp neighbor 192.168.0.4 description PE1 user@PE0# set bgp group ibgp neighbor 192.168.0.5 description PE2
-
고객 디바이스와의 EBGP 연결을 구성합니다.
[edit protocols] user@PE0# set bgp group ebgp type external user@PE0# set bgp group ebgp local address 192.168.0.1 user@PE0# set bgp group ebgp family inet labeled-unicast user@PE0# set bgp group ebgp family inet6 labeled-unicast user@PE0# set bgp group ebgp peer-as 64497 user@PE0# set bgp group ebgp neighbor 172.16.0.2 description CE0
-
로드 밸런싱 정책을 구성합니다.
[edit policy-options] user@PE0# set policy-statement lb then load-balance per-packet
-
다음 홉 self 정책을 구성합니다.
[edit policy-options] user@PE0# set policy-statement nhself then next-hop self
-
BGP PIC 에지 기능을 활성화합니다.
[edit routing-options] user@PE0# set protect core
-
로드 밸런싱 정책을 적용합니다.
[edit routing-options] user@PE0# set forwarding-table export lb
-
라우터 ID 및 AS(Autonomous System) 번호를 할당합니다.
[edit routing-options] user@PE0# set router-id 192.168.0.2 user@PE0# set autonomous-system 64496
결과
구성 모드에서 , show interfaces, show protocols, show policy-options및 show routing-options 명령을 show chassis입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
[edit] user@PE0# show chassis network-services enhanced-ip;
[edit]
user@PE0# show interfaces
ge-0/0/0 {
unit 0 {
description PE0->P0;
family inet {
address 10.0.0.5/24;
}
family iso;
family inet6 {
address 2001:db8::1/32;
}
family mpls;
}
}
ge-0/0/1 {
unit 0 {
description PE0->P1;
family inet {
address 10.0.0.1/24;
}
family iso;
family inet6 {
address 2001:db8::2/32;
}
family mpls;
}
}
ge-0/0/2 {
unit 0 {
description PE0->CE0;
family inet {
address 172.16.0.1/30;
}
family inet6 {
address 2001:db8::10/32;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
[edit]
user@PE0# show protocols
mpls {
ipv6-tunneling;
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
group ibgp {
type internal;
local-address 192.168.0.1;
family inet {
labeled-unicast {
per-prefix-label;
}
}
family inet6 {
labeled-unicast {
explicit-null;
}
}
export nhself;
neighbor 192.168.0.4 {
description PE1;
}
neighbor 192.168.0.5 {
description PE2;
}
}
group ebgp {
type external;
local-address 192.168.0.1;
family inet {
labeled-unicast;
}
family inet6 {
labeled-unicast;
}
peer-as 64497;
neighbor 172.16.0.2 {
description CE0;
}
}
}
ospf {
area 0.0.0.0 {
interface all;
interface lo0.0 {
passive;
}
interface ge-0/0/1.0 {
metric 1000;
}
interface fxp0.0 {
disable;
}
}
}
ospf3 {
area 0.0.0.0 {
interface all;
interface lo0.0 {
passive;
}
interface ge-0/0/1.0 {
metric 1000;
}
interface fxp0.0 {
disable;
}
}
}
ldp {
track-igp-metric;
interface all;
interface fxp0.0 {
disable;
}
}
[edit]
user@PE1# show policy-options
policy-statement lb {
then {
load-balance per-packet;
}
}
policy-statement nhself {
then {
next-hop self;
}
}
[edit]
user@PE0# show routing-options
protect core;
router-id 192.168.0.1;
autonomous system 64496
forwarding-table {
export lb;
}
검증
구성이 제대로 작동하고 있는지 확인합니다.
광범위한 경로 정보 표시
목적
BGP PIC 에지가 작동하는지 확인합니다.
작업
디바이스 PE0에서 명령을 실행합니다 show route extensive .
user@PE0>
show route 192.168.1.5 extensive
inet.0: 236941 destinations, 630411 routes (236940 active, 0 holddown, 1 hidden)
20.1.1.1/32 (3 entries, 2 announced)
State: <CalcForwarding>
TSI:
KRT in-kernel 192.168.1.5/24 -> {indirect(1048574), indirect(1048575)}
@BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xafd09d0
Next-hop reference count: 236886
Source: 192.168.0.4
Next hop type: Router, Next hop index: 623
Next hop: 10.0.0.2 via ge-0/0/1.0, selected
Session Id: 0x140
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144
State: <Active Int Ext ProtectionPath ProtectionCand>
Local AS: 64496 Peer AS: 64496
Age: 1:11 Metric2: 2
Validation State: unverified
Task: BGP_100.192.168.0.5
Announcement bits (1): 6-Resolve tree 2
AS path: 64497 I
Accepted MultipathUnequal
Localpref: 100
Router ID: 192.168.0.5
Indirect next hops: 1
Protocol next hop: 192.168.0.5 Metric: 2
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 10.0.0.2 via ge-0/0/1.0
Session Id: 0x140
192.168.0.5/32 Originating RIB: inet.0
Metric: 2 Node path count: 1
Forwarding nexthops: 1
Nexthop: 10.0.0.2 via ge-0/0/1.0
BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xafd0970
Next-hop reference count: 196735
Source: 192.168.0.4
Next hop type: Router, Next hop index: 624
Next hop: 10.0.0.6 via ge-0/0/0.0, selected
Session Id: 0x141
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145
State: <NotBest Int Ext ProtectionCand>
Inactive reason: Not Best in its group - IGP metric
Local AS: 100 Peer AS: 100
Age: 1:05 Metric2: 1001
Validation State: unverified
Task: BGP_100.192.168.0.4
AS path: 200 400 I
Accepted
Localpref: 100
Router ID: 192.168.0.4
Indirect next hops: 1
Protocol next hop: 192.168.0.4 Metric: 1001
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 10.0.0.6 via ge-0/0/0.0
Session Id: 0x141
192.168.0.4/32 Originating RIB: inet.0
Metric: 1001 Node path count: 1
Forwarding nexthops: 1
Nexthop: 10.0.0.6 via ge-0/0/0.0
#Multipath Preference: 255
Next hop type: Indirect, Next hop index: 0
Address: 0xd330f90
Next-hop reference count: 304062
Next hop type: Router, Next hop index: 623
Next hop: 10.0.0.6 via ge-0/0/0.0, selected
Session Id: 0x140
Next hop type: Router, Next hop index: 624
Next hop: 10.0.0.2 via ge-0/0/1.0
Session Id: 0x141
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144 Weight 0x1
Protocol next hop: 192.168.0.5
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145 Weight 0x4000
State: <ForwardinOnly Int Ext>
Inactive reason: Forwarding use only
Local AS: 64496
Age: 1:05 Metric2: 2
Validation State: unverified
Task: RT
Announcement bits (1): 0-KRT
AS path: 64497 I
의미
Junos OS는 링크 장애가 발생할 때 다음 홉과 weight 값을 사용하여 백업 경로를 선택합니다. 다음 홉 가중치는 다음 값 중 하나를 갖습니다.
-
0x1는 활성 다음 홉이 있는 기본 경로를 나타냅니다.
-
0x4000는 패시브 다음 홉이 있는 백업 경로를 나타냅니다.
포워딩 테이블 표시
목적
명령을 show route forwarding-table 사용하여 포워딩 및 커널 라우팅 테이블 상태를 확인합니다.
작업
디바이스 PE0에서 명령을 실행합니다 show route forwarding-table destination 192.168.1.5 extensive .
user@PE0>
show route forwarding-table destination 192.168.1.5 extensive
Routing table: default.inet [Index 0]
Internet:
Destination: 192.168.1.5/24
Route type: user
Route reference: 0 Route interface-index: 0
Multicast RPF nh index: 0
Flags: sent to PFE
Next-hop type: unilist Index: 1048576 Reference: 7401
Next-hop type: indirect Index: 1048574 Reference: 2 Weight: 0x1
Nexthop: 10.0.0.6
Next-hop type: unicast Index: 623 Reference: 8
Next-hop interface: ge-0/0/0.0 Weight: 0x1
Next-hop type: indirect Index: 1048575 Reference: 2 Weight: 0x4000
Nexthop: 10.0.0.2
Next-hop type: unicast Index: 624 Reference: 8
Next-hop interface: ge-0/0/1.0 Weight: 0x4000
의미
Junos OS는 링크 장애가 발생할 때 다음 홉과 weight 값을 사용하여 백업 경로를 선택합니다. 다음 홉 가중치는 다음 값 중 하나를 갖습니다.
-
0x1는 활성 다음 홉이 있는 기본 경로를 나타냅니다.
-
0x4000는 패시브 다음 홉이 있는 백업 경로를 나타냅니다.
다음 홉 계층 보존 개요
기존의 압축 계층에서는 서비스 레이블이 단일 전송 다음 홉(FNH)으로 병합되어 PFE에서 다음 홉 폭발로 이어질 수 있습니다. 기존의 압축된 계층 구조는 ECMP 잘림 및 계층 가중치 손실과 같은 문제를 일으킬 수도 있습니다.
다음 홉 계층 유지(확장된 계층이라고도 함)는 모든 것을 단일 다음 홉 구조로 병합하는 대신 원래 계층을 유지하면서 각 서비스 레이블을 자체 체인 컴포지트에 유지합니다.
다음 홉 계층 유지의 이점
이 기능은 다음과 같은 이점을 제공합니다.
- 포워딩 Nexthop 리소스 감소: 포워딩 Nexthop 리소스/수를 크게 줄일 수 있습니다.
- 모든 수준의 BGP PIC: 모든 계층 수준(전송, 서비스, 복합 체인)에서 BGP PIC를 지원하여 BGP 경로에 대한 빠른 장애 조치 및 로컬 컨버전스를 보장합니다.
- 계층적 가중치 보존: ECMP 및 계층적 라우팅 시나리오에 대한 가중치 및 대역폭 분포를 유지합니다.
- ECMP 절단 방지: 모든 ECMP 레그가 PFE에 설치되도록 하여 로드 밸런싱 및 복원력을 개선합니다.
레이어 2 서비스(레이어 2 서킷, 레이어 2 VPN), 레이어 3 VPN(IPv4 및 IPv6), VPLS, IPIP 터널, 인터넷 서비스(IPv4, IPv6, 6PE), EVPN 및 PRPD와 같은 서비스는 다음 홉 계층 유지를 지원합니다.
BGP 레이블 유니캐스트, BGP 클래스풀 전송(BGP-CT), RSVP-TE, SR-MPLS, SR-FlexAlgo, SR-TE, SRv6 TE, MPLS-over-UDP와 같은 전송 프로토콜 전송 클래스 인프라로 다음 홉 계층 유지.
다음 홉 계층 유지를 지원하는 플랫폼 목록은 기능 탐색기 도구를 참조하십시오.
다음 홉 계층 유지 구성
다음 홉 계층 보존 기능을 구성하려면 [edit routing-options resolution] 계층 수준에서 문을 포함 preserve-nexthop-hierarchy 합니다. 이를 통해 모든 관련 라우팅 프로세스가 설정된 다음 홉 계층을 준수하도록 보장합니다. 이를 통해 경로 장애 발생 시 효율적인 경로 확인과 더 빠른 적응이 가능해 네트워크 성능 향상에 기여합니다.
다음 홉 계층 보존 기능은 고가용성이 필요하고 MPLS를 통한 세그먼트 라우팅 및 IPv6를 통한 세그먼트 라우팅과 같은 고급 기술과의 원활한 통합이 필요한 네트워크에 이점을 제공합니다. 복잡한 네트워크 아키텍처 전반에서 향상된 트래픽 분산, 중복 및 일관된 라우팅 동작을 제공합니다.
preserve-nexthop-hierarchy 하면 영향을 받는 경로가 가리키는 다음 홉이 다시 계산되어 PFE 및 커널에 다운로드됩니다. 이로 인해 더 높은 규모의 환경에서 디바이스의 CPU 스파이크가 증가하여 경로가 PFE에서 다시 프로그래밍될 때까지 패킷 손실이 발생합니다.
BGP Labeled Unicast를 사용하는 BGP PIC 에지 개요
이 섹션에서는 전송 프로토콜로 BGP labeled 유니캐스트를 사용하는 BGP PIC 에지의 이점과 개요에 대해 설명합니다.
- BGP labeled unicast를 사용하는 BGP PIC 에지의 이점
- BGP 접두사 독립 컨버전스는 어떻게 작동합니까?
- 전송 프로토콜로 BGP labeled unicast를 사용하는 BGP PIC 에지
BGP labeled unicast를 사용하는 BGP PIC 에지의 이점
이 기능은 다음과 같은 이점을 제공합니다.
경계(ABR 및 ASBR) 노드가 멀티도메인 네트워크에서 실패할 경우 트래픽 보호를 제공합니다.
기본 경로를 사용할 수 없는 경우 네트워크 연결을 더 빠르게 복구하고 트래픽 손실을 줄입니다.
BGP 접두사 독립 컨버전스는 어떻게 작동합니까?
BGP 접두사 독립 컨버전스(PIC)는 네트워크 노드 장애에서 BGP 컨버전스를 개선합니다. BGP PIC는 라우팅 엔진에서 간접 다음 홉을 위한 기본 및 백업 경로를 생성하고 저장하며, 또한 패킷 포워딩 엔진에 간접 다음 홉 경로 정보를 제공합니다. 네트워크 노드 장애가 발생하면 라우팅 엔진은 간접 다음 홉이 실패한 것과 BGP 접두사를 수정하지 않고 트래픽이 미리 계산된 equal-cost 또는 백업 경로로 재라우팅된다는 신호를 패킷 포워딩 엔진에 보냅니다. BGP를 통한 글로벌 컨버전스가 해결될 때까지 트래픽 손실을 줄이기 위해 백업 경로를 사용하여 목적지 접두사로의 트래픽 라우팅을 계속합니다.
BGP 컨버전스는 코어 및 에지 네트워크 노드 장애 모두에 적용됩니다. BGP PIC 코어의 경우, 포워딩 체인 조정은 노드 또는 코어 링크 실패의 결과로 이루어집니다. BGP PIC 에지의 경우, 포워딩 체인 조정은 에지 노드 또는 에지 링크 실패의 결과로 이루어집니다.
전송 프로토콜로 BGP labeled unicast를 사용하는 BGP PIC 에지
BGP labeled 유니캐스트 전송 프로토콜을 사용하는 BGP PIC 에지는 멀티도메인 네트워크에서 경계 노드(ABR 및 ASBR) 장애가 발생할 때 트래픽을 보호하고 재라우팅하는 데 도움이 됩니다. 멀티도메인 네트워크는 일반적으로 메트로 이더넷 어그리게이션 및 모바일 백홀 네트워크 설계에 사용됩니다.
주니퍼 네트웍스 MX 시리즈, EX 시리즈 및 PTX 시리즈 디바이스에서 BGP PIC 에지는 전송 프로토콜로 BGP labeled 유니캐스트를 사용하여 레이어 3 서비스를 지원합니다. 또한 주니퍼 네트웍스 MX 시리즈, EX9204, EX9208, EX9214, EX9251 및 EX9253 디바이스에서 BGP PIC 에지는 전송 프로토콜로 BGP labeled 유니캐스트를 사용하여 레이어 2 서킷, 레이어 2 VPN 및 VPLS(BGP VPLS, LDP VPLS 및 FEC 129 VPLS) 서비스를 지원합니다. 이러한 BGP 서비스는 다중 경로(여러 PE에서 학습)이며 BGP 레이블이 지정된 유니캐스트 경로를 통해 해결되며, 다시 다른 ABR에서 학습한 다중 경로가 될 수 있습니다. BGP PIC 에지를 통해 지원되는 전송 프로토콜은 RSVP, LDP, OSPF 및 ISIS입니다. Junos OS 릴리스 20.2R1부터 시작해 MX 시리즈, EX9204, EX9208, EX9214, EX9251 및 EX9253 디바이스는 전송 프로토콜로 BGP labeled 유니캐스트를 사용하여 레이어 2 서킷, 레이어 2 VPN 및 VPLS(BGP VPLS, LDP VPLS 및 FEC 129 VPLS) 서비스에 대한 BGP PIC 에지 보호를 지원합니다.
주니퍼 네트웍스 MX 시리즈, EX 시리즈 및 PTX 시리즈 디바이스에서 전송으로 BGP 레이블 유니캐스트를 사용하는 BGP PIC 에지 보호는 다음 서비스에 지원됩니다:
IPv4 BGP labeled 유니캐스트를 통한 IPv4 서비스
IPv4 BGP 유니캐스트를 통한 IPv6 BGP 유니캐스트 서비스
IPv4 BGP labeled 유니캐스트를 통한 IPv4 레이어 3 VPN 서비스
IPv4 BGP labeled 유니캐스트를 통한 IPv6 레이어 3 VPN 서비스
주니퍼 네트웍스 MX 시리즈 및 EX 시리즈 디바이스에서 전송으로 BGP 레이블링된 유니캐스트를 사용하는 BGP PIC 에지 보호는 다음 서비스에 지원됩니다:
IPv4 BGP labeled 유니캐스트를 통한 레이어 2 서킷 서비스
IPv4 BGP labeled 유니캐스트를 통한 레이어 2 VPN 서비스
IPv4 BGP labeled 유니캐스트를 통한 VPLS(BGP VPLS, LDP VPLS 및 FEC 129 VPLS) 서비스
레이어 2 서비스를 위해 BGP Labeled Unicast를 사용하여 BGP PIC 에지 구성
MX 시리즈, EX9204, EX9208, EX9214, EX9251 및 EX9253 디바이스는 전송 프로토콜로 BGP labeled 유니캐스트를 사용하여 레이어 2 서킷, 레이어 2 VPN 및 VPLS(BGP VPLS, LDP VPLS 및 FEC 129 VPLS) 서비스에 BGP PIC 에지 보호를 지원합니다. BGP labeled 유니캐스트 전송 프로토콜을 사용하는 BGP PIC 에지는 멀티도메인 네트워크에서 경계 노드(ABR 및 ASBR)의 트래픽 장애를 보호하는 데 도움이 됩니다. 멀티도메인 네트워크는 일반적으로 메트로 어그리게이션 및 모바일 백홀 네트워크 설계에 사용됩니다.
BGP PIC 에지 보호를 위한 전제 조건은 확장된 다음 홉 계층으로 패킷 포워딩 엔진(PFE)을 프로그래밍하는 것입니다.
BGP labeled 유니캐스트 제품군에 대해 확장된 다음 홉 계층을 활성화하려면 [edit protocols] 계층 수준에서 다음 CLI 구성 문을 구성해야 합니다.
[edit protocols] user@host#set bgp group group-name family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy;
MPLS 부하 분산 nexthop을 위해 BGP PIC를 활성화하려면 [edit routing-options] 계층 수준에서 다음 CLI 구성 문을 구성해야 합니다.
[edit routing-options] user@host#set rib routing-table-name protect core;
레이어 2 서비스에 대한 빠른 컨버전스를 활성화하려면, [edit protocols] 계층 수준에서 다음 CLI 구성 문을 구성해야 합니다:
레이어 2 서킷 및 LDP VPLS의 경우:
[edit protocols] user@host#set l2circuit resolution preserve-nexthop-heirarchy;
레이어 2 VPN, BGP VPLS 및 FEC129의 경우:
[edit protocols] user@host#set l2vpn resolution preserve-nexthop-heirarchy;
예: BGP Labeled Unicast를 실행하는 레이어 3 VPN을 통한 IPv4 트래픽 보호
이 예는 BGP 접두사 독립 컨버전스(PIC) 에지 레이블 유니캐스트를 구성하고 레이어 3 VPN을 통해 IPv4 트래픽을 보호하는 방법을 보여줍니다. CE 라우터의 IPv4 트래픽이 PE 라우터로 전송되면 IPv4 트래픽은 BGP 레이블이 지정된 유니캐스트가 전송 프로토콜로 구성되는 레이어 3 VPN을 통해 라우팅됩니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
MX 시리즈 라우터.
-
모든 디바이스에서 실행되는 Junos OS 릴리스 19.4R1 이상.
개요
다음 토폴로지는 기본 경로를 사용할 수 없게 될 때마다 트래픽을 백업 경로로 전환하여 ABR 및 ASBR를 모두 보호합니다.
토폴로지
그림 14는 도메인 간 전송 프로토콜로 BGP labeled 유니캐스트를 실행하는 레이어 3 VPN을 보여줍니다.
다음 표에서는 토폴로지에서 사용되는 구성 요소를 설명합니다.
| 기본 구성 요소 |
디바이스 유형 |
위치 |
|---|---|---|
| 세1 |
MX 시리즈 |
고객 네트워크에 연결되어 있습니다. |
| PE1 |
MX 시리즈 |
CE1에서 CE2로 트래픽을 보호하고 재라우팅하기 위한 기본 및 백업 라우팅 경로로 구성됩니다. |
| P1-P3 |
MX 시리즈 |
트래픽 전송을 위한 코어 라우터. |
| ABR1-ABR2 |
MX 시리즈 |
지역 경계 라우터 |
| ABSR1-ABSR4 |
MX 시리즈 |
AS(Autonomous System) 경계 라우터 |
| RR1-RR3 |
MX 시리즈 |
경로 리플렉터 |
| PE2-PE3 |
MX 시리즈 |
고객 에지 라우터(CE2)에 연결된 PE 라우터. |
| 세2 |
MX 시리즈 |
고객 네트워크에 연결되어 있습니다. |
PE2 및 PE3 디바이스 주소는 ABR1 및 ABR2 모두에서 레이블 유니캐스트 경로로 학습됩니다. 이러한 경로는 IGP/LDP 프로토콜을 통해 해결됩니다. PE1은 PE2 및 PE3 디바이스 모두에서 CE2 경로를 학습합니다.
구성
전송 프로토콜로 LDP의 BGP 레이블 유니캐스트를 사용하여 BGP PIC 에지를 구성하려면 다음 작업을 수행합니다.
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 들어갑니다 commit .
디바이스 CE1
set interfaces ge-0/0/1 description CE1-to-PE1-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.0/31 set interfaces ge-0/0/2 description CE1-to-PE1-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.2/31 set interfaces lo0 unit 0 family inet address 10.4.4.4/32 set policy-options policy-statement nhs term 1 from interface lo0.0 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set routing-options router-id 10.4.4.4 set routing-options autonomous-system 65004 set protocols bgp path-selection external-router-id set protocols bgp group toAs2 export nhs set protocols bgp group toAs2 peer-as 65002 set protocols bgp group toAs2 neighbor 192.168.0.1 set protocols bgp group toAs2 neighbor 192.168.0.3
디바이스 PE1
set interfaces ge-0/0/1 description PE1-to-CE1-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.1/31 set interfaces ge-0/0/2 description PE1-to-CE1-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.3/31 set interfaces ge-0/0/3 description PE1-to-P1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.4/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.5/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0005.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement mp-resolv term 1 from route-filter 10.1.1.0/24 orlonger set policy-options policy-statement mp-resolv term 1 then accept set policy-options policy-statement mp-resolv term 1 then multipath-resolve set policy-options policy-statement mp-resolv term 2 from route-filter 10.2.2.0/24 orlonger set policy-options policy-statement mp-resolv term 2 then accept set policy-options policy-statement mp-resolv term 2 then multipath-resolve set policy-options policy-statement mp-resolv term def then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then local-preference 65200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red routing-options multipath preserve-nexthop-hierarchy set routing-instances red routing-options protect core set routing-instances red protocols bgp group toCE1 peer-as 4 set routing-instances red protocols bgp group toCE1 neighbor 192.168.0.2 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/2.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options rib inet.3 protect core set routing-options route-distinguisher-id 10.2.2.5 set routing-options forwarding-table export pplb set routing-options resolution preserve-nexthop-hierarchy set routing-options resolution rib inet.0 import mp-resolv set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.5 set routing-options autonomous-system 2 set routing-options protect core set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/3.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/3.0 set protocols ldp interface ge-0/0/3.0 set protocols mpls label-switched-path toABR1-gold to 10.2.2.3 set protocols mpls label-switched-path toABR1-bronze to 10.2.2.3 set protocols mpls label-switched-path toABR2-gold to 10.2.2.4 set protocols bgp path-selection external-router-id set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.5 set protocols bgp group toAs2RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR export export-inet3 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs4 peer-as 65004 set protocols bgp group toAs4 neighbor 192.168.0.0 set protocols bgp group toAs1PEs multihop no-nexthop-change set protocols bgp group toAs1PEs local-address 10.2.2.5 set protocols bgp group toAs1PEs family inet unicast set protocols bgp group toAs1PEs family inet-vpn unicast set protocols bgp group toAs1PEs family inet6 unicast set protocols bgp group toAs1PEs family inet6-vpn unicast set protocols bgp group toAs1PEs export nhs set protocols bgp group toAs1PEs peer-as 65001 set protocols bgp group toAs1PEs neighbor 10.1.1.1 set protocols bgp group toAs1PEs neighbor 10.1.1.2 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp multipath
디바이스 P1
set interfaces ge-0/0/1 description P1-to-RR1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.6/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P1-to-ABR1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.8/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P1-to-PE1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.5/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P1-to-ABR2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.10/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.8/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0008.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.2.2.8 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
디바이스 RR1
set interfaces ge-0/0/1 description RR1-to-P1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.7/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.6/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.6 set routing-options autonomous-system 2 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-rib inet6.3 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs2Reg2BNs type internal set protocols bgp group toAs2Reg2BNs family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs2Reg2BNs family inet labeled-unicast add-path receive set protocols bgp group toAs2Reg2BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2Reg2BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs2Reg2BNs export export-inet3 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.3 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.4 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.5 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.2.2.6 set protocols bgp cluster 10.2.2.6
디바이스 ABR1
set interfaces ge-0/0/1 description ABR1-to-P2 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.12/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ABR1-to-P1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.9/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.3/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.3 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls label-switched-path toASBR2-gold to 10.2.2.2 set protocols mpls label-switched-path toASBR1-bronze to 10.2.2.1 set protocols mpls label-switched-path toASBR2-bronze to 10.2.2.2 set protocols mpls interface all set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.3 set protocols bgp group toAs2RR advertise-inactive set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR cluster 10.2.2.3 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 ABR2
set interfaces ge-0/0/2 description ABR2-to-P2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.14/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/4 description ABR2-to-P1 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.11/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.4/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.4 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls label-switched-path toASBR1-bronze to 10.2.2.1 set protocols mpls interface all set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.4 set protocols bgp group toAs2RR advertise-inactive set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR cluster 10.2.2.4 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 P2
set interfaces ge-0/0/1 description P2-to-ABR1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.13/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P2-to-ABR2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.15/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P2-to-RR2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.16/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P2-to-ASBR1 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.18/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description P2-to-ASBR2 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.20/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.9/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0009.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.2.2.9 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
디바이스 RR2
set interfaces ge-0/0/3 description RR2-to-P2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.17/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.7/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0007.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.7 set routing-options autonomous-system 65002 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs2Reg1BNs type internal set protocols bgp group toAs2Reg1BNs family inet labeled-unicast add-path receive set protocols bgp group toAs2Reg1BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2Reg1BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.1 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.2 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.3 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.4 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.2.2.7 set protocols bgp cluster 10.2.2.7
디바이스 ASBR1
set interfaces ge-0/0/2 description ASBR1-to-ASBR3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.22/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description ASBR1-to-ASBR4 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.24/31 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description ASBR1-to-P2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.19/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.1/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0001.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.1 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface ge-0/0/4.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/4.0 set protocols ldp interface ge-0/0/4.0 set protocols mpls interface ge-0/0/4.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs1-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs1-T peer-as 1 set protocols bgp group toAs1-T neighbor 192.168.0.23 set protocols bgp group toAs1-T neighbor 192.168.0.27 set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.1 set protocols bgp group toAs2RR advertise-external set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 ASBR2
set interfaces ge-0/0/1 description ASBR2-to-ASBR3 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.28/31 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR2-to-ASBR4 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.26/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/5 description ASBR2-to-P2 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.21/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.2/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0002.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.2 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface ge-0/0/5.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/5.0 set protocols ldp interface ge-0/0/5.0 set protocols mpls interface ge-0/0/5.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs1-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs1-T peer-as 1 set protocols bgp group toAs1-T neighbor 192.168.0.29 set protocols bgp group toAs1-T neighbor 192.168.0.25 set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.2 set protocols bgp group toAs2RR advertise-external set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 ASBR3
set interfaces ge-0/0/1 description ASBR3-to-ASBR2 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.29/31 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR3-to-ASBR1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.23/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/4 description ASBR3-to-P3 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.30/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.3/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.1.1.3 set routing-options autonomous-system 65001 set protocols isis level 1 disable set protocols isis interface ge-0/0/4.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/4.0 set protocols ldp interface ge-0/0/4.0 set protocols mpls label-switched-path toPE2-gold to 10.1.1.1 set protocols mpls interface ge-0/0/4.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs2-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs2-T peer-as 65002 set protocols bgp group toAs2-T neighbor 192.168.0.22 set protocols bgp group toAs2-T neighbor 192.168.0.28 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.3 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 ASBR4
set interfaces ge-0/0/1 description ASBR4-to-P3 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.32/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR4-to-ASBR2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.27/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description ASBR4-to-ASBR1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.25/31 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.4/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.1.1.4 set routing-options autonomous-system 65001 set protocols isis level 1 disable set protocols isis interface ge-0/0/1.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/1.0 set protocols mpls label-switched-path toPE2-bronze to 10.1.1.1 set protocols mpls label-switched-path toPE3-bronze to 10.1.1.2 set protocols mpls interface ge-0/0/1.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs2-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs2-T peer-as 2 set protocols bgp group toAs2-T neighbor 192.168.0.26 set protocols bgp group toAs2-T neighbor 192.168.0.24 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.4 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 RR3
set interfaces ge-0/0/2 description RR3-to-P3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.35/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.6/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.6 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs1BNs type internal set protocols bgp group toAs1BNs family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1BNs family inet labeled-unicast add-path receive set protocols bgp group toAs1BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs1BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs1BNs export export-inet3 set protocols bgp group toAs1BNs neighbor 10.1.1.3 set protocols bgp group toAs1BNs neighbor 10.1.1.4 set protocols bgp group toAs1BNs neighbor 10.1.1.2 set protocols bgp group toAs1BNs neighbor 10.1.1.1 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.1.1.6 set protocols bgp cluster 10.1.1.6
디바이스 P3
set interfaces ge-0/0/1 description P3-to-ASBR4 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.33/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P3-to-RR3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.34/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P3-to-PE2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.36/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P3-to-ASBR3 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.31/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description P3-to-PE3 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.38/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.5/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0005.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.1.1.5 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
디바이스 PE2
set interfaces ge-0/0/1 description PE2-to-CE2-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.40/31 set interfaces ge-0/0/2 description PE2-to-CE2-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.42/31 set interfaces ge-0/0/3 description PE2-to-P3 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.37/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.1/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0001.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then metric add 0 set policy-options policy-statement nhs term 1 then local-preference 200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red protocols bgp group toCE2 peer-as 65003 set routing-instances red protocols bgp group toCE2 neighbor 192.168.0.43 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/2.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options route-distinguisher-id 10.1.1.1 set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.1 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/3.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/3.0 set protocols ldp interface ge-0/0/3.0 set protocols mpls interface ge-0/0/3.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs3-1 peer-as 65003 set protocols bgp group toAs3-1 neighbor 192.168.0.41 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.1 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1RR family inet labeled-unicast add-path receive set protocols bgp group toAs1RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR family inet6-vpn unicast set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR export export-inet3 set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp group toAs2PEs multihop no-nexthop-change set protocols bgp group toAs2PEs local-address 10.1.1.1 set protocols bgp group toAs2PEs family inet unicast set protocols bgp group toAs2PEs family inet-vpn unicast set protocols bgp group toAs2PEs family inet6 unicast set protocols bgp group toAs2PEs family inet6-vpn unicast set protocols bgp group toAs2PEs export nhs set protocols bgp group toAs2PEs peer-as 65002 set protocols bgp group toAs2PEs neighbor 10.2.2.5 set protocols bgp group toAs2PEs vpn-apply-export set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 PE3
set interfaces ge-0/0/3 description PE3-to-CE2-Link1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.44/31 set interfaces ge-0/0/4 description PE3-to-CE2-Link2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.46/31 set interfaces ge-0/0/5 description PE3-to-P3 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.39/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.2/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0002.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then metric add 0 set policy-options policy-statement nhs term 1 then local-preference 200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red protocols bgp group toCE2 peer-as 65003 set routing-instances red protocols bgp group toCE2 neighbor 192.168.0.47 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/4.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options route-distinguisher-id 10.1.1.2 set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.2 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/5.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/5.0 set protocols ldp interface ge-0/0/5.0 set protocols mpls interface ge-0/0/5.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs3 peer-as 65003 set protocols bgp group toAs3 neighbor 192.168.0.45 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.2 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR export export-inet3 set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp group toAs2PEs multihop no-nexthop-change set protocols bgp group toAs2PEs local-address 10.1.1.2 set protocols bgp group toAs2PEs family inet unicast set protocols bgp group toAs2PEs family inet-vpn unicast set protocols bgp group toAs2PEs family inet6 unicast set protocols bgp group toAs2PEs family inet6-vpn unicast set protocols bgp group toAs2PEs export nhs set protocols bgp group toAs2PEs peer-as 65002 set protocols bgp group toAs2PEs neighbor 10.2.2.5 set protocols bgp group toAs2PEs vpn-apply-export set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
디바이스 CE2
set interfaces ge-0/0/1 description CE2-to-PE2-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.41/31 set interfaces ge-0/0/2 description CE2-to-PE2-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.43/31 set interfaces ge-0/0/3 description CE2-to-PE3-Link1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.45/31 set interfaces ge-0/0/4 description CE2-to-PE3-Link2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.47/31 set interfaces lo0 unit 0 family inet address 10.3.3.3/32 set policy-options policy-statement nhs term 1 from interface lo0.0 set policy-options policy-statement nhs term 1 then metric 50 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement nhsMED100 term 1 from interface lo0.0 set policy-options policy-statement nhsMED100 term 1 then metric 100 set policy-options policy-statement nhsMED100 term 1 then next-hop self set policy-options policy-statement nhsMED100 term 1 then accept set policy-options community map2bronze members 100:200 set policy-options community map2gold members 100:100 set policy-options community map2gold_bronze_plain members 300:400 set routing-options router-id 10.3.3.3 set routing-options autonomous-system 65003 set protocols bgp path-selection external-router-id set protocols bgp group toAs1Internet export nhs set protocols bgp group toAs1Internet peer-as 65001 set protocols bgp group toAs1Internet neighbor 192.168.0.40 set protocols bgp group toAs1Internet neighbor 192.168.0.44 export nhsMED100 set protocols bgp group toAs1L3VPN export nhs set protocols bgp group toAs1L3VPN peer-as 65001 set protocols bgp group toAs1L3VPN neighbor 192.168.0.46 set protocols bgp group toAs1L3VPN neighbor 192.168.0.42 export nhsMED100
CE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 CE1 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@CE1#set ge-0/0/1 description CE1-to-PE1-Link1 user@CE1#set ge-0/0/1 vlan-tagging user@CE1#set ge-0/0/1 unit 0 vlan-id 100 user@CE1#set ge-0/0/1 unit 0 family inet address 192.168.0.0/31 user@CE1#set ge-0/0/2 description CE1-to-PE1-Link2 user@CE1#set ge-0/0/2 vlan-tagging user@CE1#set ge-0/0/2 unit 0 vlan-id 100 user@CE1#set ge-0/0/2 unit 0 family inet address 192.168.0.2/31
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@CE1#set lo0 unit 0 family inet address 10.4.4.4/32
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@CE1#set policy-statement nhs term 1 from interface lo0.0 user@CE1#set policy-statement nhs term 1 then next-hop self user@CE1#set policy-statement nhs term 1 then accept
-
라우팅 옵션을 구성합니다.
[edit routing-options] user@CE1#set router-id 10.4.4.4 user@CE1#set autonomous-system 65004
-
ABR에 BGP 유니캐스트를 구성하여 BGP 유니캐스트 접두사로 루프백 IP 주소를 교환합니다.
[edit protocols bgp] user@CE1#set path-selection external-router-id user@CE1#set group toAs2 export nhs user@CE1#set group toAs2 peer-as 65002 user@CE1#set group toAs2 neighbor 192.168.0.1 user@CE1#set group toAs2 neighbor 192.168.0.3
결과
구성 모드에서 , show policy-options, show routing-options및 show protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description CE1-to-PE1-Link1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.0/31;
}
}
}
ge-0/0/2 {
description CE1-to-PE1-Link2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.2/31;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.4.4.4/32;
}
}
}
}
policy-options {
policy-statement nhs {
term 1 {
from interface lo0.0;
then {
next-hop self;
accept;
}
}
}
}
routing-options {
router-id 10.4.4.4;
autonomous-system 65004;
}
protocols {
bgp {
path-selection external-router-id;
group toAs2 {
export nhs;
peer-as 65002;
neighbor 192.168.0.1;
neighbor 192.168.0.3;
}
}
}
PE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE1 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@PE1#set ge-0/0/1 description PE1-to-CE1-Link1 user@PE1#set ge-0/0/1 vlan-tagging user@PE1#set ge-0/0/1 unit 0 vlan-id 100 user@PE1#set ge-0/0/1 unit 0 family inet address 192.168.0.1/31 user@PE1#set ge-0/0/2 description PE1-to-CE1-Link2 user@PE1#set ge-0/0/2 vlan-tagging user@PE1#set ge-0/0/2 unit 0 vlan-id 100 user@PE1#set ge-0/0/2 unit 0 family inet address 192.168.0.3/31 user@PE1#set ge-0/0/3 description PE1-to-P1 user@PE1#set ge-0/0/3 vlan-tagging user@PE1#set ge-0/0/3 unit 0 vlan-id 100 user@PE1#set ge-0/0/3 unit 0 family inet address 192.168.0.4/31 user@PE1#set ge-0/0/3 unit 0 family iso user@PE1#set ge-0/0/3 unit 0 family mpls
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@PE1#set lo0 unit 1 family inet address 10.2.2.5/32 user@PE1#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0005.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@PE1#set policy-statement add-noexport term 1 then community add noexport user@PE1#set policy-statement allow-lo0 term 1 from interface lo0.1 user@PE1#set policy-statement allow-lo0 term 1 then accept user@PE1#set policy-statement allow-lo0 term 2 then reject user@PE1#set policy-statement export-inet3 term 1 from rib inet.3 user@PE1#set policy-statement export-inet3 term 1 then accept user@PE1#set policy-statement export-inet3 term 2 then reject user@PE1#set policy-statement mp-resolv term 1 from route-filter 10.1.1.0/24 orlonger user@PE1#set policy-statement mp-resolv term 1 then accept user@PE1#set policy-statement mp-resolv term 1 then multipath-resolve user@PE1#set policy-statement mp-resolv term 2 from route-filter 10.2.2.0/24 orlonger user@PE1#set policy-statement mp-resolv term 2 then accept user@PE1#set policy-statement mp-resolv term 2 then multipath-resolve user@PE1#set policy-statement mp-resolv term def then reject user@PE1#set policy-statement nhs term 1 from protocol bgp user@PE1#set policy-statement nhs term 1 then local-preference 200 user@PE1#set policy-statement nhs term 1 then next-hop self user@PE1#set policy-statement nhs term 1 then accept user@PE1#set policy-statement pplb then load-balance per-packet user@PE1#set policy-statement vrf-export-red term 1 then community add leak2red user@PE1#set policy-statement vrf-export-red term 1 then accept user@PE1#set policy-statement vrf-import-red term 1 from community leak2red user@PE1#set policy-statement vrf-import-red term 1 then accept user@PE1#set community leak2red members target:100:100 user@PE1#set community noexport members no-export user@PE1#set community noexport members no-advertise
-
고객 서비스를 제공하기 위해 레이어 3 VPN 라우팅 인스턴스를 구성합니다.
[edit routing-instances] user@PE1#set red routing-options multipath preserve-nexthop-hierarchy user@PE1#set red routing-options protect core user@PE1#set red protocols bgp group toCE1 peer-as 65004 user@PE1#set red protocols bgp group toCE1 neighbor 192.168.0.2 user@PE1#set red instance-type vrf user@PE1#set red interface ge-0/0/2.0 user@PE1#set red vrf-import vrf-import-red user@PE1#set red vrf-export vrf-export-red
-
확인자 RIB 가져오기 정책 및 해결 RIB를 구성하여 정책에서 지정된 선택된 레이어 3 VPN 접두사에 대해 확장된 계층 다음 홉 구조를 활성화합니다.
[edit routing-options] user@PE1#set rib inet.3 protect core user@PE1#set route-distinguisher-id 10.2.2.5 user@PE1#set forwarding-table export pplb user@PE1#set resolution preserve-nexthop-hierarchy user@PE1#set resolution rib inet.0 import mp-resolv user@PE1#set interface-routes rib-group inet inet0to3 user@PE1#set router-id 10.2.2.5 user@PE1#set autonomous-system 65002 user@PE1#set protect core user@PE1#set rib-groups inet0to3 import-rib inet.0 user@PE1#set rib-groups inet0to3 import-rib inet.3 user@PE1#set rib-groups inet0to3 import-policy allow-lo0 user@PE1#set rib-groups inet3to0 import-rib inet.3 user@PE1#set rib-groups inet3to0 import-rib inet.0 user@PE1#set rib-groups inet3to0 import-policy add-noexport
-
OSPF 프로토콜을 구성합니다.
[edit protocols ospf] user@PE1#set protocols ospf area 0.0.0.0 interface all link-protection; user@PE1#set protocols ospf area 0.0.0.0 interface fxp0.0 disable; user@PE1#set protocols ospf area 0.0.0.0 interface lo0.0 passive;
-
도메인 전반에 IP 및 MPLS 연결을 구축하도록 라우팅 프로토콜을 구성합니다.
[edit protocols] user@PE1#set isis level 1 disable user@PE1#set isis interface ge-0/0/3.0 user@PE1#set isis export allow-lo0 user@PE1#set isis topologies ipv6-unicast user@PE1#set rsvp interface ge-0/0/3.0 user@PE1#set ldp interface ge-0/0/3.0 user@PE1#set mpls label-switched-path toABR1-gold to 10.2.2.3 user@PE1#set mpls label-switched-path toABR1-bronze to 10.2.2.3 user@PE1#set mpls label-switched-path toABR2-gold to 10.2.2.4
-
ABR에 BGP 유니캐스트를 구성하여 BGP 유니캐스트 접두사로 루프백 IP 주소를 교환합니다.
[edit protocols bgp] user@PE1#set path-selection external-router-id user@PE1#set group toAs2RR type internal user@PE1#set group toAs2RR local-address 10.2.2.5 user@PE1#set group toAs2RR family inet labeled-unicast rib-group inet3to0 user@PE1#set group toAs2RR family inet labeled-unicast add-path receive user@PE1#set group toAs2RR family inet labeled-unicast add-path send path-count 4 user@PE1#set group toAs2RR family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy user@PE1#set group toAs2RR family inet labeled-unicast rib inet.3 user@PE1#set group toAs2RR export nhs user@PE1#set group toAs2RR export export-inet3 user@PE1#set group toAs2RR neighbor 10.2.2.6 user@PE1#set group toAs4 peer-as 65004 user@PE1#set group toAs4 neighbor 192.168.0.0 user@PE1#set group toAs1PEs multihop no-nexthop-change user@PE1#set group toAs1PEs local-address 10.2.2.5 user@PE1#set group toAs1PEs family inet unicast user@PE1#set group toAs1PEs family inet-vpn unicast user@PE1#set group toAs1PEs family inet6 unicast user@PE1#set group toAs1PEs family inet6-vpn unicast user@PE1#set group toAs1PEs export nhs user@PE1#set group toAs1PEs peer-as 65001 user@PE1#set group toAs1PEs neighbor 10.1.1.1 user@PE1#set group toAs1PEs neighbor 10 .1.1.2 user@PE1#set traceoptions file bgp.log user@PE1#set traceoptions file size 100m user@PE1#set traceoptions flag state detail user@PE1#set traceoptions flag policy user@PE1#set multipath
결과
구성 모드에서 , show interfaces, show policy-options, show routing-instances,, 및show routing-optionsshow protocols 명령을 show chassis입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description PE1-to-CE1-Link1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.1/31;
}
}
}
ge-0/0/2 {
description PE1-to-CE1-Link2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.3/31;
}
}
}
ge-0/0/3 {
description PE1-to-P1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.4/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 1 {
family inet {
address 10.2.2.5/32;
}
family iso {
address 49.0000.0000.aaaa.0005.00;
}
}
}
}
policy-options {
policy-statement add-noexport {
term 1 {
then {
community add noexport;
}
}
}
policy-statement allow-lo0 {
term 1 {
from interface lo0.1;
then accept;
}
term 2 {
then reject;
}
}
policy-statement export-inet3 {
term 1 {
from rib inet.3;
then accept;
}
term 2 {
then reject;
}
}
policy-statement mp-resolv {
term 1 {
from {
route-filter 10.1.1.0/24 orlonger;
}
then {
accept;
multipath-resolve;
}
}
term 2 {
from {
route-filter 10.2.2.0/24 orlonger;
}
then {
accept;
multipath-resolve;
}
}
term def {
then reject;
}
}
policy-statement nhs {
term 1 {
from protocol bgp;
then {
local-preference 200;
next-hop self;
accept;
}
}
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
policy-statement vrf-export-red {
term 1 {
then {
community add leak2red;
accept;
}
}
}
policy-statement vrf-import-red {
term 1 {
from community leak2red;
then accept;
}
}
community leak2red members target:100:100;
community noexport members [ no-export no-advertise ];
}
routing-instances {
red {
routing-options {
multipath preserve-nexthop-hierarchy;
protect core;
}
protocols {
bgp {
group toCE1 {
peer-as 65004;
neighbor 192.168.0.2;
}
}
}
instance-type vrf;
interface ge-0/0/2.0;
vrf-import vrf-import-red;
vrf-export vrf-export-red;
}
}
routing-options {
rib inet.3 {
protect core;
}
route-distinguisher-id 10.2.2.5;
forwarding-table {
export pplb;
}
resolution {
preserve-nexthop-hierarchy;
rib inet.0 {
import mp-resolv;
}
}
interface-routes {
rib-group inet inet0to3;
}
router-id 10.2.2.5;
autonomous-system 65002;
protect core;
rib-groups {
inet0to3 {
import-rib [ inet.0 inet.3 ];
import-policy allow-lo0;
}
inet3to0 {
import-rib [ inet.3 inet.0 ];
import-policy add-noexport;
}
}
}
protocols {
isis {
level 1 disable;
interface ge-0/0/3.0;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface ge-0/0/3.0;
}
bgp {
path-selection external-router-id;
group toAs2RR {
type internal;
local-address 10.2.2.5;
family inet {
labeled-unicast {
rib-group inet3to0;
add-path {
receive;
send {
path-count 4;
}
}
nexthop-resolution {
preserve-nexthop-hierarchy;
}
rib {
inet.3;
}
}
}
export [ nhs export-inet3 ];
neighbor 10.2.2.6;
}
group toAs4 {
peer-as 65004;
neighbor 192.168.0.0;
}
group toAs1PEs {
multihop {
no-nexthop-change;
}
local-address 10.2.2.5;
family inet {
unicast;
}
family inet-vpn {
unicast;
}
family inet6 {
unicast;
}
family inet6-vpn {
unicast;
}
export nhs;
peer-as 65001;
neighbor 10.1.1.1;
neighbor 10.1.1.2;
}
traceoptions {
file bgp.log size 100m;
flag state detail;
flag policy;
}
multipath;
}
ldp {
interface ge-0/0/3.0;
}
mpls {
label-switched-path toABR1-gold {
to 10.2.2.3;
}
label-switched-path toABR1-bronze {
to 10.2.2.3;
}
label-switched-path toABR2-gold {
to 10.2.2.4;
}
}
}
P1 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 P1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@P1#set ge-0/0/1 description P1-to-RR1 user@P1#set ge-0/0/1 vlan-tagging user@P1#set ge-0/0/1 unit 0 vlan-id 100 user@P1#set ge-0/0/1 unit 0 family inet address 192.168.0.6/31 user@P1#set ge-0/0/1 unit 0 family iso user@P1#set ge-0/0/1 unit 0 family mpls user@P1#set ge-0/0/2 description P1-to-ABR1 user@P1#set ge-0/0/2 vlan-tagging user@P1#set ge-0/0/2 unit 0 vlan-id 100 user@P1#set ge-0/0/2 unit 0 family inet address 192.168.0.8/31 user@P1#set ge-0/0/2 unit 0 family iso user@P1#set ge-0/0/2 unit 0 family mpls user@P1#set ge-0/0/3 description P1-to-PE1 user@P1#set ge-0/0/3 vlan-tagging user@P1#set ge-0/0/3 unit 0 vlan-id 100 user@P1#set ge-0/0/3 unit 0 family inet address 192.168.0.5/31 user@P1#set ge-0/0/3 unit 0 family iso user@P1#set ge-0/0/3 unit 0 family mpls user@P1#set ge-0/0/4 description P1-to-ABR2 user@P1#set ge-0/0/4 vlan-tagging user@P1#set ge-0/0/4 unit 0 vlan-id 100 user@P1#set ge-0/0/4 unit 0 family inet address 192.168.0.10/31 user@P1#set ge-0/0/4 unit 0 family iso user@P1#set ge-0/0/4 unit 0 family mpls
-
루프백 인터페이스를 구성합니다.
[edit interfaces] user@P1#set lo0 unit 0 family inet address 10.2.2.8/32 user@P1#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0008.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@P1#set policy-statement allow-lo0 term 1 from interface lo0.0 user@P1#set policy-statement allow-lo0 term 1 then accept user@P1#set policy-statement allow-lo0 term 2 then reject
-
라우팅 옵션을 구성합니다.
[edit routing-options] user@P1#set router-id 10.2.2.8
-
인터페이스에 ISIS, RSVP, LDP 및 MPLS 프로토콜을 구성합니다.
[edit protocols] user@P1#set isis level 1 disable user@P1#set isis interface all user@P1#set isis export allow-lo0 user@P1#set isis topologies ipv6-unicast user@P1#set rsvp interface all user@P1#set ldp interface all user@P1#set mpls interface all
결과
구성 모드에서 , show policy-options및 show protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description P1-to-RR1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.6/31;
}
family iso;
family mpls;
}
}
ge-0/0/2 {
description P1-to-ABR1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.8/31;
}
family iso;
family mpls;
}
}
ge-0/0/3 {
description P1-to-PE1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.5/31;
}
family iso;
family mpls;
}
}
ge-0/0/4 {
description P1-to-ABR2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.10/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.2.2.8/32;
}
family iso {
address 49.0000.0000.aaaa.0008.00;
}
}
}
}
policy-options {
policy-statement allow-lo0 {
term 1 {
from interface lo0.0;
then accept;
}
term 2 {
then reject;
}
}
}
routing-options {
router-id 10.2.2.8;
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
ldp {
interface all;
}
mpls {
interface all;
}
}
RR1 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 RR1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@RR1#set ge-0/0/1 description RR1-to-P1 user@RR1#set ge-0/0/1 vlan-tagging user@RR1#set ge-0/0/1 unit 0 vlan-id 100 user@RR1#set ge-0/0/1 unit 0 family inet address 192.168.0.7/31 user@RR1#set ge-0/0/1 unit 0 family iso user@RR1#set ge-0/0/1 unit 0 family mpls
-
루프백 인터페이스를 구성합니다.
[edit interfaces] user@RR1#set lo0 unit 1 family inet address 10.2.2.6/32 user@RR1#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@RR1#set policy-statement add-noexport term 1 then community add noexport user@RR1#set policy-statement allow-lo0 term 1 from interface lo0.1 user@RR1#set policy-statement allow-lo0 term 1 then accept user@RR1#set policy-statement allow-lo0 term 2 then reject user@RR1#set policy-statement export-inet3 term 1 from rib inet.3 user@RR1#set policy-statement export-inet3 term 1 then accept user@RR1#set policy-statement export-inet3 term 2 then reject user@RR1#set policy-statement pplb then load-balance per-packet user@RR1#set community noexport members no-export user@RR1#set community noexport members no-advertise
-
라우팅 옵션을 구성합니다.
[edit routing-options] user@RR1#set forwarding-table export pplb user@RR1#set interface-routes rib-group inet inet0to3 user@RR1#set router-id 10.2.2.6 user@RR1#set autonomous-system 2 user@RR1#set rib-groups inet0to3 import-rib inet.0 user@RR1#set rib-groups inet0to3 import-rib inet.3 user@RR1#set rib-groups inet0to3 import-policy allow-lo0 user@RR1#set rib-groups inet3to0 import-rib inet.3 user@RR1#set rib-groups inet3to0 import-rib inet.0 user@RR1#set rib-groups inet3to0 import-rib inet6.3 user@RR1#set rib-groups inet3to0 import-policy add-noexport
-
인터페이스에 ISIS, RSVP, LDP 및 MPLS 프로토콜을 구성합니다.
[edit protocols] user@RR1#set isis level 1 disable user@RR1#set isis interface all user@RR1#set isis export allow-lo0 user@RR1#set isis topologies ipv6-unicast user@RR1#set rsvp interface all user@RR1#set ldp interface all user@RR1#set mpls interface all
-
BGP 유니캐스트 구성하여 루프백 IP 주소를 BGP 유니캐스트 접두사로 교환합니다.
[edit protocols bgp] user@RR1#set path-selection external-router-id user@RR1#set group toAs2Reg2BNs type internal user@RR1#set group toAs2Reg2BNs family inet labeled-unicast rib-group inet3to0 user@RR1#set group toAs2Reg2BNs family inet labeled-unicast add-path receive user@RR1#set group toAs2Reg2BNs family inet labeled-unicast add-path send path-count 4 user@RR1#set group toAs2Reg2BNs family inet labeled-unicast rib inet.3 user@RR1#set group toAs2Reg2BNs export export-inet3 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.3 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.4 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.5 user@RR1#set traceoptions file bgp.log user@RR1#set traceoptions file size 100m user@RR1#set traceoptions flag state detail user@RR1#set traceoptions flag policy user@RR1#set local-address 10.2.2.6 user@RR1#set cluster 10.2.2.6
결과
구성 모드에서 , show policy-options및 show routing-optionsshow protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description RR1-to-P1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.7/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 1 {
family inet {
address 10.2.2.6/32;
}
family iso {
address 49.0000.0000.aaaa.0006.00;
}
}
}
}
policy-options {
policy-statement add-noexport {
term 1 {
then {
community add noexport;
}
}
}
policy-statement allow-lo0 {
term 1 {
from interface lo0.1;
then accept;
}
term 2 {
then reject;
}
}
policy-statement export-inet3 {
term 1 {
from rib inet.3;
then accept;
}
term 2 {
then reject;
}
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
community noexport members [ no-export no-advertise ];
}
routing-options {
forwarding-table {
export pplb;
}
interface-routes {
rib-group inet inet0to3;
}
router-id 10.2.2.6;
autonomous-system 2;
rib-groups {
inet0to3 {
import-rib [ inet.0 inet.3 ];
import-policy allow-lo0;
}
inet3to0 {
import-rib [ inet.3 inet.0 inet6.3 ];
import-policy add-noexport;
}
}
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
bgp {
path-selection external-router-id;
group toAs2Reg2BNs {
type internal;
family inet {
labeled-unicast {
rib-group inet3to0;
add-path {
receive;
send {
path-count 4;
}
}
rib {
inet.3;
}
}
}
export export-inet3;
neighbor 10.2.2.3;
neighbor 10.2.2.4;
neighbor 10.2.2.5;
}
traceoptions {
file bgp.log size 100m;
flag state detail;
flag policy;
}
local-address 10.2.2.6;
cluster 10.2.2.6;
}
ldp {
interface all;
}
mpls {
interface all;
}
}
ABR1 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 ABR1 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@ABR1#set ge-0/0/1 description ABR1-to-P2 user@ABR1#set ge-0/0/1 vlan-tagging user@ABR1#set ge-0/0/1 unit 0 vlan-id 100 user@ABR1#set ge-0/0/1 unit 0 family inet address 192.168.0.12/31 user@ABR1#set ge-0/0/1 unit 0 family iso user@ABR1#set ge-0/0/1 unit 0 family mpls user@ABR1#set ge-0/0/2 description ABR1-to-P1 user@ABR1#set ge-0/0/2 vlan-tagging user@ABR1#set ge-0/0/2 unit 0 vlan-id 100 user@ABR1#set ge-0/0/2 unit 0 family inet address 192.168.0.9/31 user@ABR1#set ge-0/0/2 unit 0 family iso user@ABR1#set ge-0/0/2 unit 0 family mpls
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@ABR1#set lo0 unit 0 family inet address 10.2.2.3/32 user@ABR1#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@ABR1#set policy-statement allow-lo0 term 1 from interface lo0.0 user@ABR1#set policy-statement allow-lo0 term 1 then accept user@ABR1#set policy-statement allow-lo0 term 2 then reject user@ABR1#set policy-statement nhs term 1 from protocol bgp user@ABR1#set policy-statement nhs term 1 then next-hop self user@ABR1#set policy-statement nhs term 1 then accept user@ABR1#set policy-statement pplb then load-balance per-packet
-
트래픽 보호를 활성화하기 위해 flow별 부하 분산 정책을 적용합니다.
[edit routing-options] user@ABR1#set forwarding-table export pplb user@ABR1#set router-id 10.2.2.3 user@ABR1#set autonomous-system 65002
-
인터페이스에서 ISIS, RSVP, MPLS 및 LDP 프로토콜을 구성합니다.
[edit protocols] user@ABR1#set isis level 1 disable user@ABR1#set isis interface all user@ABR1#set isis export allow-lo0 user@ABR1#set isis topologies ipv6-unicast user@ABR1#set rsvp interface all user@ABR1#set ldp interface all user@ABR1#set mpls label-switched-path toASBR2-gold to 10.2.2.2 user@ABR1#set mpls label-switched-path toASBR1-bronze to 10.2.2.1 user@ABR1#set mpls label-switched-path toASBR2-bronze to 10.2.2.2 user@ABR1#set mpls interface all
-
BGP 유니캐스트 구성하여 루프백 IP 주소를 BGP 유니캐스트 접두사로 교환합니다.
[edit protocols] user@ABR1#set bgp group toAs2RR type internal user@ABR1#set bgp group toAs2RR local-address 10.2.2.3 user@ABR1#set bgp group toAs2RR advertise-inactive user@ABR1#set bgp group toAs2RR family inet labeled-unicast add-path receive user@ABR1#set bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 user@ABR1#set bgp group toAs2RR family inet labeled-unicast rib inet.3 user@ABR1#set bgp group toAs2RR export nhs user@ABR1#set bgp group toAs2RR cluster 10.2.2.3 user@ABR1#set bgp group toAs2RR neighbor 10.2.2.6 user@ABR1#set bgp group toAs2RR neighbor 10.2.2.7 user@ABR1#set bgp traceoptions file bgp.log user@ABR1#set bgp traceoptions file size 100m user@ABR1#set bgp traceoptions flag state detail user@ABR1#set bgp traceoptions flag policy
결과
구성 모드에서 , show policy-options및 show routing-optionsshow protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description ABR1-to-P2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.12/31;
}
family iso;
family mpls;
}
}
ge-0/0/2 {
description ABR1-to-P1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.9/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.2.2.3/32;
}
family iso {
address 49.0000.0000.aaaa.0003.00;
}
}
}
}
policy-options {
policy-statement allow-lo0 {
term 1 {
from interface lo0.0;
then accept;
}
term 2 {
then reject;
}
}
policy-statement nhs {
term 1 {
from protocol bgp;
then {
next-hop self;
accept;
}
}
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
}
routing-options {
forwarding-table {
export pplb;
}
router-id 10.2.2.3;
autonomous-system 65002;
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
bgp {
group toAs2RR {
type internal;
local-address 10.2.2.3;
advertise-inactive;
family inet {
labeled-unicast {
add-path {
receive;
send {
path-count 4;
}
}
rib {
inet.3;
}
}
}
export nhs;
cluster 10.2.2.3;
neighbor 10.2.2.6;
neighbor 10.2.2.7;
}
traceoptions {
file bgp.log size 100m;
flag state detail;
flag policy;
}
}
ldp {
interface all;
}
mpls {
label-switched-path toASBR2-gold {
to 10.2.2.2;
}
label-switched-path toASBR1-bronze {
to 10.2.2.1;
}
label-switched-path toASBR2-bronze {
to 10.2.2.2;
}
interface all;
}
}
ABR2 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 ABR2 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@ABR2#set ge-0/0/2 description ABR2-to-P2 user@ABR2#set ge-0/0/2 vlan-tagging user@ABR2#set ge-0/0/2 unit 0 vlan-id 100 user@ABR2#set ge-0/0/2 unit 0 family inet address 192.168.0.14/31 user@ABR2#set ge-0/0/2 unit 0 family iso user@ABR2#set ge-0/0/2 unit 0 family mpls user@ABR2#set ge-0/0/4 description ABR2-to-P1 user@ABR2#set ge-0/0/4 vlan-tagging user@ABR2#set ge-0/0/4 unit 0 vlan-id 100 user@ABR2#set ge-0/0/4 unit 0 family inet address 192.168.0.11/31 user@ABR2#set ge-0/0/4 unit 0 family iso user@ABR2#set ge-0/0/4 unit 0 family mpls
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@ABR2#set lo0 unit 0 family inet address 2.2.2.4/32 user@ABR2#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@ABR2#set policy-statement allow-lo0 term 1 from interface lo0.0 user@ABR2#set policy-statement allow-lo0 term 1 then accept user@ABR2#set policy-statement allow-lo0 term 2 then reject user@ABR2#set policy-statement nhs term 1 from protocol bgp user@ABR2#set policy-statement nhs term 1 then next-hop self user@ABR2#set policy-statement nhs term 1 then accept user@ABR2#set policy-statement pplb then load-balance per-packet
-
트래픽 보호를 활성화하기 위해 flow별 부하 분산 정책을 적용합니다.
[edit routing-options] user@ABR2#set forwarding-table export pplb user@ABR2#set router-id 2.2.2.4 user@ABR2#set autonomous-system 2
-
인터페이스에서 ISIS, RSVP, MPLS 및 LDP 프로토콜을 구성합니다.
[edit protocols] user@ABR2#set isis level 1 disable user@ABR2#set isis interface all user@ABR2#set isis export allow-lo0 user@ABR2#set isis topologies ipv6-unicast user@ABR2#set rsvp interface all user@ABR2#set ldp interface all user@ABR2#set mpls label-switched-path toASBR1-bronze to 2.2.2.1 user@ABR2#set mpls interface all
-
BGP 유니캐스트 구성하여 루프백 IP 주소를 BGP 유니캐스트 접두사로 교환합니다.
[edit protocols] user@ABR2#set bgp group toAs2RR type internal user@ABR2#set bgp group toAs2RR local-address 2.2.2.4 user@ABR2#set bgp group toAs2RR advertise-inactive user@ABR2#set bgp group toAs2RR family inet labeled-unicast add-path receive user@ABR2#set bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 user@ABR2#set bgp group toAs2RR family inet labeled-unicast rib inet.3 user@ABR2#set bgp group toAs2RR export nhs user@ABR2#set bgp group toAs2RR cluster 2.2.2.4 user@ABR2#set bgp group toAs2RR neighbor 2.2.2.6 user@ABR2#set bgp group toAs2RR neighbor 2.2.2.7 user@ABR2#set bgp traceoptions file bgp.log user@ABR2#set bgp traceoptions file size 100m user@ABR2#set bgp traceoptions flag state detail user@ABR2#set bgp traceoptions flag policy
결과
구성 모드에서 , show policy-options및 show routing-optionsshow protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/2 {
description ABR2-to-P2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.14/31;
}
family iso;
family mpls;
}
}
ge-0/0/4 {
description ABR2-to-P1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.11/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 2.2.2.4/32;
}
family iso {
address 49.0000.0000.aaaa.0004.00;
}
}
}
}
policy-options {
policy-statement allow-lo0 {
term 1 {
from interface lo0.0;
then accept;
}
term 2 {
then reject;
}
}
policy-statement nhs {
term 1 {
from protocol bgp;
then {
next-hop self;
accept;
}
}
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
}
routing-options {
forwarding-table {
export pplb;
}
router-id 2.2.2.4;
autonomous-system 2;
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
bgp {
group toAs2RR {
type internal;
local-address 2.2.2.4;
advertise-inactive;
family inet {
labeled-unicast {
add-path {
receive;
send {
path-count 4;
}
}
rib {
inet.3;
}
}
}
export nhs;
cluster 2.2.2.4;
neighbor 2.2.2.6;
neighbor 2.2.2.7;
}
traceoptions {
file bgp.log size 100m;
flag state detail;
flag policy;
}
}
ldp {
interface all;
}
mpls {
label-switched-path toASBR1-bronze {
to 2.2.2.1;
}
interface all;
}
}
P2 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 P2 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@P2#set ge-0/0/1 description P2-to-ABR1 user@P2#set ge-0/0/1 vlan-tagging user@P2#set ge-0/0/1 unit 0 vlan-id 100 user@P2#set ge-0/0/1 unit 0 family inet address 192.168.0.13/31 user@P2#set ge-0/0/1 unit 0 family iso user@P2#set ge-0/0/1 unit 0 family mpls user@P2#set ge-0/0/2 description P2-to-ABR2 user@P2#set ge-0/0/2 vlan-tagging user@P2#set ge-0/0/2 unit 0 vlan-id 100 user@P2#set ge-0/0/2 unit 0 family inet address 192.168.0.15/31 user@P2#set ge-0/0/2 unit 0 family iso user@P2#set ge-0/0/2 unit 0 family mpls user@P2#set ge-0/0/3 description P2-to-RR2 user@P2#set ge-0/0/3 vlan-tagging user@P2#set ge-0/0/3 unit 0 vlan-id 100 user@P2#set ge-0/0/3 unit 0 family inet address 192.168.0.16/31 user@P2#set ge-0/0/3 unit 0 family iso user@P2#set ge-0/0/3 unit 0 family mpls user@P2#set ge-0/0/4 description P2-to-ASBR1 user@P2#set ge-0/0/4 vlan-tagging user@P2#set ge-0/0/4 unit 0 vlan-id 100 user@P2#set ge-0/0/4 unit 0 family inet address 192.168.0.18/31 user@P2#set ge-0/0/4 unit 0 family iso user@P2#set ge-0/0/4 unit 0 family mpls user@P2#set ge-0/0/5 description P2-to-ASBR2 user@P2#set ge-0/0/5 vlan-tagging user@P2#set ge-0/0/5 unit 0 vlan-id 100 user@P2#set ge-0/0/5 unit 0 family inet address 192.168.0.20/31 user@P2#set ge-0/0/5 unit 0 family iso user@P2#set ge-0/0/5 unit 0 family mpls
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@P2#set lo0 unit 0 family inet address 2.2.2.9/32 user@P2#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0009.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@P2#set policy-statement allow-lo0 term 1 from interface lo0.0 user@P2#set policy-statement allow-lo0 term 1 then accept user@P2#set policy-statement allow-lo0 term 2 then reject
-
라우팅 옵션을 구성합니다.
[edit routing-options] user@P2#set router-id 2.2.2.9
-
인터페이스에서 ISIS, RSVP, MPLS 및 LDP 프로토콜을 구성합니다.
[edit protocols] user@P2#set isis level 1 disable user@P2#set isis interface all user@P2#set isis export allow-lo0 user@P2#set isis topologies ipv6-unicast user@P2#set rsvp interface all user@P2#set ldp interface all user@P2#set mpls interface all
결과
구성 모드에서 , show policy-options및 show routing-optionsshow protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/1 {
description P2-to-ABR1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.13/31;
}
family iso;
family mpls;
}
}
ge-0/0/2 {
description P2-to-ABR2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.15/31;
}
family iso;
family mpls;
}
}
ge-0/0/3 {
description P2-to-RR2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.16/31;
}
family iso;
family mpls;
}
}
ge-0/0/4 {
description P2-to-ASBR1;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.18/31;
}
family iso;
family mpls;
}
}
ge-0/0/5 {
description P2-to-ASBR2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.20/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 2.2.2.9/32;
}
family iso {
address 49.0000.0000.aaaa.0009.00;
}
}
}
}
policy-options {
policy-statement allow-lo0 {
term 1 {
from interface lo0.0;
then accept;
}
term 2 {
then reject;
}
}
}
routing-options {
router-id 2.2.2.9;
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
ldp {
interface all;
}
mpls {
interface all;
}
}
RR2 디바이스 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준을 탐색해야 합니다. CLI 탐색에 대한 정보는 CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 RR2 구성:
-
IP 및 MPLS 전송을 활성화하도록 인터페이스를 구성합니다.
[edit interfaces] user@RR2#set ge-0/0/3 description RR2-to-P2 user@RR2#set ge-0/0/3 vlan-tagging user@RR2#set ge-0/0/3 unit 0 vlan-id 100 user@RR2#set ge-0/0/3 unit 0 family inet address 192.168.0.17/31 user@RR2#set ge-0/0/3 unit 0 family iso user@RR2#set ge-0/0/3 unit 0 family mpls
-
LDP 및 BGP 세션을 위한 라우터 ID 및 종료 인터페이스로 사용할 루프백 인터페이스를 구성합니다.
[edit interfaces] user@RR2#set lo0 unit 1 family inet address 2.2.2.7/32 user@RR2#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0007.00
-
다중 경로 확인 정책을 구성하여 PFE에 계층 다중 경로를 설치합니다.
[edit policy-options] user@RR2#set policy-statement allow-lo0 term 1 from interface lo0.1 user@RR2#set policy-statement allow-lo0 term 1 then accept user@RR2#set policy-statement allow-lo0 term 2 then reject user@RR2#set policy-statement export-inet3 term 1 from rib inet.3 user@RR2#set policy-statement export-inet3 term 1 then accept user@RR2#set policy-statement export-inet3 term 2 then reject user@RR2#set policy-statement pplb then load-balance per-packet
-
트래픽 보호를 활성화하기 위해 flow별 부하 분산 정책을 적용합니다.
[edit routing-options] user@RR2#set forwarding-table export pplb user@RR2#set interface-routes rib-group inet inet0to3 user@RR2#set router-id 2.2.2.7 user@RR2#set autonomous-system 2 user@RR2#set rib-groups inet0to3 import-rib inet.0 user@RR2#set rib-groups inet0to3 import-rib inet.3 user@RR2#set rib-groups inet0to3 import-policy allow-lo0
-
인터페이스에서 ISIS, RSVP, MPLS 및 LDP 프로토콜을 구성합니다.
[edit protocols] user@RR2#set isis level 1 disable user@RR2#set isis interface all user@RR2#set isis export allow-lo0 user@RR2#set isis topologies ipv6-unicast user@RR2#set rsvp interface all user@RR2#set ldp interface all user@RR2#set mpls interface all
-
BGP 유니캐스트 구성하여 루프백 IP 주소를 BGP 유니캐스트 접두사로 교환합니다.
[edit protocols] user@RR2#set bgp path-selection external-router-id user@RR2#set bgp group toAs2Reg1BNs type internal user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast add-path receive user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast add-path send path-count 4 user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast rib inet.3 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.1 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.2 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.3 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.4 user@RR2#set bgp traceoptions file bgp.log user@RR2#set bgp traceoptions file size 100m user@RR2#set bgp traceoptions flag state detail user@RR2#set bgp traceoptions flag policy user@RR2#set bgp local-address 2.2.2.7 user@RR2#set bgp cluster 2.2.2.7
결과
구성 모드에서 , show policy-options및 show routing-optionsshow protocols 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
interfaces {
ge-0/0/3 {
description RR2-to-P2;
vlan-tagging;
unit 0 {
vlan-id 100;
family inet {
address 192.168.0.17/31;
}
family iso;
family mpls;
}
}
lo0 {
unit 1 {
family inet {
address 2.2.2.7/32;
}
family iso {
address 49.0000.0000.aaaa.0007.00;
}
}
}
}
policy-options {
policy-statement allow-lo0 {
term 1 {
from interface lo0.1;
then accept;
}
term 2 {
then reject;
}
}
policy-statement export-inet3 {
term 1 {
from rib inet.3;
then accept;
}
term 2 {
then reject;
}
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
}
routing-options {
forwarding-table {
export pplb;
}
interface-routes {
rib-group inet inet0to3;
}
router-id 2.2.2.7;
autonomous-system 2;
rib-groups {
inet0to3 {
import-rib [ inet.0 inet.3 ];
import-policy allow-lo0;
}
}
}
protocols {
isis {
level 1 disable;
interface all;
export allow-lo0;
topologies ipv6-unicast;
}
rsvp {
interface all;
}
bgp {
path-selection external-router-id;
group toAs2Reg1BNs {
type internal;
family inet {
labeled-unicast {
add-path {
receive;
send {
path-count 4;
}
}
rib {
inet.3;
}
}
}
neighbor 2.2.2.1;
neighbor 2.2.2.2;
neighbor 2.2.2.3;
neighbor 2.2.2.4;
}
traceoptions {
file bgp.log size 100m;
flag state detail;
flag policy;
}
local-address 2.2.2.7;
cluster 2.2.2.7;
}
ldp {
interface all;
}
mpls {
interface all;
}
}
검증
구성이 제대로 작동하고 있는지 확인합니다.
다음 홉이 해결되는지 검증
목적
PE1에서 PE2 및 PE3 다음 홉이 해결되는지 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route forwarding-table destination .
user@PE1> show route forwarding-table destination 10.3.3.3 extensive table default | match Weight
Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x4000
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
user@PE1> show route forwarding-table destination 10.3.3.3 extensive table red | match Weight
Weight: 0x1
Weight: 0x1
Next-hop interface: ge-0/0/3.0 Weight: 0x1
Weight: 0x4000
Weight: 0x4000
Next-hop interface: ge-0/0/3.0 Weight: 0x4000
의미
가중치와 0x4000 기본 및 백업 다음 홉에 대한 가중치 0x1 를 볼 수 있습니다.
라우팅 테이블의 다음 홉 항목 확인
목적
PE1에서 활성 다음 홉 라우팅 항목을 확인합니다.
작업
운영 모드에서 명령을 실행합니다 show route extensive expanded-nh .
user@PE1> show route 10.3.3.3 extensive expanded-nh
inet.0: 36 destinations, 65 routes (36 active, 0 holddown, 0 hidden)
10.3.3.3/32 (2 entries, 1 announced)
Installed-nexthop:
List (0xd6ba4b8) Index:1048626
Indr (0xc593cac) 10.1.1.1
Krt_inh (0xcc14684) Index:1048614
List (0xc4cf7b4) Index:1048613
Frr_inh (0xc592730) Index:1048608
Chain (0xc59334c) Index:651 Push 300368
Router (0xc58ea40) Index:628 192.168.0.5 Push 299808
Frr_inh (0xc592604) Index:1048609
Chain (0xc5924d8) Index:649 Push 300384
Router (0xc58ea40) Index:628 192.168.0.5 Push 299808
Frr_inh (0xc592154) Index:1048611
Chain (0xc591bdc) Index:654 Push 300368
Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824
Frr_inh (0xc5921b8) Index:1048612
Chain (0xc591a4c) Index:655 Push 300384
Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824
Indr (0xc593ab8) 10.1.1.2
Krt_inh (0xcc14f84) Index:1048624
List (0xc4d0074) Index:1048623
Frr_inh (0xc5939f0) Index:1048619
Chain (0xc592ab4) Index:638 Push 300144
Router (0xc58ea40) Index:628 192.168.0.5 Push 299808
Frr_inh (0xc593a54) Index:1048620
Chain (0xc591efc) Index:637 Push 300160
Router (0xc58ea40) Index:628 192.168.0.5 Push 299808
Frr_inh (0xc59172c) Index:1048589
Chain (0xc5903a4) Index:640 Push 300144
Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824
Frr_inh (0xc59159c) Index:1048590
Chain (0xc58fa44) Index:639 Push 300160
Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824
TSI:
<SNIP>
Protocol next hop: 10.1.1.1
Indirect next hop: 0xcc14684 1048614 INH Session ID: 0x146 Weight 0x1
Protocol next hop: 10.1.1.2
Indirect next hop: 0xcc14f84 1048624 INH Session ID: 0x145 Weight 0x4000
State: >Active Ext>
Local AS: 65002 Peer AS: 65001
<SNIP>
Indirect next hops: 2
Protocol next hop: 10.1.1.1 Metric: 1
Indirect next hop: 0xcc14684 1048614 INH Session ID: 0x146 Weight 0x1
Indirect path forwarding next hops (Merged): 4
<SNIP>
Protocol next hop: 10.1.1.2 Metric: 1
Indirect next hop: 0xcc14f84 1048624 INH Session ID: 0x145 Weight 0x4000
Indirect path forwarding next hops (Merged): 4
의미
기본 및 백업 다음 홉에 대한 가중치 0x1 를 0x4000 볼 수 있습니다.
BGP L2VPN 및 VPLS를 위한 FAT 유사 회선 지원 개요
유사 회선은 레이어 2 서킷 또는 MPLS 패킷 교환 네트워크(PSN)를 통해 T1 라인과 같은 통신 서비스의 필수 속성을 에뮬레이션하는 서비스입니다. 유사 회선은 주어진 서비스 정의에 필요한 복원력 요구 사항을 갖춘 회선을 에뮬레이션하는 데 필요한 최소 기능만 제공하기 위한 것입니다.
MPLS 네트워크에서 유사 회선 flow 레이블의 FAT(flow-aware transport)은 draft-keyupdate-l2vpn-fat-pw-bgp에 설명되어 있으며, L2VPN(Layer 2 virtual private network) 및 VPLS(virtual private LAN service)를 위한 BGP 신호 유사 회선에서 로드 밸런싱 트래픽에 사용됩니다.
FAT flow 레이블은 레이블 에지 라우터(LER)에서만 구성됩니다. 이는 전송 라우터 또는 LSR(label-switching routers)이 payload를 심층 패킷 검사할 필요 없이 ECMP(equal-cost 다중 경로) 경로 또는 LAG(link aggregation groups)에서 MPLS 패킷의 로드 밸런싱을 수행하게 합니다.
FAT flow 레이블은 VPWS용 LDP-신호 포워딩 동급 클래스(FEC 128 및 FEC 129) 유사 회선 및 VPLS 유사 회선을 위해 사용될 수 있습니다. 인터페이스 매개 변수(서브-TLV)는 FEC 128 및 FEC 129 유사 회선에 모두 사용됩니다. LDP에 정의된 서브-TLV는 전송(T)과 수신(R) 비트를 포함합니다. T 비트는 flow 레이블을 푸시하는 기능을 광고합니다. R 비트는 flow 레이블을 접속하는 기능을 광고합니다. 기본적으로 이러한 유사 회선에 대한 프로바이더 에지(PE) 라우터의 신호 동작은 0으로 설정된 레이블에서 T 및 R 비트를 광고합니다.
flow-label-transmit 및 flow-label-receive 구성 문은 LDP 레이블 매핑 메시지를 위한 FEC 인터페이스 매개 변수의 일부인 서브-TLV 필드에서 T 비트 및 R 비트 광고를 1로 설정하는 기능을 제공합니다. 이러한 문을 사용하여 로드 밸런싱 레이블과 레이블의 광고를 L2VPN 및 VPLS와 같은 BGP 신호 유사 회선을 위한 컨트롤 플레인의 라우팅 피어로 푸시하는 것을 제어할 수 있습니다.
또한보십시오
Load-balance MPLS 트래픽을 위해 BGP L2VPN을 위한 FAT 유사 회선 지원 구성
FAT(Flow-Aware Transport) 또는 flow 레이블은 LER(label edge routers)에서만 구성되는 L2VPN과 같은 BGP-신호 유사 회선을 지원합니다. 이를 통해 전송 라우터 또는 LSR(label-switching routers)은 payload의 심층 패킷 검사 없이 ECMP(equal-cost 다중 경로) 경로 또는 LAG(link aggregation groups)에서 MPLS 패킷의 로드 밸런싱을 수행할 수 있습니다. FAT 유사 회선 또는 flow 레이블은 포워딩 동급 클래스(FEC128 및 FEC129)가 있는 LDP 신호 L2VPN과 함께 사용할 수 있으며, flow 레이블에 대한 지원은 point-to-point 또는 point–to-multipoint 레이어 2 서비스용 BGP-신호 유사 회선에 대해 확장됩니다.
BGP L2VPN을 위한 FAT 유사 회선 지원을 구성하여 MPLS 트래픽을 로드밸런싱하기 전에 다음 작업을 수행합니다.
디바이스 인터페이스를 구성하고 모든 인터페이스에서 MPLS를 활성화합니다.
RSVP를 구성합니다.
원격 PE 라우터에 MPLS 및 LSP를 구성합니다.
BGP 및 OSPF를 구성합니다.
BGP L2VPN을 위한 FAT 유사 회선 지원을 구성하여 MPLS 트래픽을 로드밸런싱하려면 다음을 수행해야 합니다.
또한보십시오
예: BGP L2VPN을 위한 FAT 유사 회선 지원을 구성하여 MPLS 트래픽 로드 밸런싱
이 예는 BGP L2VPN을 위한 FAT 유사 회선 지원을 구현하여 로드 밸런싱 MPLS 트래픽을 지원하는 방법을 보여줍니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
MX 시리즈 라우터 5개
-
모든 디바이스에서 실행되는 Junos OS 릴리스 16.1 이상
BGP L2VPN을 위한 FAT 유사 회선 지원을 구성하기 전에, 라우팅 및 신호 전송 프로토콜을 구성해야 합니다.
개요
Junos OS는 L2VPN과 같은 BGP 신호 유사 회선을 지원하는 FAT(flow-aware transport) flow 레이블을 LER(label edge routers)에서만 구성할 수 있습니다. 이는 전송 라우터 또는 LSR(label-switching routers)이 payload의 심층 패킷 검사 없이 ECMP(equal-cost 다중 경로) 경로 또는 LAG(link aggregation groups)에서 MPLS 패킷의 로드 밸런싱을 수행하게 합니다. FAT flow 레이블은 VPWS용 LDP-신호 포워딩 동급 클래스(FEC 128 및 FEC 129) 유사 회선 및 VPLS 유사 회선에 사용될 수 있습니다.
토폴로지
그림 15 는 디바이스 PE1 및 디바이스 PE2에서 구성된 BGP L2VPN에 대한 FAT 유사 회선 지원을 보여줍니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 들어갑니다 commit .
세1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 10.255.255.8/32
PE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 mtu 1600 set interfaces ge-0/0/0 encapsulation vlan-ccc set interfaces ge-0/0/0 unit 300 encapsulation vlan-ccc set interfaces ge-0/0/0 unit 300 vlan-id 600 set interfaces ge-0/0/0 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family vpls set interfaces ge-0/0/1 unit 0 family inet address 1.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.1/32 set routing-options nonstop-routing set routing-options router-id 10.255.255.1 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe2 to 10.255.255.4 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.1 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.4 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances l2vpn-inst instance-type l2vpn set routing-instances l2vpn-inst interface ge-0/0/0.300 set routing-instances l2vpn-inst route-distinguisher 10.255.255.1:200 set routing-instances l2vpn-inst vrf-target target:100:100 set routing-instances l2vpn-inst protocols l2vpn encapsulation-type ethernet-vlan set routing-instances l2vpn-inst protocols l2vpn site pe1 site-identifier 1 set routing-instances l2vpn-inst protocols l2vpn site pe1 interface ge-0/0/0.300 remote-site-id 2 set routing-instances l2vpn-inst protocols l2vpn flow-label-transmit set routing-instances l2vpn-inst protocols l2vpn flow-label-receive set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/0.600 set routing-instances vpl1 route-distinguisher 10.255.255.1:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE1 site-identifier 1 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
피
set interfaces ge-0/0/0 unit 0 family inet address 1.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 2.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.2/32 set routing-options router-id 10.255.255.2 set routing-options autonomous-system 100 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.2 set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.4 deactivate protocols bgp set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
PE2
set interfaces ge-0/0/0 unit 0 family inet address 2.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 mtu 1600 set interfaces ge-0/0/1 encapsulation vlan-ccc set interfaces ge-0/0/1 unit 300 encapsulation vlan-ccc set interfaces ge-0/0/1 unit 300 vlan-id 600 set interfaces ge-0/0/1 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 vlan-id 600 set interfaces ge-0/0/1 unit 600 family vpls set interfaces lo0 unit 0 family inet address 10.255.255.4/32 set routing-options router-id 10.255.255.4 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe1 to 10.255.255.1 set protocols mpls interface ge-0/0/0.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.4 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances l2vpn-inst instance-type l2vpn set routing-instances l2vpn-inst interface ge-0/0/1.300 set routing-instances l2vpn-inst route-distinguisher 10.255.255.4:200 set routing-instances l2vpn-inst vrf-target target:100:100 set routing-instances l2vpn-inst protocols l2vpn encapsulation-type ethernet-vlan set routing-instances l2vpn-inst protocols l2vpn site pe2 site-identifier 2 set routing-instances l2vpn-inst protocols l2vpn site pe2 interface ge-0/0/1.300 remote-site-id 1 set routing-instances l2vpn-inst protocols l2vpn flow-label-transmit set routing-instances l2vpn-inst protocols l2vpn flow-label-receive set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/1.600 set routing-instances vpl1 route-distinguisher 10.255.255.4:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE2 site-identifier 2 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive deactivate routing-instances vpl1
세2
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.2/24 set interfaces lo0 unit 0 family inet address 10.255.255.9/32
PE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE1# set ge-0/0/0 vlan-tagging user@PE1# set ge-0/0/0 mtu 1600 user@PE1# set ge-0/0/0 encapsulation vlan-ccc user@PE1# set ge-0/0/0 unit 300 encapsulation vlan-ccc user@PE1# set ge-0/0/0 unit 300 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 family vpls deactivate interfaces ge-0/0/0 unit 600 user@PE1# set ge-0/0/1 unit 0 family inet address 1.0.0.1/24 user@PE1# set ge-0/0/1 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.255.255.1/32
-
논스톱 라우팅을 구성하고 라우터 ID를 구성합니다.
[edit routing-options] user@PE1# set nonstop-routing user@PE1# set router-id 10.255.255.1
-
AS(Autonomous System) 번호를 구성하고 export 문으로 로컬 라우터의 포워딩 테이블에 정책을 적용합니다.
[edit routing-options] user@PE1# set autonomous-system 100 user@PE1# set forwarding-table export exp-to-frwd
-
인터페이스에서 RSVP 프로토콜을 구성합니다.
[edit protocols rsvp] user@PE1# set interface all user@PE1# set interface ge-0/0/1.0 user@PE1# set interface lo0.0
-
레이블 스위칭 경로 속성을 MPLS 프로토콜에 적용하고 인터페이스를 구성합니다.
[edit protocols mpls] user@PE1# set label-switched-path to-pe2 to 10.255.255.4 user@PE1# set interface ge-0/0/1.0
-
피어 그룹을 정의하고 피어 그룹을
vpls-pe위한 BGP 세션의 local-end 주소를 구성합니다.[edit protocols bgp group vpls-pe] user@PE1# set type internal user@PE1# set local-address 10.255.255.1
-
업데이트에서 NLRI에 대한 프로토콜 family의 속성을 구성합니다.
[edit protocols bgp group vpls-pe] user@PE1# set family l2vpn auto-discovery-only user@PE1# set family l2vpn signaling
-
피어 그룹
vpls-pe에 대한 neighbor를 구성합니다.[edit protocols bgp group vpls-pe] user@PE1# set neighbor 10.255.255.4 user@PE1# set neighbor 10.255.255.2
-
트래픽 엔지니어링을 구성하고, OSPF 영역 0.0.0.0의 인터페이스를 구성합니다.
[edit protocols ospf] user@PE1# set traffic-engineering user@PE1# set area 0.0.0.0 interface lo0.0 passive user@PE1# set area 0.0.0.0 interface ge-0/0/1.0
-
라우팅 정책 및 BGP 커뮤니티 정보를 구성합니다.
[edit policy-options] user@PE1# set policy-statement exp-to-fwd term 0 from community vpls-com user@PE1# set policy-statement exp-to-fwd term 0 then install-nexthop lsp to-pe2 user@PE1# set policy-statement exp-to-fwd term 0 then accept user@PE1# set community vpls-com members target:100:100
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances l2vpn-inst] user@PE1# set instance-type l2vpn user@PE1# set interface ge-0/0/0.300
-
예를 들어
l2vpn-inst경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances l2vpn-inst] user@PE1# set route-distinguisher 10.255.255.1:200 user@PE1# set vrf-target target:100:100
-
L2VPN 프로토콜에 필요한 캡슐화 유형을 구성합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set encapsulation-type ethernet-vlan
-
공급자 장비에 연결된 사이트를 구성합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set site pe1 site-identifier 1 user@PE1# set site pe1 interface ge-0/0/0.300 remote-site-id 2
-
라우팅 인스턴스에 대한 L2VPN 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set flow-label-transmit user@PE1# set flow-label-receive
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances vpl1] user@PE1# set instance-type vpls user@PE1# set interface ge-0/0/0.600
-
예를 들어
vp1경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances vpl1] user@PE1# set route-distinguisher 10.255.255.1:100 user@PE1# set vrf-target target:100:100
-
VPLS 도메인에 최대 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE1# set site-range 10
-
VPLS 인스턴스에 터널 서비스를 사용하지 않도록 구성하고 공급자 장비에 연결된 사이트에 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE1# set no-tunnel-services user@PE1# set site vpl1PE1 site-identifier 1
-
라우팅 인스턴스에 VPLS 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances vpl1 protocols vpls] user@PE1# set flow-label-transmit user@PE1# set flow-label-receive
결과
구성 모드에서 , show protocols, show policy-options, show routing-instances및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE1# show interfaces
ge-0/0/0 {
vlan-tagging;
mtu 1600;
encapsulation vlan-ccc;
unit 300 {
encapsulation vlan-ccc;
vlan-id 600;
}
unit 600 {
encapsulation vlan-vpls;
vlan-id 600;
family vpls;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 1.0.0.1/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.255.1/32;
}
}
}
user@PE1# show protocols
rsvp {
interface all;
interface ge-0/0/1.0;
interface lo0.0;
}
mpls {
label-switched-path to-pe2 {
to 10.255.255.4;
}
interface ge-0/0/1.0;
}
bgp {
group vpls-pe {
type internal;
local-address 10.255.255.1;
family l2vpn {
auto-discovery-only;
signaling;
}
neighbor 10.255.255.4;
neighbor 10.255.255.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/1.0;
}
}
user@PE1# show policy-options
policy-statement exp-to-frwd {
term 0 {
from community vpls-com;
then {
install-nexthop lsp to-pe2;
accept;
}
}
}
community vpls-com members target:100:100;
user@PE1# show routing-instances
l2vpn-inst {
instance-type l2vpn;
interface ge-0/0/0.300;
route-distinguisher 10.255.255.1:200;
vrf-target target:100:100;
protocols {
l2vpn {
encapsulation-type ethernet-vlan;
site pe1 {
site-identifier 1;
interface ge-0/0/0.300 {
remote-site-id 2;
}
}
flow-label-transmit;
flow-label-receive;
}
}
}
vpl1 {
instance-type vpls;
interface ge-0/0/0.600;
route-distinguisher 10.255.255.1:100;
vrf-target target:100:100;
protocols {
vpls {
site-range 10;
no-tunnel-services;
site vpl1PE1 {
site-identifier 1;
}
flow-label-transmit;
flow-label-receive;
}
}
}
user@PE1# show routing-options
nonstop-routing;
router-id 10.255.255.1;
autonomous-system 100;
forwarding-table {
export exp-to-frwd;
}
검증
구성이 제대로 작동하고 있는지 확인합니다.
BGP 요약 정보 확인
목적
BGP 요약 정보를 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show bgp summary
user@PE1> show bgp summary
Groups: 1 Peers: 2 Down peers: 1
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l2vpn.0
1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.255.255.2 100 0 0 0 0 2d 12:54:28 Active
10.255.255.4 100 8121 8093 0 0 2d 12:53:56 Establ
bgp.l2vpn.0: 1/1/1/0
l2vpn-inst.l2vpn.0: 1/1/1/0
의미
출력은 BGP 요약 정보를 표시합니다.
L2VPN 연결 정보 확인
목적
레이어 2 VPN 연결 정보를 확인합니다.
작업
운영 모드에서 명령을 실행 show l2vpn connections 하여 레이어 2 VPN 연결 정보를 표시합니다.
user@PE1> show l2vpn connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: l2vpn-inst
Edge protection: Not-Primary
Local site: pe1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jun 22 14:46:50 2015 1
Remote PE: 10.255.255.4, Negotiated control-word: Yes (Null)
Incoming label: 800003, Outgoing label: 800002
Local interface: ge-0/0/0.300, Status: Up, Encapsulation: VLAN
Flow Label Transmit: Yes, Flow Label Receive: Yes
의미
출력은 flow 레이블 전송 및 flow 레이블 수신 정보와 함께 레이어 2 VPN 연결 정보를 표시합니다.
경로 확인
목적
예상되는 경로가 학습되었는지 확인합니다.
작업
운영 모드에서 명령을 실행 show route 하여 라우팅 테이블에 경로를 표시합니다.
user@PE1> show route
inet.0: 51 destinations, 51 routes (51 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.0.0.0/24 *[Direct/0] 2d 12:48:34
> via ge-0/0/1.0
1.0.0.1/32 *[Local/0] 2d 12:48:34
Local via ge-0/0/1.0
2.0.0.0/24 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
10.4.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.5.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.6.128.0/17 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.9.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.10.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.13.4.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.13.10.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.82.0.0/15 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.84.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.85.12.0/22 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.92.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.94.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.99.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.102.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.102.160.0/19 *[Direct/0] 2d 12:48:34
> via fxp0.0
10.102.169.99/32 *[Local/0] 2d 12:48:34
Local via fxp0.0
10.150.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.155.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.157.64.0/19 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.160.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.204.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.205.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.206.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.207.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.209.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.212.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.213.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.214.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.215.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.216.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.13.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.14.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.16.0/20 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.32.0/20 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.227.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.255.255.1/32 *[Direct/0] 2d 12:48:34
> via lo0.0
10.255.255.2/32 *[OSPF/10] 2d 12:48:24, metric 1
> to 1.0.0.2 via ge-0/0/1.0
10.255.255.4/32 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
128.102.161.191/32 *[OSPF/10] 2d 12:48:24, metric 1
> to 1.0.0.2 via ge-0/0/1.0
128.102.169.99/32 *[Direct/0] 2d 12:48:34
> via lo0.0
128.102.171.41/32 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
172.16.0.0/12 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
192.168.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
192.168.102.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.136.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.136.192/32 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.137.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
224.0.0.5/32 *[OSPF/10] 2d 12:48:34, metric 1
MultiRecv
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.4/32 *[RSVP/7/1] 2d 12:48:04, metric 2
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
47.0005.80ff.f800.0000.0108.0001.1281.0216.9099/152
*[Direct/0] 2d 12:48:34
> via lo0.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2d 12:48:34, metric 1
Receive
1 *[MPLS/0] 2d 12:48:34, metric 1
Receive
2 *[MPLS/0] 2d 12:48:34, metric 1
Receive
13 *[MPLS/0] 2d 12:48:34, metric 1
Receive
800003 *[L2VPN/7] 2d 12:41:29
> via ge-0/0/0.300, Pop Offset: 4
ge-0/0/0.300 *[L2VPN/7] 2d 12:41:29, metric2 2
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
abcd::128:102:169:99/128
*[Direct/0] 2d 12:48:34
> via lo0.0
fe80::5668:a60f:fc6b:eb97/128
*[Direct/0] 2d 12:48:34
> via lo0.0
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.4:200:2:1/96
*[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
l2vpn-inst.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[L2VPN/170/-101] 2d 12:41:29, metric2 1
Indirect
10.255.255.4:200:2:1/96
*[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
l2vpn-inst.l2id.0: 2 destinations, 3 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1 *[L2VPN/170/-101] 2d 12:41:29, metric2 1
Indirect
[L2VPN/175] 2d 12:41:29
> via ge-0/0/0.300, Pop Offset: 4
2 *[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
의미
출력에는 라우팅 테이블의 모든 경로가 표시됩니다.
PE2 구성
절차
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE2 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE2# set ge-0/0/0 unit 0 family inet address 2.0.0.2/24 user@PE2# set ge-0/0/0 unit 0 family mpls user@PE2# set ge-0/0/1 vlan-tagging user@PE2# set ge-0/0/1 mtu 1600 user@PE2# set ge-0/0/1 encapsulation vlan-ccc user@PE2# set ge-0/0/1 unit 300 encapsulation vlan-ccc user@PE2# set ge-0/0/1 unit 300 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 family vpls deactivate interfaces ge-0/0/1 unit 600 user@PE2# set lo0 unit 0 family inet address 10.255.255.4/32
-
라우터 ID를 구성합니다.
[edit routing-options] user@PE2# set router-id 10.255.255.4
-
AS(Autonomous System) 번호를 구성하고 export 문으로 로컬 라우터의 포워딩 테이블에 정책을 적용합니다.
[edit routing-options] user@PE2# set autonomous-system 100 user@PE2# set forwarding-table export exp-to-frwd
-
인터페이스에서 RSVP 프로토콜을 구성합니다.
[edit protocols rsvp] user@PE2# set interface all user@PE2# set interface ge-0/0/1.0 user@PE2# set interface lo0.0
-
레이블 스위칭 경로 속성을 MPLS 프로토콜에 적용하고 인터페이스를 구성합니다.
[edit protocols mpls] user@PE2# set label-switched-path to-pe1 to 10.255.255.1 user@PE2# set interface ge-0/0/0.0
-
피어 그룹을 정의하고 피어 그룹을
vpls-pe위한 BGP 세션의 local-end 주소를 구성합니다.[edit protocols bgp group vpls-pe] user@PE2# set type internal user@PE2# set local-address 10.255.255.4
-
업데이트에서 NLRI에 대한 프로토콜 family의 속성을 구성합니다.
[edit protocols bgp group vpls-pe] user@PE2# set family l2vpn auto-discovery-only user@PE2# set family l2vpn signaling
-
피어 그룹
vpls-pe에 대한 neighbor를 구성합니다.[edit protocols bgp group vpls-pe] user@PE2# set neighbor 10.255.255.1 user@PE2# set neighbor 10.255.255.2
-
트래픽 엔지니어링을 구성하고, OSPF 영역 0.0.0.0의 인터페이스를 구성합니다.
[edit protocols ospf] user@PE2# set traffic-engineering user@PE2# set area 0.0.0.0 interface lo0.0 passive user@PE2# set area 0.0.0.0 interface ge-0/0/0.0
-
라우팅 정책 및 BGP 커뮤니티 정보를 구성합니다.
[edit policy-options] user@PE2# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE2# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 user@PE2# set policy-statement exp-to-frwd term 0 then accept user@PE2# set community vpls-com members target:100:100
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances l2vpn-inst] user@PE2# set instance-type l2vpn user@PE2# set interface ge-0/0/1.300
-
예를 들어
l2vpn-inst경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances l2vpn-inst] user@PE2# set route-distinguisher 10.255.255.4:200 user@PE2# set vrf-target target:100:100
-
L2VPN 프로토콜에 필요한 캡슐화 유형을 구성합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set encapsulation-type ethernet-vlan
-
공급자 장비에 연결된 사이트를 구성합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set site pe2 site-identifier 2 user@PE2# set site pe2 interface ge-0/0/1.300 remote-site-id 1
-
라우팅 인스턴스에 대한 L2VPN 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances vpl1] user@PE2# set instance-type vpls user@PE2# set interface ge-0/0/1.600
-
예를 들어
vpl1경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances vpl1] user@PE2# set route-distinguisher 10.255.255.4:100 user@PE2# set vrf-target target:100:100
-
VPLS 도메인에 최대 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set site-range 10
-
VPLS 인스턴스에 터널 서비스를 사용하지 않도록 구성하고 공급자 장비에 연결된 사이트에 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set no-tunnel-services user@PE2# set site vpl1PE2 site-identifier 2
-
라우팅 인스턴스에 VPLS 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
결과
구성 모드에서 , show protocols, show policy-options, show routing-instances및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE2# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 2.0.0.2/24;
}
family mpls;
}
}
ge-0/0/1 {
vlan-tagging;
mtu 1600;
encapsulation vlan-ccc;
unit 300 {
encapsulation vlan-ccc;
vlan-id 600;
}
unit 600 {
encapsulation vlan-vpls;
vlan-id 600;
family vpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.255.4/32;
}
}
}
user@PE2# show protocols
rsvp {
interface all;
interface ge-0/0/1.0;
interface lo0.0;
}
mpls {
label-switched-path to-pe1 {
to 10.255.255.1;
}
interface ge-0/0/0.0;
}
bgp {
group vpls-pe {
type internal;
local-address 10.255.255.4;
family l2vpn {
auto-discovery-only;
signaling;
}
neighbor 10.255.255.1;
neighbor 10.255.255.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/0.0;
}
}
user@PE2# show policy-options
policy-statement exp-to-frwd {
term 0 {
from community vpls-com;
then {
install-nexthop lsp to-pe1;
accept;
}
}
}
community vpls-com members target:100:100;
user@PE2# show routing-instances
l2vpn-inst {
instance-type l2vpn;
interface ge-0/0/1.300;
route-distinguisher 10.255.255.4:200;
vrf-target target:100:100;
protocols {
l2vpn {
encapsulation-type ethernet-vlan;
site pe2 {
site-identifier 2;
interface ge-0/0/1.300 {
remote-site-id 1;
}
}
flow-label-transmit;
flow-label-receive;
}
}
}
vpl1 {
instance-type vpls;
interface ge-0/0/1.600;
route-distinguisher 10.255.255.4:100;
vrf-target target:100:100;
protocols {
vpls {
site-range 10;
no-tunnel-services;
site vpl1PE2 {
site-identifier 2;
}
flow-label-transmit;
flow-label-receive;
}
}
}
user@PE2# show routing-options
router-id 10.255.255.4;
autonomous-system 100;
forwarding-table {
export exp-to-frwd;
}
검증
구성이 제대로 작동하고 있는지 확인합니다.
BGP 요약 정보 확인
목적
BGP 요약 정보를 확인합니다.
작업
운영 모드에서 명령을 입력합니다.show bgp summary
user@PE2> show bgp summary
Groups: 1 Peers: 2 Down peers: 1
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l2vpn.0
1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.255.255.1 100 8090 8119 0 1 2d 12:53:15 Establ
bgp.l2vpn.0: 1/1/1/0
l2vpn-inst.l2vpn.0: 1/1/1/0
10.255.255.2 100 0 0 0 0 2d 14:14:49 Active
의미
출력은 BGP 요약 정보를 표시합니다.
L2VPN 연결 정보 확인
목적
레이어 2 VPN 연결 정보를 확인합니다.
작업
운영 모드에서 명령을 실행 show l2vpn connections 하여 레이어 2 VPN 연결 정보를 표시합니다.
user@PE2> show l2vpn connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: l2vpn-inst
Edge protection: Not-Primary
Local site: pe2 (2)
connection-site Type St Time last up # Up trans
1 rmt Up Jun 22 14:46:50 2015 1
Remote PE: 10.255.255.1, Negotiated control-word: Yes (Null)
Incoming label: 800002, Outgoing label: 800003
Local interface: ge-0/0/1.300, Status: Up, Encapsulation: VLAN
Flow Label Transmit: Yes, Flow Label Receive: Yes
의미
출력은 flow 레이블 전송 및 flow 레이블 수신 정보와 함께 레이어 2 VPN 연결 정보를 표시합니다.
경로 확인
목적
예상되는 경로가 학습되었는지 확인합니다.
작업
운영 모드에서 명령을 실행 show route 하여 라우팅 테이블에 경로를 표시합니다.
user@PE2> show route
inet.0: 51 destinations, 51 routes (51 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.0.0.0/24 *[OSPF/10] 2d 14:09:33, metric 2
> to 2.0.0.1 via ge-0/0/0.0
2.0.0.0/24 *[Direct/0] 2d 14:10:18
> via ge-0/0/0.0
2.0.0.2/32 *[Local/0] 2d 14:10:20
Local via ge-0/0/0.0
10.4.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.5.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.6.128.0/17 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.9.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.10.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.13.4.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.13.10.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.82.0.0/15 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.84.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.85.12.0/22 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.92.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.94.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.99.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.102.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.102.160.0/19 *[Direct/0] 2d 14:12:18
> via fxp0.0
10.102.171.41/32 *[Local/0] 2d 14:12:18
Local via fxp0.0
10.150.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.155.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.157.64.0/19 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.160.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.204.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.205.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.206.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.207.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.209.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.212.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.213.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.214.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.215.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.216.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.13.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.14.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.16.0/20 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.32.0/20 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.227.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.255.255.1/32 *[OSPF/10] 2d 12:50:36, metric 2
> to 2.0.0.1 via ge-0/0/0.0
10.255.255.2/32 *[OSPF/10] 2d 14:09:33, metric 1
> to 2.0.0.1 via ge-0/0/0.0
10.255.255.4/32 *[Direct/0] 2d 14:11:51
> via lo0.0
128.102.161.191/32 *[OSPF/10] 2d 14:09:33, metric 1
> to 2.0.0.1 via ge-0/0/0.0
128.102.169.99/32 *[OSPF/10] 2d 12:50:36, metric 2
> to 2.0.0.1 via ge-0/0/0.0
128.102.171.41/32 *[Direct/0] 2d 14:12:18
> via lo0.0
172.16.0.0/12 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
192.168.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
192.168.102.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.136.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.136.192/32 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.137.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
224.0.0.5/32 *[OSPF/10] 2d 14:11:51, metric 1
MultiRecv
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1/32 *[RSVP/7/1] 2d 12:50:24, metric 2
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
47.0005.80ff.f800.0000.0108.0001.1281.0217.1041/152
*[Direct/0] 2d 14:12:18
> via lo0.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2d 14:11:51, metric 1
Receive
1 *[MPLS/0] 2d 14:11:51, metric 1
Receive
2 *[MPLS/0] 2d 14:11:51, metric 1
Receive
13 *[MPLS/0] 2d 14:11:51, metric 1
Receive
800002 *[L2VPN/7] 2d 12:43:43
> via ge-0/0/1.300, Pop Offset: 4
ge-0/0/1.300 *[L2VPN/7] 2d 12:43:43, metric2 2
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
abcd::128:102:171:41/128
*[Direct/0] 2d 14:12:18
> via lo0.0
fe80::5668:a60f:fc6b:ee28/128
*[Direct/0] 2d 14:12:18
> via lo0.0
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
l2vpn-inst.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
10.255.255.4:200:2:1/96
*[L2VPN/170/-101] 2d 12:43:50, metric2 1
Indirect
l2vpn-inst.l2id.0: 2 destinations, 3 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1 *[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
2 *[L2VPN/170/-101] 2d 12:43:50, metric2 1
Indirect
[L2VPN/175] 2d 12:43:43
> via ge-0/0/1.300, Pop Offset: 4
의미
출력에는 라우팅 테이블의 모든 경로가 표시됩니다.
Load-balance MPLS 트래픽에 BGP VPLS를 위한 FAT 유사 회선 지원 구성
FAT(Flow-Aware Transport) 또는 flow 레이블은 VPLS와 같은 BGP 신호 유사 회선에 대해 지원되며 레이블 에지 라우터(LER)에서만 구성됩니다. 이를 통해 전송 라우터 또는 LSR(label-switching routers)은 payload의 심층 패킷 검사 없이 ECMP(equal-cost 다중 경로) 또는 LAG(link aggregation groups)에서 MPLS 패킷의 로드 밸런싱을 수행할 수 있습니다. FAT 유사 회선 또는 flow 레이블은 포워딩 동급 클래스(FEC128 및 FEC129)가 있는 LDP 신호 VPLS와 함께 사용할 수 있으며, flow 레이블에 대한 지원은 point-to-point 또는 point-to-multipoint 레이어 2 서비스용 BGP-신호 유사 회선에 대해 확장됩니다.
Load-balance MPLS 트래픽에 BGP VPLS를 위한 FAT 유사 회선 지원을 구성하기 전에 다음 작업을 수행합니다.
디바이스 인터페이스를 구성하고 모든 인터페이스에서 MPLS를 활성화합니다.
RSVP를 구성합니다.
원격 PE 라우터에 MPLS 및 LSP를 구성합니다.
BGP 및 OSPF를 구성합니다.
Load-balance MPLS 트래픽에 BGP VPLS를 위한 FAT 유사 회선 지원을 구성하려면 다음을 수행해야 합니다.
또한보십시오
예: Load-balance MPLS 트래픽에 BGP VPLS를 위한 FAT 유사 회선 지원 구성
이 예는 BGP VPLS를 위한 FAT 유사 회선 지원을 구현하여 로드 밸런싱 MPLS 트래픽을 지원하는 방법을 보여줍니다.
요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
MX 시리즈 라우터 5개
-
모든 디바이스에서 실행되는 Junos OS 릴리스 16.1 이상
BGP VPLS를 위한 FAT 유사 회선 지원을 구성하기 전에, 라우팅 및 신호 전송 프로토콜을 구성해야 합니다.
개요
Junos OS는 레이블 에지 라우터(LER)에서만 VPLS와 같은 BGP 신호 유사 회선을 지원하는 FAT(flow-aware transport) flow 레이블을 허용합니다. 이는 전송 라우터 또는 LSR(label-switching routers)이 payload의 심층 패킷 검사 없이 ECMP(equal-cost 다중 경로) 경로 또는 LAG(link aggregation groups)에서 MPLS 패킷의 로드 밸런싱을 수행하게 합니다. FAT flow 레이블은 VPWS용 LDP-신호 포워딩 동급 클래스(FEC 128 및 FEC 129) 유사 회선 및 VPLS 유사 회선에 사용될 수 있습니다.
토폴로지
그림 16 은 디바이스 PE1 및 디바이스 PE2에서 구성된 BGP VPLS를 위한 FAT 유사 회선 지원을 보여줍니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경하고, 계층 수준에서 [edit] 명령을 복사하여 CLI에 붙여 넣은 다음, 구성 모드에서 들어갑니다 commit .
세1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 10.255.255.8/32
PE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 mtu 1600 set interfaces ge-0/0/0 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family vpls set interfaces ge-0/0/1 unit 0 family inet address 1.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.1/32 set routing-options nonstop-routing set routing-options router-id 10.255.255.1 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe2 to 10.255.255.4 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.1 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.4 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/0.600 set routing-instances vpl1 route-distinguisher 10.255.255.1:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE1 site-identifier 1 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
피
set interfaces ge-0/0/0 unit 0 family inet address 1.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 2.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.2/32 set routing-options router-id 10.255.255.2 set routing-options autonomous-system 100 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.2 set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.4 deactivate protocols bgp set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
PE2
set interfaces ge-0/0/0 unit 0 family inet address 2.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 mtu 1600 set interfaces ge-0/0/1 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 vlan-id 600 set interfaces ge-0/0/1 unit 600 family vpls set interfaces lo0 unit 0 family inet address 10.255.255.4/32 set routing-options router-id 10.255.255.4 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe1 to 10.255.255.1 set protocols mpls interface ge-0/0/0.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.4 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/1.600 set routing-instances vpl1 route-distinguisher 10.255.255.4:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE2 site-identifier 2 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
세2
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.2/24 set interfaces lo0 unit 0 family inet address 10.255.255.9/32
PE1 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE1 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE1# set ge-0/0/0 vlan-tagging user@PE1# set ge-0/0/0 mtu 1600 user@PE1# set ge-0/0/0 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 family vpls user@PE1# set ge-0/0/1 unit 0 family inet address 1.0.0.1/24 user@PE1# set ge-0/0/1 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.255.255.1/32
-
논스톱 라우팅을 구성하고 라우터 ID를 구성합니다.
[edit routing-options] user@PE1# set nonstop-routing user@PE1# set router-id 10.255.255.1
-
AS(Autonomous System) 번호를 구성하고 export 문으로 로컬 라우터의 포워딩 테이블에 정책을 적용합니다.
[edit routing-options] user@PE1# set autonomous-system 100 user@PE1# set forwarding-table export exp-to-frwd
-
인터페이스에서 RSVP 프로토콜을 구성합니다.
[edit protocols rsvp] user@PE1# set interface all user@PE1# set interface ge-0/0/1.0 user@PE1# set interface lo0.0
-
레이블 스위칭 경로 속성을 MPLS 프로토콜에 적용하고 인터페이스를 구성합니다.
[edit protocols mpls] user@PE1# set label-switched-path to-pe2 to 10.255.255.4 user@PE1# set interface ge-0/0/1.0
-
피어 그룹을 정의하고 피어 그룹을
vpls-pe위한 BGP 세션의 로컬 엔드 주소를 구성합니다.[edit protocols bgp group vpls-pe] user@PE1# set type internal user@PE1# set local-address 10.255.255.1
-
업데이트에서 NLRI에 대한 프로토콜 family의 속성을 구성합니다.
[edit protocols bgp group vpls-pe family l2vpn] user@PE1# set auto-discovery-only user@PE1# set signaling
-
피어 그룹
vpls-pe에 대한 neighbor를 구성합니다.[edit protocols bgp group vpls-pe] user@PE1# set neighbor 10.255.255.4 user@PE1# set neighbor 10.255.255.2
-
트래픽 엔지니어링을 구성하고, OSPF 영역 0.0.0.0의 인터페이스를 구성합니다.
[edit protocols ospf] user@PE1# set traffic-engineering user@PE1# set area 0.0.0.0 interface lo0.0 passive user@PE1# set area 0.0.0.0 interface ge-0/0/1.0
-
라우팅 정책 및 BGP 커뮤니티 정보를 구성합니다.
[edit policy-options ] user@PE1# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE1# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 user@PE1# set policy-statement exp-to-frwd term 0 then accept user@PE1# set community vpls-com members target:100:100
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances vp1] user@PE1# set instance-type vpls user@PE1# set interface ge-0/0/0.600
-
예를 들어
vpl1경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances vpl1] user@PE1# set route-distinguisher 10.255.255.1:100 user@PE1# set vrf-target target:100:100
-
VPLS 도메인에 최대 사이트 식별자를 할당합니다.
[edit routing-instances vp1 protocols vpls] user@PE1# set site-range 10
-
VPLS 인스턴스에 터널 서비스를 사용하지 않도록 VPLS 프로토콜을 구성하고 공급자 장비에 연결된 사이트에 사이트 식별자를 할당합니다.
[edit routing-instances vp1 protocols vpls] user@PE1# set no-tunnel-services user@PE1# set site vpl1PE1 site-identifier 1
-
라우팅 인스턴스에 VPLS 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances vp1 protocols vpls] user@PE1# set flow-label-receive user@PE1# set flow-label-transmit
결과
구성 모드에서 , show protocols, show policy-options, show routing-instances및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE1# show interfaces
ge-0/0/0 {
vlan-tagging;
mtu 1600;
encapsulation vlan-vpls;
unit 600 {
encapsulation vlan-vpls;
vlan-id 600;
family vpls;
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 1.0.0.1/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.255.1/32;
}
}
}
user@PE1# show protocols
rsvp {
interface all;
interface ge-0/0/1.0;
interface lo0.0;
}
mpls {
label-switched-path to-pe2 {
to 10.255.255.4;
}
interface ge-0/0/1.0;
}
bgp {
group vpls-pe {
type internal;
local-address 10.255.255.1;
family l2vpn {
auto-discovery-only;
signaling;
}
neighbor 10.255.255.4;
neighbor 10.255.255.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/1.0;
}
}
user@PE1# show policy-options
policy-statement exp-to-frwd {
term 0 {
from community vpls-com;
then {
install-nexthop lsp to-pe2;
accept;
}
}
}
community vpls-com members target:100:100;
user@PE1# show routing-instances
vpl1 {
instance-type vpls;
interface ge-0/0/0.600;
route-distinguisher 10.255.255.1:100;
vrf-target target:100:100;
protocols {
vpls {
site-range 10;
no-tunnel-services;
site vpl1PE1 {
site-identifier 1;
}
flow-label-transmit;
flow-label-receive;
}
}
}
user@PE1# show routing-options
nonstop-routing;
router-id 10.255.255.1;
autonomous-system 100;
forwarding-table {
export exp-to-frwd;
}
PE2 구성
단계별 절차
다음 예에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 Junos OS CLI 사용자 가이드의 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE2 구성:
-
인터페이스를 구성합니다.
[edit interfaces] user@PE2# set ge-0/0/0 unit 0 family inet address 2.0.0.2/24 user@PE2# set ge-0/0/0 unit 0 family mpls user@PE2# set ge-0/0/1 vlan-tagging user@PE2# set ge-0/0/1 mtu 1600 user@PE2# set ge-0/0/1 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 family vpls user@PE2# set lo0 unit 0 family inet address 10.255.255.4/32
-
라우터 ID를 구성합니다.
[edit routing-options] user@PE2# set router-id 10.255.255.4
-
AS(Autonomous System) 번호를 구성하고 export 문으로 로컬 라우터의 포워딩 테이블에 정책을 적용합니다.
[edit routing-options] user@PE2# set autonomous-system 100 user@PE2# set forwarding-table export exp-to-frwd
-
인터페이스에서 RSVP 프로토콜을 구성합니다.
[edit protocols rsvp] user@PE2# set interface all user@PE2# set interface ge-0/0/1.0 user@PE2# set interface lo0.0
-
레이블 스위칭 경로 속성을 MPLS 프로토콜에 적용하고 인터페이스를 구성합니다.
[edit protocols mpls] user@PE2# set label-switched-path to-pe1 to 10.255.255.1 user@PE2# set interface ge-0/0/0.0
-
피어 그룹을 정의하고 피어 그룹을
vpls-pe위한 BGP 세션의 local-end 주소를 구성합니다.[edit protocols bgp group vpls-pe] user@PE2# set type internal user@PE2# set local-address 10.255.255.4
-
업데이트에서 NLRI에 대한 프로토콜 family의 속성을 구성합니다.
[edit protocols bgp group vpls-pe] user@PE2# set family l2vpn auto-discovery-only user@PE2# set family l2vpn signaling
-
피어 그룹
vpls-pe에 대한 neighbor를 구성합니다.[edit protocols bgp group vpls-pe] user@PE2# set neighbor 10.255.255.1 user@PE2# set neighbor 10.255.255.2
-
트래픽 엔지니어링을 구성하고, OSPF 영역 0.0.0.0의 인터페이스를 구성합니다.
[edit protocols ospf] user@PE2# set traffic-engineering user@PE2# set area 0.0.0.0 interface lo0.0 passive user@PE2# set area 0.0.0.0 interface ge-0/0/0.0
-
라우팅 정책 및 BGP 커뮤니티 정보를 구성합니다.
[edit policy-options ] user@PE2# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE2# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 user@PE2# set policy-statement exp-to-frwd term 0 then accept user@PE2# set community vpls-com members target:100:100
-
라우팅 인스턴스 유형을 구성하고 인터페이스를 구성합니다.
[edit routing-instances vpl1] user@PE2# set instance-type vpls user@PE2# set interface ge-0/0/1.600
-
예를 들어
vp11경로 식별자를 구성하고 VRF 대상 커뮤니티를 구성합니다.[edit routing-instances vpl1] user@PE2# set route-distinguisher 10.255.255.4:100 user@PE2# set vrf-target target:100:100
-
VPLS 도메인에 최대 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set site-range 10
-
VPLS 인스턴스에 터널 서비스를 사용하지 않도록 VPLS 프로토콜을 구성하고 공급자 장비에 연결된 사이트에 사이트 식별자를 할당합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set no-tunnel-services user@PE2# set site vpl1PE2 site-identifier 2
-
라우팅 인스턴스에 VPLS 프로토콜을 구성하여 수신 방향의 flow 레이블을 원격 PE로 접속하는 광고 기능을 제공하고 전송 방향의 flow 레이블을 원격 PE로 푸시하는 광고 기능을 제공합니다.
[edit routing-instances vpl1 protocols vpls] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
결과
구성 모드에서 , show protocols, show policy-options, show routing-instances및 show routing-options 명령을 show interfaces입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
user@PE2# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 2.0.0.2/24;
}
family mpls;
}
}
ge-0/0/1 {
vlan-tagging;
mtu 1600;
encapsulation vlan-vpls;
unit 600 {
encapsulation vlan-vpls;
vlan-id 600;
family vpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.255.4/32;
}
}
}
user@PE2# show protocols
rsvp {
interface all;
interface ge-0/0/1.0;
interface lo0.0;
}
mpls {
label-switched-path to-pe1 {
to 10.255.255.1;
}
interface ge-0/0/0.0;
}
bgp {
group vpls-pe {
type internal;
local-address 10.255.255.4;
family l2vpn {
auto-discovery-only;
signaling;
}
neighbor 10.255.255.1;
neighbor 10.255.255.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/0.0;
}
}
user@PE2# show policy-options
policy-statement exp-to-frwd {
term 0 {
from community vpls-com;
then {
install-nexthop lsp to-pe1;
accept;
}
}
}
community vpls-com members target:100:100;
user@PE2# show routing-instances
vpl1 {
instance-type vpls;
interface ge-0/0/1.600;
route-distinguisher 10.255.255.4:100;
vrf-target target:100:100;
protocols {
vpls {
site-range 10;
no-tunnel-services;
site vpl1PE2 {
site-identifier 2;
}
flow-label-transmit;
flow-label-receive;
}
}
}
user@PE2# show routing-options
router-id 10.255.255.4;
autonomous-system 100;
forwarding-table {
export exp-to-frwd;
}
검증
구성이 제대로 작동하고 있는지 확인합니다.
VPLS 연결 정보 검증
목적
VPLS 연결 정보를 확인합니다.
작업
운영 모드에서 명령을 실행 show vpls connections 하여 VPLS 연결 정보를 표시합니다.
user@PE1> show vpls connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: vpl1
Edge protection: Not-Primary
Local site: vpl1PE1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jun 17 11:38:14 2015 1
Remote PE: 10.255.255.4, Negotiated control-word: No
Incoming label: 262146, Outgoing label: 262145
Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS
Description: Intf - vpls vpl1 local site 1 remote site 2
Flow Label Transmit: Yes, Flow Label Receive: Yes
의미
출력은 flow 레이블 수신 및 flow 레이블 전송 정보와 함께 VPLS 연결 정보를 표시합니다.
검증
구성이 제대로 작동하고 있는지 확인합니다.
VPLS 연결 정보 검증
목적
VPLS 연결 정보를 확인합니다.
작업
운영 모드에서 명령을 실행 show vpls connections 하여 VPLS 연결 정보를 표시합니다.
user@PE2> show vpls connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: vpl1
Edge protection: Not-Primary
Local site: vpl1PE2 (2)
connection-site Type St Time last up # Up trans
1 rmt Up Jun 17 11:38:14 2015 1
Remote PE: 10.255.255.1, Negotiated control-word: No
Incoming label: 262145, Outgoing label: 262146
Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS
Description: Intf - vpls vpl1 local site 2 remote site 1
Flow Label Transmit: Yes, Flow Label Receive: Yes
의미
출력은 flow 레이블 수신 및 flow 레이블 전송 정보와 함께 VPLS 연결 정보를 표시합니다.
변경 내역 표
기능 지원은 사용 중인 플랫폼과 릴리스에 따라 결정됩니다. 기능 탐색기를 사용하여 플랫폼에서 기능이 지원되는지 확인합니다.
[edit protocols bgp] 전 세계적으로 지원됩니다. 일부 BGP 그룹 및 neighbor에서 다중 경로를 선택적으로 비활성화할 수 있습니다. 그룹 또는 특정 BGP neighbor에 대한 다중 경로 옵션을 비활성화하려면 계층 수준에
[edit protocols bgp group group-name multipath] 포함
disable 합니다.
[edit protocols bgp] 구성
defer-initial-multipath-build 합니다. 또는 계층 수준에서
[edit protocols bgp] 구성 문을 사용하여
multipath-build-priority BGP 다중 경로 빌드 작업 우선 순위를 낮추고 RIB 학습을 가속화할 수 있습니다.
