配置CR-LSP热备份隧道LSP Trace测试示例
组网需求
SwitchA、SwitchB、SwitchC、SwitchD都运行OSPF协议,并学习到彼此Loopback接口的32位主机路由。
SwitchA、SwitchB、SwitchC、SwitchD上都启用MPLS、MPLS TE和MPLS RSVP-TE。
SwitchA、SwitchB、SwitchC、SwitchD之间的接口都启用MPLS、MPLS TE和MPLS RSVP-TE,建立从SwitchA到SwitchC的TE隧道。
- 主CR-LSP的路径为SwitchA-->SwitchB-->SwitchC
- 备份CR-LSP的路径为SwitchA-->SwitchD-->SwitchC
但是当备份CR-LSP出现故障不能承载主链路切换过来的流量时,需要对这条备份链路进行检测。应用NQA LSP Trace可以实现对CR-LSP热备份(hot-standby)隧道进行连通性的检测。NQA集成的备份链路的检测功能,可以对备份链路的连通性及性能状况进行实时的检测,便于链路故障的检测和定位。
请确保该场景下互联接口的STP处于未使能状态。因为在使能STP的环形网络中,如果用交换机的VLANIF接口构建三层网络,会导致某个端口被阻塞,从而导致三层业务不能正常运行。
操作步骤
- 配置SwitchA、SwitchB、SwitchC和SwitchD之间路由可达
具体配置内容请参见本例的配置文件。
- 配置SwitchA、SwitchB、SwitchC和SwitchD的MPLS RSVP-TE
具体配置内容请参见本例的配置文件。
- 配置SwitchA上建立到SwitchC的TE隧道
具体配置内容请参见本例的配置文件。
- 配置SwitchA的NQA测试例
# 使能NQA客户端,配置TE隧道的LSP Trace测试例。
<Quidway> system-view [Quidway] sysname SwitchA
[SwitchA] nqa test-instance admin lsptrace
[SwitchA-nqa-admin-lsptrace] test-type lsptrace
[SwitchA-nqa-admin-lsptrace] lsp-type te
[SwitchA-nqa-admin-lsptrace] lsp-tetunnel tunnel 1 hot-standby
- 启动测试操作
[SwitchA-nqa-admin-lsptrace] start now
- 验证测试结果
[SwitchA-nqa-admin-lsptrace] display nqa results test-instance admin lsptrace
NQA entry(admin, lsptrace) :testflag is inactive ,testtype is lsptrace 1 . Test 1 result The test is finished Completion:success Attempts number:1 Disconnect operation number:0 Operation timeout number:0 System busy operation number:0 Connection fail number:0 Operation sequence errors number:0 RTT Status errors number:0 Drop operation number:0 Last good path Time:2009-04-24 11:22:21.2 1 . Hop 1 Send operation times: 3 Receive response times: 3 Min/Max/Average Completion Time: 50/60/56 Sum/Square-Sum Completion Time: 170/9700 RTD OverThresholds number: 0 Last Good Probe Time: 2009-04-24 11:22:20.8 Destination ip address:10.1.3.2 Lost packet ratio: 0 % 2 . Hop 2 Send operation times: 3 Receive response times: 3 Min/Max/Average Completion Time: 80/110/93 Sum/Square-Sum Completion Time: 280/26600 RTD OverThresholds number: 0 Last Good Probe Time: 2009-04-24 11:22:21.2 Destination ip address:10.3.3.3 Lost packet ratio: 0 %
配置文件
SwitchA的配置文件
# sysname SwitchA # vlan batch 10 30 # mpls lsr-id 10.5.5.5 mpls mpls te mpls rsvp-te mpls te cspf # explicit-path backup next hop 10.1.3.2 next hop 10.1.4.2 next hop 10.3.3.3 # explicit-path main next hop 10.1.1.2 next hop 10.1.2.2 next hop 10.3.3.3 # interface Vlanif10 ip address 10.5.5.5 255.255.255.0 mpls mpls te mpls rsvp-te # interface Vlanif30 ip address 10.1.3.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface LoopBack1 ip address 10.5.5.5 255.255.255.255 # interface Tunnel1 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 10.3.3.3 mpls te tunnel-id 100 mpls te record-route mpls te path explicit-path main mpls te path explicit-path backup secondary mpls te backup hot-standby mode revertive wtr 15 mpls te backup ordinary best-effort mpls te commit # ospf 1 opaque-capability enable area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.5.5.5 0.0.0.0 network 10.1.3.0 0.0.0.255 mpls-te enable # nqa test-instance admin lsptrace test-type lsptrace lsp-type te lsp-tetunnel Tunnel1 hot-standby # return
SwitchB的配置文件
# sysname SwitchB # vlan batch 10 20 # mpls lsr-id 10.2.2.2 mpls mpls te mpls rsvp-te mpls te cspf # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface LoopBack1 ip address 10.2.2.2 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.2.2.2 0.0.0.0 network 10.1.2.0 0.0.0.255 mpls-te enable # return
SwitchC的配置文件
# sysname SwitchC # vlan batch 20 40 # mpls lsr-id 10.3.3.3 mpls mpls te mpls rsvp-te mpls te cspf # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface Vlanif40 ip address 10.1.4.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface LoopBack1 ip address 10.3.3.3 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 10.1.2.0 0.0.0.255 network 10.1.4.0 0.0.0.255 network 10.3.3.3 0.0.0.0 mpls-te enable # return
SwitchD的配置文件
# sysname SwitchD # vlan batch 30 40 # mpls lsr-id 10.4.4.4 mpls mpls te mpls rsvp-te mpls te cspf # interface Vlanif30 ip address 10.1.3.2 255.255.255.0 mpls mpls te mpls rsvp-te # interface Vlanif40 ip address 10.1.4.1 255.255.255.0 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface LoopBack1 ip address 10.4.4.4 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 10.4.4.4 0.0.0.0 network 10.1.3.0 0.0.0.255 network 10.1.4.0 0.0.0.255 mpls-te enable # return