Mr.Chan

导航

第3章 MPLS流量工程

 

第3章  MPLS流量工程

1.1  MPLS流量工程简介

MPLS流量工程(MPLS TE——MPLS Traffic Engineering)是一种将流量工程技术与MPLS这种叠加模型相结合的技术。通过MPLS 流量工程,可以建立指定路径的LSP隧道,进行资源预留,并且可以进行重新优化;在资源紧张的情况下,可以根据优先级和抢占参数的情况,抢占低优先级的LSP隧道的带宽资源等等。同时,还可以通过备份路径和快速重路由技术,在链路或节点失败的情况下,提供保护。

使用MPLS流量工程,网络管理员只需要建立一些LSP和旁路拥塞节点,就可以消除网络拥塞。随着LSP数量的增长,还需要使用一些特殊的离线工具进行业务量分析。

为了实现流量工程,策略是非常重要的一个方面。MPLS流量工程需要下列策略的支持:

                                              图1-1 备份策略:

当前CR-LSP隧道的备份策略是建立与基本CR-LSP路径完全不同的备份路径。这些CR-LSP只与基本CR-LSP具有相同的入口和出口节点,并且备份支持Ordinary方式。

                                              图1-2 容错策略:

l              基本CR-LSP,没有快速重路由,没有备份CR-LSP

l              基本CR-LSP,备份使能;

l              基本CR-LSP,快速重路由使能;

l              基本CR-LSP,备份和快速重路由都使能。

                                              图1-3 抢占策略;
                                              图1-4 重试策略。

1.2  MPLS流程工程的配置

1.2.1  MPLS流量工程配置总体介绍

对于一个由NE路由器组成的链路,要使其具备流量工程特性,需要进行以下配置:

l              设备配置,全局使能MPLS TE特性

l              接口及其MPLS TE参数配置

l              MPLS TE隧道及其参数配置

l              MPLS TE IGP协议(OSPF)配置

每台设备都经过上述配置后,则该链路就具备了MPLS TE特性。总的来说,MPLS流程工程的配置项包括:

l              使能MPLS流量工程

l              使能RSVP-TE特性

l              配置OSPF TE

l              配置MPLS TE显示路径

l              配置隧道显示路径

l              配置MPLS TE接口最大使用带宽

l              配置MPLS TE接口最大可预留带宽     

l              指定建立隧道使用的资源预留风格

l              指定建立隧道时支持路由记录和标记记录

l              指定建立隧道时支持环路检测

l              提交隧道当前配置

l              指定建立隧道使用的信令协议类型为RSVP

l              设置隧道重试建立的次数

l              指定重建隧道的间隔时间

l              启动Hello机制,用来检测邻居的存在

l              设定允许Hello消息丢失的最大次数     

l              设定Hello消息刷新时间间隔

l              设置PSBRSB的超时倍数

l              启动预留确认机制

l              设置处于阻塞状态的超时倍数

l              设置节点的PathResv 消息的刷新周期

1.2.2  使能MPLS流量工程

首先要配置LSR ID,使能MPLS,然后才能执行mpls te命令使能流量工程特性。

需在系统视图下执行该命令全局使能MPLS流量工程特性,然后才能在相应接口下使能流量工程特性。

请在MPLS视图或接口视图下进行下列配置。

表1-1 使能MPLS流量工程特性

操作

命令

使能MPLS流量工程

mpls te

去使能MPLS流量工程

undo mpls te

 

接口视图下关闭流量工程特性,将删除接口上所有CR-LSP,关闭流量工程特性。

系统视图下关闭流量工程特性,将删除所有CR-LSP隧道,接口流量工程特性同时被关闭。

1.2.3  使能RSVP-TE特性

如使用RSVP控制协议,需要先在系统模视图下全局使能RSVP-TE特性,并在相应接口视图下使能RSVP-TE特性。

请在系统视图、接口视图或隧道视图下进行下列配置。

表1-2 使能RSVP-TE特性

操作

命令

使能RSVP-TE特性

mpls rsvp-te

使能RSVP-TE特性

undo mpls rsvp-te

 

全局去使能RSVP-TE特性,同时会去使能每个接口上的RSVP-TE特性。

1.2.4  配置OSPF TE

OSPF TE是基于Opaque LSA的,在使能OSPF TE之前,必须使能Opaque能力。

1. 使能进程的Opaque能力

请在OSPF视图下进行下列配置。

表1-3 使能进程的Opaque能力

操作

命令

使能进程的Opaque能力

opaque-capability enable

取消使能

undo opaque-capability

 

  注意:

若某个区域已经使能了OSPF TE,则“undo opaque-capability”命令会执行失败。

 

2. 使能区域的TE能力

请在OSPF区域视图下进行下列配置。

表1-4 使能区域的TE能力

操作

命令

使能

mpls-te enable

取消使能

undo mpls-te

 

  注意:

若进程还没有使能Opaque,则“mpls-te enable”命令会执行失败。

 

1.2.5  配置MPLS TE显示路径

进入显式路径的子命令模式,创建或修改指定的路径

请在系统视图下进行下列配置。

表1-5 进入显式路径的子命令模式

操作

命令

进入显式路径的子命令模式,创建或修改指定的路径

mpls te explicit-path pathname [ enable | disable ]

删除该路径

undo mpls te explicit-path pathname

 

为显示路径插入和删除节点

请在显式路径视图下进行下列配置。

表1-6 为显示路径插入和删除节点

操作

命令

插入一个节点

add hop ip-address1  [ strict | loose ] [ after ip-address2 ]

删除一个节点

delete hop ip-address

根据index插入或者修改显示路径的结点地址。

modify hop ip-address1 ip-address2 [ strict | loose ]

指定显式路径的下一个IP地址

next hop ip-address [ strict | loose ]

查看显式路径节点信息

display hop [ ip-address ]

 

1.2.6  配置隧道显示路径

请把隧道设置成mpls te隧道,然后在隧道视图下进行下列配置

表1-7 配置MPLS TE显示路径

操作

命令

配置MPLS TE显示路径

mpls te path explicit-path pathname

取消该路径的配置

undo mpls te path explicit-path

 

1.2.7  配置MPLS TE接口最大使用带宽

请在接口视图下进行下列配置。

表1-8 配置MPLS TE接口最大使用带宽

操作

命令

配置MPLS TE接口最大使用带宽

mpls te max-link-bandwidth bandwidth-value

恢复缺省值

undo mpls te max-link-bandwidth

 

1.2.8  配置MPLS TE接口最大可预留带宽

请在接口视图下进行下列配置。

表1-9 配置MPLS TE接口最大可预留带宽

操作

命令

配置MPLS TE接口最大可预留带宽

mpls te max-reservable-bandwidth bandwidth-value

恢复缺省值

undo mpls te max-reservable-bandwidth

 

1.2.9  指定建立隧道使用的资源预留风格

请在隧道视图下进行下列配置。

表1-10 指定建立隧道使用的资源预留风格

操作

命令

指定建立隧道使用的资源预留风格

mpls te resv-style [ ff | se ]

恢复缺省的资源预留样式

undo mpls te resv-style

 

系统缺省为FF样式。

1.2.10  指定建立隧道时支持路由记录和标记记录

请在隧道视图下进行下列配置。

表1-11 指定建立隧道时支持路由记录和标记记录

操作

命令

指定建立隧道时支持路由记录和标记记录

mpls te record-route [ label ]

取消该配置,恢复缺省情况

undo mpls te record-route

 

缺省情况下不支持路由记录和标记记录。

1.2.11  指定建立隧道时支持环路检测

请在隧道视图下进行下列配置。

表1-12 指定建立隧道时支持环路检测

操作

命令

指定建立隧道时支持环路检测

mpls te loop-detection

取消环路检测

undo mpls te loop-detection

 

缺省情况下不支持环路检测

1.2.12  提交隧道当前配置

请在隧道视图下进行下列配置。

表1-13 提交隧道当前配置

操作

命令

提交隧道当前配置

mpls te commit

 

1.2.13  指定建立隧道使用的信令协议类型为RSVP

请在隧道视图下进行下列配置。

表1-14 指定建立隧道使用的信令协议类型为RSVP

操作

命令

指定建立隧道使用的信令协议类型为RSVP

mpls te signal-protocol rsvp-te

 

1.2.14  设置隧道重试建立的次数

请在隧道视图下进行下列配置。

表1-15 建立静态CR-LSP

操作

命令

配置CR-LSP的入口节点

mpls te retry value

恢复缺省值

undo mpls te retry

 

缺省重建次数为50

1.2.15  指定重建隧道的间隔时间

请在隧道视图下进行下列配置。

表1-16 指定重建隧道的间隔时间

操作

命令

指定重建隧道的间隔时间

mpls te timer retry seconds

恢复缺省值

undo mpls te timer retry

 

缺省重建隧道时间为10秒。

1.2.16  启动Hello机制,用来检测邻居的存在

请在系统视图下进行下列配置。

表1-17 启动Hello机制用来检测邻居的存在

操作

命令

启动Hello机制用来检测邻居的存在

mpls rsvp-te hello

关闭Hello机制

undo mpls rsvp-te hello

 

1.2.17  设定允许Hello消息丢失的最大次数

设定连续未接收到Hello消息的次数,当超过此次数时判定链路故障。

请在系统视图下进行下列配置。

表1-18 设定允许Hello消息丢失的最大次数

操作

命令

设定允许Hello消息丢失的最大次数

mpls rsvp-te hello-lost [ times ]

恢复连续未收到HELLO应答消息的缺省次数

undo mpls rsvp-te hello-lost [ times ]

 

缺省值为3

1.2.18  设定Hello消息刷新时间间隔

请在系统视图下进行下列配置。

表1-19 设定Hello消息刷新时间间隔

操作

命令

设定Hello消息刷新时间间隔

mpls rsvp-te timer hello [ timevalue ]

复发送Hello刷新消息的间隔周期的缺省值

undo mpls rsvp-te timer hello [ timevalue ]

 

缺省值为3

1.2.19  设置PSBRSB的超时倍数

请在系统视图下进行下列配置。

表1-20 设置PSBRSB的超时倍数

操作

命令

设置PSBRSB的超时倍数

mpls rsvp-te keep-multiplier [ number ]

恢复缺省值

undo mpls rsvp-te keep-multiplier [ number ]

 

缺省值为3

1.2.20  启动预留确认机制

请在系统视图下进行下列配置。

表1-21 启动预留确认机制

操作

命令

启动预留确认机制

mpls rsvp-te resvconfirm

关闭预留确认机制

undo mpls rsvp-te resvconfirm

 

1.2.21  设置处于阻塞状态的超时倍数

请在系统视图下进行下列配置。

表1-22 设置处于阻塞状态的超时倍数

操作

命令

设置处于阻塞状态的超时倍数

mpls rsvp-te blockade-multiplier [ number ]

恢复缺省值

undo mpls rsvp-te blockade-multiplier [ number ]

 

缺省值为3

1.2.22  设置节点的PathResv 消息的刷新周期

请在系统视图下进行下列配置。

表1-23 设置节点的PathResv 消息的刷新周期

操作

命令

设置节点的PathResv 消息的刷新周期

mpls rsvp-te timer refresh [ timevalue ]

恢复缺省值

undo mpls rsvp-te timer refresh [ timevalue ]

 

缺省的Path/Resv刷新周期为30

1.3  MPLS TE显示和调试

在完成上述配置后,在所有视图下执行display命令可以显示配置后MPLS TE的运行情况,通过查看显示信息验证配置的效果。

表1-24 MPLS TE显示和调试命令

操作

命令

显示已经配置的显式路径

display mpls te explicit-path [ pathname ]

显示本地接纳的隧道,以及它们的参数(如优先级、带宽、入接口和出接口、状态)

display mpls te link-administration admission-control interface [ interface-name | { interface-type interface-num } ]

显示当前链路信息

display mpls te link-administration bandwidth-distribution interface [ interface-name | { interface-type interface-num } ]

显示隧道信息

display mpls te tunnel [ destination address ] [ lsp-id { num | ipaddress | ipaddress num } ] [ lsr-role { all | ingress | transit | egress | remote } ] [ { up | down } ] [ name string ] [ [ incoming-interface { interface-name | interface-type interface-number } ] [ outgoing-inteface { interface-name | interface-type interface-number } ] | [ interface { interface-name | interface-type interface-number } ] ]

显示隧道统计信息

display mpls te tunnel statistics

显示配置节点信息

display hop

 

在完成上述配置后,在所有视图下执行display命令可以显示配置后RSVP的运行情况,通过查看显示信息验证配置的效果。

在用户视图下,执行debugging命令可对RSVP-TE模块进行调试。

表1-25 RSVP-TE的显示和调试命令

操作

命令

显示RSVP接口的相关信息

display mpls rsvp-te [ interface interface-type interface-number ]

显示RSVP LSP和带宽信息

display mpls rsvp-te established [ interface interface-type interface-number ]

显示RSVP邻居

display mpls rsvp-te neighbor [ interface interface-type interface-number ]

显示RSVP LSP发送方请求的资源预留信息

display mpls rsvp-te request [ interface interface-type interface-number ]

显示RSVP资源预留信息

display mpls rsvp-te reservation [ interface interface-type interface-number ]

显示RSVP发送方信息

display mpls rsvp-te sender [ interface interface-type interface-number ]

打开RSVP-TE不同模块的告警开关

debugging mpls rsvp-te { all | error | path | ptear | resv | rtear | rconf | hello | perr | rerr | encdec | socket | traffic-control | main | tool }

关闭RSVP-TE不同模块的告警开关

undo debugging mpls rsvp-te { all | error | path | ptear | resv | rtear | rconf | hello | perr | rerr | encdec | socket | traffic-control | main | tool }

 

1.4  MPLS流量工程典型配置举例

1. 组网需求

配置一条动态的隧道,如下图所示,该路径由RT1RT3RT4RT6组成,设置带宽20预留风格为FF风格。

2. 组网图

图1-1 MPLS TE隧道典型配置举例图

3. 配置步骤

# RT1的配置:

<Quidway> system

[Quidway] sysname RT1

# 配置LSR ID,使能MPLS

[RT1] mpls lsr-id 11.2.1.1

[RT1] mpls

# 使能MPLS TE,使能RSVP TE

[RT1] mpls te

[RT1] mpls rsvp-te

# 配置LOOPBACK接口,并配置名为huawei的显示路径。

[RT1] interface LoopBack0

[RT1-LoopBack0] ip address 11.2.1.1 255.255.0.0

[RT1] mpls te explicit-path Huawei

[RT1-mpls-te-expl-path-huawei] next hop 110.1.1.2

[RT1-mpls-te-expl-path-huawei] next hop 100.1.1.2

[RT1-mpls-te-expl-path-huawei] next hop 60.1.1.2

# 配置Serial1/0/0

[RT1] interface Serial1/0/0

[RT1-Serial1/0/0] link-protocol ppp

[RT1-Serial1/0/0] ip address 110.1.1.1 255.255.0.0

[RT1-Serial1/0/0] mpls

[RT1-Serial1/0/0] mpls te

[RT1-Serial1/0/0] mpls te max-link-bandwidth 100

[RT1-Serial1/0/0] mpls te max-reservable-bandwidth 80

[RT1-Serial1/0/0] mpls rsvp-te

# 配置tunnel1/0/0

[RT1] interface Tunnel1/0/0

[RT1-tunnel1/0/0] tunnel-protocol mpls te

[RT1-tunnel1/0/0] destination 16.2.1.1

[RT1-tunnel1/0/0] mpls te path explicit-path pathname

[RT1-tunnel1/0/0] mpls te resv-style ff

[RT1-tunnel1/0/0] mpls te bandwidth 20

[RT1-tunnel1/0/0] mpls te commit

[RT1-tunnel1/0/0] quit

# 配置RT1OSPF

[RT1] ospf 1

[RT1-ospf-1] area 0.0.0.1

[RT1-ospf-1-area-0.0.0.0] network 11.2.0.0 0.0.255.255

[RT1-ospf-1-area-0.0.0.0] network 110.1.0.0 0.0.255.255

[RT1-ospf-1-area-0.0.0.0] quit

# RT3上的配置。

<Quidway> system

[Quidway] sysname RT3

[RT3] mpls lsr-id 13.2.1.1

[RT3] mpls

# 使能MPLS TE,使能RSVP TE

[RT3] mpls te

[RT3] mpls rsvp-te

[RT3] interface LoopBack0

[RT3-LoopBack0] ip address 13.2.1.1 255.255.0.0

# 配置接口Serial0/0/0

[RT3] interface Serial 0/0/0

[RT3-Serial0/0/0] link-protocol ppp

[RT3-Serial0/0/0] ip address 100.1.1.1 255.255.0.0

[RT3-Serial0/0/0] mpls

[RT3-Serial0/0/0] mpls te

[RT3-Serial0/0/0] mpls te max-link-bandwidth 100

[RT3-Serial0/0/0] mpls te max-reservable-bandwidth 80

[RT3-Serial0/0/0] mpls rsvp-te

# 配置接口Serial1/0/0

[RT3] interface Serial1/0/0

[RT3-Serial1/0/0] link-protocol ppp

[RT3-Serial1/0/0] ip address 110.1.1.2 255.255.0.0

[RT3-Serial1/0/0] mpls

[RT3-Serial1/0/0] mpls te

[RT3-Serial1/0/0] mpls te max-link-bandwidth 100

[RT3-Serial1/0/0] mpls te max-reservable-bandwidth 80

[RT3-Serial1/0/0] mpls rsvp-te

# 配置接口Serial2/0/0

[RT3] interface Serial2/0/0

[RT3-Serial2/0/0] link-protocol ppp

[RT3-Serial2/0/0] ip address 120.1.1.2 255.255.0.0

[RT3-Serial2/0/0] mpls

[RT3-Serial2/0/0] mpls te

[RT3-Serial2/0/0] mpls te max-link-bandwidth 100

[RT3-Serial2/0/0] mpls te max-reservable-bandwidth 80

[RT3-Serial2/0/0] mpls rsvp-te

# 配置接口Serial3/0/0

[RT3] interface Serial3/0/0

[RT3-Serial3/0/0] link-protocol ppp

[RT3-Serial3/0/0] ip address 150.1.1.1 255.255.0.0

[RT3-Serial3/0/0] mpls

[RT3-Serial3/0/0] mpls te

[RT3-Serial3/0/0] mpls te max-link-bandwidth 100

[RT3-Serial3/0/0] mpls te max-reservable-bandwidth 80

[RT3-Serial3/0/0] mpls rsvp-te

# 配置OSPF

[RT3] ospf 1

[RT3-ospf-1] area 0.0.0.0

[RT3-ospf-1-area-0.0.0.0] network 100.1.0.0 0.0.255.255

[RT3-ospf-1-area-0.0.0.0] network 150.1.0.0 0.0.255.255

[RT3-ospf-1-area-0.0.0.0] quit

[RT3-ospf-1] area 0.0.0.1

[RT3-ospf-1-area-0.0.0.1] network 120.1.0.0 0.0.255.255

[RT3-ospf-1-area-0.0.0.1] network 110.1.0.0 0.0.255.255

[RT3-ospf-1-area-0.0.0.1] quit

[RT3-ospf-1] quit

# RT4上的配置:

<Quidway> system

[Quidway] sysname RT4

# MPLS基本能力配置。

[RT4] mpls lsr-id 14.2.1.1

[RT4] mpls

[RT4] mpls te

[RT4] quit

[RT4] mpls rsvp-te

# 配置LOOKPBSACK0

[RT4] interface LoopBack0

[RT4-LoopBack0] ip address 14.2.1.1 255.255.0.0

# 配置接口Serial0/0/0

[RT4] interface Serial0/0/0

[RT4-Serial0/0/0] link-protocol ppp

[RT4-Serial0/0/0] ip address 100.1.1.2 255.255.0.0

[RT4-Serial0/0/0] mpls

[RT4-Serial0/0/0] mpls te

[RT4-Serial0/0/0] mpls te max-link-bandwidth 100

[RT4-Serial0/0/0] mpls te max-reservable-bandwidth 80

[RT4-Serial0/0/0] mpls rsvp-te

[RT4-Serial0/0/0] quit

# 配置接口Serial3/0/0

[RT4] interface Serial1/0/0

[RT4-Serial1/0/0] link-protocol ppp

[RT4-Serial1/0/0] ip address 60.1.1.1 255.255.0.0

[RT4-Serial1/0/0] mpls

[RT4-Serial1/0/0] mpls te

[RT4-Serial1/0/0] mpls te max-link-bandwidth 100

[RT4-Serial1/0/0] mpls te max-reservable-bandwidth 80

[RT4-Serial1/0/0] mpls rsvp-te

[RT4-Serial1/0/0] quit

# 配置接口Serial2/0/0

[RT4] interface Serial2/0/0

[RT4-Serial2/0/0] link-protocol ppp

[RT4-Serial2/0/0] ip address 70.1.1.1 255.255.0.0

[RT4-Serial2/0/0] mpls

[RT4-Serial2/0/0] mpls te

[RT4-Serial2/0/0] mpls te max-link-bandwidth 100

[RT4-Serial2/0/0] mpls te max-reservable-bandwidth 80

[RT4-Serial2/0/0] mpls rsvp-te

[RT4-Serial2/0/0] quit

# 配置接口Serial4/0/0

[RT4] interface Serial4/0/0

[RT4-Serial4/0/0] link-protocol ppp

[RT4-Serial4/0/0] ip address 40.1.1.2 255.255.0.0

[RT4-Serial4/0/0] mpls

[RT4-Serial4/0/0] mpls te

[RT4-Serial4/0/0] mpls te max-link-bandwidth 100

[RT4-Serial4/0/0] mpls te max-reservable-bandwidth 80

[RT4-Serial4/0/0] mpls rsvp-te

[RT4-Serial4/0/0] quit

# 配置OSPF

[RT4] ospf 1

[RT4-ospf-1] area 0.0.0.0

[RT4-ospf-1-area 0.0.0.0] network 40.1.0.0 0.0.255.255

[RT4-ospf-1-area 0.0.0.0] network 100.1.0.0 0.0.255.255

[RT4-ospf-1-area 0.0.0.0] quit

[RT4-ospf-1] area 0.0.0.1

[RT4-ospf-1-area 0.0.0.1] network 60.1.0.0 0.0.255.255

[RT4-ospf-1-area 0.0.0.1] network 70.1.0.0 0.0.255.255

[RT4-ospf-1-area 0.0.0.1] quit

[RT4-ospf-1] quit

# RT6上的配置:

<Quidway> system

[Quidway] sysname RT6

# MPLS基本能力配置。

[RT6] mpls lsr-id 16.2.1.1

[RT6] mpls

[RT6] mpls te

[RT6] quit

[RT6] mpls rsvp-te

[RT6] interface LoopBack0

[RT6-LoopBack0] ip address 16.2.1.1 255.255.0.0

[RT6-LoopBack0] quit

# 配置接口Serial1/0/0

[RT6] interface Serial1/0/0

[RT6-Serial1/0/0] link-protocol ppp

[RT6-Serial1/0/0] ip address 60.1.1.2 255.255.0.0

[RT6-Serial1/0/0] mpls

[RT6-Serial1/0/0] mpls te

[RT6-Serial1/0/0] mpls te max-link-bandwidth 100

[RT6-Serial1/0/0] mpls te max-reservable-bandwidth 80

[RT6-Serial1/0/0] mpls rsvp-te

[RT6-Serial1/0/0] quit

# 配置OSPF

[RT6] ospf 1

[RT6-ospf-1] area 0.0.0.1

[RT6-ospf-1-area 0.0.0.1] network 16.2.0.0 0.0.255.255

[RT6-ospf-1-area 0.0.0.1] network 60.1.0.0 0.0.255.255

[RT6-ospf-1-area 0.0.0.1] quit

1.5  MPLS 流量工程故障诊断与排错

故障之一:无法产生描述MPLS TE信息的TE LSA

故障排除:打开OSPF TE的调试开关,具体操作请参见debugging命令中的debugging ospf te。根据路由器上的调试信息,初步定位错误,然后使用其它命令作进一步的判断。如果发现OSPF没有收到建立TE LINK的消息,则可能是还没有配置MPLS TE或者相关接口没有UP。否则,可以检查OSPF邻居是否正常建立。

 

posted on 2005-05-17 23:04  cunshen  阅读(2238)  评论(1)    收藏  举报