配置MPLS TE Auto FRR示例
组网需求
如图3-17所示,要求创建一条沿显式路径LSRA→LSRB→LSRC的主隧道。在入节点LSRA和中间节点LSRB上分别创建一条节点保护和一条链路保护的旁路隧道,并且都提供带宽保护。其中从LSRA的入接口直连到LSRC的出接口,越过中间节点LSRB的旁路隧道为节点保护隧道。从LSRB出接口经过LSRD到LSRC入接口的旁路隧道越过LSRB出接口到LSRC入接口的直连链路,称此旁路隧道为链路保护隧道。
操作步骤
- 配置各接口的IP地址
按照图3-17配置各接口的IP地址和掩码,包括各Loopback接口,具体配置过程略。
- 配置OSPF协议发布各网段路由及LSR ID的主机路由
在所有节点上配置OSPF协议,发布LSR ID的主机路由,具体配置过程略。
配置完成后,在各节点上执行display ip routing-table命令,应可以看到相互之间都学到了到对方LSR ID的主机路由。
- 配置MPLS基本能力,使能MPLS TE、RSVP-TE和CSPF
# 配置LSRA。
[*LSRA] mpls lsr-id 1.1.1.1
[*LSRA] mpls
[*LSRA-mpls] mpls te
[*LSRA-mpls] mpls rsvp-te
[*LSRA-mpls] mpls te cspf
[*LSRA-mpls] quit
[*LSRA] interface gigabitethernet 0/2/0
[*LSRA-GigabitEthernet0/2/0] mpls
[*LSRA-GigabitEthernet0/2/0] mpls te
[*LSRA-GigabitEthernet0/2/0] mpls rsvp-te
[*LSRA-GigabitEthernet0/2/0] quit
[*LSRA] interface gigabitethernet 0/1/0
[*LSRA-GigabitEthernet0/1/0] mpls
[*LSRA-GigabitEthernet0/1/0] mpls te
[*LSRA-GigabitEthernet0/1/0] mpls rsvp-te
[*LSRA-GigabitEthernet0/1/0] commit
[~LSRA-GigabitEthernet0/1/0] quit
LSRB、LSRC、LSRD的配置与LSRA的配置相似,此处不再赘述。
- 配置OSPF TE
# 配置LSRA。
[~LSRA] ospf
[~LSRA-ospf-1] opaque-capability enable
[*LSRA-ospf-1] area 0
[*LSRA-ospf-1-area-0.0.0.0] mpls-te enable
[*LSRA-ospf-1-area-0.0.0.0] commit
[~LSRA-ospf-1-area-0.0.0.0] quit
[~LSRA-ospf-1] quit
LSRB、LSRC、LSRD的配置与LSRA的配置相似,此处不再赘述。
- 配置显式路径,准备给主隧道使用
[~LSRA] explicit-path master
[*LSRA-explicit-path-master] next hop 2.1.1.1
[*LSRA-explicit-path-master] next hop 3.1.1.1
[*LSRA-explicit-path-master] commit
- 使能TE Auto FRR
# 配置LSRA。
[~LSRA] mpls
[~LSRA-mpls] mpls te auto-frr
[*LSRA-mpls] commit
# 配置LSRB。
[~LSRB] mpls
[~LSRB-mpls] mpls te auto-frr
[*LSRB-mpls] commit
- 配置主隧道
[~LSRA] interface tunnel2
[*LSRA-Tunnel2] ip address unnumbered interface loopBack1
[*LSRA-Tunnel2] tunnel-protocol mpls te
[*LSRA-Tunnel2] destination 3.3.3.3
[*LSRA-Tunnel2] mpls te tunnel-id 200
[*LSRA-Tunnel2] mpls te record-route label
[*LSRA-Tunnel2] mpls te path explicit-path master
[*LSRA-Tunnel2] mpls te bandwidth ct0 400
[*LSRA-Tunnel2] mpls te priority 4 3
[*LSRA-Tunnel2] mpls te fast-reroute bandwidth
[*LSRA-Tunnel2] mpls te bypass-attributes bandwidth 200 priority 5 4
[*LSRA-Tunnel2] commit
[~LSRA-Tunnel2] quit
- 检查配置结果
在入节点LSRA上使用命令display mpls te tunnel name Tunnel2 verbose查看LSP信息时,可以看到主隧道信息及与之绑定的旁路隧道。
[~LSRA] display mpls te tunnel name Tunnel2 verbose
No : 1 Tunnel-Name : Tunnel2 Tunnel Interface Name : Tunnel2 TunnelIndex : - Session ID : 200 LSP ID : 164 LSR Role : Ingress Ingress LSR ID : 1.1.1.1 Egress LSR ID : 3.3.3.3 In-Interface : - Out-Interface : GE0/2/0 Sign-Protocol : RSVP TE Resv Style : SE IncludeAnyAff : 0x0 ExcludeAnyAff : 0x0 IncludeAllAff : 0x0 ER-Hop Table Index : 1 AR-Hop Table Index: 674 C-Hop Table Index : 579 PrevTunnelIndexInSession: - NextTunnelIndexInSession: - PSB Handle : - Created Time : 2015-01-28 11:10:32 RSVP LSP Type : - -------------------------------- DS-TE Information -------------------------------- Bandwidth Reserved Flag : Reserved CT0 Bandwidth(Kbit/sec) : 400 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 : 4 Hold-Priority : 3 -------------------------------- FRR Information -------------------------------- Primary LSP Info Bypass In Use : Not Used Bypass Tunnel Id : 32866 BypassTunnel : Tunnel Index[AutoTunnel32866], InnerLabel[3] Bypass LSP ID : 165 FrrNextHop : 10.1.1.1 ReferAutoBypassHandle : - FrrPrevTunnelTableIndex : - FrrNextTunnelTableIndex: - Bypass Attribute Setup Priority : 5 Hold Priority : 4 HopLimit : 32 Bandwidth : 200 IncludeAnyGroup : 0 ExcludeAnyGroup : 0 IncludeAllGroup : 0 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 : -
可以看到主隧道和一条自动旁路隧道AutoTunnel32866绑定。
用命令display mpls te tunnel-interface auto-bypass-tunnel可以看到自动旁路隧道的详细信息。它的带宽和创建、保持优先级和主隧道的bypass-attribute配置项一致。
[~LSRA] display mpls te tunnel-interface auto-bypass-tunnel AutoTunnel32866
Tunnel Name : AutoTunnel32866 Signalled Tunnel Name: - Tunnel State Desc : CR-LSP is Up Tunnel Attributes : Active LSP : Primary LSP Traffic Switch : - Session ID : 32866 Ingress LSR ID : 1.1.1.1 Egress LSR ID: 3.3.3.3 Admin State : UP Oper State : UP Signaling Protocol : RSVP FTid : 130 Tie-Breaking Policy : None Metric Type : None Bfd Cap : None Reopt : Disabled Reopt Freq : - Auto BW : Disabled Threshold : - Current Collected BW: - Auto BW Freq : - Min BW : - Max BW : - Offload : Disabled Offload Freq : - Low Value : - High Value : - Readjust Value : - Offload Explicit Path Name: - Tunnel Group : Primary Interfaces Protected: GigabitEthernet0/2/0 Excluded IP Address : 2.1.1.1 2.1.1.2 2.2.2.2 Referred LSP Count : 1 Primary Tunnel : - Pri Tunn Sum : - Backup Tunnel : - Group Status : Down Oam Status : None IPTN InLabel : - BackUp LSP Type : None BestEffort : Disabled Secondary HopLimit : - BestEffort HopLimit : - Secondary Explicit Path Name: - Secondary Affinity Prop/Mask: 0x0/0x0 BestEffort Affinity Prop/Mask: 0x0/0x0 IsConfigLspConstraint: - Hot-Standby Revertive Mode: Revertive Hot-Standby Overlap-path: Disabled Hot-Standby Switch State: CLEAR Bit Error Detection: Disabled Bit Error Detection Switch Threshold: - Bit Error Detection Resume Threshold: - Ip-Prefix Name : - P2p-Template Name : - PCE Delegate : No LSP Control Status : Local control Entropy Label :None Auto BW Remain Time : 200 s Reopt Remain Time : 100 s Primary LSP ID : 1.1.1.1:165 LSP State : UP LSP Type : Primary Setup Priority : 5 Hold Priority: 4 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 200 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 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 200 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 Explicit Path Name : - Hop Limit: - Record Route : Enabled Record Label : Enabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Disabled
可以看到自动旁路隧道保护主隧道的出接口GigabitEthernet0/2/0,排除了主隧道路径上的三个地址提供节点保护,并且带宽是200kbps,建立优先级和保持优先级分别是5和4。
在LSRA上用命令display mpls te tunnel path可以看到主隧道和自动旁路隧道的路径信息,在主隧道的出接口这一跳上显示主隧道受节点保护和带宽保护。
[~LSRA] display mpls te tunnel path
Tunnel Interface Name : Tunnel2 Lsp ID : 1.1.1.1 :200 :164 Hop Information Hop 0 2.1.1.1 Local-Protection available | bandwidth | node Hop 1 2.1.1.2 Label 32846 Hop 2 2.2.2.2 Label 32846 Hop 3 3.1.1.1 Local-Protection available | bandwidth Hop 4 3.1.1.2 Label 3 Hop 5 3.3.3.3 Label 3 Tunnel Interface Name : AutoTunnel32866 Lsp ID : 1.1.1.1 :32866 :165 Hop Information Hop 0 10.1.1.2 Hop 1 10.1.1.1 Label 3 Hop 2 3.3.3.3 Label 3
在中间节点LSRB上使用命令display mpls te tunnel name Tunnel2 verbose查看LSP信息时,可以看到主隧道信息及与之绑定的旁路隧道。
[~LSRB] display mpls te tunnel name Tunnel2 verbose
No : 1 Tunnel-Name : Tunnel2 Tunnel Interface Name : - TunnelIndex : - Session ID : 200 LSP ID : 164 LSR Role : Transit Ingress LSR ID : 1.1.1.1 Egress LSR ID : 3.3.3.3 In-Interface : GE0/3/0 Out-Interface : GE0/2/0 Sign-Protocol : RSVP TE Resv Style : SE IncludeAnyAff : 0x0 ExcludeAnyAff : 0x0 IncludeAllAff : 0x0 ER-Hop Table Index : - AR-Hop Table Index: - C-Hop Table Index : - PrevTunnelIndexInSession: - NextTunnelIndexInSession: - PSB Handle : - Created Time : 2015-01-28 11:10:32 RSVP LSP Type : - -------------------------------- DS-TE Information -------------------------------- Bandwidth Reserved Flag : Reserved CT0 Bandwidth(Kbit/sec) : 400 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 : 4 Hold-Priority : 3 -------------------------------- FRR Information -------------------------------- Primary LSP Info Bypass In Use : Not Used Bypass Tunnel Id : 32865 BypassTunnel : Tunnel Index[AutoTunnel32865], InnerLabel[3] Bypass LSP ID : 6 FrrNextHop : 4.1.1.2 ReferAutoBypassHandle : - FrrPrevTunnelTableIndex : - FrrNextTunnelTableIndex: - Bypass Attribute Setup Priority : 5 Hold Priority : 4 HopLimit : 32 Bandwidth : 200 IncludeAnyGroup : 0 ExcludeAnyGroup : 0 IncludeAllGroup : 0 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 : -
可以看到主隧道和一条自动旁路隧道AutoTunnel32865绑定。
用命令display mpls te tunnel-interface auto-bypass-tunnel可以看到自动旁路隧道的详细信息。它的带宽和创建、保持优先级和主隧道的bypass-attribute配置项一致。
[~LSRB] display mpls te tunnel-interface auto-bypass-tunnel AutoTunnel32865
Tunnel Name : AutoTunnel32865 Signalled Tunnel Name: - Tunnel State Desc : CR-LSP is Up Tunnel Attributes : Active LSP : Primary LSP Traffic Switch : - Session ID : 32865 Ingress LSR ID : 2.2.2.2 Egress LSR ID: 3.3.3.3 Admin State : UP Oper State : UP Signaling Protocol : RSVP FTid : 97 Tie-Breaking Policy : None Metric Type : None Bfd Cap : None Reopt : Disabled Reopt Freq : - Auto BW : Disabled Threshold : - Current Collected BW: - Auto BW Freq : - Min BW : - Max BW : - Offload : Disabled Offload Freq : - Low Value : - High Value : - Readjust Value : - Offload Explicit Path Name: - Tunnel Group : Primary Interfaces Protected: GigabitEthernet0/2/0 Excluded IP Address : 3.1.1.1 3.1.1.2 Referred LSP Count : 1 Primary Tunnel : - Pri Tunn Sum : - Backup Tunnel : - Group Status : Down Oam Status : None IPTN InLabel : - BackUp LSP Type : None BestEffort : Disabled Secondary HopLimit : - BestEffort HopLimit : - Secondary Explicit Path Name: - Secondary Affinity Prop/Mask: 0x0/0x0 BestEffort Affinity Prop/Mask: 0x0/0x0 IsConfigLspConstraint: - Hot-Standby Revertive Mode: Revertive Hot-Standby Overlap-path: Disabled Hot-Standby Switch State: CLEAR Bit Error Detection: Disabled Bit Error Detection Switch Threshold: - Bit Error Detection Resume Threshold: - Ip-Prefix Name : - P2p-Template Name : - PCE Delegate : No LSP Control Status : Local control Entropy Label :None Auto BW Remain Time : 200 s Reopt Remain Time : 100 s Primary LSP ID : 2.2.2.2:6 LSP State : UP LSP Type : Primary Setup Priority : 5 Hold Priority: 4 IncludeAll : 0x0 IncludeAny : 0x0 ExcludeAny : 0x0 Affinity Prop/Mask : 0x0/0x0 Resv Style : SE Configured Bandwidth Information: CT0 Bandwidth(Kbit/sec): 200 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 Actual Bandwidth Information: CT0 Bandwidth(Kbit/sec): 200 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 Explicit Path Name : - Hop Limit: - Record Route : Enabled Record Label : Enabled Route Pinning : Disabled FRR Flag : Disabled IdleTime Remain : - BFD Status : - Soft Preemption : Disabled
可以看到自动旁路隧道保护主隧道的出接口GigabitEthernet0/2/0,提供链路保护,并且带宽是200kbps,建立优先级和保持优先级分别是5和4。
在LSRB上使用命令display mpls te tunnel path可以看到主隧道和自动旁路隧道的路径信息。
[~LSRB] display mpls te tunnel path
Tunnel Interface Name : Tunnel2 Lsp ID : 1.1.1.1 :200 :164 Hop Information Hop 0 1.1.1.1 Hop 1 2.1.1.1 Local-Protection available | bandwidth | node Hop 2 2.1.1.2 Label 32846 Hop 3 2.2.2.2 Label 32846 Hop 4 3.1.1.1 Local-Protection available | bandwidth Hop 5 3.1.1.2 Label 3 Hop 6 3.3.3.3 Label 3 Tunnel Interface Name : AutoTunnel32865 Lsp ID : 2.2.2.2 :32865 :6 Hop Information Hop 0 3.2.1.1 Hop 1 3.2.1.2 Label 32839 Hop 2 4.4.4.4 Label 32839 Hop 3 4.1.1.1 Hop 4 4.1.1.2 Label 3 Hop 5 3.3.3.3 Label 3
配置文件
LSRA的配置文件
#
sysname LSR A
#
mpls lsr-id 1.1.1.1
#
mpls
mpls te
mpls te auto-frr
mpls te cspf
mpls rsvp-te
#
explicit-path master
next hop 2.1.1.1
next hop 3.1.1.1
#
ospf 1
opaque-capability enable
area 0.0.0.0
mpls-te enable
network 10.1.1.0 0.0.0.255
network 2.1.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 2.1.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel2
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 200
mpls te record-route label
mpls te priority 4 3
mpls te bandwidth ct0 400
mpls te path explicit-path master
mpls te fast-reroute bandwidth
mpls te bypass-attributes bandwidth 200 priority 5 4
#
return
LSRB的配置文件
#
sysname LSRB
#
mpls lsr-id 2.2.2.2
#
mpls
mpls te
mpls te auto-frr
mpls te cspf
mpls rsvp-te
#
ospf 1
opaque-capability enable
area 0.0.0.0
mpls-te enable
network 3.1.1.0 0.0.0.255
network 3.2.1.0 0.0.0.255
network 2.1.1.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 3.2.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 3.1.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 2.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
return
LSRC的配置文件
#
sysname LSRC
#
mpls lsr-id 3.3.3.3
#
mpls
mpls te
mpls rsvp-te
#
ospf 1
opaque-capability enable
area 0.0.0.0
mpls-te enable
network 10.1.1.0 0.0.0.255
network 3.1.1.0 0.0.0.255
network 4.1.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 4.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 3.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
return
LSRD的配置文件
#
sysname LSRD
#
mpls lsr-id 4.4.4.4
#
mpls
mpls te
mpls rsvp-te
#
ospf 1
opaque-capability enable
area 0.0.0.0
mpls-te enable
network 3.2.1.0 0.0.0.255
network 4.1.1.0 0.0.0.255
network 4.4.4.4 0.0.0.0
#
interface GigabitEthernet0/2/0
undo shutdown
mpls
ip address 4.1.1.1 255.255.255.0
mpls te
mpls rsvp-te
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 3.2.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
Return