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

此示例中,设备 C 在自治系统 (BGP) 2 中与设备 G 有一个外部路由 (EBGP) AS会话。为了让其内部 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 出口设备以外的目标的单一数据链路。
使用(默认设置)和快捷键IGP,流量工程解决方案仅BGP AS traffic-engineering bgp
外部路由解析。但是,也可以AS内部目标的流量映射到 LSP。实现此 traffic-engineering bgp-igp
目标将实现。因此,RSVP 将 MPLS前缀安装到 inet.0 表中,而不是 inet.3 表中。因此,MPLS LSP 安装在转发表中。
只要大量流量路由到网络内部的特定目标(例如服务器场AS,此方法就会找到实用的应用程序。
关于 IGP 快捷键的一个重要观点,不管是否单独使用,还是与信息流工程 BGP-IGP 一起使用,IGP邻接从未在整个 LSP 中形成。该IGP将 LSP 视为单个数据链路,但不将出口路由器视为潜在对等方,并且不会跨 LSP 转发 hello 消息。此外,RSVP 消息永远不会通过 LSP 转发,从而防止 LSP 可能意外地构建在另一个 LSP 中。
CLI 快速配置 显示了图 1中所有设备的配置。"#configuration424__isis 快捷键 分步部分介绍设备 A 的步骤。
配置
程序
CLI快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以匹配网络配置,然后将命令复制并粘贴到 层次结构级别的 CLI 中 [edit]
。
设备 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
配置标签交换路径。
单个 LSP(名为 test_path )从设备 A 配置到设备 C。LSP 显式路由对象 (ERO) 指定为通过设备 E 使用严格跳跃,以便 LSP 采用与 A-B-C 的 OSPF 最短路径不同的路径。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 interfaces
命令 show 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;
如果完成设备配置,请在配置 模式下输入 commit 。
验证
确认配置工作正常。
验证下一跃点
目的
验证 LSP MPLS是否用作预期路由中的下一跳跃。
行动
在操作模式下,输入 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仍然会选择 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。标签仅在相邻标签交换路由器 (LRS) 之间具有意义。设备 F 将传入标签299808交换用于传出标签 3。设备 C、出口将弹出标签 3,然后由标准 IP 最长匹配路由查找路由收到的数据包。
使用不同流量工程设置检查路径
目的
检查用于路由和IGP BGP何时( traffic-engineering bgp-igp
traffic-engineering bgp
默认)的路径。
行动
配置
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
意义
配置时,第一个跟踪是属于 BGP traffic-engineering 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解析。