- play_arrow 概述
- play_arrow 了解 MPLS
- play_arrow 支持的标准
-
- play_arrow MPLS 配置
- play_arrow 配置 MPLS
- play_arrow 配置 MPLS 隧道
-
- play_arrow MPLS 流量
- play_arrow 管理 MPLS 流量
- play_arrow 保护 MPLS 流量
- play_arrow 测量 MPLS 流量
-
- play_arrow MPLS LSP
- play_arrow 了解 MPLS LSP
- play_arrow 配置 MPLS LSP
-
- play_arrow MPLS 流量工程
- play_arrow 配置 MPLS 信息流工程
-
- play_arrow MPLS 传输配置文件
- play_arrow MPLS 的操作、管理和维护 (OAM)
- play_arrow MPLS 伪线
- play_arrow MPLS 的服务等级 (CoS)
- play_arrow 广义 MPLS (GMPLS)
-
- play_arrow MPLS VPN 和电路
- play_arrow MPLS 以太网(L2 电路)
- play_arrow CCC、TCC 和 2.5 层交换
-
- play_arrow 面向软件定义网络 (SDN) 的 MPLS
- play_arrow 路径计算元素协议 (PCEP)
-
- play_arrow MPLS 故障排除
- play_arrow MPLS 故障排除
-
- play_arrow 配置语句和操作命令
示例:在 IS-IS 网络中通过 SR-TE 建立隧道 LDP
使用此示例了解如何在核心网络中通过 SR-TE 通过隧道传输 LDP LSP。
我们的内容测试团队已验证并更新了此示例。
要求
此示例使用以下硬件和软件组件:
MX 系列路由器可作为 CE、PE 和核心路由器。
在所有设备上运行的 Junos OS 20.3R1 或更高版本。
在 Junos OS 21.1R1 版上使用 vMX 进行更新和重新验证。
概述
以下拓扑 (图 1) 显示了连接到 SR-TE 核心网络的两个 LDP 域(LDP 域 A 和 LDP 域 B),这两个域通过在 SR-TE 上建立隧道,从而将 LSP 会话扩展到核心。
拓扑学

配置
要在核心网络中通过 SR-TE 传输 LDP LSP 隧道,请执行以下操作:
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
设备 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 iso 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 iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.100.5/32 set interfaces lo0 unit 0 family iso address 49.0004.0192.0168.0005.00 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 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 isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive 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 mpls interface lo0.0 set routing-options router-id 192.168.100.5 set routing-options autonomous-system 65410
设备 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 iso 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 iso 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 iso 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 iso address 49.0004.0192.0168.0001.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 108 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 110 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 109 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 111 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 104 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 106 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 105 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 107 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 100 set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 102 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 101 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 103 set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5001 set protocols isis source-packet-routing node-segment ipv6-index 5501 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols isis traffic-engineering tunnel-source-protocol spring-te 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 mpls interface lo0.0 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 set routing-options router-id 192.168.100.1
设备 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 iso 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 iso 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 iso 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 iso address 49.0004.0192.0168.0002.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 500 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 502 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 501 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 503 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 504 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 506 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 505 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 507 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 508 set protocols isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 510 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 509 set protocols isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 511 set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5005 set protocols isis source-packet-routing node-segment ipv6-index 5505 set protocols isis source-packet-routing traffic-statistics statistics-granularity per-interface set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols isis traffic-engineering tunnel-source-protocol spring-te 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 mpls interface lo0.0 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 set routing-options router-id 192.168.100.2
设备 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 iso 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 iso 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 iso address 49.0004.0192.0168.0003.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 204 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 206 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 205 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 207 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 200 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 202 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 201 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 203 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5003 set protocols isis source-packet-routing node-segment ipv6-index 5503 set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.3
设备 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 iso 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 iso 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 iso address 49.0004.0192.0168.0004.00 set interfaces lo0 unit 0 family mpls set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 300 set protocols isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 302 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 301 set protocols isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 303 set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 304 set protocols isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 306 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 305 set protocols isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 307 set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 80000 set protocols isis source-packet-routing srgb index-range 50000 set protocols isis source-packet-routing node-segment ipv4-index 5004 set protocols isis source-packet-routing node-segment ipv6-index 5504 set protocols isis source-packet-routing traffic-statistics statistics-granularity per-interface set protocols isis level 1 disable set protocols isis backup-spf-options use-post-convergence-lfa set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering l3-unicast-topology set protocols isis traffic-engineering credibility-protocol-preference set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set routing-options router-id 192.168.100.4
设备 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 iso 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 iso 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 iso address 49.0004.0192.0168.0006.00 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 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 isis interface ge-0/0/3.0 point-to-point set protocols isis interface lo0.0 passive 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 mpls interface lo0.0 set routing-options router-id 192.168.100.6 set routing-options autonomous-system 65410
设备 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 将路由器的网络服务设置为增强型 Internet 协议,并使用增强模式功能。
content_copy zoom_out_map[edit chassis] user@PE1#set network-services enhanced-ip
配置
enhanced-ip
语句并提交配置后,将显示以下警告消息,提示您重新启动路由器:content_copy zoom_out_map'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。
配置设备的接口。
content_copy zoom_out_map[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/1 unit 0 family iso 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 iso 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 iso address 49.0004.0192.0168.0005.00 user@PE1#set lo0 unit 0 family mpls
配置策略选项以将 BGP 路由导出到客户边缘路由器,在此示例中,客户边缘路由器运行 OSPF 协议。
content_copy zoom_out_map[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
配置第 3 层 VPN 路由实例以支持基于 OSPF 的 CE1 设备。
content_copy zoom_out_map[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 和自治系统编号。
content_copy zoom_out_map[edit routing-options] user@PE1#set router-id 192.168.100.5 userPE1# set autonomous-system 65410
在连接到核心网络的接口上配置 ISIS、LDP 和 MPLS。
content_copy zoom_out_map[edit protocols] user@PE1#set isis interface ge-0/0/3.0 point-to-point user@PE1#set isis interface 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。
content_copy zoom_out_map[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 iso; } } ge-0/0/3 { description PE1-to-R1; unit 0 { family inet { address 10.1.2.1/24; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 192.168.100.5/32; } family iso { address 49.0004.0192.0168.0005.00; } 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; } } isis { interface ge-0/0/3.0 { point-to-point; } interface lo0.0 { passive; } } ldp { interface ge-0/0/3.0; interface lo0.0; } mpls { interface ge-0/0/3.0; interface lo0.0; }
配置 R1 设备
分步过程
下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置设备 R1:
将网络服务模式配置为增强型 IP。增强型 IP 将路由器的网络服务设置为增强型 Internet 协议,并使用增强模式功能。
content_copy zoom_out_map[edit chassis] user@R1#set network-services enhanced-ip
配置
enhanced-ip
语句并提交配置后,将显示以下警告消息,提示您重新启动路由器:content_copy zoom_out_map'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。
配置设备的接口。
content_copy zoom_out_map[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 iso 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 iso 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 iso 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 iso address 49.0004.0192.0168.0001.00 user@R1#set lo0 unit 0 family mpls
配置路由选项以标识域中的路由器。
content_copy zoom_out_map[edit routing-options] user@R1#set router-id 192.168.100.1
在接口上配置 ISIS 邻接 SID 并分配 SRGB 标签以启用分段路由。整个SRGB中的标签可用于ISIS。前缀 SID(和节点 SID)从 SRGB 编制索引。
content_copy zoom_out_map[edit protocols] user@R1#set isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment protected index 108 user@R1#set isis interface ge-0/0/1.0 level 2 ipv4-adjacency-segment unprotected index 110 user@R1#set isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment protected index 109 user@R1#set isis interface ge-0/0/1.0 level 2 ipv6-adjacency-segment unprotected index 111 user@R1#set isis interface ge-0/0/1.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/1.0 point-to-point user@R1#set isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment protected index 104 user@R1#set isis interface ge-0/0/2.0 level 2 ipv4-adjacency-segment unprotected index 106 user@R1#set isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment protected index 105 user@R1#set isis interface ge-0/0/2.0 level 2 ipv6-adjacency-segment unprotected index 107 user@R1#set isis interface ge-0/0/2.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/2.0 point-to-point user@R1#set isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment protected index 100 user@R1#set isis interface ge-0/0/3.0 level 2 ipv4-adjacency-segment unprotected index 102 user@R1#set isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment protected index 101 user@R1#set isis interface ge-0/0/3.0 level 2 ipv6-adjacency-segment unprotected index 103 user@R1#set isis interface ge-0/0/3.0 level 2 post-convergence-lfa user@R1#set isis interface ge-0/0/3.0 point-to-point user@R1#set isis interface lo0.0 passive user@R1#set isis source-packet-routing srgb start-label 80000 user@R1#set isis source-packet-routing srgb index-range 50000 user@R1#set isis source-packet-routing node-segment ipv4-index 5001 user@R1#set isis source-packet-routing node-segment ipv6-index 5501 user@R1#set isis level 1 disable
配置 TI-LFA 以启用针对链路和节点故障的保护。使用 TI-LFA 的 SR 可在主路径发生故障或不可用时,将流量立即路由到备用路径或备用路径,从而更快地恢复网络连接。
content_copy zoom_out_map[edit protocols] user@R1#set isis backup-spf-options use-post-convergence-lfa user@R1#set isis backup-spf-options use-source-packet-routing
配置 ISIS 流量工程参数。
content_copy zoom_out_map[edit protocols] user@R1#set isis traffic-engineering l3-unicast-topology user@R1#set isis traffic-engineering credibility-protocol-preference
通过 SR-TE 启用 LDP 隧道。
content_copy zoom_out_map[edit protocols] user@R1#set isis traffic-engineering tunnel-source-protocol spring-te
在 LDP 域中的接口上配置 MPLS 和 LDP 协议,以在 LDP 域中交换标签。
content_copy zoom_out_map[edit protocols] user@R1#set ldp preference 1 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 会话。
content_copy zoom_out_map[edit protocols] user@R1#set ldp auto-targeted-session
配置分段列表以将流量路由到特定路径。
content_copy zoom_out_map[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 LSP 配置为远程边缘路由器,以启用通过 SR-TE 的 LDP 隧道。
content_copy zoom_out_map[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 iso; family mpls { maximum-labels 8; } } } ge-0/0/2 { description R1-to-R3; unit 0 { family inet { address 10.1.4.1/24; } family iso; family mpls { maximum-labels 8; } } } ge-0/0/3 { description R1-to-PE1; unit 0 { family inet { address 10.1.2.2/24; } family iso; family mpls { maximum-labels 8; } } } lo0 { unit 0 { family inet { address 192.168.100.1/32; } family iso { address 49.0004.0192.0168.0001.00; } family mpls; } }
user@R1#show protocols isis { interface ge-0/0/1.0 { level 2 { ipv4-adjacency-segment { protected index 108; unprotected index 110; } ipv6-adjacency-segment { protected index 109; unprotected index 111; } post-convergence-lfa; } point-to-point; } interface ge-0/0/2.0 { level 2 { ipv4-adjacency-segment { protected index 104; unprotected index 106; } ipv6-adjacency-segment { protected index 105; unprotected index 107; } post-convergence-lfa; } point-to-point; } interface ge-0/0/3.0 { level 2 { ipv4-adjacency-segment { protected index 100; unprotected index 102; } ipv6-adjacency-segment { protected index 101; unprotected index 103; } post-convergence-lfa; } point-to-point; } interface lo0.0 { passive; } source-packet-routing { srgb start-label 80000 index-range 50000; node-segment { ipv4-index 5001; ipv6-index 5501; } } level 1 disable; backup-spf-options { use-post-convergence-lfa; use-source-packet-routing; } traffic-engineering { l3-unicast-topology; credibility-protocol-preference; tunnel-source-protocol { spring-te; } } } ldp { auto-targeted-session; preference 1; 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; } 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.4; 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 To: 192.168.100.2 State: Up LDP-tunneling enabled Path: seg1 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 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 To: 192.168.100.1 State: Up LDP-tunneling enabled Path: seg1 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 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 上,使用 SR-TE 核心网络中的远程边缘路由器 192.168.100.2 建立 LDP 隧道。还可以在输出中看到 SID 标签值 80104, 80204, 80304 。
在 R2 上,使用 SR-TE 核心网络中的远程边缘路由器 192.168.100.1 建立 LDP 隧道。还可以在输出中看到 SID 标签值 80504, 80300, 80200 。
验证 LDP 转发到远程 PE 设备
目的
验证到远程 PE 路由器的路由是否使用 LDP 转发,并且是否通过 SR-TE 建立隧道。
操作
在操作模式下,运行 show route destination-prefix
命令。
在 R1 上
验证到远程 PE (PE2) 路由器的路由是否通过 LDP over SR-TE 隧道。
user@R1>show route 192.168.100.6 inet.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[IS-IS/18] 5d 13:10:09, metric 20 > to 10.1.3.2 via ge-0/0/1.0 inet.3: 8 destinations, 13 routes (5 active, 0 holddown, 6 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.6/32 *[LDP/1] 5d 13:10:09, 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) 路由器的路由是否通过 LDP over SR-TE 隧道。
user@R2>show route 192.168.100.5 inet.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[IS-IS/18] 5d 13:20:15, metric 20 > to 10.1.3.1 via ge-0/0/1.0 inet.3: 8 destinations, 13 routes (5 active, 0 holddown, 6 hidden) + = Active Route, - = Last Active, * = Both 192.168.100.5/32 *[LDP/9] 5d 13:20:15, metric 1 > to 10.1.6.1 via ge-0/0/2.0, Push 16, Push 80200, Push 80300(top) to 10.1.3.1 via ge-0/0/1.0, Push 16, Push 80200, Push 80300, Push 85004, Push 85003(top)
在 PE1 上
验证到远程 PE (PE2) 路由器的路由是否通过到远程 PE 的目标 LDP 会话。
user@PE1>show route 192.168.100.6
inet.0: 22 destinations, 22 routes (22 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.6/32 *[IS-IS/18] 1w3d 15:58:20, metric 30
> 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] 1w0d 16:00:05, metric 1
> to 10.1.2.2 via ge-0/0/3.0, Push 18
关于 PE2
验证到远程 PE (PE1) 路由器的路由是否通过到远程 PE 的目标 LDP 会话。
user@PE2>show route 192.168.100.5
inet.0: 22 destinations, 22 routes (22 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.100.5/32 *[IS-IS/18] 1w3d 15:59:19, metric 30
> 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] 1w0d 16:01:14, metric 1
> to 10.1.7.1 via ge-0/0/3.0, Push 18
意义
在 R1 上,您可以看到 LDP 标签 16 为 ,SR-TE 标签堆栈为 80304, 80204, 85003, 85004。
在 R2 上,您可以看到 LDP 标签 16 为 ,SR-TE 标签堆栈为 80200, 80300, 85004, 85003。
在 PE1 和 PE2 上,您可以分别看到 LDP 标签 18 为 和 19。
验证播发的标签
目的
验证为转发等效类 (FEC) 播发的标签。
操作
在操作模式下,运行 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 17 192.168.100.1/32 3 192.168.100.2/32 18 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 17 192.168.100.2/32 16 192.168.100.5/32 18 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 18 192.168.100.2/32 3 192.168.100.5/32 19 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 17 192.168.100.2/32 16 192.168.100.5/32 18 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 17 192.168.100.2/32 16 192.168.100.5/32 18 192.168.100.6/32 Output label database, 192.168.100.2:0--192.168.100.1:0 Labels advertised: 4 Label Prefix 17 192.168.100.1/32 3 192.168.100.2/32 18 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 18 192.168.100.1/32 17 192.168.100.2/32 19 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 17 192.168.100.1/32 3 192.168.100.2/32 18 192.168.100.5/32 16 192.168.100.6/32
在 PE1 上
验证边缘设备 R1 是否已将远程 PE (PE2) 设备的环路地址标签播发到本地 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
17 192.168.100.2/32
16 192.168.100.5/32
18 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
18 192.168.100.2/32
3 192.168.100.5/32
19 192.168.100.6/32
关于 PE2
验证边缘设备 R2 是否已将远程 PE (PE1) 设备的环路地址标签播发到本地 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
17 192.168.100.1/32
3 192.168.100.2/32
18 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
18 192.168.100.1/32
17 192.168.100.2/32
19 192.168.100.5/32
3 192.168.100.6/32
意义
在 R1 上,您可以看到标签 18 已播发到直接连接的 PE (PE1),并且标签 19 是从远程边缘路由器 (R2) 接收的。
在 R2 上,您可以看到标签 17 已播发到直接连接的 PE (PE2),并且标签 19 是从远程边缘路由器 (R1) 接收的。
在 PE1 上,可以看到从本地边缘路由器 (R1) 接收了标签 18 。
在 PE2 上,可以看到从本地边缘路由器 (R2) 接收了标签 17 。