• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C MSR系列路由器典型配置举例(V5)-6W100

目录

48-MSR系列路由器Standby track功能的配置举例

本章节下载 48-MSR系列路由器Standby track功能的配置举例  (146.21 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/MSR/MSR_50/Configure/Typical_Configuration_Example/H3C_MSR_(V5)-6W100/201401/812759_30005_0.htm

48-MSR系列路由器Standby track功能的配置举例

MSR系列路由器Standby track功能配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

H3C_彩色.emf

 



1  简介

本文档介绍使用TRACK和NQA联动对链路状态检测并做出相应处理的典型配置。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解接口备份、TRACK和NQA特性。

3  配置举例

3.1  组网需求

图1,Server A所在网络部署了四台设备,路由器之间起OSPF协议.在正常情况下,由ServerB和ServerA通信通过路由器AB之间的链路;当路由器A和B之间链路接口出现故障时,数据通过隧道Tunnel1转发;当A和B之间链路接口故障恢复后,数据通过路由器AB之间链路转发。

图1 Track配置组网图

设备

接口

IP地址

设备

接口

IP地址

Router A

Eth0/0

12.12.12.1/24

Router C

Eth0/0

23.23.23.2/24

 

Eth0/1

14.14.14.2/24

 

Eth0/1

35.35.35.1/24

 

 

 

 

Tun1

192.168.1.1/24

Router B

Eth0/0

12.12.12.2/24

Router D

Eth0/0

45.45.45.1/24

 

Eth0/1

23.23.23.1/24

 

Eth0/1

14.14.14.1/24

Router E

Eth0/0

45.45.45.2/24

 

Tun1

192.168.1.2/24

 

Eth0/1

35.35.35.2/24

 

 

 

 

3.2  配置思路

·     为了让全网互通,各路由器上启用OSPF协议;

·     在Router C上采用Standby track功能,配置NQA监控12.12.12.1地址,如果发生异常数据切换到Router C到Router D链路。

3.3  使用版本

本举例是在Release 2317版本上进行配置和验证的。

3.4  配置注意事项

·     在RouterC与RouterD之间配置静态路由将流量引到隧道上;

·     NQA与Track的联动关联要匹配。

3.5  配置步骤

3.5.1  Router A的配置

<RouterA> system-view

[RouterA] interface Ethernet 0/0

[RouterA-Ethernet0/0] ip address 12.12.12.1 255.255.255.0

[RouterA-Ethernet0/0] quit

[RouterA] interface Ethernet 0/1

[RouterA-Ethernet0/1] ip address 14.14.14.1 255.255.255.0

[RouterA-Ethernet0/1] quit

# 配置OSPF

[RouterA] ospf 1

[RouterA-ospf-1] area 1

[RouterA-ospf-1-area-0.0.0.1] network 14.14.14.1 0.0.0.255

[RouterA-ospf-1-area-0.0.0.1] network 12.12.12.1 0.0.0.255

[RouterA-ospf-1-area-0.0.0.1] quit

3.5.2  Router B的配置

<RouterB> system-view

[RouterB] interface Ethernet 0/0

[RouterB-Ethernet0/0] ip address 12.12.12.2 24

[RouterB-Ethernet0/0] quit

[RouterB] interface Ethernet 0/1

[RouterB-Ethernet0/1] ip address 23.23.23.1 24

[RouterB-Ethernet0/1] quit

# 配置OSPF

[RouterB] ospf 1

[RouterB-ospf-1] area 0

[RouterB-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

[RouterB-ospf-1-area-0.0.0.0] quit

[RouterB-ospf-1] area 1

[RouterB-ospf-1-area-0.0.0.1] network 12.12.12.0 0.0.0.255

[RouterB-ospf-1-area-0.0.0.1] quit

3.5.3  Router C的配置

<RouterC> system-view

[RouterC] interface Ethernet 0/0

[RouterC-Ethernet0/0] ip address 23.23.23.2 24

[RouterC-Ethernet0/0] quit

[RouterC] interface Ethernet 0/1

[RouterC-Ethernet0/1] ip address 35.35.35.1 24

[RouterC-Ethernet0/1] quit

[RouterC] interface Tunnel 1

[RouterC-Tunnel1] ip address 192.168.1.1 255.255.255.0

[RouterC-Tunnel1] source 35.35.35.1

[RouterC-Tunnel1] destination 45.45.45.1

[RouterC-Tunnel1] standby track 1

# 配置OSPF

[RouterC-Tunnel1] quit

[RouterC] ospf 1

[RouterC-ospf-1] area 0

[RouterC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[RouterC-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

[RouterC-ospf-1-area-0.0.0.0] quit

# 创建管理员名为admin、操作标签为test的NQA测试组。

[RouterC] nqa entry admin oper

# 配置测试类型为ICMP-echo

[RouterC-nqa-admin1-oper1] type icmp-echo

[RouterC-nqa-admin1-oper1-icmp-echo] destination ip 12.12.12.1

[RouterC-nqa-admin1-oper1-icmp-echo]frequency 1000

# 配置联动项1(连续失败3次触发联动)

[RouterC-nqa-admin1-oper1-icmp-echo] reaction 1 checked-element probe-fail thres

hold-type consecutive 3 action-type trigger-only

# 配置Track项1,关联NQA测试组

[RouterC] track 1 nqa entry admin oper reaction 1

[RouterC] nqa schedule admin oper start-time now lifetime forever

# 配置由Router C到Router D的静态路由

[RouterC] ip route-static 45.45.45.0 255.255.255.0 35.35.35.2

3.5.4  Router D的配置

<RouterD> system-view

[RouterD] interface Tunnel 1

[RouterD-Tunnel1] ip address 192.168.1.2 24

[RouterD-Tunnel1] source 45.45.45.1

[RouterD-Tunnel1] destination 35.35.35.1

[RouterD] interface Ethernet 0/0

[RouterD-Ethernet0/0] ip address 45.45.45.1 24

[RouterD-Ethernet0/0] quit

[RouterD] interface Ethernet 0/1

[RouterD-Ethernet0/1] ip address 14.14.14.2 24

[RouterD-Ethernet0/1] quit

# 配置OFPF

[RouterD] ospf 1

[RouterD-ospf-1] area 0

[RouterD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[RouterD-ospf-1-area-0.0.0.0 ]quit

[RouterD-ospf-1] area 1

[RouterD-ospf-1-area-0.0.0.1] network 14.14.14.0 0.0.0.255

# 配置由Router D到Router C的静态路由

[RouterD] ip route-static 35.35.35.0 255.255.255.0 45.45.45.2

3.6  验证配置

(1)     Router A与Router B之间链路正常工作,网络正常

[Router C] ping 14.14.14.1

  PING 14.14.14.1: 56  data bytes, press CTRL_C to break

    Reply from 14.14.14.1: bytes=56 Sequence=0 ttl=254 time=2 ms

    Reply from 14.14.14.1: bytes=56 Sequence=1 ttl=254 time=4 ms

    Reply from 14.14.14.1: bytes=56 Sequence=2 ttl=254 time=1 ms

    Reply from 14.14.14.1: bytes=56 Sequence=3 ttl=254 time=2 ms

Reply from 14.14.14.1: bytes=56 Sequence=4 ttl=254 time=1 ms

 

  --- 14.14.14.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

round-trip min/avg/max = 1/2/4 ms

# 显示Router C上Track项的信息。

[RouterC] display track all                                                     

Track ID: 1                                                                    

  Status: Positive                                                             

  Duration: 0 days 0 hours 1 minutes 40 seconds                                

  Notification delay: Positive 0, Negative 0 (in seconds)                      

  Reference object:                                                            

    NQA entry: admin oper                                                      

Reaction: 1                                                                

#显示ICMP-echo测试中最后一次测试的结果。

[RouterC] display nqa result                                                        

  NQA entry (admin admin, tag oper) test results:                              

    Destination IP address: 12.12.12.1                                         

      Send operation times: 1              Receive response times: 1           

      Min/Max/Average round trip time: 1/1/1                                   

      Square-Sum of round trip time: 1                                         

      Last succeeded probe time: 2013-10-14 20:46:37.4                         

    Extended results:                                                          

      Packet loss in test: 0%                                                  

      Failures due to timeout: 0                                                

      Failures due to disconnect: 0                                            

      Failures due to no connection: 0                                         

      Failures due to sequence error: 0                                        

      Failures due to internal error: 0                                        

      Failures due to other errors: 0                                          

      Packet(s) arrived late: 0                                                

(2)     Router A与Router B之间链路故障时

# 链路故障后,测试网络

[Router C] ping 14.14.14.1

  PING 14.14.14.1: 56  data bytes, press CTRL_C to break

    Request time out

 

  --- 14.14.14.1 ping statistics ---

    1 packet(s) transmitted

    0 packet(s) received

100.00% packet loss

# 几秒后隧道状态由down变为up

%Jun  8 10:00:00:717 2013 Router C IFNET/3/LINK_UPDOWN: Tunnel1 link status is U

P.

%Jun  8 10:00:00:718 2013 Router C IFNET/5/LINEPROTO_UPDOWN: Line protocol on th

e interface Tunnel1 is UP.

 

%Jun  8 10:00:05:457 2013 Router C OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 192.168.

1.2(Tunnel1) from Loading to Full.

# 网络恢复正常

[Router C] ping 14.14.14.1

  PING 14.14.14.1: 56  data bytes, press CTRL_C to break

    Reply from 14.14.14.1: bytes=56 Sequence=0 ttl=254 time=2 ms

    Reply from 14.14.14.1: bytes=56 Sequence=1 ttl=254 time=4 ms

    Reply from 14.14.14.1: bytes=56 Sequence=2 ttl=254 time=1 ms

    Reply from 14.14.14.1: bytes=56 Sequence=3 ttl=254 time=2 ms

    Reply from 14.14.14.1: bytes=56 Sequence=4 ttl=254 time=1 ms

 

  --- 14.14.14.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

round-trip min/avg/max = 1/2/4 ms

# 显示Router C上Track项的信息。

[RouterC] display track all                                                     

Track ID: 1                                                                    

  Status: Negative                                                             

  Duration: 0 days 0 hours 0 minutes 34 seconds                                

  Notification delay: Positive 0, Negative 0 (in seconds)                      

  Reference object:                                                            

    NQA entry: admin oper                                                       

Reaction: 1                                                                

#显示ICMP-echo测试中最后一次测试的结果。

[RouterC] display nqa result                                                    

  NQA entry (admin admin, tag oper) test results:                              

    Destination IP address: 12.12.12.1                                         

      Send operation times: 1              Receive response times: 0           

      Min/Max/Average round trip time: 0/0/0                                   

      Square-Sum of round trip time: 0                                         

      Last succeeded probe time: 0-00-00 00:00:00.0                            

    Extended results:                                                           

      Packet loss in test: 100%                                                

      Failures due to timeout: 0                                               

      Failures due to disconnect: 0                                            

      Failures due to no connection: 0                                         

      Failures due to sequence error: 0                                        

      Failures due to internal error: 0                                        

      Failures due to other errors: 1                                          

      Packet(s) arrived late: 0                                                

3.7  配置文件

·     Router A:

#

interface Ethernet0/0

 port link-mode route

 ip address 12.12.12.1 255.255.255.0

#

interface Ethernet0/1

 port link-mode route

 ip address 14.14.14.2 255.255.255.0

#

interface NULL0

#

ospf 1

 area 0.0.0.1

  network 14.14.14.0 0.0.0.255

  network 12.12.12.0 0.0.0.255

#

·     Router B

interface Ethernet0/0

 port link-mode route

 ip address 12.12.12.2 255.255.255.0

#

interface Ethernet0/1

 port link-mode route

 ip address 23.23.23.1 255.255.255.0

ospf 1

 area 0.0.0.0

  network 23.23.23.0 0.0.0.255

 area 0.0.0.1

  network 12.12.12.0 0.0.0.255

#

·     Router C :

interface Ethernet0/0

 port link-mode route

 ip address 23.23.23.2 255.255.255.0

#

interface Ethernet0/1

 port link-mode route

 ip address 35.35.35.1 255.255.255.0

#

interface NULL0

#

interface Tunnel1

 ip address 192.168.1.1 255.255.255.0

 source 35.35.35.1

 destination 45.45.45.1

 standby track

#

ospf 1

 area 0.0.0.0

  network 192.168.1.0 0.0.0.255

  network 23.23.23.0 0.0.0.255

#

nqa entry admin oper

 type icmp-echo

  destination ip 12.12.12.1

  frequency 1000

  reaction 1 checked-element probe-fail threshold-type consecutive 3 action-type

 trigger-only

#                                                                              

 ip route-static 45.45.45.0 255.255.255.0 35.35.35.2  

#                              

 track 1 nqa entry admin oper reaction 1

#

 nqa schedule admin oper start-time now lifetime forever

#

·     Router D

interface Ethernet0/0

 port link-mode route

 ip address 45.45.45.1 255.255.255.0

#

interface Ethernet0/1

 port link-mode route

 ip address 14.14.14.1 255.255.255.0

#

interface Tunnel1

 ip address 192.168.1.2 255.255.255.0

 source 45.45.45.1

 destination 35.35.35.1

#

ospf 1

 area 0.0.0.0

  network 192.168.1.0 0.0.0.255

 area 0.0.0.1

  network 14.14.14.0 0.0.0.255

#                                                                              

 ip route-static 35.35.35.0 255.255.255.0 45.45.45.2                           

#                                                                              

4  相关资料

·     H3C MSR 系列路由器 命令参考(V5)-R2311

·     H3C MSR 系列路由器 配置指导(V5)-R2311

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们