예: OSPF 네트워크에서 SR-TE를 통한 LDP 터널링
개요
이 예에서는 OSPF 네트워크에서 SR-TE를 통한 LDP 터널링을 구성하는 방법을 보여 줍니다. 이는 SR-TE를 통한 LDP 터널이 사용하도록 설정되어 있고 원격 에지 디바이스에 대한 LDP 터널이 올바른 경로를 사용하는지 확인하면 알 수 있습니다. 또한 원격 에지 디바이스로의 경로가 LDP 전달을 사용하고 SR-TE를 통해 터널링됨을 보여 줍니다. 다음 토폴로지(그림 1)에서 PE1 및 PE2는 IPv4 전용 디바이스 CE1 및 CE2를 지원하는 수신 및 송신 디바이스입니다. 디바이스 R1, R2, R3 및 R4는 IPv4 전용 SR-TE 코어 네트워크를 구성합니다. 토폴로지에는 두 개의 LDP 도메인이 표시됩니다. LDP 도메인은 디바이스 CE1 및 PE1로 구성됩니다. LDP 도메인 B는 디바이스 PE2 및 CE2로 구성됩니다. LDP 도메인은 SR-TE를 통해 LSP 세션을 터널링하여 코어를 통해 확장하는 SR-TE 코어 네트워크에 연결됩니다.
토폴로지

요구 사항
이 예에서 사용되는 하드웨어 및 소프트웨어 구성 요소는 다음과 같습니다.
-
CE, PE 및 코어 라우터로 MX 시리즈 라우터를 사용합니다.
-
모든 디바이스에서 실행되는 Junos OS 릴리스 22.4R1 이상
구성
코어 네트워크에서 SR-TE를 통해 LDP LSP를 터널링하려면 다음 작업을 수행합니다.
CLI 빠른 구성
이 예를 빠르게 구성하려면, 아래 명령을 복사하여 텍스트 파일로 붙여 넣은 다음 모든 라인브레이크를 제거하고, 네트워크 구성을 일치하는 데 필요한 세부 사항을 바꾸고 [edit]
계층 수준에서 명령을 CLI로 복사해 붙여 넣은 다음, 구성 모드에서 commit
을(를) 입력합니다.
enhanced-ip
구성을 커밋하면 라우터를 재부팅하라는 다음 경고 메시지가 나타납니다.'chassis' WARNING: Chassis configuration for network services has been changed. A system reboot is mandatory. Please reboot the system NOW. Continuing without a reboot might result in unexpected system behavior. commit complete
디바이스 CE1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description CE1-to-PE1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 192.168.100.11/32 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set routing-options router-id 192.168.100.11
디바이스 PE1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description PE1-to-CE1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.2/24 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description PE1-to-R1 set interfaces ge-0/0/3 unit 0 family inet address 10.1.2.1/24 set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.5/32 set interfaces lo0 unit 0 family mpls set policy-options policy-statement export_bgp term a from protocol bgp set policy-options policy-statement export_bgp term a from protocol direct set policy-options policy-statement export_bgp term a then accept set routing-instances CE1_vpn1 instance-type vrf set routing-instances CE1_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set routing-instances CE1_vpn1 protocols ospf export export_bgp set routing-instances CE1_vpn1 interface ge-0/0/1.0 set routing-instances CE1_vpn1 route-distinguisher 192.168.100.5:1 set routing-instances CE1_vpn1 vrf-target target:100:4 set routing-instances CE1_vpn1 vrf-table-label set routing-options router-id 192.168.100.5 set routing-options autonomous-system 65410 set protocols bgp group ibgp1 type internal set protocols bgp group ibgp1 local-address 192.168.100.5 set protocols bgp group ibgp1 family inet unicast set protocols bgp group ibgp1 family inet-vpn unicast set protocols bgp group ibgp1 neighbor 192.168.100.6 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point set protocols ospf area 0.0.0.0 interface lo0.0 passive
디바이스 R1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R1-to-R2 set interfaces ge-0/0/1 unit 0 family inet address 10.1.3.1/24 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/2 description R1-to-R3 set interfaces ge-0/0/2 unit 0 family inet address 10.1.4.1/24 set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description R1-to-PE1 set interfaces ge-0/0/3 unit 0 family inet address 10.1.2.2/24 set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.1/32 set interfaces lo0 unit 0 family mpls set routing-options router-id 192.168.100.1 set protocols ldp auto-targeted-session set protocols ldp preference 1 set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf backup-spf-options use-post-convergence-lfa set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering l3-unicast-topology set protocols ospf traffic-engineering credibility-protocol-preference set protocols ospf traffic-engineering advertisement always set protocols ospf traffic-engineering tunnel-source-protocol spring-te set protocols ospf source-packet-routing node-segment ipv4-index 5001 set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 50000 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment protected index 108 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment unprotected index 110 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment protected index 104 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected index 106 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment protected index 100 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment unprotected index 102 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols source-packet-routing segment-list seg1 inherit-label-nexthops set protocols source-packet-routing segment-list seg1 auto-translate set protocols source-packet-routing segment-list seg1 hop1 ip-address 10.1.4.2 set protocols source-packet-routing segment-list seg1 hop2 ip-address 10.1.5.2 set protocols source-packet-routing segment-list seg1 hop3 ip-address 10.1.6.2 set protocols source-packet-routing source-routing-path sr_static_r5 ldp-tunneling set protocols source-packet-routing source-routing-path sr_static_r5 to 192.168.100.2 set protocols source-packet-routing source-routing-path sr_static_r5 binding-sid 1003001 set protocols source-packet-routing source-routing-path sr_static_r5 primary seg1
디바이스 R2
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R2-to-R1 set interfaces ge-0/0/1 unit 0 family inet address 10.1.3.2/24 set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/2 description R2-to-R4 set interfaces ge-0/0/2 unit 0 family inet address 10.1.6.2/24 set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description R2-to-PE2 set interfaces ge-0/0/3 unit 0 family inet address 10.1.7.1/24 set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.2/32 set interfaces lo0 unit 0 family mpls set routing-options router-id 192.168.100.2 set protocols ldp auto-targeted-session set protocols ldp preference 1 set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf backup-spf-options use-post-convergence-lfa set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering l3-unicast-topology set protocols ospf traffic-engineering credibility-protocol-preference set protocols ospf traffic-engineering advertisement always set protocols ospf traffic-engineering tunnel-source-protocol spring-te set protocols ospf source-packet-routing node-segment ipv4-index 5002 set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 50000 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment protected index 500 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment unprotected index 502 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment protected index 504 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected index 506 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment protected index 508 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment unprotected index 510 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols source-packet-routing segment-list seg1 inherit-label-nexthops set protocols source-packet-routing segment-list seg1 auto-translate set protocols source-packet-routing segment-list seg1 hop1 ip-address 10.1.6.1 set protocols source-packet-routing segment-list seg1 hop2 ip-address 10.1.5.1 set protocols source-packet-routing segment-list seg1 hop3 ip-address 10.1.4.1 set protocols source-packet-routing source-routing-path sr_static_r1 ldp-tunneling set protocols source-packet-routing source-routing-path sr_static_r1 to 192.168.100.1 set protocols source-packet-routing source-routing-path sr_static_r1 binding-sid 1003001 set protocols source-packet-routing source-routing-path sr_static_r1 primary seg1
디바이스 R3
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R3-to-R4 set interfaces ge-0/0/1 unit 0 family inet address 10.1.5.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R3-to-R1 set interfaces ge-0/0/2 unit 0 family inet address 10.1.4.2/24 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.3/32 set interfaces lo0 unit 0 family mpls set routing-options router-id 192.168.100.3 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols ospf backup-spf-options use-post-convergence-lfa set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering l3-unicast-topology set protocols ospf traffic-engineering credibility-protocol-preference set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing node-segment ipv4-index 5003 set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 50000 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment protected index 204 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment unprotected index 206 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment protected index 200 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected index 202 set protocols ospf area 0.0.0.0 interface lo0.0 passive
디바이스 R4
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description R4-to-R3 set interfaces ge-0/0/1 unit 0 family inet address 10.1.5.2/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R4-to-R2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.6.1/24 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.4/32 set interfaces lo0 unit 0 family mpls set routing-options router-id 192.168.100.4 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols ospf backup-spf-options use-post-convergence-lfa set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering l3-unicast-topology set protocols ospf traffic-engineering credibility-protocol-preference set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing node-segment ipv4-index 5004 set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 50000 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment protected index 300 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment unprotected index 302 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 point-to-point set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment protected index 304 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected index 306 set protocols ospf area 0.0.0.0 interface lo0.0 passive
디바이스 PE2
set chassis network-services enhanced-ip set interfaces ge-0/0/2 description PE2-to-CE2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.8.1/24 set interfaces ge-0/0/2 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/3 description PE2-to-R2 set interfaces ge-0/0/3 unit 0 family inet address 10.1.7.2/24 set interfaces ge-0/0/3 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.100.6/32 set interfaces lo0 unit 0 family mpls set policy-options policy-statement export_bgp term a from protocol bgp set policy-options policy-statement export_bgp term a from protocol direct set policy-options policy-statement export_bgp term a then accept set routing-instances CE2_vpn1 instance-type vrf set routing-instances CE2_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set routing-instances CE2_vpn1 protocols ospf export export_bgp set routing-instances CE2_vpn1 interface ge-0/0/2.0 set routing-instances CE2_vpn1 route-distinguisher 192.168.100.6:1 set routing-instances CE2_vpn1 vrf-target target:100:4 set routing-instances CE2_vpn1 vrf-table-label set routing-options router-id 192.168.100.6 set routing-options autonomous-system 65410 set protocols bgp group ibgp1 type internal set protocols bgp group ibgp1 local-address 192.168.100.6 set protocols bgp group ibgp1 family inet unicast set protocols bgp group ibgp1 family inet-vpn unicast set protocols bgp group ibgp1 neighbor 192.168.100.5 set protocols ldp interface ge-0/0/3.0 set protocols ldp interface lo0.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point set protocols ospf area 0.0.0.0 interface lo0.0 passive
디바이스 CE2
set chassis network-services enhanced-ip set interfaces ge-0/0/1 description CE2-to-PE2 set interfaces ge-0/0/2 unit 0 family inet address 10.1.8.2/24 set interfaces lo0 unit 0 family inet address 192.168.100.22/32 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 routing-options router-id 192.168.100.22
PE1 구성
단계별 절차
다음 예는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 관한 정보는 CLI 사용자 가이드에서 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 PE1 구성:
-
네트워크 서비스 모드를 향상된 IP로 구성합니다. 향상된 IP는 라우터의 네트워크 서비스를 향상된 인터넷 프로토콜로 설정하고 향상된 모드 기능을 사용합니다.
[edit chassis] user@PE1#set network-services enhanced-ip
-
디바이스의 인터페이스를 구성합니다.
[edit interfaces] user@PE1#set ge-0/0/1 description PE1-to-CE1 user@PE1#set ge-0/0/1 unit 0 family inet address 10.1.1.2/24 user@PE1#set ge-0/0/3 description PE1-to-R1 user@PE1#set ge-0/0/3 unit 0 family inet address 10.1.2.1/24 user@PE1#set ge-0/0/3 unit 0 family mpls user@PE1#set lo0 unit 0 family inet address 192.168.100.5/32 user@PE1#set lo0 unit 0 family mpls
-
이 예에서 OSPF 프로토콜을 실행하는 CE 라우터로 BGP 경로를 내보내도록 정책 옵션을 구성합니다.
[edit policy-options] user@PE1#set policy-statement export_bgp term a from protocol bgp user@PE1#set policy-statement export_bgp term a from protocol direct user@PE1#set policy-statement export_bgp term a then accept
-
OSPF 기반 CE1 디바이스를 지원하도록 계층 3 VPN 라우팅 인스턴스를 구성합니다.
[edit routing-instances] user@PE1#set CE1_vpn1 instance-type vrf user@PE1#set CE1_vpn1 protocols ospf area 0.0.0.0 interface ge-0/0/1.0 user@PE1#set CE1_vpn1 protocols ospf export export_bgp user@PE1#set CE1_vpn1 interface ge-0/0/1.0 user@PE1#set CE1_vpn1 route-distinguisher 192.168.100.5:1 user@PE1#set CE1_vpn1 vrf-target target:100:4 user@PE1#set CE1_vpn1 vrf-table-label
-
디바이스 PE1의 라우터 ID 및 자율 시스템 번호를 구성합니다.
[edit routing-options] user@PE1#set router-id 192.168.100.5 userPE1# set autonomous-system 65410
-
코어 네트워크에 연결된 인터페이스에서 OSPF, LDP 및 MPLS를 구성합니다.
[edit protocols] user@PE1#set ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point user@PE1#set ospf area 0.0.0.0 lo0.0 passive user@PE1#set ldp interface ge-0/0/3.0 user@PE1#set ldp interface lo0.0 user@PE1#set mpls interface ge-0/0/3.0 user@PE1#set mpls interface lo0.0
-
PE 디바이스 간에 BGP를 구성합니다.
[edit protocols] user@PE1#set bgp group ibgp1 type internal user@PE1#set bgp group ibgp1 local-address 192.168.100.5 user@PE1#set bgp group ibgp1 family inet unicast user@PE1#set bgp group ibgp1 family inet-vpn unicast user@PE1#set bgp group ibgp1 neighbor 192.168.100.6
결과
구성 모드에서 show chassis
, show interfaces
, show policy-options
, show routing-instances
, show routing-options
및 show protocols
명령을 입력하여 구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.
user@PE1#show chassis network-services enhanced-ip;
user@PE1#show interfaces ge-0/0/1 { description PE1-to-CE1; unit 0 { family inet { address 10.1.1.2/24; } family mpls { maximum-labels 8; } } } ge-0/0/3 { description PE1-to-R1; unit 0 { family inet { address 10.1.2.1/24; } family mpls { maximum-labels 8; } } } lo0 { unit 0 { family inet { address 192.168.100.5/32; } family mpls; } }
user@PE1#show policy-options policy-statement export_bgp { term a { from protocol [ bgp direct ]; then accept; } }
user@PE1#show routing-instances CE1_vpn1 { instance-type vrf; protocols { ospf { area 0.0.0.0 { interface ge-0/0/1.0; } export export_bgp; } } interface ge-0/0/1.0; route-distinguisher 192.168.100.5:1; vrf-target target:100:4; vrf-table-label; }
user@PE1#show routing-options router-id 192.168.100.5; autonomous-system 65410;
user@PE1#show protocols bgp { group ibgp1 { type internal; local-address 192.168.100.5; family inet { unicast; } family inet-vpn { unicast; } neighbor 192.168.100.6; } } ldp { interface ge-0/0/3.0; interface lo0.0; } mpls { interface ge-0/0/3.0; interface lo0.0; } ospf { area 0.0.0.0 { interface ge-0/0/3.0 { point-to-point; } interface lo0.0 { passive; } } }
R1 디바이스 구성하기
단계별 절차
다음 예는 구성 계층에서 다양한 수준의 탐색이 필요합니다. CLI 탐색에 관한 정보는 CLI 사용자 가이드에서 구성 모드에서 CLI 편집기 사용을 참조하십시오.
디바이스 R1 구성
-
네트워크 서비스 모드를 향상된 IP로 구성합니다. 향상된 IP는 라우터의 네트워크 서비스를 향상된 인터넷 프로토콜로 설정하고 향상된 모드 기능을 사용합니다.
[edit chassis] user@R1#set network-services enhanced-ip
enhanced-ip
문을 구성하고 구성을 커밋하면 라우터를 재부팅하라는 다음 경고 메시지가 나타납니다.'chassis' WARNING: Chassis configuration for network services has been changed. A system reboot is mandatory. Please reboot the system NOW. Continuing without a reboot might result in unexpected system behavior. commit complete
재부팅하면 라우터에 FPC가 표시됩니다.
-
디바이스의 인터페이스를 구성합니다.
[edit interfaces] user@R1#set ge-0/0/1 description R1-to-R2 user@R1#set ge-0/0/1 unit 0 family inet address 10.1.3.1/24 user@R1#set ge-0/0/1 unit 0 family mpls maximum-labels 8 user@R1#set ge-0/0/2 description R1-to-R3 user@R1#set ge-0/0/2 unit 0 family inet address 10.1.4.1/24 user@R1#set ge-0/0/2 unit 0 family mpls maximum-labels 8 user@R1#set ge-0/0/3 description R1-to-PE1 user@R1#set ge-0/0/3 unit 0 family inet address 10.1.2.2/24 user@R1#set ge-0/0/3 unit 0 family mpls maximum-labels 8 user@R1#set lo0 unit 0 family inet address 192.168.100.1/32 user@R1#set lo0 unit 0 family mpls
-
도메인에서 라우터를 식별하는 라우팅 옵션을 구성합니다.
[edit routing-options] user@R1#set router-id 192.168.100.1
-
인터페이스에서 OSPF 인접 SID를 구성하고 SRGB 레이블을 할당하여 세그먼트 라우팅을 활성화합니다. 전체 SRGB의 레이블은 OSPF에 사용할 수 있습니다. 접두사 SID(및 노드 SID)는 SRGB에서 인덱싱됩니다.
[edit protocols] user@R1#set ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment protected index 108 user@R1#set ospf area 0.0.0.0 interface ge-0/0/1.0 ipv4-adjacency-segment unprotected index 110 user@R1#set ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa user@R1#set ospf area 0.0.0.0 interface ge-0/0/1.0 point-to-point user@R1#set ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment protected index 104 user@R1#set ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected index 106 user@R1#set ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa user@R1#set ospf area 0.0.0.0 interface ge-0/0/2.0 point-to-point user@R1#set ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment protected index 100 user@R1#set ospf area 0.0.0.0 interface ge-0/0/3.0 ipv4-adjacency-segment unprotected index 102 user@R1#set ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa user@R1#set ospf area 0.0.0.0 interface ge-0/0/3.0 point-to-point user@R1#set ospf area 0.0.0.0 interface lo0.0 passive user@R1#set ospf source-packet-routing srgb start-label 80000 user@R1#set ospf source-packet-routing srgb index-range 50000 user@R1#set ospf source-packet-routing node-segment ipv4-index 5001
-
링크 및 노드 장애에 대한 보호를 사용하도록 TI-LFA를 구성합니다. TI-LFA를 사용하는 SR은 기본 경로가 실패하거나 사용할 수 없게 될 경우 즉시 트래픽을 백업 또는 대체 경로로 라우팅하여 네트워크 연결을 더 빠르게 복원합니다.
[edit protocols] user@R1#set ospf backup-spf-options use-post-convergence-lfa user@R1#set ospf backup-spf-options use-source-packet-routing
-
OSPF 트래픽 엔지니어링 매개 변수를 구성합니다.
[edit protocols] user@R1#set ospf traffic-engineering l3-unicast-topology user@R1#set ospf traffic-engineering credibility-protocol-preference user@R1#set protocols ospf traffic-engineering advertisement always
-
SR-TE를 통한 LDP 터널링을 사용하도록 설정합니다.
[edit protocols] user@R1#set ospf traffic-engineering tunnel-source-protocol spring-te
-
LDP 도메인의 인터페이스에서 MPLS 및 LDP 프로토콜을 구성하여 LDP 도메인의 레이블을 교환합니다.
[edit protocols] user@R1#set ldp preference 1 user@R1#set protocols ldp interface ge-0/0/1.0 user@R1#set ldp interface ge-0/0/3.0 user@R1#set ldp interface lo0.0 user@R1#set mpls interface ge-0/0/1.0 user@R1#set mpls interface ge-0/0/2.0 user@R1#set mpls interface ge-0/0/3.0 user@R1#set mpls interface lo0.0
-
LDP 도메인의 에지 라우터 간에 대상 LDP 세션을 사용하도록 설정합니다.
[edit protocols] user@R1#set ldp auto-targeted-session
-
트래픽을 특정 경로로 라우팅하도록 세그먼트 목록을 구성합니다.
[edit protocols] user@R1#set source-packet-routing segment-list seg1 inherit-label-nexthops user@R1#set source-packet-routing segment-list seg1 auto-translate user@R1#set source-packet-routing segment-list seg1 hop1 ip-address 192.168.4.2 user@R1#set source-packet-routing segment-list seg1 hop2 ip-address 192.168.5.2 user@R1#set source-packet-routing segment-list seg1 hop3 ip-address 192.168.6.2
-
SR-TE를 통한 LDP 터널링을 사용하도록 원격 에지 라우터에 SR-TELSP를 구성합니다.
[edit protocols] user@R1#set source-packet-routing source-routing-path sr_static_r5 ldp-tunneling user@R1#set source-packet-routing source-routing-path sr_static_r5 to 192.168.66.66 user@R1#set source-packet-routing source-routing-path sr_static_r5 binding-sid 1003001 user@R1#set source-packet-routing source-routing-path sr_static_r5 primary seg1
결과
구성 모드에서 show chassis
, show interfaces
, show routing-options
및 show protocols
명령을 입력하여 구성을 확인합니다. 출력 결과가 의도한 구성대로 표시되지 않으면 이 예의 지침을 반복하여 구성을 수정하십시오.
user@R1#show chassis network-services enhanced-ip;
user@R1#show interfaces ge-0/0/1 { description R1-to-R2; unit 0 { family inet { address 10.1.3.1/24; } family mpls { maximum-labels 8; } } } ge-0/0/2 { description R1-to-R3; unit 0 { family inet { address 10.1.4.1/24; } family mpls { maximum-labels 8; } } } ge-0/0/3 { description R1-to-PE1; unit 0 { family inet { address 10.1.2.2/24; } family mpls { maximum-labels 8; } } } lo0 { unit 0 { family inet { address 192.168.100.1/32; } family mpls; } }
user@R1#show protocols ldp { auto-targeted-session; preference 1; interface ge-0/0/1.0; interface ge-0/0/3.0; interface lo0.0; } mpls { interface ge-0/0/1.0; interface ge-0/0/2.0; interface ge-0/0/3.0; interface lo0.0; } ospf { backup-spf-options { use-post-convergence-lfa; use-source-packet-routing; } traffic-engineering { l3-unicast-topology; credibility-protocol-preference; advertisement always; tunnel-source-protocol { spring-te; } } source-packet-routing { node-segment ipv4-index 5001; srgb start-label 80000 index-range 50000; } area 0.0.0.0 { interface ge-0/0/1.0 { point-to-point; post-convergence-lfa; ipv4-adjacency-segment { protected index 108; unprotected index 110; } } interface ge-0/0/2.0 { point-to-point; post-convergence-lfa; ipv4-adjacency-segment { protected index 104; unprotected index 106; } } interface ge-0/0/3.0 { point-to-point; post-convergence-lfa; ipv4-adjacency-segment { protected index 100; unprotected index 102; } } interface lo0.0 { passive; } } } source-packet-routing { segment-list seg1 { inherit-label-nexthops; auto-translate; hop1 ip-address 10.1.4.2; hop2 ip-address 10.1.5.2; hop3 ip-address 10.1.6.2; } source-routing-path sr_static_r5 { ldp-tunneling; to 192.168.100.2; binding-sid 1003001; primary { seg1; } } }
user@R1#show routing-options router-id 192.168.100.1;
검증
구성이 제대로 작동하는지 확인하려면 다음 작업을 수행하십시오.
SR-TE를 통한 LDP 터널링 확인
목적
SR-TE를 통한 LDP 터널이 사용하도록 설정되어 있고 원격 에지 라우터에 대한 LDP 터널이 올바른 경로를 사용하고 있는지 확인합니다.
작업
운영 모드에서 show spring-traffic-engineering lsp detail
명령을 실행합니다.
R1
user@R1>show spring-traffic-engineering lsp detail Name: sr_static_r5 Tunnel-source: Static configuration Tunnel Forward Type: SRMPLS To: 192.168.100.2 Te-group-id: 0 State: Up LDP-tunneling enabled Path: seg1 Path Status: NA Outgoing interface: NA Auto-translate status: Enabled Auto-translate result: Success Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A BFD status: N/A BFD name: N/A BFD remote-discriminator: N/A Segment ID : 128 ERO Valid: true SR-ERO hop count: 3 Hop 1 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.4.2 SID type: 20-bit label, Value: 80104 Hop 2 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.5.2 SID type: 20-bit label, Value: 80204 Hop 3 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.6.2 SID type: 20-bit label, Value: 80304 Total displayed LSPs: 1 (Up: 1, Down: 0)
R2
user@R2>show spring-traffic-engineering lsp detail Name: sr_static_r1 Tunnel-source: Static configuration Tunnel Forward Type: SRMPLS To: 192.168.100.1 Te-group-id: 0 State: Up LDP-tunneling enabled Path: seg1 Path Status: NA Outgoing interface: NA Auto-translate status: Enabled Auto-translate result: Success Compute Status:Disabled , Compute Result:N/A , Compute-Profile Name:N/A BFD status: N/A BFD name: N/A BFD remote-discriminator: N/A Segment ID : 128 ERO Valid: true SR-ERO hop count: 3 Hop 1 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.6.1 SID type: 20-bit label, Value: 80504 Hop 2 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.5.1 SID type: 20-bit label, Value: 80300 Hop 3 (Strict): NAI: IPv4 Adjacency ID, 0.0.0.0 -> 10.1.4.1 SID type: 20-bit label, Value: 80200 Total displayed LSPs: 1 (Up: 1, Down: 0)
의미
-
R1에서, LDP 터널은 SR-TE 코어 네트워크에서 원격 에지 라우터 192.168.100.2과(와) 함께 설정됩니다. 출력에서도 SID 레이블값 80104, 80204, 80304 을(를) 확인할 수 있습니다.
-
R2에서 LDP 터널은 SR-TE 코어 네트워크에서 원격 에지 라우터 192.168.100.1과(와) 함께 설정됩니다. 출력에서도 SID 레이블값 80504, 80300, 80200 을(를) 확인할 수 있습니다.
보급 레이블확인
목적
FEC(Forwarding Equivalence Class)에 대해 보급된 레이블을 확인합니다.
작업
운영 모드에서 show ldp database
명령을 실행합니다.
R1
직접 연결된 PE(PE1) 쪽으로 보급된 레이블과 원격 에지 라우터(R2)로부터 받은 레이블을 확인합니다.
user@R1>show ldp database Input label database, 192.168.100.1:0--192.168.100.2:0 Labels received: 4 Label Prefix 18 192.168.100.1/32 3 192.168.100.2/32 20 192.168.100.5/32 16 192.168.100.6/32 Output label database, 192.168.100.1:0--192.168.100.2:0 Labels advertised: 4 Label Prefix 3 192.168.100.1/32 4115 192.168.100.2/32 4114 192.168.100.5/32 4117 192.168.100.6/32 Input label database, 192.168.100.1:0--192.168.100.5:0 Labels received: 4 Label Prefix 17 192.168.100.1/32 22 192.168.100.2/32 3 192.168.100.5/32 24 192.168.100.6/32 Output label database, 192.168.100.1:0--192.168.100.5:0 Labels advertised: 4 Label Prefix 3 192.168.100.1/32 4115 192.168.100.2/32 4114 192.168.100.5/32 4117 192.168.100.6/32
R2
직접 연결된 PE(PE2) 쪽으로 보급된 레이블과 원격 에지 라우터(R1)로부터 받은 레이블을 확인합니다.
user@R2>show ldp database Input label database, 192.168.100.2:0--192.168.100.1:0 Labels received: 4 Label Prefix 3 192.168.100.1/32 4115 192.168.100.2/32 4114 192.168.100.5/32 4117 192.168.100.6/32 Output label database, 192.168.100.2:0--192.168.100.1:0 Labels advertised: 4 Label Prefix 18 192.168.100.1/32 3 192.168.100.2/32 20 192.168.100.5/32 16 192.168.100.6/32 Input label database, 192.168.100.2:0--192.168.100.6:0 Labels received: 4 Label Prefix 24 192.168.100.1/32 17 192.168.100.2/32 25 192.168.100.5/32 3 192.168.100.6/32 Output label database, 192.168.100.2:0--192.168.100.6:0 Labels advertised: 4 Label Prefix 18 192.168.100.1/32 3 192.168.100.2/32 20 192.168.100.5/32 16 192.168.100.6/32
PE1
원격 PE(PE2) 디바이스의 루프백 주소 레이블이 에지 디바이스 R1에 의해 로컬 PE(PE1) 디바이스에 보급되었는지 확인합니다.
user@PE1>show ldp database
Input label database, 192.168.100.5:0--192.168.100.1:0
Labels received: 4
Label Prefix
3 192.168.100.1/32
4115 192.168.100.2/32
4114 192.168.100.5/32
4117 192.168.100.6/32
Output label database, 192.168.100.5:0--192.168.100.1:0
Labels advertised: 4
Label Prefix
17 192.168.100.1/32
22 192.168.100.2/32
3 192.168.100.5/32
24 192.168.100.6/32
PE2
원격 PE(PE1) 디바이스의 루프백 주소 레이블이 에지 디바이스 R2에 의해 로컬 PE(PE2) 디바이스에 보급되었는지 확인합니다.
user@PE2>show ldp database
Input label database, 192.168.100.6:0--192.168.100.2:0
Labels received: 4
Label Prefix
18 192.168.100.1/32
3 192.168.100.2/32
20 192.168.100.5/32
16 192.168.100.6/32
Output label database, 192.168.100.6:0--192.168.100.2:0
Labels advertised: 4
Label Prefix
24 192.168.100.1/32
17 192.168.100.2/32
25 192.168.100.5/32
3 192.168.100.6/32
의미
-
OR1에서 레이블4117이(가) 직접 연결된 PE(PE1)를 향해 광고되고 레이블 27이(가) 원격 에지 라우터(R2)로부터 수신되는 것을 볼 수 있습니다.
-
R2에서는 레이블18이(가) 직접 연결된 PE(PE2)를 향해 광고되고 레이블 25이(가) 원격 에지 라우터(R1)로부터 수신되는 것을 볼 수 있습니다.
-
PE1에서 레이블4117이(가) 로컬 에지 라우터(R1)로부터 수신되는 것을 볼 수 있습니다.
-
PE2에서는 레이블18이(가) 로컬 에지 라우터(R2)로부터 수신되는 것을 볼 수 있습니다.
원격 PE 디바이스로 LDP 전달 확인
목적
원격 PE 라우터로 가는 경로가 LDP 전달을 사용하고 SR-TE를 통해 터널링되는지 확인합니다.
작업
운영 모드에서 show route destination-prefix
명령을 실행합니다.
R1
원격 PE(PE2) 라우터로 가는 경로가 SR-TE 터널을 통해 LDP를 통과하는지 확인합니다.
user@R1>show route 192.168.100.6 inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[OSPF/10/10] 1d 03:28:10, metric 2 > to 10.1.3.2 via ge-0/0/1.0 inet.3: 10 destinations, 15 routes (5 active, 0 holddown, 8 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[LDP/1] 21:42:29, metric 1 > to 10.1.4.2 via ge-0/0/2.0, Push 16, Push 80304, Push 80204(top) to 10.1.3.2 via ge-0/0/1.0, Push 16, Push 80304, Push 80204, Push 85003, Push 85004(top)
R2
원격 PE(PE1) 라우터로 가는 경로가 SR-TE 터널을 통해 LDP를 통과하는지 확인합니다.
user@R2>show route 192.168.100.5 inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[OSPF/10/10] 22:22:45, metric 2 > to 10.1.3.1 via ge-0/0/1.0 inet.3: 10 destinations, 15 routes (5 active, 0 holddown, 8 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[LDP/1] 22:22:45, metric 1 > to 10.1.6.1 via ge-0/0/2.0, Push 4114, Push 80200, Push 80300(top) to 10.1.3.1 via ge-0/0/1.0, Push 4114, Push 80200, Push 80300, Push 85004, Push 85003(top)
PE1
원격 PE(PE2) 라우터로 가는 경로가 대상 LDP 세션을 통해 원격 PE로 가는 것인지 확인합니다.
user@PE1>show route 192.168.100.6
inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.6/32 *[OSPF/10] 01:15:29, metric 3
> to 10.1.2.2 via ge-0/0/3.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.6/32 *[LDP/9] 01:15:29, metric 1
> to 10.1.2.2 via ge-0/0/3.0, Push 4117
PE2
원격 PE(PE1) 라우터로 가는 경로가 대상 LDP 세션을 통해 원격 PE로 가는 것인지 확인합니다.
user@PE2>show route 192.168.100.5
inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.5/32 *[OSPF/10] 01:27:40, metric 3
> to 10.1.7.1 via ge-0/0/3.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.5/32 *[LDP/9] 01:27:40, metric 1
> to 10.1.7.1 via ge-0/0/3.0, Push 20
의미
-
R1에서 LDP 레이블은 (으)로, SR-TE 레이블스택 16 은 (으)로 표시됩니다80304, 80204, 85003, 85004.
-
R2에서 LDP 레이블은 로, SR-TE 레이블스택 22 은 (으)로 볼 수 있 습니다80200, 80300, 85004, 85003.
-
PE1과 PE2에서 LDP 레이블은 각각 과(와) (으)로 4117 표시 20됩니다.
엔드 투 엔드 연결성 확인
목적
ping 192.168.100.22 source 192.168.100.11 count 2 operational mode 명령을 사용하여 CE1이 CE2를 ping할 수 있는지 확인합니다.
작업
user@CE1> ping 192.168.100.22 source 192.168.100.11 count 2 PING 192.168.100.22 (192.168.100.22): 56 data bytes 64 bytes from 192.168.100.22: icmp_seq=0 ttl=58 time=8.772 ms 64 bytes from 192.168.100.22: icmp_seq=1 ttl=58 time=9.189 ms --- 192.168.100.22 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 8.772/8.980/9.189/0.209 ms
의미
CE1의 출력은 CE1이 CE2를 ping할 수 있음을 보여줍니다.