MPLS cRPD 지원
cRPD MPLS 지원 이해하기
MPLS(MPLS 노드) 구성은 MPLS 네트워크에서 패킷을 대상으로 전달하기 위해 cRPD 지원됩니다.
MPLS 경우 첫 번째 디바이스만 라우팅 조회를 수행합니다. 디바이스는 다음 홉을 찾는 대신 해당 목적지에 대한 경로와 함께 최종 목적지를 찾습니다. MPLS 패킷의 경로를 레이블 스위칭 경로(LSP)라고 합니다. LSP는 네트워크 또는 AS(Autonomous System)를 통해 단방향 경로입니다. AS 내의 MPLS 라우터는 MPLS 트래픽 엔지니어링 정보의 교환을 통해 네트워크를 통과하는 경로를 결정합니다. 이러한 경로를 사용하여 라우터는 설정된 경로를 따라 네트워크를 통해 트래픽을 전달합니다. 각 라우터는 IP 라우팅에서와 같이 경로를 따라 다음 홉을 선택하는 대신 소정의 다음 홉 주소로 패킷을 전달합니다.
LSP의 일부인 라우터는 레이블 스위칭 라우터(LSR)입니다. MPLS LSP는 정적 LSP를 사용하여 설정됩니다. 정적 LSP는 경로를 따라 각 라우터를 명시적으로 구성해야 합니다. 경로 및 관련 레이블 값을 수동으로 구성해야 합니다.
cRPD 제한된 수의 Junos OS MPLS 기능만 지원합니다. 계층에서 cRPD interface
ipv6-tunneling
label-history
CLI에서 MPLS, , , label-range
및 static-label-switched-path
을(를edit protocols mpls
) 구성할 수 있습니다.
Supported Features
BGP 구성
PRPD API를 사용하는 MPLS
BGP labeled unicast 구성
더 보기
예: cRPD MPLS 위한 정적 레이블 스위칭 경로 구성
이 예는 BGP 및 정적 레이블 스위치 경로를 구성하여 VPN 트래픽이 PES 간 v4 MPLS MPLS 터널을 통해 흐르는 방법을 보여줍니다.
요구 사항
이 예는 다음과 같은 하드웨어 및 소프트웨어 구성 요소를 사용합니다.
Ubuntu 소프트웨어 버전 18.04
Linux 커널 버전 4.5 이상
cRPD 소프트웨어 릴리스 버전 19.4R1 이상
MPLS 포워딩을 위해 정적 LSP를 구성하기 전에 기본 구성 요소를 설치해야 합니다.
MPLS 인스턴스가 생성되는 호스트 OS의 모듈을 cRPD. 자세한 내용은 호스트 OS에서 설정 구성을 참조하십시오.
프로바이더 에지 라우터(PE1), 프로바이더 라우터(P) 및 프로바이더 에지 라우터(PE2). 설치는 Docker에서 cRPD 설치를 참조하십시오.
개요
이 예에서 PE1은 MPLS 네트워크에 레이블 에지 라우터 또는 수신 노드 역할을 하며, 레이블을 연결하여 패킷을 캡슐화합니다. P는 MPLS 네트워크에서 레이블을 사용하여 MPLS 패킷을 전송하는 레이블 스위칭 라우터 역할을 합니다.
MPLS 구성하려면 먼저 수신 및 전송 라우터에서 하나 이상의 명명된 경로를 생성해야 합니다. 각 경로에 대해 경로에 일부 또는 모든 전송 라우터를 지정할 수 있습니다.
MPLS 대한 정적 LSP(label-switched paths)를 구성하는 것은 개별 라우터에서 정적 경로를 구성하는 것과 유사합니다.
구성
cRPD MPLS 위한 정적 LSP 구성 방법:
PE1 라우터 구성
단계별 절차
정적 LSP를 구성하려면 다음을 수행합니다.
inet.0 및 mpls.0 테이블을 만듭니다.
[edit routing-options] user@crpd1# set rib inet.0 user@crpd1# set rib mpls.0 user@crpd1# set router-id 20.2.2.2
BGP 세션을 구성합니다.
[edit protocols bgp group VPN] user@crpd1# set type internal local-address 20.2.2.2 family inet-vpn unicast user@crpd1# set local-as 5 user@crpd1# set neighbor 40.4.4.4 family inet-vpn unicast
정적 레이블 범위 및 수신 정적 LSP 매개 변수를 구성합니다.
[edit protocols mpls] user@crpd1# set interface all user@crpd1# set label-range static-label-range 1000000 1048575 user@crpd1# set static-label-switched-path pe2 ingress install 40.4.4.4/32 active user@crpd1# set static-label-switched-path pe2 ingress to 40.4.4.4 next-hop 20.20.20.2 push 1000001
수신 PE2에서 정적 경로를 구성합니다.
[edit routing-options static] user@crpd1# set route 20.2.2.2/32 next-hop 20.20.20.2 user@crpd1# set route 40.4.4.4/32 static-lsp-next-hop pe2
PE1 및 기타 라우팅 인스턴스 매개 변수에서 VRF 라우팅 인스턴스를 구성합니다.
[edit routing-instances vrfblue] user@crpd1# set routing-options static route 10.1.1.1/32 next-hop 10.10.10.1 user@crpd1# set route-distinguisher 100:100 user@crpd1# set vrf-target target:100:100 user@crpd1# set interface all
결과
구성 모드에서 PE1의 show protocols bgp
및 run show configuration protocols mpls
명령을 입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 구성 지침을 반복하여 수정합니다.
user@crpd1# show protocols bgp group VPN { type internal; local-address 20.2.2.2; family inet-vpn { unicast; } local-as 5; neighbor 40.4.4.4 { family inet-vpn { unicast; } } }
user@crpd1# run show configuration protocols mpls interface all; static-label-switched-path pe2 { ingress { next-hop 20.20.20.3; to 40.4.4.4; push 1000001; } }
디바이스 구성이 완료되면 구성 모드에서 커밋을 입력합니다.
프로바이더 P 라우터 구성.
단계별 절차
정적 LSP를 구성하려면 다음을 수행합니다.
라우터 P에 대한 라우터 ID를 구성합니다.
[edit routing-options] user@crpd2# set rib mpls.0 user@crpd2# set router-id 30.3.3.3
스왑 및 팝 레이블에 대한 전송 정적 LSP를 구성합니다.
[edit protocols mpls] user@crpd2# set label-range static-label-range 1000000 1048575 user@crpd2# set static-label-switched-path pe2 transit 1000001 next-hop 30.30.30.4 swap 1000002 user@crpd2# set static-label-switched-path pe1 transit 1000003 next-hop 20.20.20.2 swap 1000004 user@crpd2# set static-label-switched-path pe2 transit 1000001 pop next-hop 30.30.30.4 user@crpd2# set static-label-switched-path pe1 transit 1000003 pop next-hop 20.20.20.2
결과
구성 모드에서 P의 show protocols bgp
, run show configuration protocols mpls
및 run show mpls interface
명령을 입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 구성 지침을 반복하여 수정합니다.
user@crpd2# run show configuration protocols mpls interface all; static-label-switched-path pe1 { transit 1000003 { next-hop 20.20.20.2; swap 1000004; } } static-label-switched-path pe2 { transit 1000001 { next-hop 30.30.30.4; swap 1000002; } }
디바이스 구성이 완료되면 구성 모드에서 커밋을 입력합니다.
PE2 라우터 구성
단계별 절차
PE2에서 MPLS 위한 정적 LSP를 구성하려면 다음을 수행합니다.
BGP 세션을 구성합니다.
[edit protocols bgp group VPN ] user@crpd3# set type internal local-address 40.4.4.4 family inet-vpn unicast user@crpd3# set local-as 5 user@crpd3# set neighbor 20.2.2.2 family inet-vpn unicast
수신 정적 LSP 매개 변수를 구성합니다.
[edit protocols mpls ] user@crpd3# set interface all user@crpd3# set label-range static-label-range 1000000 1048575 user@crpd3# set static-label-switched-path pe1 ingress install 20.2.2.2/32 active user@crpd3# set static-label-switched-path pe1 ingress to 20.2.2.2 next-hop 30.30.30.4 push 1000003
수신 PE1에서 라우터 ID 및 정적 경로를 구성합니다.
[edit routing-options] user@crpd3# set rib inet.0 user@crpd3# set router-id 40.4.4.4 user@crpd3# set static route 40.4.4.4/32 next-hop 30.30.30.4 user@crpd3# set static route 20.2.2.2/32 static-lsp-next-hop pe1
PE2 및 기타 라우팅 인스턴스 매개 변수에서 VRF 라우팅 인스턴스를 구성합니다.
[edit routing-instances vrfblue] user@crpd3# set routing-options static route 50.5.5.5/32 next-hop 40.40.40.5 user@crpd3# set route-distinguisher 100:100 user@crpd3# set vrf-target target:100:100 user@crpd3# set interface all
결과
구성 모드에서 PE2의 run show configuration protocols mpls
및 run show mpls interface
명령을 입력하여 구성을 확인합니다. 출력에 의도한 구성이 표시되지 않으면 이 예의 구성 지침을 반복하여 수정합니다.
user@crpd3# show protocols bgp group VPN { type internal; local-address 40.4.4.4; family inet-vpn { unicast; } local-as 5; neighbor 20.2.2.2 { family inet-vpn { unicast; } } }
user@crpd3# run show configuration protocols mpls interface all; static-label-switched-path pe2 { ingress { next-hop 20.20.20.3; to 40.4.4.4; push 1000001; } }
디바이스 구성이 완료되면 구성 모드에서 커밋을 입력합니다.
확인
PE1에서 MPLS 포워딩 확인
목적
PE1에서 MPLS 대한 구성을 확인합니다.
작업
운영 모드에서 명령을 입력합니다 show route table vrfblue.inet.0 50.5.5.5
.
user@crpd1> show route table vrfblue.inet.0 50.5.5.5
vrfblue.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 50.5.5.5/32 *[BGP/170] 00:01:03, localpref 100, from 40.4.4.4 AS path: I, validation-state: unverified > to 20.20.20.3 via pe1-p, Push 299776, Push 1000001(top)
운영 모드에서 명령을 입력합니다 show mpls label usage
.
user@crpd1> show mpls label usage
Label space Total Available Applications LSI 999984 999983 (100.00%) BGP/LDP VPLS with no-tunnel-services, BGP L3VPN with vrf-table-label Block 999984 999983 (100.00%) BGP/LDP VPLS with tunnel-services, BGP L2VPN Dynamic 999984 999983 (100.00%) RSVP, LDP, PW, L3VPN, RSVP-P2MP, LDP-P2MP, MVPN, EVPN, BGP Static 48576 48576 (100.00%) Static LSP, Static PW Effective Ranges Range name Shared with Start End Dynamic 16 999999 Static 1000000 1048575 Configured Ranges Range name Shared with Start End Dynamic 16 999999 Static 1000000 1048575
운영 모드에서 명령을 입력합니다 show mpls static-lsp
.
user@crpd1> show mpls static-lsp
Ingress LSPs: LSPname To State pe2 40.4.4.4 Up Total 1, displayed 1, Up 1, Down 0 Transit LSPs: Total 0, displayed 0, Up 0, Down 0 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
운영 모드에서 명령을 입력합니다 show route table inet.3
.
user@crpd1> show route table inet.3
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.4.4.4/32 *[MPLS/6/1] 00:04:44, metric 0 > to 20.20.20.3 via pe1-p, Push 1000001
운영 모드에서 명령을 입력합니다 show route table mpls.0
.
user@crpd1> 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] 00:15:45, metric 1 Receive 1 *[MPLS/0] 00:15:45, metric 1 Receive 2 *[MPLS/0] 00:15:45, metric 1 Receive 13 *[MPLS/0] 00:15:45, metric 1 Receive 299776 *[VPN/170] 00:06:32 > to 10.10.10.1 via pe1-ce1, Pop 299776(S=0) *[VPN/170] 00:06:32 > to 10.10.10.1 via pe1-ce1, Pop
운영 모드에서 명령을 입력합니다 ip route list table 5 50.5.5.5
.
user@crpd1> ip route list table 5 50.5.5.5
50.5.5.5 encap mpls 1000001/299776 via 20.20.20.3 dev pe1-p proto 22
운영 모드에서 명령을 입력합니다 ip -f mpls route
.
user@crpd1> ip -f mpls route
299776 via inet 10.10.10.1 dev pe1-ce1 proto 22
P에서 MPLS 포워딩 확인
목적
P에서 MPLS 대한 구성을 확인합니다.
작업
쉘 모드에서 명령을 입력합니다 show route table mpls.0
.
user@crpd2> show route table mpls.0
mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 00:00:11, metric 1 Receive 1 *[MPLS/0] 00:00:11, metric 1 Receive 2 *[MPLS/0] 00:00:11, metric 1 Receive 13 *[MPLS/0] 00:00:11, metric 1 Receive 299776 *[VPN/170] 00:00:05 > to 20.20.20.2 via p-pe1, Pop 299776(S=0) *[VPN/170] 00:00:05 > to 20.20.20.2 via p-pe1, Pop 299792 *[VPN/170] 00:00:05 > to 30.30.30.4 via p-pe2, Pop 299792(S=0) *[VPN/170] 00:00:05 > to 30.30.30.4 via p-pe2, Pop 1000001 *[MPLS/6] 00:00:11, metric 1 > to 30.30.30.4 via p-pe2, Swap 1000002 1000003 *[MPLS/6] 00:00:11, metric 1 > to 20.20.20.2 via p-pe1, Swap 1000004
user@crpd2> show mpls static-lsp
Ingress LSPs: Total 0, displayed 0, Up 0, Down 0 Transit LSPs: LSPname Incoming-label State pe1 1000003 Up pe2 1000001 Up Total 2, displayed 2, Up 2, Down 0 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
bash 쉘 모드에서 명령을 입력합니다 ip -f mpls route
.
user@crpd2:/# ip -f mpls route
299776 via inet 20.20.20.2 dev p-pe1 proto 22 299792 via inet 30.30.30.4 dev p-pe2 proto 22 1000001 as to 1000002 via inet 30.30.30.4 dev p-pe2 proto 22 1000003 as to 1000004 via inet 20.20.20.2 dev p-pe1 proto 22
PE2에서 MPLS 포워딩 확인
목적
P에서 MPLS 대한 구성을 확인합니다.
작업
쉘 모드에서 명령을 입력합니다 show route table vrfblue.inet.0 10.1.1.1
.
user@crpd3> show route table vrfblue.inet.0 10.1.1.1
vrfblue.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.1.1.1/32 *[BGP/170] 00:03:00, localpref 100, from 2.2.2.2 AS path: I, validation-state: unverified > to 30.30.30.3 via pe2-p, Push 299776, Push 1000003(top)
user@crpd3> show mpls static-lsp
Ingress LSPs: LSPname To State pe1 20.2.2.2 Up Total 1, displayed 1, Up 1, Down 0 Transit LSPs: LSPname Incoming-label State pe2 1000002 Dn Total 1, displayed 1, Up 0, Down 1 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
user@crpd3> 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] 00:17:31, metric 1 Receive 1 *[MPLS/0] 00:17:31, metric 1 Receive 2 *[MPLS/0] 00:17:31, metric 1 Receive 13 *[MPLS/0] 00:17:31, metric 1 Receive 299776 *[VPN/170] 00:03:07 > to 40.40.40.5 via pe2-ce2, Pop 299776(S=0) *[VPN/170] 00:03:07 > to 40.40.40.5 via pe2-ce2, Pop
bash 쉘 모드에서 명령을 입력합니다 ip -f mpls route
.
user@crpd3:/# ip -f mpls route
299776 via inet 40.40.40.5 dev pe2-ce2 proto 22
bash 쉘 모드에서 명령을 입력합니다 ip route list table 5 10.1.1.1
.
user@crpd3:/# ip route list table 5 10.1.1.1
10.1.1.1 encap mpls 1000003/299776 via 30.30.30.3 dev pe2-p proto 22
의미
모든 디바이스에서 PES 간의 정적 LSP가 작동하며 경로가 해당 경로 테이블 inet.o
과 inet.3
Linux FIB에 채워져 있는지 확인할 수 있습니다.