35-MSR系列路由器MPLS TE自动路由宣告 + Absolute Metric功能的典型配置举例
本章节下载: 35-MSR系列路由器MPLS TE自动路由宣告 + Absolute Metric功能的典型配置举例 (155.88 KB)
MSR系列路由器MPLS TE自动路由宣告 + Absolute Metric功能的典型配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍使用MPLS TE自动路由宣告功能的典型案例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解MPLS TE自动路由宣告的特性。
如图1所示,在MPLS骨干网上,Router A、Router B、Router C和Router D通过OSPF发布路由,在Router A和Router D间通过CR-LDP建立MPLS TE隧道。要求:通过将MPLS TE隧道路由宣告到OSPF路由中进行流量转发。
图1 MSR系列路由器采用MPLS TE自动路由宣告到IGP组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Router A |
Loop0 |
1.1.1.1/32 |
Router C |
Loop0 |
3.3.3.3/32 |
|
Eth0/1 |
10.1.1.2/30 |
|
Eth0/0 |
192.168.1.2/30 |
|
Tunnel1 |
14.1.1.1/24 |
|
Eth0/1 |
10.1.2.1/30 |
Router B |
Loop0 |
2.2.2.2/32 |
Router D |
Loop0 |
4.4.4.4/32 |
|
Eth0/0 |
192.168.1.1/30 |
|
Eth0/1 |
10.1.2.2/30 |
|
Eth0/1 |
10.1.1.1/30 |
|
Tunnel1 |
14.1.1.2/24 |
在配置MPLS TE隧道时,由于MPLS TE的LSP隧道是单向的,因此需要在Router A和Router D都向对方建立一条LSP隧道,只有双向Tunnel都建立成功,才能使IGP Advertise成功,这样发送给对方的报文才能正常转发回来。
本举例是在Release 2311版本上进行配置和验证的。
# 配置接口IP地址。
[RouterA] interface loopback 0
[RouterA-LoopBack0] ip address 1.1.1.1 255.255.255.255
[RouterA-LoopBack0] quit
[RouterA] interface ethernet 0/1
[RouterA-Ethernet0/1] port link-mode route
[RouterA-Ethernet0/1] ip address 10.1.1.2 255.255.255.252
[RouterA-Ethernet0/1] quit
[RouterA] router id 1.1.1.1
# 配置OSPF协议,实现骨干网的互通。
[RouterA] ospf 1
[RouterA-ospf-1] area 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 使能MPLS基本能力,并使能MPLS TE和CSPF。
[RouterA] mpls lsr-id 1.1.1.1
[RouterA] mpls
[RouterA-mpls] mpls te
[RouterA-mpls] mpls te cspf
[RouterA-mpls] quit
[RouterA] interface ehernet 0/1
[RouterA-Ethernet0/1] mpls
[RouterA-Ethernet0/1] mpls te
[RouterA-Ethernet0/1] quit
# 使能opaque LSA能力和转发邻接特性,使能OSPF TE。
[RouterA] ospf 1
[RouterA-ospf-1] opaque-capability enable
[RouterA-ospf-1] enable traffic-adjustment advertise
[RouterA-ospf-1] area 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] mpls-te enable
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 配置链路的MPLS TE的链路最大带宽为100kbps,最大可预留带宽为50kbps。
[RouterA] interface ethernet 0/1
[RouterA-Ethernet0/1] mpls te max-link-bandwidth 100
[RouterA-Ethernet0/1] mpls te max-reservable-bandwidth 50
[RouterA-Ethernet0/1] quit
# 使能MPLS LDP能力。
[RouterA] mpls ldp
[RouterA] interface ethernet 0/1
[RouterA-Ethernet0/1] mpls ldp
[RouterA-Ethernet0/1] quit
# 以Router A为首端路由器,Router D为尾端路由器创建一条LSP隧道,隧道模式为MPLS TE,信令协议为CR-LDP。
[RouterA] interface tunnel 1
[RouterA-Tunnel1] ip address 14.1.1.1 255.255.255.0
[RouterA-Tunnel1] tunnel-protocol mpls te
[RouterA-Tunnel1] destination 4.4.4.4
[RouterA-Tunnel1] mpls te signal-protocol crldp
[RouterA-Tunnel1] mpls te tunnel-id 10
# 将MPLS TE隧道作为链路发布到IGP网络,配置MPLS TE隧道的绝对度量值为2。
[RouterA-Tunnel1] mpls te igp advertise
[RouterA-Tunnel1] mpls te igp metric absolute 2
[RouterA-Tunnel1] mpls te commit
[RouterA-Tunnel1] quit
# 将Tunnel接口发布到OSPF协议中。
[RouterA] ospf 1
[RouterA-ospf-1] area 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] network 14.1.1.0 0.0.0.3
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 配置接口IP地址。
[RouterB] interface loopback 0
[RouterB-LoopBack0] ip address 2.2.2.2 255.255.255.255
[RouterB-LoopBack0] quit
[RouterB] interface ethernet 0/0
[RouterB-Ethernet0/0] port link-mode route
[RouterB-Ethernet0/0] ip address 192.168.1.1 255.255.255.252
[RouterB-Ethernet0/0] quit
[RouterB] interface ethernet 0/1
[RouterB-Ethernet0/1] port link-mode route
[RouterB-Ethernet0/1] ip address 10.1.1.1 255.255.255.252
[RouterB-Ethernet0/1] quit
[RouterB] router id 2.2.2.2
# 配置OSPF协议,实现骨干网的互通。
[RouterB] ospf 1
[RouterB-ospf-1] area 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.3
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 使能MPLS基本能力,并使能MPLS TE和CSPF。
[RouterB] mpls
[RouterB-mpls] mpls te
[RouterB-mpls] mpls te cspf
[RouterB-mpls] quit
[RouterB] interface ethernet 0/0
[RouterB-Ethernet0/0] mpls
[RouterB-Ethernet0/0] mpls te
[RouterB-Ethernet0/0] quit
[RouterB] interface ethernet 0/1
[RouterB-Ethernet0/1] mpls
[RouterB-Ethernet0/1] mpls te
[RouterB-Ethernet0/1] quit
# 使能opaque LSA能力,使能OSPF TE。
[RouterB] ospf 1
[RouterB-ospf-1] opaque-capability enable
[RouterB-ospf-1] area 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] mpls-te enable
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 配置链路的MPLS TE的链路最大带宽为100kbps,最大可预留带宽为50kbps。
[RouterB] interface ethernet 0/0
[RouterB-Ethernet0/0] mpls te max-link-bandwidth 100
[RouterB-Ethernet0/0] mpls te max-reservable-bandwidth 50
[RouterB-Ethernet0/0] quit
[RouterB] interface ethernet 0/1
[RouterB-Ethernet0/1] mpls te max-link-bandwidth 100
[RouterB-Ethernet0/1] mpls te max-reservable-bandwidth 50
[RouterB-Ethernet0/1] quit
# 使能MPLS LDP能力。
[RouterB] mpls ldp
[RouterB] interface ethernet 0/0
[RouterB-Ethernet0/0] mpls ldp
[RouterB-Ethernet0/0] quit
[RouterB] interface ethernet 0/1
[RouterB-Ethernet0/1] mpls ldp
[RouterB-Ethernet0/1] quit
# 配置接口IP地址。
[RouterC] interface loopback 0
[RouterC-LoopBack0] ip address 3.3.3.3 255.255.255.255
[RouterC-LoopBack0] quit
[RouterC] interface ethernet 0/1
[RouterC-Ethernet0/1] port link-mode route
[RouterC-Ethernet0/1] ip address 10.1.2.1 255.255.255.252
[RouterC-Ethernet0/1] quit
[RouterC] interface ethernet 0/0
[RouterC-Ethernet0/0] port link-mode route
[RouterC-Ethernet0/0] ip address 192.168.1.2 255.255.255.252
[RouterC-Ethernet0/0] quit
[RouterC] router id 3.3.3.3
# 配置OSPF协议,实现骨干网的互通。
[RouterC] ospf 1
[RouterC-ospf-1] area 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.3
[RouterC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.3
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 使能MPLS基本能力,并使能MPLS TE和CSPF。
[RouterC] mpls lsr-id 3.3.3.3
[RouterC] mpls
[RouterC-mpls] mpls te
[RouterC-mpls] mpls te cspf
[RouterC-mpls] quit
[RouterC] interface ethernet 0/1
[RouterC-Ethernet0/1] mpls
[RouterC-Ethernet0/1] mpls te
[RouterC-Ethernet0/1] quit
[RouterC] interface ethernet 0/0
[RouterC-Ethernet0/0] mpls
[RouterC-Ethernet0/0] mpls te
[RouterC-Ethernet0/0] quit
# 使能opaque LSA能力,使能OSPF TE。
[RouterC] ospf 1
[RouterC-ospf-1] opaque-capability enable
[RouterC-ospf-1] area 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] mpls-te enable
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 配置链路的MPLS TE的链路最大带宽为100kbps,最大可预留带宽为50kbps。
[RouterC] interface ethernet 0/1
[RouterC-Ethernet0/1] mpls te max-link-bandwidth 100
[RouterC-Ethernet0/1] mpls te max-reservable-bandwidth 50
[RouterC-Ethernet0/1] quit
[RouterC] interface ethernet 0/0
[RouterC-Ethernet0/0] mpls te max-link-bandwidth 100
[RouterC-Ethernet0/0] mpls te max-reservable-bandwidth 50
[RouterC-Ethernet0/0] quit
# 使能MPLS LDP能力。
[RouterC] mpls ldp
[RouterC] interface ethernet 0/1
[RouterC-Ethernet0/1] mpls ldp
[RouterC-Ethernet0/1] quit
[RouterC] interface ethernet 0/0
[RouterC-Ethernet0/0] mpls ldp
[RouterC-Ethernet0/0] quit
# 配置接口IP地址。
[RouterD] interface loopback 0
[RouterD-LoopBack0] ip address 4.4.4.4 255.255.255.255
[RouterD-LoopBack0] quit
[RouterD] interface ethernet 0/1
[RouterD-Ethernet0/1] port link-mode route
[RouterD-Ethernet0/1] ip address 10.1.2.2 255.255.255.252
[RouterD-Ethernet0/1] quit
[RouterD] router id 4.4.4.4
# 配置OSPF协议,实现骨干网的互通。
[RouterD] ospf 1
[RouterD-ospf-1] area 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.3
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# 使能MPLS基本能力,并使能MPLS TE和CSPF。
[RouterD] mpls lsr-id 4.4.4.4
[RouterD] mpls
[RouterD-mpls] mpls te
[RouterD-mpls] mpls te cspf
[RouterD-mpls] quit
[RouterD] interface ethernet 0/1
[RouterD-Ethernet0/1] mpls
[RouterD-Ethernet0/1] mpls te
[RouterD-Ethernet0/1] quit
# 使能opaque LSA能力和转发邻接特性,使能OSPF TE。
[RouterD] ospf 1
[RouterD-ospf-1] opaque-capability enable
[RouterD-ospf-1] enable traffic-adjustment advertise
[RouterD-ospf-1] area 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] mpls-te enable
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# 配置链路的MPLS TE的链路最大带宽为100kbps,最大可预留带宽为50kbps。
[RouterD] interface ethernet 0/1
[RouterD-Ethernet0/1] mpls te max-link-bandwidth 100
[RouterD-Ethernet0/1] mpls te max-reservable-bandwidth 50
[RouterD-Ethernet0/1] quit
# 使能MPLS LDP能力。
[RouterD] mpls ldp
[RouterD] interface ethernet 0/1
[RouterD-Ethernet0/1] mpls ldp
[RouterD-Ethernet0/1] quit
# 以Router D为首端路由器,Router A为尾端路由器创建一条LSP隧道,隧道模式为MPLS TE,信令协议为CR-LDP。
[RouterD] interface tunnel 1
[RouterD-Tunnel1] ip address 14.1.1.2 255.255.255.0
[RouterD-Tunnel1] tunnel-protocol mpls te
[RouterD-Tunnel1] destination 1.1.1.1
[RouterD-Tunnel1] mpls te signal-protocol crldp
[RouterD-Tunnel1] mpls te tunnel-id 20
# 将MPLS TE隧道作为链路发布到IGP网络,配置MPLS TE隧道的绝对度量值为2。
[RouterD-Tunnel1] mpls te igp advertise
[RouterD-Tunnel1] mpls te igp metric absolute 2
[RouterD-Tunnel1] mpls te commit
[RouterD-Tunnel1] quit
# 将Tunnel接口发布到OSPF协议中。
[RouterD] ospf 1
[RouterD-ospf-1] area 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 14.1.1.0 0.0.0.3
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# 查看Router A的Tunnel接口状态。
<RouterA> display interface Tunnel 1
Tunnel1 current state: UP
Line protocol current state: UP
Description: Tunnel1 Interface
The Maximum Transmit Unit is 64000
Internet Address is 14.1.1.1/24 Primary
Encapsulation is TUNNEL, service-loopback-group ID not set.
Tunnel source unknown, destination 4.4.4.4
Tunnel bandwidth 64 (kbps)
Tunnel protocol/transport CR_LSP
Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0
Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
Last clearing of counters: Never
Last 300 seconds input: 0 bytes/sec, 0 packets/sec
Last 300 seconds output: 0 bytes/sec, 0 packets/sec
0 packets input, 0 bytes
0 input error
45 packets output, 3780 bytes
0 output error
# 查看Router D的Tunnel接口状态。
<RouterD> display interface Tunnel 1
Tunnel1 current state: UP
Line protocol current state: UP
Description: Tunnel1 Interface
The Maximum Transmit Unit is 64000
Internet Address is 14.1.1.2/24 Primary
Encapsulation is TUNNEL, service-loopback-group ID not set.
Tunnel source unknown, destination 1.1.1.1
Tunnel bandwidth 64 (kbps)
Tunnel protocol/transport CR_LSP
Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0
Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
Last clearing of counters: Never
Last 300 seconds input: 0 bytes/sec, 0 packets/sec
Last 300 seconds output: 0 bytes/sec, 0 packets/sec
0 packets input, 0 bytes
0 input error
60 packets output, 5040 bytes
0 output error
· Router A配置:
#
Router id 1.1.1.1
#
mpls lsr-id 1.1.1.1
#
mpls
mpls te
mpls te cspf
#
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip address 10.1.1.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1
ip address 14.1.1.1 255.255.255.0
tunnel-protocol mpls te
destination 4.4.4.4
mpls te signal-protocol crldp
mpls te tunnel-id 10
mpls te igp advertise
mpls te igp metric absolute 2
mpls te commit
#
ospf 1
opaque-capability enable
enable traffic-adjustment advertise
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.3
network 14.1.1.0 0.0.0.3
mpls-te enable
· Router B配置:
#
Router id 2.2.2.2
#
mpls lsr-id 2.2.2.2
#
mpls
mpls te
mpls te cspf
#
mpls ldp
#
interface Ethernet0/0
port link-mode route
ip address 192.168.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface Ethernet0/1
port link-mode route
ip address 10.1.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.3
network 192.168.1.0 0.0.0.3
mpls-te enable
· Router C配置:
#
Router id 3.3.3.3
#
mpls lsr-id 3.3.3.3
#
mpls
mpls te
mpls te cspf
#
mpls ldp
#
interface Ethernet0/0
port link-mode route
ip address 192.168.1.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip address 10.1.2.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 192.168.1.0 0.0.0.3
network 3.3.3.3 0.0.0.0
network 10.1.2.0 0.0.0.3
mpls-te enable
· Router D配置:
#
Router id 4.4.4.4
#
mpls lsr-id 4.4.4.4
#
mpls
mpls te
mpls te cspf
#
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip address 10.1.2.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 100
mpls te max-reservable-bandwidth 50
mpls ldp
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface Tunnel1
ip address 14.1.1.2 255.255.255.0
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol crldp
mpls te tunnel-id 20
mpls te igp advertise
mpls te igp metric absolute 2
mpls te commit
#
ospf 1
opaque-capability enable
enable traffic-adjustment advertise
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.1.2.0 0.0.0.3
network 14.1.1.0 0.0.0.3
mpls-te enable
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!