点击学习精彩网络技术老师:华为HCIA和HCIP数通eNSP实战视频课、华三、锐捷、WLAN、IPv6等全套视频课程
介绍动态BFD for IS-IS的配置过程,包括在各设备配置IS-IS的基本功能、各接口开销、IS-IS进程BFD和接口BFD。
组网需求
如图1所示。
DeviceA、DeviceB和DeviceC之间运行IS-IS协议。
使能DeviceA、DeviceB和DeviceC的IS-IS进程BFD特性。
业务流量在主链路DeviceA→DeviceB上传送,链路DeviceA→DeviceC→DeviceB作为备份链路。
在DeviceA和DeviceB之间的链路上创建接口的BFD特性,当DeviceA和DeviceB之间的链路出现故障时,BFD能够快速检测到故障并通告给IS-IS协议,使业务流量使用备份链路传送。
设备名称 | 接口 | IP地址 |
DeviceA | GE0/1/0 | 1.1.1.1/24 |
GE0/2/0 | 3.3.3.1/24 | |
DeviceB | GE0/1/0 | 2.2.2.2/24 |
GE0/2/0 | 3.3.3.2/24 | |
GE0/3/0 | 172.16.1.1/24 | |
DeviceC | GE0/1/0 | 1.1.1.2/24 |
GE0/2/0 | 2.2.2.1/24 |
配置思路
采用如下思路配置BFD for IS-IS特性:
在各NE上使能IS-IS基本功能,保证各路由的连通。
配置IS-IS接口开销值控制路由的选路功能。
使能全局BFD特性。
在DeviceA、DeviceB和DeviceC上使能IS-IS进程的BFD检测机制。
在DeviceA和DeviceB上使能接口的BFD检测机制。
数据准备
为完成此配置例,需准备如下的数据:
IS-IS协议进程号。
DeviceA、DeviceB和DeviceC的区域号。
DeviceA和DeviceB的接口开销值。
DeviceA、DeviceB和DeviceC使能BFD的接口号和类型号。
DeviceA和DeviceB对BFD报文的最小发送和接收间隔、本地检测倍数。
操作步骤
- 配置各NE接口的IP地址(略)
- 配置IS-IS基本功能
# 配置DeviceA。
[~DeviceA] isis
[*DeviceA-isis-1] is-level level-2
[*DeviceA-isis-1] network-entity 10.0000.0000.0001.00
[*DeviceA-isis-1] quit
[*DeviceA] interface gigabitethernet 0/1/0
[*DeviceA-GigabitEthernet0/1/0] isis enable 1
[*DeviceA-GigabitEthernet0/1/0] quit
[*DeviceA] interface gigabitethernet 0/2/0
[*DeviceA-GigabitEthernet0/2/0] isis enable 1
[*DeviceA-GigabitEthernet0/2/0] commit
[~DeviceA-GigabitEthernet0/2/0] quit
# 配置DeviceB。
[~DeviceB] isis
[*DeviceB-isis-1] is-level level-2
[*DeviceB-isis-1] network-entity 10.0000.0000.0002.00
[*DeviceB-isis-1] quit
[*DeviceB] interface gigabitethernet 0/1/0
[*DeviceB-GigabitEthernet0/1/0] isis enable 1
[*DeviceB-GigabitEthernet0/1/0] quit
[*DeviceB] interface gigabitethernet 0/2/0
[*DeviceB-GigabitEthernet0/2/0] isis enable 1
[*DeviceB-GigabitEthernet0/2/0] quit
[*DeviceB] interface gigabitethernet 0/3/0
[*DeviceB-GigabitEthernet0/3/0] isis enable 1
[*DeviceB-GigabitEthernet0/3/0] commit
[~DeviceB-GigabitEthernet0/3/0] quit
# 配置DeviceC。
[~DeviceC] isis
[*DeviceC-isis-1] is-level level-2
[*DeviceC-isis-1] network-entity 10.0000.0000.0003.00
[*DeviceC-isis-1] quit
[*DeviceC] interface gigabitethernet 0/1/0
[*DeviceC-GigabitEthernet0/1/0] isis enable 1
[*DeviceC-GigabitEthernet0/1/0] quit
[*DeviceC] interface gigabitethernet 0/2/0
[*DeviceC-GigabitEthernet0/2/0] isis enable 1
[*DeviceC-GigabitEthernet0/2/0] commit
[~DeviceC-GigabitEthernet0/2/0] quit
# 配置完成后,使用display isis peer命令,可以查看DeviceA和DeviceB、DeviceA和DeviceC建立了邻居关系。以DeviceA为例。
[~DeviceA] display isis peer
-------------------------------------------------------------------------------
0000.0000.0002 GE0/2/0 0000.0000.0002.01 Up 9s L2 64
0000.0000.0003 GE0/1/0 0000.0000.0001.02 Up 21s L2 64
Total Peer(s): 2
# NE之间已经互相学到路由。以查看DeviceA的路由表为例。
[~DeviceA] display ip routing-tableRoute Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 8 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 GigabitEthernet0/1/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.0/24 ISIS 15 20 D 1.1.1.2 GigabitEthernet0/1/0
3.3.3.0/24 Direct 0 0 D 3.3.3.1 GigabitEthernet0/2/0
3.3.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 ISIS 15 20 D 3.3.3.2 GigabitEthernet0/2/0
从路由表可以看出,去往172.16.1.0/24的路由下一跳地址为3.3.3.2,流量在主链路DeviceA→DeviceB上传输。
- 配置接口开销值
# 配置DeviceA。
[~DeviceA] interface gigabitethernet 0/2/0
[~DeviceA-GigabitEthernet0/2/0] isis cost 5
[*DeviceA-GigabitEthernet0/2/0] commit
[~DeviceA-GigabitEthernet0/2/0] quit
# 配置DeviceB。
[~DeviceB] interface gigabitethernet 0/2/0
[~DeviceB-GigabitEthernet0/2/0] isis cost 5
[*DeviceB-GigabitEthernet0/2/0] commit
[~DeviceB-GigabitEthernet0/2/0] quit
- 配置IS-IS进程的BFD特性
# 在DeviceA上使能IS-IS的BFD特性。
[~DeviceA] bfd
[*DeviceA-bfd] quit
[*DeviceA] isis
[*DeviceA-isis-1] bfd all-interfaces enable
[*DeviceA-isis-1] commit
[~DeviceA-isis-1] quit
# 在DeviceB上使能IS-IS的BFD特性。
[~DeviceB] bfd
[*DeviceB-bfd] quit
[*DeviceB] isis
[*DeviceB-isis-1] bfd all-interfaces enable
[*DeviceB-isis-1] commit
[~DeviceB-isis-1] quit
# 在DeviceC上使能IS-IS的BFD特性。
[~DeviceC] bfd
[*DeviceC-bfd] quit
[*DeviceC] isis
[*DeviceC-isis-1] bfd all-interfaces enable
[*DeviceC-isis-1] commit
[~DeviceC-isis-1] quit
# 配置完成后,在DeviceA、DeviceB或DeviceC上执行display isis bfd session all命令,可以看到BFD State的状态为Up。
以DeviceA的显示为例。
[~DeviceA] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0002 Interface : GE0/2/0
TX : 10 BFD State : up Peer IP Address : 3.3.3.2
RX : 10 LocDis : 16385 Local IP Address: 3.3.3.1
Multiplier : 3 RemDis : 16388 Type : L2
Diag : No diagnostic information
Peer System ID : 0000.0000.0003 Interface : GE0/1/0
TX : 10 BFD State : up Peer IP Address : 1.1.1.2
RX : 10 LocDis : 16386 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 16387 Type : L2
Diag : No diagnostic information
Total BFD session(s): 2
从上面信息可以看出,DeviceA与DeviceB、DeviceC的BFD会话状态为Up。
- 配置接口的BFD特性
# 在DeviceA的GE0/2/0接口上配置BFD特性,并指定最小发送和接收间隔为100ms本地检测时间倍数为4。
[~DeviceA] interface gigabitEthernet 0/2/0
[~DeviceA-GigabitEthernet0/2/0] isis bfd enable
[*DeviceA-GigabitEthernet0/2/0] isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
[*DeviceA-GigabitEthernet0/2/0] commit
[~DeviceA-GigabitEthernet0/2/0] quit
# 在DeviceB的GE0/2/0接口上配置BFD特性,并指定最小发送和接收间隔为100ms本地检测时间倍数为4。
[~DeviceB] interface gigabitethernet 0/2/0
[~DeviceB-GigabitEthernet0/2/0] isis bfd enable
[*DeviceB-GigabitEthernet0/2/0] isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
[*DeviceB-GigabitEthernet0/2/0] commit
[~DeviceB-GigabitEthernet0/2/0] quit
# 配置完成后,在DeviceA或DeviceB上执行display isis bfd session all命令,可以看到BFD参数已生效。以DeviceB的显示为例。
[~DeviceB] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0001 Interface : GE0/2/0
TX : 100 BFD State : up Peer IP Address : 3.3.3.1
RX : 100 LocDis : 16385 Local IP Address: 3.3.3.2
Multiplier : 4 RemDis : 16385 Type : L2
Diag : No diagnostic information
Peer System ID : 0000.0000.0003 Interface : GE0/1/0
TX : 10 BFD State : up Peer IP Address : 2.2.2.1
RX : 10 LocDis : 16385 Local IP Address: 2.2.2.2
Multiplier : 4 RemDis : 16385 Type : L2
Diag : No diagnostic information
Total BFD session(s): 2
- 对DeviceB的GigabitEthernet0/2/0接口执行shutdown命令,模拟主链路故障。
[~DeviceB] interface gigabitethernet 0/2/0
[~DeviceB-GigabitEthernet0/2/0] shutdown
[*DeviceB-GigabitEthernet0/2/0] commit
- 检查配置结果。
# 在DeviceA上,查看路由表。
[~DeviceA] display ip routing-tableRoute Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 GigabitEthernet0/1/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/1/0
1.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/1/0
2.2.2.0/24 ISIS 15 20 D 1.1.1.2 GigabitEthernet0/1/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.16.1.0/24 ISIS 15 30 D 1.1.1.2 GigabitEthernet0/1/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
从路由表可以看出,在主链路失效后,备份链路DeviceA-DeviceC-DeviceB生效,去往172.16.1.0/24的路由下一跳地址为1.1.1.2。
# 在DeviceA上执行display isis bfd session all命令,只能看到DeviceA和DeviceC之间的BFD State的状态为Up。
[~DeviceA] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0003 Interface : GE0/1/0
TX : 10 BFD State : up Peer IP Address : 1.1.1.2
RX : 10 LocDis : 16385 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 16388 Type : L2
Diag : No diagnostic information
Total BFD session(s): 1
配置文件
DeviceA的配置文件
#
sysname DeviceA
#
bfd
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0001.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 1.1.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 3.3.3.1 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
return
DeviceB的配置文件
#
sysname DeviceB
#
bfd
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0002.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 2.2.2.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 3.3.3.2 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 172.16.1.1 255.255.255.0
isis enable 1
#
return
DeviceC的配置文件
#
sysname DeviceC
#
bfd
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0003.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 1.1.1.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 2.2.2.1 255.255.255.0
isis enable 1
#
return