配置IS-IS负载分担示例
介绍IS-IS负载分担的配置过程。
组网需求
如图9-3所示:
DeviceA、DeviceB、DeviceC和DeviceD之间通过IS-IS协议达到IP网络互连的目的。
DeviceA、DeviceB、DeviceC和DeviceD同属于区域10,都是Level-2设备。
要求配置负载分担,使得DeviceA的流量,可以分别通过路由器DeviceB和DeviceC发送到路由器DeviceD。
配置思路
采用如下的思路配置IS-IS的负载分担:
在各路由器上使能IS-IS基本功能,实现互连。
取消负载分担,查看路由表信息。
在DeviceA上配置负载分担功能,查看路由表信息。
在DeviceA上配置负载分担方式。
(可选)在DeviceA上配置等价路由优先级。
操作步骤
- 配置各接口的IP地址(略)
- 配置IS-IS的基本功能(略)
- 在DeviceA上取消负载分担,即配置负载分担的等价路由最大数目为1
[~DeviceA] isis 1
[~DeviceA-isis-1] maximum load-balancing 1
[*DeviceA-isis-1] commit
[~DeviceA-isis-1] quit
# 查看DeviceA的路由表。
[~DeviceA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
---------------------------------------------------------------------------
192.168.1.0/24 20 NULL GE0/2/0 10.1.2.2 A/-/-/-/-
10.1.1.0/24 10 NULL GE0/1/0 Direct D/-/L/-/-
172.16.1.0/24 10 NULL GE0/3/0 Direct D/-/L/-/-
172.17.1.0/24 30 NULL GE0/1/0 10.1.1.2 A/-/-/-/-
10.1.2.0/24 10 NULL GE0/2/0 Direct D/-/L/-/-
192.168.0.0/24 20 NULL GE0/1/0 10.1.1.2 A/-/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
从路由表中可以看出,当配置负载分担最大等价路由条数为1后,到达目标网段172.17.1.0的下一跳为10.1.1.2,这是由于DeviceB的System ID较小,所以IS-IS优先选择下一跳为10.1.1.2为唯一最优路由。
- 在DeviceA上恢复负载分担路由的缺省数目
[~DeviceA] isis 1
[~DeviceA-isis-1] undo maximum load-balancing
[*DeviceA-isis-1] commit
[~DeviceA-isis-1] quit
# 查看DeviceA的路由表。
[~DeviceA] display isis route
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
---------------------------------------------------------------------------
192.168.1.0/24 20 NULL GE0/2/0 10.1.2.2 A/-/-/-/-
10.1.1.0/24 10 NULL GE0/1/0 Direct D/-/L/-/-
172.16.1.0/24 10 NULL GE0/3/0 Direct D/-/L/-/-
172.17.1.0/24 30 NULL GE0/1/0 10.1.1.2 A/-/-/-/-
GE0/2/0 10.1.2.2
10.1.2.0/24 10 NULL GE0/2/0 Direct D/-/L/-/-
192.168.0.0/24 20 NULL GE0/1/0 10.1.1.2 A/-/-/-/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set
从路由表可以看出,当取消负载分担设置即恢复缺省配置后,由于最大等价路由条数为32,因此路由器DeviceA的两个下一跳10.1.1.2(DeviceB)和10.1.2.2(DeviceC)均成为有效路由。
配置文件
DeviceA的配置文件
#
sysname DeviceA
#
isis 1
is-level level-2
network-entity 10.0000.0000.0001.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.1.2.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 172.16.1.1 255.255.255.0
isis enable 1
#
return
DeviceB的配置文件
#
sysname DeviceB
#
isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 192.168.0.1 255.255.255.0
isis enable 1
#
return
DeviceC的配置文件
#
sysname DeviceC
#
isis 1
is-level level-2
network-entity 10.0000.0000.0003.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.2.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 192.168.1.1 255.255.255.0
isis enable 1
#
return
DeviceD的配置文件
#
sysname DeviceD
#
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 192.168.0.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 192.168.1.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/3/0
undo shutdown
ip address 172.17.1.1 255.255.255.0
isis enable 1
#
return