示例:启用 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 有一个到设备 C 的 LSP。路径配置为始终通过设备 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 结合使用)的一个重要点是,永远不会在 LSP 之间形成 IGP 邻接。IGP 将 LSP 视为单个数据链路,但不会将出口路由器视为潜在的对等方,也不会跨 LSP 转发发送发送消息。此外,RSVP 消息永远不会通过 LSP 转发,从而防止 LSP 无意中构建在另一个 LSP 中的可能性。
CLI 快速配置 显示了 图 1 中所有设备的配置。 #configuration424__isis-shortcuts-step-by-step 部分介绍了设备 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 配置一个名为 test_path 的 LSP。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 interfacesshow protocols、和show routing-options命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
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 在到 10.2.0.0 和 10.3.0.0 的路由中也使用 LSP。
如果在设备 C 使用下一跃点自身,BGP 仍将选择 LSP 而不是 IGP 路径。
检查 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 最长匹配路由查找路由接收到的数据包。
检查具有不同流量工程设置的路径
目的
检查用于 traffic-engineering bgp IGP 和 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.0user@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 msuser@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.0user@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 msuser@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 中。因此,192.168.0.3 的转发条目是从 inet.0 中到该目标的唯一路由创建的:IS-IS 路由。
配置后 traffic-engineering bgp-igp ,到 10.2.1.1 的第一个跟踪继续跟随 LSP。对 192.168.0.3 的第二个跟踪也遵循 LSP。这些结果与我们在转转发表中观察到的结果相对应,这表明 LSP 用于 IGP 下一跳解析。