예: VPN에서 직접 PE-PE 연결을 위한 연동 복합 다음 홉 구성
요구 사항
이 예는 MX 시리즈 및 T4000 라우터에서 MIC 및 MPC 인터페이스에 대한 연동 복합 다음 홉으로 프로바이더 에지(PE) 라우터 레이어 2 가상 프라이빗 네트워크(VPN) 연결을 활성화하는 방법을 보여줍니다. 이 예에서는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
MX240, MX480, MX960 또는 T4000 라우터 조합의 라우터 5개.
모든 디바이스에서 실행되는 릴리스 17.3R1 이상에서 Junos OS.
개요 및 토폴로지
그림 1 은 MX 시리즈 라우터에서 MIC 및 MPC 인터페이스에 대한 연동 복합 다음 홉이 있는 레이어 2 VPN 연결의 샘플 토폴로지 를 보여줍니다.
구성
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브러브를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 변경한 다음 계층 수준에서 명령을 CLI [edit]
로 복사해 붙여 넣습니다.
CE1
set interfaces ge-1/1/1 unit 0 family inet address 192.0.2.2/24 set interfaces ge-1/1/1 unit 0 family iso set interfaces ge-1/1/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.1/24
PE1
set interfaces ge-0/0/4 unit 0 family inet address 10.38.0.5/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/1/1 encapsulation ethernet-ccc set interfaces ge-0/1/1 unit 0 family ccc set interfaces lo0 unit 0 family inet address 10.255.104.133/32 set routing-options forwarding-table chained-composite-next-hop ingress l2vpn set routing-options autonomous-system 200 set routing-options forwarding-table export lbpp set protocols mpls interface ge-0/0/4.0 set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.133 set protocols bgp group PEs family l2vpn signaling set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.134 set routing-instances vpn-a instance-type l2vpn set routing-instances vpn-a interface ge-0/1/1.0 set routing-instances vpn-a route-distinguisher 200:1 set routing-instances vpn-a vrf-target target:200:1 set routing-instances vpn-a protocols l2vpn encapsulation-type ethernet set routing-instances vpn-a protocols l2vpn site 100 site-identifier 100 set routing-instances vpn-a protocols l2vpn site 100 interface ge-0/1/1.0 remote-site-id 200
PE2
set interfaces ge-1/0/2 unit 0 family inet address 10.38.0.13/30 set interfaces ge-1/0/2 unit 0 family mpls set interfaces ge-1/0/5 encapsulation ethernet-ccc set interfaces ge-1/0/5 unit 0 family ccc set interfaces lo0 unit 0 family inet address 10.255.104.134/32 set routing-options forwarding-table chained-composite-next-hop ingress l2vpn set routing-options autonomous-system 200 set routing-options forwarding-table export lbpp set protocols mpls interface ge-1/0/2.0 set protocols ospf area 0.0.0.0 interface ge-1/0/2.0 set protocols bgp group PEs type internal set protocols bgp group PEs local-address 10.255.104.134 set protocols bgp group PEs family l2vpn signaling set protocols bgp group PEs family inet-vpn unicast set protocols bgp group PEs neighbor 10.255.104.133 set routing-instances vpn-a instance-type l2vpn set routing-instances vpn-a interface ge-1/0/5.0 set routing-instances vpn-a route-distinguisher 200:1 set routing-instances vpn-a vrf-target target:200:1 set routing-instances vpn-a protocols l2vpn encapsulation-type ethernet set routing-instances vpn-a protocols l2vpn site 200 site-identifier 200 set routing-instances vpn-a protocols l2vpn site 200 interface ge-1/0/5.0 remote-site-id 100
P
set interfaces ge-2/0/1 unit 0 family inet address 10.38.0.6/30 set interfaces ge-2/0/1 unit 0 family mpls set interfaces ge-2/0/2 unit 0 family inet address 10.38.0.14/30 set interfaces ge-2/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.104.136/32 set protocols mpls interface ge-2/0/1.0 set protocols ospf area 0.0.0.0 interface ge-2/0/1.0 set protocols mpls interface ge-2/0/2.0 set protocols ospf area 0.0.0.0 interface ge-2/0/2.0 set routing-options autonomous-system 200
CE2
set interfaces ge-2/2/2 unit 0 family inet address 192.0.2.4/24 set interfaces ge-2/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 198.51.100.2/24
절차
단계별 절차
다음 예제에서는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 대한 정보는 구성 모드에서 CLI 편집기 사용을 참조하십시오.
PE1 라우터에서 연동된 복합 다음 홉을 사용하여 기본 레이어 2 VPN을 구성하려면 다음을 수행합니다.
라우터에 대한 적절한 인터페이스 이름, 주소 및 기타 매개 변수를 수정한 후 MPLS 도메인의 PE2 라우터에 대한 이 절차를 반복합니다.
PE1 라우터에서 인터페이스를 구성합니다.
PE1 to CE1
[edit interfaces]
user@PE1# set interfaces ge-0/1/1 encapsulation ethernet-ccc user@PE1# set interfaces ge-0/1/1 unit 0 family cccPE1 to P
[edit interfaces]
user@PE1 # set ge-0/0/4 unit 0 family inet address 10.38.0.5/30 user@PE1 # set ge-0/0/4 unit 0 family mplsLoopback interface
[edit interfaces]
user@PE1 # set lo0 unit 0 family inet address 10.255.104.133/32전역 레이어 2 VPN에서 연동된 복합 다음 홉을 활성화합니다.
[edit routing-options]
use@PE1# set forwarding-table chained-composite-next-hop ingress l2vpnPE1을 위한 AS(Autonomous System)를 구성합니다.
[edit routing-options]
user@PE1# set autonomous-system 200로드 밸런싱을 위해 구성된 정책을 내보냅니다.
[edit routing-options]
user@PE1# set forwarding-table export lbppP 라우터에 연결되는 PE1 인터페이스에서 MPLS 구성합니다.
[edit protocols]
set mpls interface ge-0/0/4.0PE1 nterface에서 OSPF를 구성합니다.
[edit protocols]
user@PE1# set ospf area 0.0.0.0 interface ge-0/0/4.0PE1에서 PE2 라우터에 대한 IBGP 그룹을 구성합니다.
[edit protocols]
user@PE1# set bgp group PEs type internal user@PE1# set bgp group PEs local-address 10.255.104.133 user@PE1# set bgp group PEs family l2vpn signaling user@PE1# set bgp group PEs family inet-vpn unicast user@PE1# set bgp group PEs neighbor 10.255.104.134라우팅 인스턴스 매개 변수를 구성합니다.
[edit routing-instances]
user@PE1# set vpn-a instance-type l2vpn user@PE1# set vpn-a interface ge-0/1/1.0 user@PE1# set vpn-a route-distinguisher 200:1 user@PE1# set vpn-a vrf-target target:200:1 user@PE1# set vpn-a protocols l2vpn encapsulation-type ethernet user@PE1# set vpn-a protocols l2vpn site 100 site-identifier 100 user@PE1# set vpn-a protocols l2vpn site 100 interface ge-0/1/1.0 remote-site-id 200
결과
구성 모드에서 , , show interfaces
show routing-options
show protocols
show routing-instances
및 show policy-options
명령을 입력show chassis
하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정합니다.
PE1
user@PE1# show interfaces
ge-0/0/4 {
unit 0 {
family inet {
address 10.38.0.5/30;
}
family mpls;
}
}
ge-0/1/1 {
encapsulation ethernet-ccc;
unit 0 {
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.104.133/32;
}
}
}
user@PE1# show protocols
mpls {
interface ge0/0/4.0;
}
bgp {
group PEs {
type internal;
local-address 10.255.104.133;
family inet-vpn {
unicast;
}
family l2vpn {
signaling;
}
neighbor 10.255.104.134;
}
}
ospf {
area 0.0.0.0 {
interface ge-0/0/4.0;
}
}
user@PE1# show routing-options
autonomous-system 200;
forwarding-table {
export lbpp;
chained-composite-next-hop {
ingress {
l2vpn;
}
}
}
user@PE1# show routing-instances
vpn-a {
instance-type l2vpn;
interface ge-0/1/1.0;
route-distinguisher 200:1;
vrf-target target:200:1;
protocols {
l2vpn {
encapsulation-type ethernet;
site 100 {
site-identifier 100;
interface ge-0/1/1.0 {
remote-site-id 200;
}
}
}
}
}