示例:启用 IS-IS 流量工程支持
此示例说明如何配置 IS-IS,使其使用标签交换路径作为快捷键。
要求
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
MPLS 流量工程会将某些数据流映射到已建立的标签交换路径 (LSP),而不是内部网关协议 (IGP) 计算得出成为最佳(最短)路径一部分的数据链路。此功能的基础是确定要映射到 LSP 的流量。通过将出口 LSR 指定为某些目标前缀的下一跳路由器,流量将映射到隧道的入口标签交换路由器 (LSR) 上的 LSP。
了解 LSP 并不构成到目标的完整路由,这一点非常重要。相反,LSP 是路由的下一跃点分段。因此,只有在路由解析过程中将出口 LSR 视为可行的下一跃点候选项时,数据包才能映射到 LSP。
图 1 显示了此示例中使用的拓扑。

在此示例中,设备 C 具有与自治系统 (AS) 2 中设备 G 的外部 BGP (EBGP) 对等会话。为了使其内部 BGP (IBGP) 对等方能够访问 AS 2 中的子网,设备 C 在其连接到设备 G 的接口上被动运行 IS-IS。IS-IS 提供有关外部子网的信息,并在 inet.0 路由表中输入到这些子网的路由。BGP 在解析 AS 外部路由的下一跃点地址时,使用 IGP 路由。
在接口上被动运行 IS-IS 的替代方案是使用下一跃点自我策略。
设备 A 的 LSP 到设备 C。该路径配置为始终遍历设备 E,而不是通过设备 B。
内部网关协议 (IGP) 快捷键也称为流量工程快捷键,提供一种工具,使 AS 中的链路状态 IGP(OSPF 或 IS-IS) 可以在其最短路径优先 (SPF) 计算中考虑 LSP。如果使用无源外部接口,IGP 将 LSP 视为指向 LSP 出口设备之外目标的单个数据链路。
使用 traffic-engineering bgp
(默认设置)和 IGP 快捷键时,流量工程解决方案仅用于 BGP AS 外部路由解析。但是,流向 AS 内部目标的流量也可以映射到 LSP。为了实现这一目标, traffic-engineering bgp-igp
已启用。因此,RSVP 将 MPLS 前缀安装到 inet.0 表中,而不是 inet.3 表中。因此,MPLS LSP 安装在转发表。
每当大量流量路由到 AS 中的特定目标(如服务器群)时,这种方法就找到了实际应用。
关于 IGP 快捷键(无论是单独使用还是与流量工程 BGP-IGP 一起使用)的一个重要问题是,IGP 邻接永远不会在 LSP 之间形成。IGP 会将 LSP 视为单个数据链路,但不会将出口路由器视为潜在的对等方,并且不会通过 LSP 转发 hello 消息。此外,从不通过 LSP 转发 RSVP 消息,这可以防止在另一个 LSP 中无意中构建 LSP 的可能性。
CLI 快速配置 显示了 图 1 中所有设备的配置。 #configuration424__isis快捷键分步 部分介绍了设备 A 上的步骤。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
设备 A
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.5/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0001.00 set protocols rsvp interface lo0.0 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/1.0 set protocols mpls traffic-engineering bgp-igp set protocols mpls label-switched-path test_path to 192.168.0.3 set protocols mpls label-switched-path test_path no-cspf set protocols mpls label-switched-path test_path primary through_E set protocols mpls path through_E 192.168.0.5 strict set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/1.0 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.1 set protocols bgp group int neighbor 192.168.0.5 set protocols bgp group int neighbor 192.168.0.6 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group int neighbor 192.168.0.3 set protocols isis traffic-engineering family inet shortcuts set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.1 set routing-options autonomous-system 1
设备 B
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.6/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.9/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0002.00 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/1.0 set protocols rsvp interface lo0.0 set protocols mpls interface fe-1/2/1.0 set protocols mpls interface fe-1/2/0.0 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.2 set protocols bgp group int neighbor 192.168.0.6 set protocols bgp group int neighbor 192.168.0.5 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.3 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.2 set routing-options autonomous-system 1
设备 C
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.10/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.13/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.25/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/3 unit 0 family inet address 10.0.0.29/30 set interfaces fe-1/2/3 unit 0 family iso set interfaces fe-1/2/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0003.00 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface lo0.0 set protocols rsvp interface fe-1/2/3.0 set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/3.0 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.3 set protocols bgp group int neighbor 192.168.0.6 set protocols bgp group int neighbor 192.168.0.5 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group external-peers type external set protocols bgp group external-peers export send-some-isis set protocols bgp group external-peers peer-as 2 set protocols bgp group external-peers neighbor 10.0.0.26 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface fe-1/2/2.0 level 1 disable set protocols isis interface fe-1/2/2.0 level 2 passive set protocols isis interface fe-1/2/3.0 level 1 disable set protocols isis interface lo0.0 set policy-options policy-statement send-some-isis term 1 from protocol isis set policy-options policy-statement send-some-isis term 1 from route-filter 10.0.0.0/24 orlonger set policy-options policy-statement send-some-isis term 1 from route-filter 192.168.0.0/24 orlonger set policy-options policy-statement send-some-isis term 1 then accept set routing-options router-id 192.168.0.3 set routing-options autonomous-system 1
设备 D
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.14/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0004.00 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.4 set routing-options autonomous-system 1
设备 E
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.2/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.17/30 set interfaces fe-1/2/1 unit 0 family iso set interfaces fe-1/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.5/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0005.00 set protocols rsvp interface lo0.0 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/1.0 set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/1.0 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.5 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.6 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group int neighbor 192.168.0.3 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.5 set routing-options autonomous-system 1
设备 F
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.18/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces fe-1/2/0 unit 0 family mpls set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.30/30 set interfaces fe-1/2/2 unit 0 family iso set interfaces fe-1/2/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.6/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0006.00 set protocols rsvp interface lo0.0 set protocols rsvp interface fe-1/2/0.0 set protocols rsvp interface fe-1/2/1.0 set protocols rsvp interface fe-1/2/2.0 set protocols mpls interface fe-1/2/0.0 set protocols mpls interface fe-1/2/1.0 set protocols mpls interface fe-1/2/2.0 set protocols bgp group int type internal set protocols bgp group int local-address 192.168.0.6 set protocols bgp group int neighbor 192.168.0.1 set protocols bgp group int neighbor 192.168.0.5 set protocols bgp group int neighbor 192.168.0.2 set protocols bgp group int neighbor 192.168.0.3 set protocols isis interface fe-1/2/0.0 level 1 disable set protocols isis interface fe-1/2/1.0 level 1 disable set protocols isis interface fe-1/2/2.0 level 1 disable set protocols isis interface lo0.0 set routing-options router-id 192.168.0.6 set routing-options autonomous-system 1
设备 G
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.26/30 set interfaces lo0 unit 0 family inet address 192.168.0.7/32 primary set interfaces lo0 unit 0family inet address 10.2.1.1/32 set interfaces lo0 unit 0family inet address 10.3.1.1/32 set protocols bgp group external-peers type external set protocols bgp group external-peers export statics set protocols bgp group external-peers export send-directs set protocols bgp group external-peers peer-as 1 set protocols bgp group external-peers neighbor 10.0.0.25 set policy-options policy-statement statics from protocol static set policy-options policy-statement statics then accept set policy-options policy-statement send-directs term 1 from protocol direct set policy-options policy-statement send-directs term 1 then accept set routing-options static route 10.2.0.0/32 reject set routing-options static route 10.2.0.0/32 install set routing-options static route 10.3.0.0/32 reject set routing-options static route 10.3.0.0/32 install set routing-options router-id 192.168.0.7 set routing-options autonomous-system 2
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置 IS-IS 流量工程快捷键:
配置接口。
[edit interfaces] user@A# set fe-1/2/0 unit 0 family inet address 10.0.0.1/30 user@A# set fe-1/2/0 unit 0 family iso user@A# set fe-1/2/0 unit 0 family mpls user@A# set fe-1/2/1 unit 0 family inet address 10.0.0.5/30 user@A# set fe-1/2/1 unit 0 family iso user@A# set fe-1/2/1 unit 0 family mpls user@A# set lo0 unit 0 family inet address 192.168.0.1/32 user@A# set lo0 unit 0 family iso address 49.0002.0192.0168.0001.00
在接口上启用信令协议。
[edit protocols rsvp] user@A# set interface lo0.0 user@A# set interface fe-1/2/0.0 user@A# set interface fe-1/2/1.0
在接口上启用 MPLS。
[edit protocols mpls] user@A# set interface fe-1/2/0.0 user@A# set interface fe-1/2/1.0
配置标签交换路径。
从设备 A 配置到设备 C 的单个 LSP,名为 test_path。指定 LSP 显式路由对象 (ERO) 使用通过设备 E 的严格跃点,以便 LSP 采用与 OSPF A-B-C 最短路径不同的路径。LSP 使用 RSVP 发出信号,但没有 CSPF 正在运行。
[edit protocols mpls] user@A# set label-switched-path test_path to 192.168.0.3 user@A# set label-switched-path test_path no-cspf user@A# set label-switched-path test_path primary through_E user@A# set path through_E 192.168.0.5 strict
为 BGP 和 IGP 目标配置流量工程。
同时启用 IGP 快捷键后,IGP 可以在其计算中使用 LSP。计算结果会输入 inet.0 表中。
[edit protocols mpls] user@A# set traffic-engineering bgp-igp
配置设备之间的内部 BGP (IBGP) 对等互连。
[edit protocols bgp group int] user@A# set type internal user@A# set local-address 192.168.0.1 user@A# set neighbor 192.168.0.5 user@A# set neighbor 192.168.0.6 user@A# set neighbor 192.168.0.2 user@A# set neighbor 192.168.0.3
在接口上启用 IS-IS,并设置链路指标。
[edit protocols isis] user@A# set interface fe-1/2/0.0 level 1 disable user@A# set interface fe-1/2/1.0 level 1 disable user@A# set interface lo0.0
配置 IS-IS 以将 MPLS LSP 用作 IPv4 地址家族的下一跃点。
只需在入口路由器上启用 IGP 快捷键,因为它是执行最短路径优先 (SPF) 计算的路由器。
了解 IGP 快捷键如何影响协议和路由表关系非常重要。IGP 对 LSP 出口点下游的子网执行 SPF 计算,但这些计算结果仅输入 inet.3 表中。同时,IGP 会执行其传统 SPF 计算,并将这些计算的结果输入 inet.0 表中。结果是,尽管 IGP 正在将条目加入 inet.3 表,但出于路由解析目的,BGP 仍然是唯一具有该表可见性的协议。因此,转发到 AS 内部目标仍会使用 inet.0 IGP 路由,而 LSP 仅用于 BGP 下一跃点解析。如果您希望使用 LSP 进行 IGP 下一跃点解析,则必须进行配置
traffic-engineering bgp-igp
。[edit protocols isis] user@A# set traffic-engineering family inet shortcuts
配置路由器 ID 和自治系统 (AS) 编号。
[edit routing-options] user@A# set router-id 192.168.0.1 user@A# set autonomous-system 1
结果
在配置模式下,输入 、 show protocols
和show routing-options
命令,show interfaces
以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@A# show interfaces
fe-1/2/0 {
unit 0{
family inet {
address 10.0.0.1/30;
}
family iso;
family mpls;
}
}
fe-1/2/1{
unit 0
family inet {
address 10.0.0.5/30;
}
family iso;
family mpls;
}
}
lo0 {
unit 0{
family inet {
address 192.168.0.1/32;
}
family iso {
address 49.0002.0192.0168.0001.00;
}
}
}
user@A# show protocols
rsvp {
interface lo0.0;
interface fe-1/2/0.0;
interface fe-1/2/1.0;
}
mpls {
traffic-engineering bgp-igp;
label-switched-path test_path {
to 192.168.0.3;
no-cspf;
primary through_E;
}
path through_E {
192.168.0.5 strict;
}
interface fe-1/2/0.0;
interface fe-1/2/1.0;
}
bgp {
group int {
type internal;
local-address 192.168.0.1;
neighbor 192.168.0.5;
neighbor 192.168.0.6;
neighbor 192.168.0.2;
neighbor 192.168.0.3;
}
}
isis {
traffic-engineering {
family inet {
shortcuts;
}
}
interface fe-1/2/0.0 {
level 1 disable;
}
interface fe-1/2/1.0 {
level 1 disable;
}
interface lo0.0;
}
user@A# show routing-options
router-id 192.168.0.1;
autonomous-system 1;
完成设备配置后,请在配置模式下输入 提交 。
验证
确认配置工作正常。
验证下一跃点
目的
验证 MPLS LSP 是否用作预期路由中的下一跃点。
行动
在操作模式下,输入 show route
命令。
user@A> show route inet.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.0/30 *[Direct/0] 4d 09:07:26 > via fe-1/2/0.0 10.0.0.1/32 *[Local/0] 4d 09:07:26 Local via fe-1/2/0.0 10.0.0.4/30 *[Direct/0] 4d 09:07:28 > via fe-1/2/1.0 10.0.0.5/32 *[Local/0] 4d 09:07:28 Local via fe-1/2/1.0 10.0.0.8/30 *[IS-IS/18] 01:42:24, metric 20 > to 10.0.0.6 via fe-1/2/1.0 10.0.0.12/30 *[IS-IS/18] 01:42:24, metric 30 > to 10.0.0.6 via fe-1/2/1.0 10.0.0.16/30 *[IS-IS/18] 01:42:24, metric 20 > to 10.0.0.2 via fe-1/2/0.0 10.0.0.20/30 *[IS-IS/18] 01:42:24, metric 30 > to 10.0.0.2 via fe-1/2/0.0 10.0.0.24/30 *[IS-IS/18] 01:42:24, metric 30 > to 10.0.0.6 via fe-1/2/1.0 10.0.0.28/30 *[IS-IS/18] 01:42:24, metric 30 to 10.0.0.6 via fe-1/2/1.0 > to 10.0.0.2 via fe-1/2/0.0 10.2.0.0/32 *[BGP/170] 02:22:30, localpref 100, from 192.168.0.3 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 10.2.1.1/32 *[BGP/170] 02:20:23, localpref 100, from 192.168.0.3 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 10.3.0.0/32 *[BGP/170] 02:22:30, localpref 100, from 192.168.0.3 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 10.3.1.1/32 *[BGP/170] 02:20:23, localpref 100, from 192.168.0.3 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 192.168.0.1/32 *[Direct/0] 4d 09:08:47 > via lo0.0 192.168.0.2/32 *[IS-IS/18] 01:42:24, metric 10 > to 10.0.0.6 via fe-1/2/1.0 192.168.0.3/32 *[IS-IS/18] 01:42:24, metric 20 > to 10.0.0.6 via fe-1/2/1.0 192.168.0.4/32 *[IS-IS/18] 01:42:24, metric 30 > to 10.0.0.6 via fe-1/2/1.0 to 10.0.0.2 via fe-1/2/0.0 192.168.0.5/32 *[IS-IS/18] 01:42:24, metric 10 > to 10.0.0.2 via fe-1/2/0.0 192.168.0.6/32 *[IS-IS/18] 01:42:24, metric 20 > to 10.0.0.2 via fe-1/2/0.0 192.168.0.7/32 *[BGP/170] 02:20:23, localpref 100, from 192.168.0.3 AS path: 2 I, validation-state: unverified > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path inet.3: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.0.12/30 *[IS-IS/18] 01:41:21, metric 30 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 10.0.0.24/30 *[IS-IS/18] 01:41:21, metric 30 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 10.0.0.28/30 *[IS-IS/18] 01:41:21, metric 30 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 192.168.0.3/32 *[RSVP/7/1] 01:41:21, metric 20 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path [IS-IS/18] 01:41:21, metric 20 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path 192.168.0.4/32 *[IS-IS/18] 01:41:21, metric 30 > to 10.0.0.2 via fe-1/2/0.0, label-switched-path test_path iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 49.0002.0192.0168.0001/72 *[Direct/0] 4d 09:08:47 > via lo0.0 mpls.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 4d 09:10:00, metric 1 Receive 1 *[MPLS/0] 4d 09:10:00, metric 1 Receive 2 *[MPLS/0] 4d 09:10:00, metric 1 Receive 13 *[MPLS/0] 4d 09:10:00, metric 1 Receive
意义
IS-IS 选择 LSP 作为通往 LSP 出口设备下游目标的最短路径。此外,由于 IGP 使用 LSP 访问外部子网 10.0.0.24/30,BGP 也在其路由中使用 LSP 到 10.2.0.0 和 10.3.0.0。
如果设备 C 使用下一跃点自,BGP 仍将选择 IGP 路径上的 LSP。
检查 RSVP 会话
目的
显示有关 RSVP 会话的信息
行动
在操作模式下,输入 show rsvp session brief
命令。
user@A> show rsvp session brief Ingress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 192.168.0.3 192.168.0.1 Up 0 1 FF - 299776 test_path Total 1 displayed, Up 1, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 0 sessions Total 0 displayed, Up 0, Down 0
user@E> show rsvp session brief Ingress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 192.168.0.3 192.168.0.1 Up 0 1 FF 299776 299808 test_path Total 1 displayed, Up 1, Down 0
user@F> show rsvp session brief Ingress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Egress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Transit RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 192.168.0.3 192.168.0.1 Up 0 1 FF 299808 3 test_path Total 1 displayed, Up 1, Down 0
user@C> show rsvp session brief Ingress RSVP: 0 sessions Total 0 displayed, Up 0, Down 0 Egress RSVP: 1 sessions To From State Rt Style Labelin Labelout LSPname 192.168.0.3 192.168.0.1 Up 0 1 FF 3 - test_path Total 1 displayed, Up 1, Down 0 Transit RSVP: 0 sessions Total 0 displayed, Up 0, Down 0
意义
在所有四个路由设备上,都显示 LSP 的入口和出口 IP 地址。该路径在设备 A 上显示为入口路径,并且为在 LSP 上转发的数据包分配一个 299776 标签。在设备 E 上,LSP 正在传输,如果到达的数据包带有299776标签,则系统会为传出299808。标签仅在相邻的标签交换路由器 (LSR) 之间才有意义。设备 F 将传入标签299808交换为传出标签 3。设备 C,出口,弹出标签 3,并通过标准 IP 最长匹配路由查找路由接收的数据包。
检查具有不同流量工程设置的路径
目的
检查何时使用和何时使用(默认)用于 IGP 和 traffic-engineering bgp
BGP 路由traffic-engineering bgp-igp
的路径。
行动
配置
traffic-engineering bgp
。这从
traffic-engineering bgp-igp
配置中删除,因为在每个路由实例中只能配置一个 MPLS 流量工程设置。[edit protocols mpls] user@A# set traffic-engineering bgp user@A# commit
配置
show route forwarding-table
(默认)时traffic-engineering bgp
,使用命令检查路径。user@A> show route forwarding-table destination 10.2.1.1 Routing table: default.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 10.2.1.1/32 user 0 indr 262145 6 10.0.0.2 Push 299776 1013 2 fe-1/2/0.0
user@A> show route forwarding-table destination 192.168.0.3 Routing table: default.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 192.168.0.3/32 user 1 10.0.0.6 ucst 938 11 fe-1/2/1.0
配置
traceroute
(默认)时traffic-engineering bgp
,使用命令检查路径。user@A> traceroute 10.2.1.1 traceroute to 10.2.1.1 (10.2.1.1), 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 11.086 ms 1.587 ms 1.603 ms MPLS Label=299776 CoS=0 TTL=1 S=1 2 10.0.0.18 (10.0.0.18) 1.455 ms 1.477 ms 1.442 ms MPLS Label=299808 CoS=0 TTL=1 S=1 3 10.0.0.29 (10.0.0.29) 2.240 ms 1.045 ms 1.243 ms 4 10.2.1.1 (10.2.1.1) 1.363 ms 1.389 ms 1.374 ms
user@A> traceroute 192.168.0.3 traceroute to 192.168.0.3 (192.168.0.3), 30 hops max, 40 byte packets 1 10.0.0.6 (10.0.0.6) 1.759 ms 1.872 ms 2.281 ms 2 bb03-cclab-lo0.spglab.juniper.net (192.168.0.3) 2.119 ms 2.157 ms 1.598 ms
配置
traffic-engineering bgp-igp
。这从
traffic-engineering bgp
配置中删除,因为在每个路由实例中只能配置一个 MPLS 流量工程设置。[edit protocols mpls] user@A# set traffic-engineering bgp-igp user@A# commit
配置
show route forwarding-table
后traffic-engineering bgp-igp
,使用命令检查路径。user@A> show route forwarding-table destination 10.2.1.1 Routing table: default.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 10.2.1.1/32 user 0 indr 262145 6 10.0.0.2 Push 299776 1013 2 fe-1/2/0.0
user@A> show route forwarding-table destination 192.168.0.3 Routing table: default.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 192.168.0.3/32 user 1 10.0.0.2 Push 299776 1013 8 fe-1/2/0.0
配置
traceroute
后traffic-engineering bgp-igp
,使用命令检查路径。user@A> traceroute 10.2.1.1 traceroute to 10.2.1.1 (10.2.1.1), 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 2.348 ms 1.475 ms 1.434 ms MPLS Label=299776 CoS=0 TTL=1 S=1 2 10.0.0.18 (10.0.0.18) 1.507 ms 2.307 ms 1.911 ms MPLS Label=299808 CoS=0 TTL=1 S=1 3 10.0.0.29 (10.0.0.29) 1.743 ms 1.645 ms 1.940 ms 4 10.2.1.1 (10.2.1.1) 2.041 ms 1.977 ms 2.233 ms
user@A> traceroute 192.168.0.3 traceroute to 192.168.0.3 (192.168.0.3), 30 hops max, 40 byte packets 1 10.0.0.2 (10.0.0.2) 1.721 ms 2.558 ms 2.229 ms MPLS Label=299776 CoS=0 TTL=1 S=1 2 10.0.0.18 (10.0.0.18) 2.505 ms 1.462 ms 1.408 ms MPLS Label=299808 CoS=0 TTL=1 S=1 3 bb03-cclab-lo0.spglab.juniper.net (192.168.0.3) 1.371 ms 1.422 ms 1.351 ms
意义
配置后 traffic-engineering bgp
,第一个跟踪是属于 BGP 学习的 10.2.0.0/16 前缀的目标,并跟随 LSP。第二个追踪是 IS-IS 学习的 192.168.0.3 路由(设备 C 的环路接口地址),并遵循 IS-IS 路由。这些结果与我们在转发表表中观察到的结果相对应。转发表仅基于 inet.0 中的路由构建。BGP 可以研究 inet.3 并选择一个 LSP 作为 BGP 前缀下一跃点的最佳路径,还可以利用该 LSP 将路由添加到 inet.0 中。然后,从 inet.0 路由进入转发表。默认情况下,其他协议都无法查询 inet.3,而且 inet.3 路由不会输入到 inet.0 中。因此,将创建从 inet.0 中唯一路由到该目标的 192.168.0.3 的转发条目:IS-IS 路由。
配置后 traffic-engineering bgp-igp
,到 10.2.1.1 的第一个跟踪将继续跟随 LSP。192.168.0.3 的第二个追踪也遵循 LSP。这些结果与我们在转发表表中观察到的结果相对应,该表显示 LSP 用于 IGP 下一跃点解析。