资料中心

H3C S10500系列交换机Track与布尔类型的监测对象列表结合实现不同策略路由PBR联动案例

2020-09-01发表
  • 0收藏
河子 八段

描述

    

组网及说明


S10500系列交换机上,旁挂第三方防火墙,进行三层业务转发。

S10500系列交换机G1/0/5和G1/0/6接口上分别部署不同PBR策略,使得“由南向北”、“由北向南”的流量均通过第三方防火墙处理后转发。如图1所示:


图1


为避免出现如图2所示的情况,及:
1、第三方防火墙G0/1接口故障后,交换机G1/0/5接口上的PBR策略(绿色)无法感知;

2、第三方防火墙G0/2接口故障后,交换机G1/0/6接口上的PBR策略(蓝色)无法感知;


图2

因此需要在交换机上部署Track与布尔类型的监测对象列表,实现当任意一个监测对象失效后,两个PBR(绿色和蓝色)同时失效,流量直接通过S10500系列交换机直接转发。



配置步骤


列举S10500系列交换机PBR以及Track与布尔类型的监测对象列表的关键配置:


1、Track关键配置

#

 nqa entry admin1 test1   //为后续“由南向北”的PBR策略进行探测

  type icmp-echo 

  destination ip 3.0.22.1

  next-hop ip 3.0.22.1

  frequency 100

  reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only 

#

 nqa entry admin2 test2  //为后续“由北向南”的PBR策略进行探测

   type icmp-echo

   destination ip 3.0.22.2

   next-hop ip 3.0.22.2

   frequency 100

   reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only 

#

 nqa schedule admin1 test1 start-time now lifetime forever

 nqa schedule admin2 test2 start-time now lifetime forever

#

 track 1 nqa entry admin1 test1 reaction 1 

 track 2 nqa entry admin2 test2 reaction 1 

#


2、布尔类型的监测对象列表关键配置

#                                                                                                                                   

track 3 list boolean and    //Track与布尔类型的监测对象列表关联                                                    

 object 1   //“1”表示track 1                                                                                                                        

 object 2   //“2”表示track 2                                                                                                                          

#


3、PBR策略路由与Track与布尔类型的监测对象列表联动配置

#

policy-based-route 105 permit node 10

if-match acl 3611

apply next-hop 3.0.22.1 track 3

#

policy-based-route 106 permit node 10

if-match acl 3612

apply next-hop 3.0.11.1 track 3

#


配置关键点


通过PBR策略路由与Track与布尔类型的监测对象列表联动配置后,仅当Track 1 和 Track 2 都为Positive时,Track 3才为Positive。及当Track 1 或 Track 2 存在任意一个检测不成功时,Track 3就监测不成功,因此两个PBR均失效。

<S10500>display track all

......

Track ID: 3

  State: Positive   //当 track 1和 track 2,及 Object 1 和 Object 2 均为Positive时,Track 3才为Positive状态

  Duration: 0 days 0 hours 0 minutes 8 seconds                                                                                     

  Tracked object type: Boolean and list                                                                                             

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

  Tracked objects:                                                                                                                  

    Object 1: Positive                                                                                                             

    Object 2: Positive           


<S10500>display track all

......

Track ID: 3

  State: Negative   //当 track 2 Negative  时,Track 3为 Negative 状态

  Duration: 0 days 0 hours 0 minutes 21 seconds                                                                                     

  Tracked object type: Boolean and list                                                                                             

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

  Tracked objects:                                                                                                                  

    Object 1: Positive                                                                                                             

    Object 2:  Negative             


<S10500>display track all

......

Track ID: 3

  State: Negative   //当 track 1 Negative  时,Track 3为 Negative 状态

  Duration: 0 days 0 hours 0 minutes 50 seconds                                                                                     

  Tracked object type: Boolean and list                                                                                             

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

  Tracked objects:                                                                                                                  

    Object 1:  Negative                                                                                                              

    Object 2: Positive           


当Track 3为 Negative 时,S10500交换机上PBR105 和 106 均失效,流量不经过第三方FW转发。如图3所示:


图3


提出建议

    +

亲~登录后才可以操作哦!

确定

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作