BFD示例图
一、实验目的
1.配置BFD静态标识符(静态标识符自协商)建立BFD会话综合实验
二、注意事项
1.配置标识符时,本端的本地标识符与对端的远端标识符必
需相同,否则BFD会话无法正确建立。并且,本地标识符和
远端标识符配置成功后不可修改。
2.对于使用缺省组播IP地址的BFD会话,本地标识符和远端
标识符不能相同
3.在三层接口上创建组播BFD会话时,需要在三层接口上配
置IP地址使其协议层Up,否则,组播BFD会话无法协商成功。
4.当组播BFD会话绑定的三层接口协议状态为Down时,通过
配置unlimited-negotiate,使能组播BFD会话无条件协商
功能,使得BFD检测可以顺利执行
5.在创建BFD配置项时,系统只检查IP地址是否符合IP地址
格式,不检查其正确性。绑定错误的对端IP地址或源IP地址
都将导致BFD会话无法建立
6.在创建多跳BFD会话时,必须绑定对端IP地址
7.静态标识符自协商BFD
7.1必须配置源IP地址。
7.2必须指定明确的对端IP地址,不能使用组播IP地址
8.单臂回声功能的BFD会话只能应用于BFD单跳检测中
9.目前,BFD会话不会感知路由切换。如果绑定的对端IP地、址改变引
起路由切换到其他链路上,除非原链路转发不通,否则,BFD不会重新协商
10.BFD检测二层链路必须是单跳的,因为发送BFD报文是组播报文。
三、BFD查询命令
1.display bfd interface [ interface-type
interface-number ] 命令查看使能BFD的接口信息
2.display bfd session { all | static |
discriminator discr-value | dynamic | peer-ip {
default-ip | peer-ip [ vpn-instance vpn-
instance-name ] } | static-auto } [ verbose ]命
令查看BFD会话信息。
3.display bfd statistics命令查看BFD全局统计信息
4.display bfd statistics session { all | static
| dynamic | discriminator discr-value | peer-ip
default-ip | peer-ip peer-ip [ vpn-instance vpn-
name ] | static-auto }命令查看BFD会话统计信息
四、简单配置
1.三层物理链路单跳检测(静态标识符和静态标识符自协商)
AR1
sysname AR1
#
bfd
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
bfd 1to2 bind peer-ip 192.168.1.2 interface GigabitEthernet0/0/0
discriminator local 1
discriminator remote 2
commit
#
bfd atob bind peer-ip 192.168.1.2 source-ip 192.168.1.1 auto
commit
#
return
AR2
sysname AR2
#
bfd
#
interface GigabitEthernet0/0/0
ip address 192.168.1.2 255.255.255.0
#
bfd 2to1 bind peer-ip 192.168.1.1 interface GigabitEthernet0/0/0
discriminator local 2
discriminator remote 1
commit
#
bfd btoa bind peer-ip 192.168.1.1 source-ip 192.168.1.2 auto
commit
#
return
2.VLANIF接口BFD单跳检测(静态标识符)
LSW1
sysname LSW1
#
vlan batch 2
#
bfd
#
interface Vlanif2
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
bfd 1to2 bind peer-ip 192.168.1.2 interface Vlanif2
discriminator local 1
discriminator remote 2
commit
#
return
LSW2
sysname LSW2
#
vlan batch 2
#
bfd
#
interface Vlanif2
ip address 192.168.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
bfd 2to1 bind peer-ip 192.168.1.1 interface Vlanif2
discriminator local 2
discriminator remote 1
commit
#
return
3.BFD状态与接口状态联动
LSW3
sysname LSW3
#
bfd
#
bfd 1to2 bind peer-ip default-ip interface GigabitEthernet0/0/1
discriminator local 1
discriminator remote 2
process-interface-status
commit
#
return
LSW4
sysname LSW4
#
bfd
#
bfd 2to1 bind peer-ip default-ip interface GigabitEthernet0/0/1
discriminator local 2
discriminator remote 1
process-interface-status
commit
#
return
4.单臂回声功能和三层物理链路多跳检测与联动OSPF动态建立BFD会话
AR4
sysname AR4
#
bfd
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
ospf bfd enable
#
bfd 1to1 bind peer-ip 192.168.1.2 interface GigabitEthernet0/0/0 one-arm-echo
discriminator local 1
commit
#
bfd 4-to-6 bind peer-ip 192.168.2.2 source-ip 192.168.1.1 auto
commit
#
bfd 4to6 bind peer-ip 192.168.2.2
discriminator local 10
discriminator remote 20
commit
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
return
AR5
sysname AR5
#
bfd
#
interface GigabitEthernet0/0/0
ip address 192.168.1.2 255.255.255.0
ospf bfd enable
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
ospf 1
bfd all-interfaces enable
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
return
AR6
sysname AR6
#
bfd
#
interface GigabitEthernet0/0/1
ip address 192.168.2.2 255.255.255.0
#
bfd 6-to-4 bind peer-ip 192.168.1.1 source-ip 192.168.2.2 auto
commit
#
bfd 6to4 bind peer-ip 192.168.1.1
discriminator local 20
discriminator remote 10
commit
#
ospf 1
bfd all-interfaces enable
area 0.0.0.0
network 192.168.2.0 0.0.0.255
#
return
五、BFD状态查询
1.display bfd statistics session all
2.display bfd interface GigabitEthernet 0/0/0 3.display bfd session all verbose
|