• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

08-MPLS配置举例

目录

01-H3C S12500 MPLS TE FRR典型配置举例

本章节下载 01-H3C S12500 MPLS TE FRR典型配置举例  (194.32 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500/Configure/Typical_Configuration_Example/H3C_S12500-R1825P01-6W100/08/201308/794659_30005_0.htm

01-H3C S12500 MPLS TE FRR典型配置举例

H3C S12500 MPLS TE FRR配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2013 杭州华三通信技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

 



1  简介

本文档介绍了MPLS TE FRR的配置举例。

FRR(Fast Reroute,快速重路由)是MPLS TE中临时性网络局部保护的技术,用来保护CR-LSP(Constraint-based Routed Label Switched Path,基于约束路由的LSP)中的某段链路和某个节点。FRR的切换速度可以达到50ms,能够最大程度减少网络故障时数据的丢失。对CR-LSP配置FRR功能后,当CR-LSP上的某条链路或某个节点失效时,流量会被切换到保护链路上,同时CR-LSP头节点尝试建立新的CR-LSP。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解MPLS TE FRR特性。

3  MPLS TE FRR配置举例

3.1  组网需求

图1所示,Switch1->Switch2->Switch3->Switch4是一条CR-LSP,承载着某公司的语音业务。由于Switch2和Switch3两台交换机相隔较远,中间连有多台二层交换机,链路不太稳定,可能会发生故障,现要求使用MPLS TE FRR功能对Switch2->Switch3这段链路进行保护,当链路出现故障时,能快速切换到Bypass CR-LSP(Switch2->Switch5->Switch3)。

图1 MPLS TE FRR配置举例组网图

 

3.2  配置思路

·     为建立主备CR-LSP,需要在各Switch上使能MPLS、MPLS TE和RSVP-TE基本能力。

·     由于组网需求中已明确主CR-LSP的路径和Bypass CR-LSP的路径,需要通过显式路径的方式指定MPLS TE的主CR-LSP和Bypass CR-LSP。

·     为实现被保护的主CR-LSP链路发生故障后,PLR(Point of Local Repair,本地修复节点)设备(PLR设备即为Bypass CR-LSP的头节点,本例中为Switch 2)能快速感知到,需要在主CR-LSP保护链路两端的节点上配置BFD联动RSVP。

·     为了保证主CR-LSP链路恢复时,主CR-LSP和Bypass CR-LSP的绑定关系能及时刷新,将快速重路由扫描间隔时间配置为5秒(缺省为300秒)。

·     为实现当BFD检测到故障后,主CR-LSP上的流量能快速切换到Bypass CR-LSP,需在主CR-LSP的头节点上使能MPLS TE FRR功能。

3.3  使用版本

本举例在S12500-CMW520-R1825P01版本上进行配置和验证。

3.4  配置注意事项

·     新增或者修改MPLS TE隧道接口下的配置后,需要重新执行mpls te commit命令,配置才能生效。

·     当MPLS TE隧道建立之后,如果不配置流量沿隧道转发,缺省情况下依然会沿IP路由转发。

·     由于FRR使用的Bypass CR-LSP需要预先建立,占用额外的带宽,因此,在网络带宽余量不多的情况下,应该只对关键的接口或链路进行快速重路由保护。

·     Bypass CR-LSP除了头节点和尾节点之外,中间节点不能和主CR-LSP路径重叠。

·     对于Bypass CR-LSP,必须使用mpls te backup bandwidth命令配置可保护的带宽,否则,将导致主CR-LSP和Bypass CR-LSP不能绑定成功。

·     Bypass CR-LSP的带宽用于保护主CR-LSP,用户在配置时应保证其带宽不小于被保护的所有CR-LSP所需带宽之和,否则可能有主CR-LSP不能绑定到Bypass CR-LSP上。

·     Bypass CR-LSP不能同时作为VPN等业务的隧道使用。

3.5  配置步骤

3.5.1  设备Switch1的配置

(1)     配置接口以及环回口地址

<Switch1> system-view

[Switch1] interface LoopBack 0

[Switch1-LoopBack0] ip address 1.1.1.1 32

[Switch1-LoopBack0] quit

[Switch1] vlan 12

[Switch1-vlan12] port GigabitEthernet 9/0/1

[Switch1-vlan12] quit

[Switch1] interface GigabitEthernet 9/0/1

[Switch1-GigabitEthernet9/0/1] undo shutdown

[Switch1-GigabitEthernet9/0/1] quit

[Switch1] interface Vlan-interface 12

[Switch1-Vlan-interface12] ip address 4.0.12.1 24

[Switch1-Vlan-interface12] undo shutdown

[Switch1-Vlan-interface12] quit

(2)     配置IGP协议

# 配置OSPF协议。

[Switch1] ospf

# 使能OSPF的Opaque LSA发布接收能力。

[Switch1-ospf-1] opaque-capability enable

# 进入区域视图,发布相应接口和环回口的地址。

[Switch1-ospf-1] area 0

[Switch1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[Switch1-ospf-1-area-0.0.0.0] network 4.0.12.1 0.0.0.0

# 当前OSPF区域下使能MPLS TE能力。

[Switch1-ospf-1-area-0.0.0.0] mpls-te enable

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

[Switch1-ospf-1] quit

(3)     全局使能MPLS以及MPLS TE功能

# 配置LSR-ID为环回口地址。

[Switch1] mpls lsr-id 1.1.1.1

# MPLS视图下,使能MPLS TE、CSPF算法以及RSVP-TE。

[Switch1] mpls

[Switch1-mpls] mpls te

[Switch1-mpls] mpls te cspf

[Switch1-mpls] mpls rsvp-te

[Switch1-mpls] quit

(4)     接口使能MPLS以及MPLS TE功能,使能BFD联动RSVP

[Switch1] interface Vlan-interface 12

[Switch1-Vlan-interface12] mpls

[Switch1-Vlan-interface12] mpls te

[Switch1-Vlan-interface12] mpls rsvp-te

[Switch1-Vlan-interface12] mpls rsvp-te bfd enable

[Switch1-Vlan-interface12] quit

(5)     配置主CR-LSP

# 配置主CR-LSP。

[Switch1] interface Tunnel 0

# 配置主CR-LSP接口的IP地址,使得MPLS-TE隧道的协议(Line protocol)UP,对于MPLS-TE隧道UP/DOWN状态没有影响;具体IP地址的选择可以根据现网选择。

[Switch1-Tunnel0] ip address 5.0.0.1 24

# 配置主CR-LSP类型为MPLS TE。

[Switch1-Tunnel0] tunnel-protocol mpls te

# 配置主CR-LSP的Tunnel-ID

[Switch1-Tunnel0] mpls te tunnel-id 1

# 配置主CR-LSP的目的地址为Switch4的环回口地址。

[Switch1-Tunnel0] destination 4.4.4.4

[Switch1-Tunnel0] quit

# 配置流量沿隧道转发。

[Switch1] ip route-static 4.4.4.4 32 Tunnel 0

# 配置主CR-LSP对应的显式路径。

[Switch1] explicit-path pri-path

[Switch1-explicit-path-pri-path] next hop 4.0.12.2

[Switch1-explicit-path-pri-path] next hop 4.0.23.3

[Switch1-explicit-path-pri-path] next hop 4.0.34.4

[Switch1-explicit-path-pri-path] quit

# 主CR-LSP应用显式路径,其显式路径优先级别为5。注意,隧道可以同时应用多条显式路径,优先级数值大的显式路径优先考虑,当优先级数值大的显式路径无效时才使用次大的,依次类推。

[Switch1] interface Tunnel 0

[Switch1-Tunnel0] mpls te path explicit-path pri-path preference 5

(6)     使能MPLS TE FRR

# 在主CR-LSP上使能MPLS TE FRR。

[Switch1-Tunnel0] mpls te fast-reroute

# 配置完成后,提交主CR-LSP配置,使得配置生效。

[Switch1-Tunnel0] mpls te commit

[Switch1-Tunnel0] quit

3.5.2  设备Switch2的配置

(1)     配置接口以及环回口地址

<Switch2> system-view

[Switch2] interface LoopBack 0

[Switch2-LoopBack0] ip address 2.2.2.2 32

[Switch2-LoopBack0] quit

[Switch2] vlan 12

[Switch2-vlan12] port GigabitEthernet 9/0/1

[Switch2-vlan12] quit

[Switch2] interface GigabitEthernet 9/0/1

[Switch2-GigabitEthernet9/0/1] undo shutdown

[Switch2-GigabitEthernet9/0/1] quit

[Switch2] interface Vlan-interface 12

[Switch2-Vlan-interface12] ip address 4.0.12.2 24

[Switch2-Vlan-interface12] undo shutdown

[Switch2-Vlan-interface12] quit

[Switch2] vlan 23

[Switch2-vlan23] port GigabitEthernet 9/0/2

[Switch2-vlan23] quit

[Switch2] interface GigabitEthernet 9/0/2

[Switch2-GigabitEthernet9/0/2] undo shutdown

[Switch2-GigabitEthernet9/0/2] quit

[Switch2] interface Vlan-interface 23

[Switch2-Vlan-interface23] ip address 4.0.23.2 24

[Switch2-Vlan-interface23] undo shutdown

[Switch2-Vlan-interface23] quit

[Switch2] vlan25

[Switch2-vlan25] port GigabitEthernet 9/0/3

[Switch2-vlan25] quit

[Switch2] interface GigabitEthernet 9/0/3

[Switch2-GigabitEthernet9/0/3] undo shutdown

[Switch2-GigabitEthernet9/0/3] quit

[Switch2] interface Vlan-interface 25

[Switch2-Vlan-interface25] ip address 4.0.25.2 24

[Switch2-Vlan-interface25] undo shutdown

[Switch2-Vlan-interface25] quit

(2)     配置IGP协议

# 配置OSPF协议。

[Switch2] ospf

# 使能OSPF的Opaque LSA发布接收能力。

[Switch2-ospf-1] opaque-capability enable

# 进入区域视图,发布相应接口和环回口的地址。

[Switch2-ospf-1] area 0

[Switch2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[Switch2-ospf-1-area-0.0.0.0] network 4.0.12.2 0.0.0.0

[Switch2-ospf-1-area-0.0.0.0] network 4.0.23.2 0.0.0.0

[Switch2-ospf-1-area-0.0.0.0] network 4.0.25.2 0.0.0.0

# 当前OSPF区域下使能MPLS TE能力。

[Switch2-ospf-1-area-0.0.0.0] mpls-te enable

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

[Switch2-ospf-1] quit

(3)     全局使能MPLS以及MPLS TE功能

# 配置LSR-ID为环回口地址。

[Switch2] mpls lsr-id 2.2.2.2

# MPLS视图下,使能MPLS TE、CSPF算法以及RSVP-TE。

[Switch2] mpls

[Switch2-mpls] mpls te

[Switch2-mpls] mpls te cspf

[Switch2-mpls] mpls rsvp-te

# 配置FRR绑定关系的扫描定时器为5秒。

[Switch2-mpls] mpls te timer fast-reroute 5

[Switch2-mpls] quit

(4)     接口使能MPLS以及MPLS TE功能,使能BFD联动RSVP

[Switch2] interface Vlan-interface 12

[Switch2-Vlan-interface12] mpls

[Switch2-Vlan-interface12] mpls te

[Switch2-Vlan-interface12] mpls rsvp-te

[Switch2-Vlan-interface12] mpls rsvp-te bfd enable

[Switch2-Vlan-interface12] quit

[Switch2] interface Vlan-interface 23

[Switch2-Vlan-interface23] mpls

[Switch2-Vlan-interface23] mpls te

[Switch2-Vlan-interface23] mpls rsvp-te

[Switch2-Vlan-interface23] mpls rsvp-te bfd enable

[Switch2-Vlan-interface23] quit

[Switch2] interface Vlan-interface 25

[Switch2-Vlan-interface25] mpls

[Switch2-Vlan-interface25] mpls te

[Switch2-Vlan-interface25] mpls rsvp-te

[Switch2-Vlan-interface25] mpls rsvp-te bfd enable

[Switch2-Vlan-interface25] quit

(5)     配置Bypass CR-LSP

# 配置Bypass CR-LSP。

[Switch2] interface Tunnel 1

# 配置Bypass CR-LSP接口的IP地址,使得MPLS-TE隧道的协议(Line protocol)UP,对于MPLS-TE隧道UP/DOWN状态没有影响;具体IP地址的选择可以根据现网选择。

[Switch2-Tunnel1] ip address 6.0.0.1 24

# 配置Bypass CR-LSP类型为MPLS TE。

[Switch2-Tunnel1] tunnel-protocol mpls te

# 配置Bypass CR-LSP的Tunnel-ID

[Switch2-Tunnel1] mpls te tunnel-id 1

# 配置Bypass CR-LSP的目的地址为Switch3的环回口地址。

[Switch2-Tunnel1] destination 3.3.3.3

# 配置Bypass CR-LSP对应的显式路径。

[Switch2] explicit-path by-path

[Switch2-explicit-path-by-path] next hop 4.0.25.5

[Switch2-explicit-path-by-path] next hop 4.0.35.3

[Switch2-explicit-path-by-path] quit

# Bypass CR-LSP应用显式路径,其显式路径优先级别为5。注意,隧道可以同时应用多条显式路径,优先级数值大的显式路径优先考虑,当优先级数值大的显式路径无效时才使用次大的,依次类推。

[Switch2-Tunnel1] mpls te path explicit-path by-path preference 5

# 配置Bypass CR-LSP可保护的带宽。

[Switch2-Tunnel1] mpls te backup bandwidth bc0 un-limited

# 配置完成后,提交Bypass CR-LSP配置,使得配置生效。

[Switch1-Tunnel1] mpls te commit

[Switch2-Tunnel1] quit

(6)     将Bypass CR-LSP绑定到被保护的接口

[Switch2] interface Vlan-interface 23

[Switch2-Vlan-interface23] mpls te fast-reroute bypass-tunnel Tunnel1

[Switch2-Vlan-interface23] quit

3.5.3  设备Switch3的配置

(1)     配置接口以及环回口地址

<Switch3> system-view

[Switch3] interface LoopBack 0

[Switch3-LoopBack0] ip address 3.3.3.3 32

[Switch3-LoopBack0] quit

[Switch3] vlan 23

[Switch3-vlan23] port GigabitEthernet 9/0/1

[Switch3-vlan23] quit

[Switch3] interface GigabitEthernet 9/0/1

[Switch3-GigabitEthernet9/0/1] undo shutdown

[Switch3-GigabitEthernet9/0/1] quit

[Switch3] interface Vlan-interface 23

[Switch3-Vlan-interface23] ip address 4.0.23.3 24

[Switch3-Vlan-interface23] undo shutdown

[Switch3-Vlan-interface23] quit

[Switch3] vlan 34

[Switch3-vlan34] port GigabitEthernet 9/0/2

[Switch3-vlan34] quit

[Switch3] interface GigabitEthernet 9/0/2

[Switch3-GigabitEthernet9/0/2] undo shutdown

[Switch3-GigabitEthernet9/0/2] quit

[Switch3] interface Vlan-interface 34

[Switch3-Vlan-interface34] ip address 4.0.34.3 24

[Switch3-Vlan-interface34] undo shutdown

[Switch3-Vlan-interface34] quit

[Switch3] vlan 35

[Switch3-vlan35] port GigabitEthernet 9/0/3

[Switch3-vlan35] quit

[Switch3] interface GigabitEthernet 9/0/3

[Switch3-GigabitEthernet9/0/3] undo shutdown

[Switch3-GigabitEthernet9/0/3] quit

[Switch3] interface Vlan-interface 35

[Switch3-Vlan-interface35] ip address 4.0.35.3 24

[Switch3-Vlan-interface35] undo shutdown

[Switch3-Vlan-interface35] quit

(2)     配置IGP协议

# 配置OSPF协议。

[Switch3] ospf

# 使能OSPF的Opaque LSA发布接收能力。

[Switch3-ospf-1] opaque-capability enable

# 进入区域视图,发布相应接口和环回口的地址。

[Switch3-ospf-1] area 0

[Switch3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[Switch3-ospf-1-area-0.0.0.0] network 4.0.23.3 0.0.0.0

[Switch3-ospf-1-area-0.0.0.0] network 4.0.34.3 0.0.0.0

[Switch3-ospf-1-area-0.0.0.0] network 4.0.35.3 0.0.0.0

# 当前OSPF区域下使能MPLS TE能力。

[Switch3-ospf-1-area-0.0.0.0] mpls-te enable

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

[Switch3-ospf-1] quit

(3)     全局使能MPLS以及MPLS TE功能

# 配置LSR-ID为环回口地址。

[Switch3] mpls lsr-id 3.3.3.3

# MPLS视图下,使能MPLS TE、CSPF算法以及RSVP-TE。

[Switch3] mpls

[Switch3-mpls] mpls te

[Switch3-mpls] mpls te cspf

[Switch3-mpls] mpls rsvp-te

[Switch3-mpls] quit

(4)     接口使能MPLS以及MPLS TE功能,使能BFD联动RSVP。

[Switch3] interface Vlan-interface 23

[Switch3-Vlan-interface23] mpls

[Switch3-Vlan-interface23] mpls te

[Switch3-Vlan-interface23] mpls rsvp-te

[Switch3-Vlan-interface23] mpls rsvp-te bfd enable

[Switch3-Vlan-interface23] quit

[Switch3] interface Vlan-interface 34

[Switch3-Vlan-interface34] mpls

[Switch3-Vlan-interface34] mpls te

[Switch3-Vlan-interface34] mpls rsvp-te

[Switch3-Vlan-interface34] mpls rsvp-te bfd enable

[Switch3-Vlan-interface34] quit

[Switch3] interface Vlan-interface 35

[Switch3-Vlan-interface35] mpls

[Switch3-Vlan-interface35] mpls te

[Switch3-Vlan-interface35] mpls rsvp-te

[Switch3-Vlan-interface35] mpls rsvp-te bfd enable

[Switch3-Vlan-interface35] quit

3.5.4  设备Switch4的配置

(1)     配置接口以及环回口地址

<Switch4> system-view

[Switch4] interface LoopBack 0

[Switch4-LoopBack0] ip address 4.4.4.4 32

[Switch4-LoopBack0] quit

[Switch4] vlan 34

[Switch4-vlan34] port GigabitEthernet 9/0/1

[Switch4-vlan34] quit

[Switch4] interface GigabitEthernet 9/0/1

[Switch4-GigabitEthernet9/0/1] undo shutdown

[Switch4-GigabitEthernet9/0/1] quit

[Switch4] interface Vlan-interface 34

[Switch4-Vlan-interface34] ip address 4.0.34.4 24

[Switch4-Vlan-interface34] undo shutdown

[Switch4-Vlan-interface34] quit

(2)     配置IGP协议

# 配置OSPF协议。

[Switch4] ospf

# 使能OSPF的Opaque LSA发布接收能力。

[Switch4-ospf-1] opaque-capability enable

# 进入区域视图,发布相应接口和环回口的地址。

[Switch4-ospf-1] area 0

[Switch4-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[Switch4-ospf-1-area-0.0.0.0] network 4.0.34.4 0.0.0.0

# 当前OSPF区域下使能MPLS TE能力。

[Switch4-ospf-1-area-0.0.0.0] mpls-te enable

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

[Switch4-ospf-1] quit

(3)     全局使能MPLS以及MPLS TE功能

# 配置LSR-ID为环回口地址。

[Switch4] mpls lsr-id 4.4.4.4

# MPLS视图下,使能MPLS TE、CSPF算法以及RSVP-TE。

[Switch4] mpls

[Switch4-mpls] mpls te

[Switch4-mpls] mpls te cspf

[Switch4-mpls] mpls rsvp-te

[Switch4-mpls] quit

(4)     接口使能MPLS以及MPLS TE功能,使能BFD联动RSVP

[Switch4] interface Vlan-interface 34

[Switch4-Vlan-interface34] mpls

[Switch4-Vlan-interface34] mpls te

[Switch4-Vlan-interface34] mpls rsvp-te

[Switch4-Vlan-interface34] mpls rsvp-te bfd enable

[Switch4-Vlan-interface34] quit

3.5.5  设备Switch5的配置

(1)     配置接口以及环回口地址

<Switch5> system-view

[Switch5] interface LoopBack 0

[Switch5-LoopBack0] ip address 5.5.5.5 32

[Switch5-LoopBack0] quit

[Switch5] vlan 25

[Switch5-vlan25] port GigabitEthernet 9/0/1

[Switch5-vlan25] quit

[Switch5] interface GigabitEthernet 9/0/1

[Switch5-GigabitEthernet9/0/1] undo shutdown

[Switch5-GigabitEthernet9/0/1] quit

[Switch5] interface Vlan-interface 25

[Switch5-Vlan-interface25] ip address 4.0.25.5 24

[Switch5-Vlan-interface25] undo shutdown

[Switch5-Vlan-interface25] quit

[Switch5] vlan 35

[Switch5-vlan35] port GigabitEthernet 9/0/2

[Switch5-vlan35] quit

[Switch5] interface GigabitEthernet 9/0/2

[Switch5-GigabitEthernet9/0/2] undo shutdown

[Switch5-GigabitEthernet9/0/2] quit

[Switch5] interface Vlan-interface 35

[Switch5-Vlan-interface35] ip address 4.0.35.5 24

[Switch5-Vlan-interface35] undo shutdown

[Switch5-Vlan-interface35] quit

(2)     配置IGP协议

# 配置OSPF协议。

[Switch5] ospf

# 使能OSPF的Opaque LSA发布接收能力。

[Switch5-ospf-1] opaque-capability enable

# 进入区域视图,发布相应接口和环回口的地址。

[Switch5-ospf-1] area 0

[Switch5-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.0

[Switch5-ospf-1-area-0.0.0.0] network 4.0.25.5 0.0.0.0

[Switch5-ospf-1-area-0.0.0.0] network 4.0.35.5 0.0.0.0

# 当前OSPF区域下使能MPLS TE能力。

[Switch5-ospf-1-area-0.0.0.0] mpls-te enable

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

[Switch5-ospf-1] quit

(3)     全局使能MPLS以及MPLS TE功能

# 配置LSR-ID为环回口地址。

[Switch5] mpls lsr-id 5.5.5.5

# MPLS视图下,使能MPLS TE、CSPF算法以及RSVP-TE。

[Switch5] mpls

[Switch5-mpls] mpls te

[Switch5-mpls] mpls te cspf

[Switch5-mpls] mpls rsvp-te

[Switch5-mpls] quit

(4)     接口使能MPLS以及MPLS TE功能,使能BFD联动RSVP

[Switch5] interface Vlan-interface 25

[Switch5-Vlan-interface25] mpls

[Switch5-Vlan-interface25] mpls te

[Switch5-Vlan-interface25] mpls rsvp-te

[Switch5-Vlan-interface25] mpls rsvp-te bfd enable

[Switch5-Vlan-interface25] quit

[Switch5] interface Vlan-interface 35

[Switch5-Vlan-interface35] mpls

[Switch5-Vlan-interface35] mpls te

[Switch5-Vlan-interface35] mpls rsvp-te

[Switch5-Vlan-interface35] mpls rsvp-te bfd enable

[Switch5-Vlan-interface35] quit

3.6  验证配置

按照如上配置,PE1、PE2、PE3、P两两之间建立LDP会话,PW连接也已建立。

(1)     在Switch1上查看TE隧道状态

[Switch1] display mpls te tunnel-interface Tunnel 0

 

  Tunnel Name         :  Tunnel0

  Tunnel Desc         :  Tunnel0 Interface

  Tunnel State Desc   :  CR-LSP is Up

  Tunnel Attributes   :

    LSP ID              :  1.1.1.1:3

    Session ID          :  1

    Admin State         :  UP                    Oper State   :  UP

    Ingress LSR ID      :  1.1.1.1               Egress LSR ID:  4.4.4.4

    Signaling Prot      :  RSVP                  Resv Style   :  SE

    Tunnel mode         :  -

    Class Type          :  CT0                   Tunnel BW    :  0 kbps

    Reserved BW         :  0 kbps

    Setup Priority      :  7                     Hold Priority:  7

    Affinity Prop/Mask  :  0x0/0x0

    Explicit Path Name  :  pri-path

    Tie-Breaking Policy :  None

    Metric Type         :  None

    Loop Detection      :  Disabled

    Record Route        :  Enabled               Record Label :  Enabled

    FRR Flag            :  Enabled               BackUpBW Flag:  Not Supported

    BackUpBW Type       :  -                     BackUpBW     :  -

    Route Pinning       :  Disabled

    Retry Limit         :  5                     Retry Interval:  2 sec

    Reopt               :  Disabled              Reopt Freq   :  -

    Back Up Type        :  None

    Back Up LSPID       :  -

    Auto BW             :  Disabled              Auto BW Freq :  -

    Min BW              :  -                     Max BW       :  -

    Current Collected BW:  -

    Interfaces Protected:  -

    VPN Bind Type       :  NONE

    VPN Bind Value      :  -

    Car Policy          :  Disabled

    Tunnel Group        :  Primary

    Primary Tunnel      :  -

    Backup Tunnel       :  -

    Group Status        :  -

(2)     在所有设备上查看隧道的简要信息

[Switch1] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

1.1.1.1:1             4.4.4.4         -/Vlan12                   Tunnel0

[Switch2] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

1.1.1.1:1             4.4.4.4         Vlan12/Vlan23              Tunnel0

2.2.2.2:3             3.3.3.3         -/Vlan25                   Tunnel1

[Switch3] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

1.1.1.1:1             4.4.4.4         Vlan23/Vlan34              Tunnel0

2.2.2.2:3             3.3.3.3         Vlan35/-                   Tunnel1

[Switch4] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

1.1.1.1:1             4.4.4.4         Vlan34/-                   Tunnel0

[Switch5] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

2.2.2.2:3             3.3.3.3         Vlan25/Vlan35              Tunnel1

可以看到:Switch 2和Switch 3上有两条CR-LSP经过。

(3)     在Switch 2上查看主、备CR-LSP绑定关系

[Switch2] display mpls lsp verbose

-------------------------------------------------------------------------

                 LSP Information: RSVP LSP

-------------------------------------------------------------------------

  No.                 :  1

  IngressLsrID        :  2.2.2.2

  LocalLspID          :  1

  Tunnel-Interface    :  Tunnel1

  Fec                 :  3.3.3.3/32

  Nexthop             :  4.0.25.5

  In-Label            :  NULL

  Out-Label           :  1024

  In-Interface        :  ----------

  Out-Interface       :  Vlan-interface25

  LspIndex            :  3073

  Tunnel ID           :  0x23c002

  LsrType             :  Ingress

  Bypass In Use       :  Not Exists

  BypassTunnel        :  Tunnel Index[---]

 

  No.                 :  2

  IngressLsrID        :  1.1.1.1

  LocalLspID          :  3

  Tunnel-Interface    :  Tunnel0

  Fec                 :  4.4.4.4/32

  Nexthop             :  4.0.23.3

  In-Label            :  1026

  Out-Label           :  1026

  In-Interface        :  Vlan-interface12

  Out-Interface       :  Vlan-interface23

  LspIndex            :  3076

  Tunnel ID           :  0x23c005

  LsrType             :  Transit

  Bypass In Use       :  Not Used

  BypassTunnel        :  Tunnel Index[Tunnel1], InnerLabel[1026]

可以看到:Bypass CR-LSP绑定到出接口Vlan-interface23,目前未被使用。

(4)     查看BFD会话状态

BFD检测的只是MPLS-TE隧道路径沿途每个节点间的链路,即单跳检测,因此在MPLS-TE隧道经过的路径上,只要某条链路两端VLAN虚接口使能了BFD联动RSVP,就存在相应的BFD会话来检测该链路是否正常。

# 使用display bfd session命令查看设备上的BFD会话。

[Switch1] display bfd session

 Total session number: 1   Up session number: 1   Init mode: Active

 IPv4 session working under Ctrl mode:

LD/RD         SourceAddr      DestAddr        State Holdtime Interface

 3/16          4.0.12.1        4.0.12.2        Up    1800ms   Vlan12

[Switch2] display bfd session

 Total session number: 3   Up session number: 3   Init mode: Active

 IPv4 session working under Ctrl mode:

LD/RD         SourceAddr      DestAddr        State Holdtime Interface

 7/3           4.0.25.2        4.0.25.5        Up    1600ms   Vlan25

 16/3          4.0.12.2        4.0.12.1        Up    1800ms   Vlan12

 17/8          4.0.23.2        4.0.23.3        Up    1900ms   Vlan23

[Switch3] display bfd session

 Total session number: 3   Up session number: 3   Init mode: Active

 IPv4 session working under Ctrl mode:

 LD/RD         SourceAddr      DestAddr        State Holdtime Interface

 6/4           4.0.35.3        4.0.35.5        Up    1900ms   Vlan35

 8/17          4.0.23.3        4.0.23.2        Up    1900ms   Vlan23

 9/4           4.0.34.3        4.0.34.4        Up    1900ms   Vlan34

[Switch4] display bfd session

 Total session number: 1   Up session number: 1   Init mode: Active

 IPv4 session working under Ctrl mode:

 LD/RD         SourceAddr      DestAddr        State Holdtime Interface

 4/9           4.0.34.4        4.0.34.3        Up    1700ms   Vlan34

[Switch5] display bfd session

 Total session number: 2   Up session number: 2   Init mode: Active

 IPv4 session working under Ctrl mode:

 LD/RD         SourceAddr      DestAddr        State Holdtime Interface

 3/7           4.0.25.5        4.0.25.2        Up    1800ms   Vlan25

 4/6           4.0.35.5        4.0.35.3        Up    1700ms   Vlan35

# 在Switch2上使用display bfd session verbose命令查看BFD会话的详细信息,可以知道RSVP协议已经和BFD会话关联。

[Switch2] display bfd session verbose

 Total Session Num: 3            Init Mode: Active

 Session Working Under Ctrl Mode:

     Local Discr: 7                   Remote Discr: 3

       Source IP: 4.0.25.2          Destination IP: 4.0.25.5

   Session State: Up                     Interface: Vlan-interface25

 Min Trans Inter: 400ms            Act Trans Inter: 400ms

  Min Recv Inter: 400ms           Act Detect Inter: 2000ms

  Running Up for: 00:57:04               Auth mode: None

    Connect Type: Direct                 Board Num: 6

        Protocol: RSVP

       Diag Info: No Diagnostic

 

     Local Discr: 16                  Remote Discr: 3

       Source IP: 4.0.12.2          Destination IP: 4.0.12.1

   Session State: Up                     Interface: Vlan-interface12

 Min Trans Inter: 400ms            Act Trans Inter: 400ms

  Min Recv Inter: 400ms           Act Detect Inter: 2000ms

  Running Up for: 00:05:44               Auth mode: None

    Connect Type: Direct                 Board Num: 6

        Protocol: RSVP

       Diag Info: No Diagnostic

 

     Local Discr: 17                  Remote Discr: 8

       Source IP: 4.0.23.2          Destination IP: 4.0.23.3

   Session State: Up                     Interface: Vlan-interface23

 Min Trans Inter: 400ms            Act Trans Inter: 400ms

  Min Recv Inter: 400ms           Act Detect Inter: 2000ms

  Running Up for: 00:05:44               Auth mode: None

    Connect Type: Direct                 Board Num: 6

        Protocol: RSVP/MFW

       Diag Info: No Diagnostic     

 

(5)     FRR切换

# 使PLR(Switch2)上被保护的出接口Vlan-interface23失效,主隧道不会Down。

[Switch2] interface Vlan-interface 23

[Switch2-Vlan-interface23] shutdown

[Switch2-Vlan-interface23] quit

[Switch2] display mpls te tunnel

LSP-Id                Destination     In/Out-If                  Name

1.1.1.1:1             4.4.4.4         Vlan12/Vlan23              Tunnel0

2.2.2.2:3             3.3.3.3         -/Vlan25                   Tunnel1

# 查看Bypass CR-LSP是否已启用。

[Switch2] display mpls lsp verbose

-------------------------------------------------------------------------

                 LSP Information: RSVP LSP

-------------------------------------------------------------------------

  No.                 :  1

  IngressLsrID        :  2.2.2.2

  LocalLspID          :  1

  Tunnel-Interface    :  Tunnel1

  Fec                 :  3.3.3.3/32

  Nexthop             :  4.0.25.5

  In-Label            :  NULL

  Out-Label           :  1024

  In-Interface        :  ----------

  Out-Interface       :  Vlan-interface25

  LspIndex            :  3073

  Tunnel ID           :  0x23c002

  LsrType             :  Ingress

  Bypass In Use       :  Not Exists

  BypassTunnel        :  Tunnel Index[---]

 

  No.                 :  2

  IngressLsrID        :  1.1.1.1

  LocalLspID          :  3

  Tunnel-Interface    :  Tunnel0

  Fec                 :  4.4.4.4/32

  Nexthop             :  4.0.23.3

  In-Label            :  1026

  Out-Label           :  1026

  In-Interface        :  Vlan-interface12

  Out-Interface       :  Vlan-interface23

  LspIndex            :  3076

  Tunnel ID           :  0x23c005

  LsrType             :  Transit

  Bypass In Use       :  In Use

  BypassTunnel        :  Tunnel Index[Tunnel1], InnerLabel[1026]

3.7  配置文件

·     Switch1:

[Switch1] display current-configuration

#

 sysname Switch1

#

 mpls lsr-id 1.1.1.1

#

vlan 1

#

vlan 12

#

mpls

 mpls te

 mpls rsvp-te

 mpls te cspf

#

explicit-path pri-path

 next hop 4.0.12.2

 next hop 4.0.23.3

 next hop 4.0.34.4

#

interface NULL0

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface12

 ip address 4.0.12.1 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface GigabitEthernet9/0/1

 port link-mode bridge

 port access vlan 12

#

interface Tunnel0

 ip address 5.0.0.1 255.255.255.0

 tunnel-protocol mpls te

 destination 4.4.4.4

 mpls te tunnel-id 1

 mpls te record-route label

mpls te path explicit-path pri-path preference 5

 mpls te fast-reroute

 mpls te commit

#

 ip route-static 4.4.4.4 255.255.255.255 Tunnel0

#

ospf 1

 opaque-capability enable

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 4.0.12.1 0.0.0.0

  mpls-te enable

#

·     Switch2:

[Switch2] display current-configuration

#

 sysname Switch2

#

 mpls lsr-id 2.2.2.2

#

vlan 1

#

vlan 12

#

vlan 23

#

vlan 25

#

mpls

 mpls te

 mpls te timer fast-reroute 5

 mpls rsvp-te

 mpls te cspf

#

explicit-path by-path

 next hop 4.0.25.5

 next hop 4.0.35.3

#

interface NULL0

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface12

 ip address 4.0.12.2 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface Vlan-interface23

 ip address 4.0.23.2 255.255.255.0

 mpls

 mpls te

 mpls te fast-reroute bypass-tunnel Tunnel1

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface Vlan-interface25

 ip address 4.0.25.2 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface GigabitEthernet9/0/1

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet9/0/2

 port link-mode bridge

 port access vlan 23

#

interface GigabitEthernet9/0/3

 port link-mode bridge

 port access vlan 25

#

interface Tunnel1

 ip address 6.0.0.1 255.255.255.0

 tunnel-protocol mpls te

 destination 3.3.3.3

 mpls te tunnel-id 1

 mpls te record-route

 mpls te path explicit-path by-path preference 5

 mpls te backup bandwidth bc0 un-limited

 mpls te commit

#

ospf 1

 opaque-capability enable

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 4.0.12.2 0.0.0.0

  network 4.0.23.2 0.0.0.0

  network 4.0.25.2 0.0.0.0

  mpls-te enable

#

·     Switch3:

[Switch3] display current-configuration

#

 sysname Switch3

#

 mpls lsr-id 3.3.3.3

#

vlan 1

#

vlan 23

#

vlan 34 to 35

#

mpls

 mpls te

 mpls rsvp-te

 mpls te cspf

#

interface NULL0

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface23

 ip address 4.0.23.3 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface Vlan-interface34

 ip address 4.0.34.3 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface Vlan-interface35

 ip address 4.0.35.3 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface GigabitEthernet9/0/1

 port link-mode bridge

 port access vlan 23

#

interface GigabitEthernet9/0/2

 port link-mode bridge

 port access vlan 34

#

interface GigabitEthernet9/0/3

 port link-mode bridge

 port access vlan 35

#

ospf 1

 opaque-capability enable

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 4.0.23.3 0.0.0.0

  network 4.0.34.3 0.0.0.0

  network 4.0.35.3 0.0.0.0

  mpls-te enable

#

·     Switch4:

[Switch4] display current-configuration

#

 sysname Switch4

#

 mpls lsr-id 4.4.4.4

#

vlan 1

#

vlan 34

#

mpls

 mpls te

 mpls rsvp-te

 mpls te cspf

#

interface NULL0

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface34

 ip address 4.0.34.4 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface GigabitEthernet9/0/1

 port link-mode bridge

 port access vlan 34

#

ospf 1

 opaque-capability enable

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 4.0.34.4 0.0.0.0

  mpls-te enable

#

·     Switch5:

[Switch5] display current-configuration

#

 sysname Switch5

#

 mpls lsr-id 5.5.5.5

#

vlan 1

#

vlan 25

#

vlan 35

#

mpls

 mpls te

 mpls rsvp-te

 mpls te cspf

#

interface NULL0

#

interface LoopBack0

 ip address 5.5.5.5 255.255.255.255

#

interface Vlan-interface25

 ip address 4.0.25.5 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface Vlan-interface35

 ip address 4.0.35.5 255.255.255.0

 mpls

 mpls te

 mpls rsvp-te

 mpls rsvp-te bfd enable

#

interface GigabitEthernet9/0/1

 port link-mode bridge

 port access vlan 25

#

interface GigabitEthernet9/0/2

 port link-mode bridge

 port access vlan 35

#

ospf 1

 opaque-capability enable

 area 0.0.0.0

  network 5.5.5.5 0.0.0.0

  network 4.0.35.5 0.0.0.0

  network 4.0.25.5 0.0.0.0

  mpls-te enable

#

4  相关资料

·     《H3C S12500系列路由交换机 MPLS配置指导》中的“MPLS TE”

·     《H3C S12500系列路由交换机 MPLS命令参考》中的“MPLS TE”

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们