配置动态MPLS TE隧道示例
组网需求
如图4-44所示,某企业自建MPLS骨干网,LSRA、LSRB、LSRC均属于MPLS骨干网设备。MPLS骨干网的路由协议使用IS-IS,都属于Level-2。现要求在MPLS骨干网创建公网隧道承载L2VPN或L3VPN业务,同时要求该隧道适应网络拓扑变化保证数据传输的稳定性。
为了实现该需求,需要使用RSVP-TE信令建立一条动态MPLS TE隧道。
操作步骤
- 配置各接口的IP地址
# 配置LSRA。LSRB和LSRC的配置与LSRA类似,不再赘述。
<Huawei> system-view [Huawei] sysname LSRA [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] ip address 172.1.1.1 255.255.255.0 [LSRA-GigabitEthernet1/0/0] quit [LSRA] interface loopback 1 [LSRA-LoopBack1] ip address 1.1.1.9 255.255.255.255 [LSRA-LoopBack1] quit
- 配置IS-IS协议发布路由
# 配置LSRA。
[LSRA] isis 1 [LSRA-isis-1] network-entity 00.0005.0000.0000.0001.00 [LSRA-isis-1] is-level level-2 [LSRA-isis-1] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] isis enable 1 [LSRA-GigabitEthernet1/0/0] quit [LSRA] interface loopback 1 [LSRA-LoopBack1] isis enable 1 [LSRA-LoopBack1] quit
# 配置LSRB。
[LSRB] isis 1 [LSRB-isis-1] network-entity 00.0005.0000.0000.0002.00 [LSRB-isis-1] is-level level-2 [LSRB-isis-1] quit [LSRB] interface gigabitethernet 1/0/0 [LSRB-GigabitEthernet1/0/0] isis enable 1 [LSRB-GigabitEthernet1/0/0] quit [LSRB] interface gigabitethernet 2/0/0 [LSRB-GigabitEthernet2/0/0] isis enable 1 [LSRB-GigabitEthernet2/0/0] quit [LSRB] interface loopback 1 [LSRB-LoopBack1] isis enable 1 [LSRB-LoopBack1] quit
# 配置LSRC。
[LSRC] isis 1 [LSRC-isis-1] network-entity 00.0005.0000.0000.0003.00 [LSRC-isis-1] is-level level-2 [LSRC-isis-1] quit [LSRC] interface gigabitethernet 1/0/0 [LSRC-GigabitEthernet1/0/0] isis enable 1 [LSRC-GigabitEthernet1/0/0] quit [LSRC] interface loopback 1 [LSRC-LoopBack1] isis enable 1 [LSRC-LoopBack1] quit
配置完成后,在各节点上执行display ip routing-table命令,可以看到相互之间都学到了到对方的路由。以LSRA的显示为例:
[LSRA] display ip routing-table Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 11 Routes : 11 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 LoopBack1 2.2.2.9/32 ISIS-L2 15 10 D 172.1.1.2 GigabitEthernet1/0/0 3.3.3.9/32 ISIS-L2 15 20 D 172.1.1.2 GigabitEthernet1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 172.1.1.0/24 Direct 0 0 D 172.1.1.1 GigabitEthernet1/0/0 172.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet1/0/0 172.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet1/0/0 172.2.1.0/24 ISIS-L2 15 20 D 172.1.1.2 GigabitEthernet1/0/0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 配置MPLS基本能力,使能MPLS TE、RSVP-TE
在各节点全局使能MPLS、MPLS TE和RSVP-TE,在隧道沿途的接口上使能MPLS、MPLS TE和RSVP-TE。
# 配置LSRA。LSRB和LSRC的配置与LSRA类似,不再赘述。
[LSRA] mpls lsr-id 1.1.1.9 [LSRA] mpls [LSRA-mpls] mpls te [LSRA-mpls] mpls rsvp-te [LSRA-mpls] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] mpls [LSRA-GigabitEthernet1/0/0] mpls te [LSRA-GigabitEthernet1/0/0] mpls rsvp-te [LSRA-GigabitEthernet1/0/0] quit
- 配置IS-IS TE
# 配置LSRA。LSRB和LSRC的配置与LSRA类似,不再赘述。
[LSRA] isis 1 [LSRA-isis-1] cost-style wide [LSRA-isis-1] traffic-eng level-2 [LSRA-isis-1] quit
- 配置MPLS TE隧道接口,使能MPLS TE CSPF
在隧道入节点上创建Tunnel接口,并配置Tunnel接口的IP地址、隧道协议、目的地址、Tunnel ID、动态信令协议,并执行mpls te commit命令使配置生效。
# 配置LSRA。
[LSRA] mpls [LSRA-mpls] mpls te cspf [LSRA-mpls] quit [LSRA] interface tunnel 0/0/1 [LSRA-Tunnel0/0/1] ip address unnumbered interface loopback 1 [LSRA-Tunnel0/0/1] tunnel-protocol mpls te [LSRA-Tunnel0/0/1] destination 3.3.3.9 [LSRA-Tunnel0/0/1] mpls te tunnel-id 100 [LSRA-Tunnel0/0/1] mpls te commit [LSRA-Tunnel0/0/1] quit
- 验证配置结果
# 配置完成后,在LSRA上执行display interface tunnel命令可以看到隧道接口状态为Up。
[LSRA] display interface tunnel Tunnel0/0/1 current state : UP Line protocol current state : UP Last line protocol up time : 2013-01-14 09:18:46 Description: ...
# 在LSRA上执行display mpls te tunnel-interface命令可以看到隧道接口信息。
[LSRA] display mpls te tunnel-interface ---------------------------------------------------------------- Tunnel0/0/1 ---------------------------------------------------------------- Tunnel State Desc : UP Active LSP : Primary LSP Session ID : 100 Ingress LSR ID : 1.1.1.9 Egress LSR ID: 3.3.3.9 Admin State : UP Oper State : UP Primary LSP State : UP Main LSP State : READY LSP ID : 3
# 在LSRA上执行display mpls te tunnel verbose命令可以看到隧道详细信息。
[LSRA] display mpls te tunnel verbose No : 1 Tunnel-Name : Tunnel0/0/1 Tunnel Interface Name : Tunnel0/0/1 TunnelIndex : 1 LSP Index : 2048 Session ID : 100 LSP ID : 3 LSR Role : Ingress LSP Type : Primary Ingress LSR ID : 1.1.1.9 Egress LSR ID : 3.3.3.9 In-Interface : - Out-Interface : GE1/0/0 Sign-Protocol : RSVP TE Resv Style : SE IncludeAnyAff : 0x0 ExcludeAnyAff : 0x0 IncludeAllAff : 0x0 LspConstraint : - ER-Hop Table Index : 0 AR-Hop Table Index: - C-Hop Table Index : 1 PrevTunnelIndexInSession: - NextTunnelIndexInSession: - PSB Handle : 16388 Created Time : 2013/01/19 16:04:15 RSVP LSP Type : - -------------------------------- DS-TE Information -------------------------------- Bandwidth Reserved Flag : Unreserved CT0 Bandwidth(Kbit/sec) : 0 CT1 Bandwidth(Kbit/sec): 0 CT2 Bandwidth(Kbit/sec) : 0 CT3 Bandwidth(Kbit/sec): 0 CT4 Bandwidth(Kbit/sec) : 0 CT5 Bandwidth(Kbit/sec): 0 CT6 Bandwidth(Kbit/sec) : 0 CT7 Bandwidth(Kbit/sec): 0 Setup-Priority : 7 Hold-Priority : 7 -------------------------------- FRR Information -------------------------------- Primary LSP Info TE Attribute Flag : 0x3 Protected Flag : 0x0 Bypass In Use : Not Exists Bypass Tunnel Id : - BypassTunnel : - Bypass LSP ID : - FrrNextHop : - ReferAutoBypassHandle : - FrrPrevTunnelTableIndex : - FrrNextTunnelTableIndex: - Bypass Attribute(Not configured) Setup Priority : - Hold Priority : - HopLimit : - Bandwidth : - IncludeAnyGroup : - ExcludeAnyGroup : - IncludeAllGroup : - Bypass Unbound Bandwidth Info(Kbit/sec) CT0 Unbound Bandwidth : - CT1 Unbound Bandwidth: - CT2 Unbound Bandwidth : - CT3 Unbound Bandwidth: - CT4 Unbound Bandwidth : - CT5 Unbound Bandwidth: - CT6 Unbound Bandwidth : - CT7 Unbound Bandwidth: - -------------------------------- BFD Information -------------------------------- NextSessionTunnelIndex : - PrevSessionTunnelIndex: - NextLspId : - PrevLspId : -
# 在LSRA上执行display mpls te cspf tedb all命令查看TEDB中的链路信息。
[LSRA] display mpls te cspf tedb all Maximum Nodes Supported: 1024 Current Total Node Number: 3 Maximum Links Supported: 2048 Current Total Link Number: 4 Maximum SRLGs supported: 5120 Current Total SRLG Number: 0 ID Router-ID IGP Process-ID Area Link-Count 1 2.2.2.9 ISIS 1 Level-2 2 2 1.1.1.9 ISIS 1 Level-2 1 3 3.3.3.9 ISIS 1 Level-2 1
配置文件
LSRA的配置文件
# sysname LSRA # mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf # isis 1 is-level level-2 cost-style wide network-entity 00.0005.0000.0000.0001.00 traffic-eng level-2 # interface GigabitEthernet1/0/0 ip address 172.1.1.1 255.255.255.0 isis enable 1 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 isis enable 1 # interface Tunnel0/0/1 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 100 mpls te commit # return
LSRB的配置文件
# sysname LSRB # mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te # isis 1 is-level level-2 cost-style wide network-entity 00.0005.0000.0000.0002.00 traffic-eng level-2 # interface GigabitEthernet1/0/0 ip address 172.1.1.2 255.255.255.0 isis enable 1 mpls mpls te mpls rsvp-te # interface GigabitEthernet2/0/0 ip address 172.2.1.1 255.255.255.0 isis enable 1 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 isis enable 1 # return
LSRC的配置文件
# sysname LSRC # mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te # isis 1 is-level level-2 cost-style wide network-entity 00.0005.0000.0000.0003.00 traffic-eng level-2 # interface GigabitEthernet1/0/0 ip address 172.2.1.2 255.255.255.0 isis enable 1 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 isis enable 1 # return