组网需求
- R1、R2、R3运行IS-IS路由协议
- R1通过R1->R3访问R3的环回地址,也可以通过R1->R2->R3访问R3的环回地址
- 实现负载均衡和配置等价路由的优先级
组网拓扑
配置思路
- 配置路由器基本功能以及各个接口IP地址
- 配置IS-IS协议,并在各个接口使能IS-IS协议
- 配置各个接口开销值,确保有一对等价路由,并配置最大负载均衡数量
- 配置接口的权重,实现等价路由的优选
配置命令
配置路由器基本功能以及各个接口IP地址
R1配置
1
2
3
4
5
6sys
sys R1
int g0/0/0
ip add 10.1.13.1 30
int g0/0/1
ip add 10.1.12.1 30
R2配置
1
2
3
4
5
6sys
sys R2
int g0/0/1
ip add 10.1.12.2 30
int g0/0/2
ip add 10.1.23.1 30
R3配置
1
2
3
4
5
6
7
8sys
sys R3
int g0/0/0
ip add 10.1.13.2 30
int g0/0/2
ip add 10.1.23.2 30
int LoopBack 0
ip add 10.1.3.3
配置IS-IS协议,并在各个接口使能IS-IS协议
R1配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
network-entity 49.0010.0100.0100.1001.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
R2配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
network-entity 49.0010.0100.0200.2002.00
int g0/0/1
isis enable 1
isis small-hello
int g0/0/2
isis enable 1
isis small-hello
R3配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
network-entity 49.0010.0100.0300.3003.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/2
isis enbale 1
isis small-hello
配置各个接口开销值,确保有一对等价路由,并配置最大负载均衡数量
R1配置
1
2
3
4
5sys
int g0/0/0
isis cost 10
int g0/0/1
isis cost 5
R2配置
1
2
3
4
5sys
int g0/0/1
isis cost 5
int g0/0/2
isis cost 5
R3配置
1
2
3
4
5sys
int g0/0/0
isis cost 10
int g0/0/1
isis cost 5
配置接口的权重,实现路由选路的优先级
R1配置
1
2
3
4sys
isis 1
nexthop 10.1.13.2 weight 1
nexthop 10.1.12.2 weight 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
29
30
31
32display ip routing-table
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.3.3/32 ISIS-L2 15 10 D 10.1.12.2 GigabitEthernet
0/0/1
ISIS-L2 15 10 D 10.1.13.2 GigabitEthernet
0/0/0
10.1.12.0/30 Direct 0 0 D 10.1.12.1 GigabitEthernet
0/0/1
10.1.12.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.12.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.13.0/30 Direct 0 0 D 10.1.13.1 GigabitEthernet
0/0/0
10.1.13.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.13.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.23.0/30 ISIS-L1 15 10 D 10.1.12.2 GigabitEthernet
0/0/1
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
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
查看设置优先级后的路由表
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
29
30display ip routing-table
<R1>display 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
10.1.3.3/32 ISIS-L2 15 10 D 10.1.13.2 GigabitEthernet
0/0/0
10.1.12.0/30 Direct 0 0 D 10.1.12.1 GigabitEthernet
0/0/1
10.1.12.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.12.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.13.0/30 Direct 0 0 D 10.1.13.1 GigabitEthernet
0/0/0
10.1.13.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.13.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.23.0/30 ISIS-L1 15 10 D 10.1.12.2 GigabitEthernet
0/0/1
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
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0