组网需求
- 三台路由器通过IS-IS协议实现互联互通
- Router A与Router B之间通过一台二层交换机互联
- 要求Router A与Router B之间故障,两台路由器能够快速对故障做出反应,并将流量切到Router C链路转发
实验拓扑
配置思路
- 配置路由器基本功能以及IP地址
- 配置IS-IS协议以及接口使能IS-IS
- 配置IS-IS接口开销值控制路由选路,Router A到Router B作为主链路
- 配置动态BFD
- 接口使能IS-IS与BFD联动
配置命令
配置路由器基本功能以及IP地址
Router A配置
1
2
3
4
5
6sys
sys Router A
int g0/0/0
ip add 3.3.3.1 30
int g0/0/1
ip add 1.1.1.1 30
Router B配置
1
2
3
4
5
6sys
sys Router B
int g0/0/0
ip add 3.3.3.2 30
int g0/0/2
ip add 2.2.2.1 30
Router C配置
1
2
3
4
5
6sys
sys Router C
int g0/0/1
ip add 1.1.1.2 30
int g0/0/2
ip add 2.2.2.2 30
配置IS-IS协议以及接口使能IS-IS协议
Router A配置
1
2
3
4
5
6
7
8
9
10
11sys
isis 1
is-level level-2
network-entity 86.0010.0030.0300.3001.00
q
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
Router B配置
1
2
3
4
5
6
7
8
9
10
11sys
isis 1
is-level level-2
network-entity 86.0010.0030.0300.3002.00
q
int g0/0/0
isis enable 1
isis small-hello
int g0/0/2
isis enable 1
isis small-hello
Router C配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
is-level level-2
network-entity 86.0010.0010.0100.1002.00
int g0/0/1
isis enable 1
isis small-hello
int g0/0/2
isis enable 1
isis small-hello
配置IS-IS接口开销值控制路由选路
Router A配置
1
2
3sys
int g0/0/0
isis cost 5
Router B配置
1
2
3sys
int g0/0/0
isis cost 5
配置动态BFD,并与IS-IS协议联动
Router A配置
1
2
3
4
5
6sys
bfd
q
isis 1
bfd all-interface enable
q
Router B配置
1
2
3
4
5
6sys
bfd
q
isis 1
bfd all-interface enable
q
Router C配置
1
2
3
4
5
6sys
bfd
q
isis 1
bfd all-interface enable
q
接口使能IS-IS BFD,并配置特性
Router A配置
1
2
3
4
5
6sys
int g0/0/0
isis bfd enable
isis bfd min-tx-interval 100
isis bfd min-rx-interval 100
isis bfd detect-multiplier 4
Router B配置
1
2
3
4
5
6sys
int g0/0/0
isis bfd enable
isis bfd min-tx-interval 100
isis bfd min-rx-interval 100
isis bfd detect-multiplier 4
测试结果
查看IS-IS邻居
1
2
3
4
5
6
7
8
9
10
11dis isis peer
<Router A>dis isis peer
Peer information for ISIS(1)
System Id Interface Circuit Id State HoldTime Type PRI
-------------------------------------------------------------------------------
0030.0300.3002 GE0/0/0 0030.0300.3001.01 Up 28s L2 64
0010.0100.1002 GE0/0/1 0010.0100.1002.01 Up 8s L2 64
Total Peer(s): 2
查看路由表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28<Router A>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.1 GigabitEthernet
0/0/1
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
2.2.2.0/30 ISIS-L2 15 15 D 3.3.3.2 GigabitEthernet
0/0/0
3.3.3.0/30 Direct 0 0 D 3.3.3.1 GigabitEthernet
0/0/0
3.3.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/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.1/32 ISIS-L2 15 5 D 3.3.3.2 GigabitEthernet # 选择主链路
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
查看IS-IS与BFD联动会话状态
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19dis isis bfd session all
<Router A>dis isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0030.0300.3002 Interface : GE0/0/0
TX : 100 BFD State : up Peer IP Address : 3.3.3.2
RX : 100 LocDis : 8195 Local IP Address: 3.3.3.1
Multiplier : 4 RemDis : 8195 Type : L2
Diag : No diagnostic information
Peer System ID : 0010.0100.1002 Interface : GE0/0/1
TX : 1000 BFD State : up Peer IP Address : 1.1.1.2
RX : 1000 LocDis : 8193 Local IP Address: 1.1.1.1
Multiplier : 3 RemDis : 8192 Type : L2
Diag : No diagnostic information
Total BFD session(s): 2
测试结果
Router B的端口Down
1
2
3sys
int g0/0/0
shutdown
Router A选择备用链路
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29dis ip routing-table
<Router A>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.1 GigabitEthernet
0/0/1
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
2.2.2.0/30 ISIS-L2 15 20 D 1.1.1.2 GigabitEthernet
0/0/1
3.3.3.0/30 Direct 0 0 D 3.3.3.1 GigabitEthernet
0/0/0
3.3.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/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.1/32 ISIS-L2 15 20 D 1.1.1.2 GigabitEthernet # 选择备用链路
0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0