BFD状态与接口状态联动配置示例
首页 > HuaWei > BFD   作者:杭州清默网络  2015年10月12日 22:14 星期一  字号:   评论:0 条
时间:2015-10-12 22:14   评论:0 条 

      指当BFD会话的状态变化时,直接修改接口或子接口的BFD状态。与接口或子接口状态联动的功能仅针对绑定了出接口,且使用缺省组播IP地址进行检测的单跳检测BFD会话。

      本示例默认默认阻塞S3 GE0/0/1端口(因为默认开启stp)

bfd.png



具体配置:

[s1]bfd

[s1-bfd]q

[s1]bfd s2 bind peer-ip default-ip interface GigabitEthernet 0/0/1

[s1-bfd-session-s2]discriminator local 12    #设置本地标识符

[s1-bfd-session-s2]discriminator remote 21  #设置远端标识符

[s1-bfd-session-s2]process-interface-status  #使能BFD状态与接口状态联动

[s1-bfd-session-s2]commit  # 提交配置

 

[s1]bfd s3 bind peer-ip default-ip  interface GigabitEthernet 0/0/2

[s1-bfd-session-s3]discriminator local  13

[s1-bfd-session-s3]discriminator remote 31

[s1-bfd-session-s3]process-interface-status

[s1-bfd-session-s3]commit

-------------

[s2]bfd

[s2-bfd]q

[s2]bfd s1 bind  peer-ip default-ip int g 0/0/1

[s2-bfd-session-s1]discriminator local 21

[s2-bfd-session-s1]discriminator remote 12

[s2-bfd-session-s1]process-interface-status

[s2-bfd-session-s1]commit

 

[s2]bfd s3 bind peer-ip default-ip interface  GigabitEthernet 0/0/2

[s2-bfd-session-s3]discriminator local 23

[s2-bfd-session-s3]discriminator remote 32

[s2-bfd-session-s3]process-interface-status

[s2-bfd-session-s3]commit

---------------------

[s3]bfd

[s3-bfd]q

[s3]bfd s1 bind peer-ip default-ip  interface  GigabitEthernet 0/0/1

[s3-bfd-session-s1]discriminator local 31

[s3-bfd-session-s1]discriminator remote 13

[s3-bfd-session-s1]process-interface-status

[s3-bfd-session-s1]commit

 

[s3]bfd s2 bind peer-ip default-ip  interface GigabitEthernet 0/0/2     

[s3-bfd-session-s2]discriminator local 32

[s3-bfd-session-s2]discriminator remote 23

[s3-bfd-session-s2]process-interface-status

[s3-bfd-session-s2]commit

============

查看BFD 状态

[s2]dis bfd se al ve

--------------------------------------------------------------------------------

Session MIndex : 256       (One Hop) State : Up        Name : s1            

--------------------------------------------------------------------------------

  Local Discriminator    : 21               Remote Discriminator   : 12       

  Session Detect Mode    : Asynchronous Mode Without Echo Function            

  BFD Bind Type          : Interface(GigabitEthernet0/0/1)                    

  Bind Session Type      : Static   

  Bind Peer IP Address   : 224.0.0.184                                        

  NextHop Ip Address     : 224.0.0.184                                        

  Bind Interface         : GigabitEthernet0/0/1                               

  FSM Board Id           : 0                TOS-EXP                : 7        

  Min Tx Interval (ms)   : 1000             Min Rx Interval (ms)   : 1000     

  Actual Tx Interval (ms): 1000             Actual Rx Interval (ms): 1000     

  Local Detect Multi     : 3                Detect Interval (ms)   : 3000     

  Echo Passive           : Disable          Acl Number             : -        

  Destination Port       : 3784             TTL                    : 255      

  Proc Interface Status  : Enable   

  WTR Interval (ms)      : -        

  Active Multi           : 3        

  Last Local Diagnostic  : No Diagnostic                                      

  Bind Application       : IFNET

  Session TX TmrID       : 1035             Session Detect TmrID   : 1036     

  Session Init TmrID     : -                Session WTR TmrID      : -        

  Session Echo Tx TmrID  : -        

  PDT Index              : FSM-0 | RCV-0 | IF-0 | TOKEN-0                     

  Session Description    : -        

--------------------------------------------------------------------------------

 

--------------------------------------------------------------------------------

Session MIndex : 257       (One Hop) State : Up        Name : s3            

--------------------------------------------------------------------------------

  Local Discriminator    : 23               Remote Discriminator   : 32       

  Session Detect Mode    : Asynchronous Mode Without Echo Function            

  BFD Bind Type          : Interface(GigabitEthernet0/0/2)                    

  Bind Session Type      : Static   

  Bind Peer IP Address   : 224.0.0.184                                        

  NextHop Ip Address     : 224.0.0.184                                        

  Bind Interface         : GigabitEthernet0/0/2                               

  FSM Board Id           : 0                TOS-EXP                : 7        

  Min Tx Interval (ms)   : 1000             Min Rx Interval (ms)   : 1000     

  Actual Tx Interval (ms): 1000             Actual Rx Interval (ms): 1000     

  Local Detect Multi     : 3                Detect Interval (ms)   : 3000     

  Echo Passive           : Disable          Acl Number             : -        

  Destination Port       : 3784             TTL                    : 255      

  Proc Interface Status  : Enable   

  WTR Interval (ms)      : -        

  Active Multi           : 3        

  Last Local Diagnostic  : Control Detection Time Expired                     

  Bind Application       : IFNET

  Session TX TmrID       : 1041             Session Detect TmrID   : 1042     

  Session Init TmrID     : -                Session WTR TmrID      : -        

  Session Echo Tx TmrID  : -        

  PDT Index              : FSM-0 | RCV-0 | IF-0 | TOKEN-0                     

  Session Description    : -        

--------------------------------------------------------------------------------

 

     Total UP/DOWN Session Number : 2/0

 

=============

配置文件

<s1>dis cu

#

sysname s1

#

vlan batch 10 20 200

#

bfd

#

interface Vlanif10

 ip address 192.168.10.254 255.255.255.0

#

interface Vlanif20

 ip address 192.168.20.254 255.255.255.0

#

interface Vlanif200

 ip address 192.168.200.254 255.255.255.0

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/23

 port link-type access

 port default vlan 200

#

bfd s2 bind peer-ip default-ip interface GigabitEthernet0/0/1

 discriminator local 12

 discriminator remote 21

 process-interface-status

 commit

#

bfd s3 bind peer-ip default-ip interface GigabitEthernet0/0/2

 discriminator local 13

 discriminator remote 31

 process-interface-status

 commit

#

return

<s1>

-----------------------

<s3>dis cu

#

sysname s3

#

vlan batch 10 20

#

bfd

#

interface Ethernet0/0/22

 port link-type access

 port default vlan 20

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

bfd s1 bind peer-ip default-ip interface GigabitEthernet0/0/1

 discriminator local 31

 discriminator remote 13

 process-interface-status

 commit

#

bfd s2 bind peer-ip default-ip interface GigabitEthernet0/0/2

 discriminator local 32

 discriminator remote 23

 process-interface-status

 commit

#

<s3>

----------------------

<s2>dis cu

#

sysname s2

#

vlan batch 10 20

#

bfd

#

interface Ethernet0/0/22

 port link-type access

 port default vlan 10

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

bfd s1 bind peer-ip default-ip interface GigabitEthernet0/0/1

 discriminator local 21

 discriminator remote 12

 process-interface-status

 commit

#

bfd s3 bind peer-ip default-ip interface GigabitEthernet0/0/2

 discriminator local 23

 discriminator remote 32

 process-interface-status

 commit

#

return

<s2>


 您阅读这篇文章共花了: 
二维码加载中...
技术交流:欢迎在本文下方留言或加入QQ群:647682417 互相学习。     
本文地址:http://www.023wg.com/bfd/23.html
版权声明:若无注明,本文皆为“杭州清默网络”原创,转载请保留文章出处。

返回顶部    首页   
版权所有:杭州清默网络    杭州清默网络