本次介绍一下转发捷径,转发捷径是一种将流量引入TE隧道的常用方式,其中TE隧道将作为逻辑链路参与到本地的IGP路由计算。通过设置隧道的Metric值,可以是TE隧道被优选,故可以将流量引入TE隧道。
依如下拓扑,做配置示例:
LSRA与LSRD之间链路的带宽为100Mbit/s,去往LSRC的流量带宽需求为50Mbit/s,去往LSRE的流量带宽需求为60Mbit/s,二者相加为110Mbit/s,此时LSRA和LSRD之间链路会发生拥塞,造成流量延时或丢失,为解决此问题,可在LSRA上的TE隧道配置转发捷径将去往LSRC的流量引入TE隧道,从而避免网络拥塞的发生。
1、配置各接口IP,使用OSPF协议实现各节点路由,同时配置各接口OSPF开销值。
2、在LSRA、LSRB和LSRC全局与公网接口上配置MPLS、MPLS TE、RSVP-TE并在LSRA使用CSPF算法计算路径。
3、LSRA、LSRB、LSRC配置OSPF TE 发布。
LSRA配置
#
mpls lsr-id 1.1.1.1 //配置MPLS LSR-ID
mpls //配置MPLS全局视图
mpls te //配置MPLS TE功能
mpls rsvp-te //配置RSVP-TE功能
mpls te cspf //配置CSPF路径算法功能
#
interface GigabitEthernet0/0/0
ip address 10.10.1.1 255.255.255.0
ospf cost 15
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/0/1
ip address 10.10.4.1 255.255.255.0
ospf cost 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.10.1.0 0.0.0.255
network 10.10.4.0 0.0.0.255
mpls-te enable
LSRB配置
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/0/0
ip address 10.10.1.2 255.255.255.0
ospf cost 15
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/0/1
ip address 10.10.2.1 255.255.255.0
ospf cost 10
mpls
mpls te
mpls rsvp-te
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.10.1.0 0.0.0.255
network 10.10.2.0 0.0.0.255
mpls-te enable
#
LSRC配置
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/0/1
ip address 10.10.2.2 255.255.255.0
ospf cost 10
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/0/2
ip address 10.10.3.1 255.255.255.0
ospf cost 10
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.10.2.0 0.0.0.255
network 10.10.3.0 0.0.0.255
mpls-te enable
#
LSRD配置
interface GigabitEthernet0/0/0
ip address 10.10.5.1 255.255.255.0
ospf cost 10
#
interface GigabitEthernet0/0/1
ip address 10.10.4.2 255.255.255.0
ospf cost 10
#
interface GigabitEthernet0/0/2
ip address 10.10.3.2 255.255.255.0
ospf cost 10
#
ospf 1
area 0.0.0.0
network 10.10.3.0 0.0.0.255
network 10.10.4.0 0.0.0.255
network 10.10.5.0 0.0.0.255
#
LSRE配置
#
interface GigabitEthernet0/0/0
ip address 10.10.5.2 255.255.255.0
ospf cost 10
#
ospf 1
area 0.0.0.0
network 10.10.5.0 0.0.0.255
4、在LSRA上配置Tunnel接口目的地IP,配置显示式路径。
5、在LSRA的TE隧道接口下使用转发捷径功能,并配置TE隧道的IGP度量值10
[LSRA] explicit-path pri-path //配置显示式路径
[LSRA-explicit-path-pri-path]next hop 10.10.1.2 //配置严格的下一跳
[LSRA-explicit-path-pri-path]next hop 10.10.2.2
[LSRA-explicit-path-pri-path]next hop 3.3.3.3
[LSRA]
#
interface Tunnel0/0/1
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te //配置隧道接口的封装协议
destination 3.3.3.3
mpls te tunnel-id 100
mpls te path explicit-path pri-path //配置隧道应用的显示路径
mpls te igp metric absolute 10 //配置TE隧道绝对度量
mpls te commit
#
[LSRA-Tunnel0/0/1]mpls te igp shortcut ospf //配置使用OSPF shortcut
[LSRA-Tunnel0/0/1]mpls te signal-protocol rsvp-te //配置隧道使用的信令协议
[LSRA-ospf-1]enable traffic-adjustment //配置转发捷径功能
6、配置验证
可以看到去往LSRC(3.3.3.3)的路由跳到1.1.1.1 转发接口为Tunnel0/0/1可以说明去往LSRC 的流量被引进到了TE 隧道中。
<LSRA>dis ip routing-table 3.3.3.3
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
3.3.3.3/32 OSPF 10 10 D 1.1.1.1 Tunnel0/0/1