学习精彩网络技术老师:华为HCIA和HCIP数通eNSP实战视频课
点击学习精彩网络技术老师:华为HCIA和HCIP数通eNSP实战课程、华三、锐捷、WLAN、IPv6等全套视频课程
举例说明通过IS-IS协议实现路由负载分担的配置方法。
组网需求
如图1所示:
RouterA、RouterB、RouterC和RouterD之间通过IS-IS协议达到IP网络互连的目的。
RouterA、RouterB、RouterC和RouterD同属于区域10,都是Level-2路由器。
要求配置负载分担,使得RouterA的流量,可以分别通过路由器RouterB和RouterC发送到路由器RouterD。
Device | Interface | IP Address | Device | Interface | IP Address |
RouterA | GE 3/0/0 | 172.16.1.1/24 | RouterC | POS 1/0/0 | 10.1.2.2/24 |
RouterA | POS 1/0/0 | 10.1.1.1/24 | RouterC | POS 2/0/0 | 192.168.1.1/24 |
RouterA | POS 2/0/0 | 10.1.2.1/24 | RouterD | GE 3/0/0 | 172.17.1.1/24 |
RouterB | POS 1/0/0 | 10.1.1.2/24 | RouterD | POS 1/0/0 | 192.168.0.2/24 |
RouterB | POS 2/0/0 | 192.168.0.1/24 | RouterD | POS 2/0/0 | 192.168.1.2/24 |
配置思路
采用如下的思路配置IS-IS的负载分担:
在各路由器上使能IS-IS基本功能,实现互连。
取消负载分担,查看路由表信息。
在RouterA上配置负载分担功能,查看路由表信息。
(可选)在RouterA上配置等价路由优先级。
数据准备
为完成此配置例,需准备如下的数据:
四台路由器的级别和所属区域地址。
RouterA上负载分担数目为1。
RouterC的等价路由优先级权值为1。
操作步骤
- 配置各接口的IP地址(略)
- 配置IS-IS的基本功能
IS-IS基本功能的配置,请参见配置IS-IS基本功能示例。
- 在RouterA上取消负载分担
[RouterA] isis 1
[RouterA-isis-1] maximum load-balancing 1
[RouterA-isis-1] quit
# 查看RouterA的路由表。
[RouterA] 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 P2/0/0 10.1.2.2 A/-/L/-
10.1.1.0/24 10 NULL P1/0/0 Direct D/-/L/-
172.16.1.0/24 10 NULL GE3/0/0 Direct D/-/L/-
172.17.1.0/24 30 NULL P1/0/0 10.1.1.2 A/-/L/-
10.1.2.0/24 10 NULL P2/0/0 Direct D/-/L/-
192.168.0.0/24 20 NULL P1/0/0 10.1.1.2 A/-/L/-
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,这是由于RouterB的System ID较小,所以IS-IS优先选择下一跳为10.1.1.2为唯一最优路由。
- 在RouterA上恢复负载分担路由的缺省数量
[RouterA] isis 1
[RouterA-isis-1] undo maximum load-balancing
[RouterA-isis-1] quit
# 查看RouterA的路由表。
[RouterA] 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 P2/0/0 10.1.2.2 A/-/L/-
10.1.1.0/24 10 NULL P1/0/0 Direct D/-/L/-
172.16.1.0/24 10 NULL GE3/0/0 Direct D/-/L/-
172.17.1.0/24 30 NULL P1/0/0 10.1.1.2 A/-/L/-
P2/0/0 10.1.2.2
10.1.2.0/24 10 NULL P2/0/0 Direct D/-/L/-
192.168.0.0/24 20 NULL P1/0/0 10.1.1.2 A/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
从路由表可以看出,当取消负载分担设置即恢复缺省配置后,RouterA的两个下一跳10.1.1.2(RouterB)和10.1.2.2(RouterC)均成为有效路由。
- (可选)在RouterA上配置等价路由优先级
如果不希望RouterB和RouterC形成负载分担,可以配置等价路由优先级,指定下一跳。
[RouterA] isis
[RouterA-isis-1] nexthop 10.1.2.2 weight 1
[RouterA-isis-1] quit
- 验证配置结果
# 查看RouterA的路由表。
[RouterA] 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 P2/0/0 10.1.2.2 A/-/L/-
10.1.1.0/24 10 NULL P1/0/0 Direct D/-/L/-
172.16.1.0/24 10 NULL GE3/0/0 Direct D/-/L/-
172.17.1.0/24 30 NULL P1/0/0 10.1.2.2 A/-/L/-
10.1.2.0/24 10 NULL P2/0/0 Direct D/-/L/-
192.168.0.0/24 20 NULL P1/0/0 10.1.1.2 A/-/L/-
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
从路由表中可以看出,当配置等价路由的优先级后,由于下一跳为10.1.2.2(RouterC)的优先级(权值为1)高于下一跳为10.1.1.2(RouterB)的优先级,所以IS-IS优先选择下一跳为10.1.2.2为唯一最优路由。
配置文件
RouterA的配置文件
#
sysname RouterA
#
isis 1
is-level level-2
network-entity 10.0000.0000.0001.00
nexthop 10.1.2.2 weight 1
#
interface GigabitEthernet3/0/0
ip address 172.16.1.1 255.255.255.0
isis enable 1
#
interface Pos1/0/0
link-protocol ppp
ip address 10.1.1.1 255.255.255.0
isis enable 1
#
interface Pos2/0/0
link-protocol ppp
ip address 10.1.2.1 255.255.255.0
isis enable 1
#
return
RouterB的配置文件
#
sysname RouterB
#
isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
#
interface Pos1/0/0
link-protocol ppp
ip address 10.1.1.2 255.255.255.0
isis enable 1
#
interface Pos2/0/0
link-protocol ppp
ip address 192.168.0.1 255.255.255.0
isis enable 1
#
return
RouterC的配置文件
#
sysname RouterC
#
isis 1
is-level level-2
network-entity 10.0000.0000.0003.00
#
interface Pos1/0/0
link-protocol ppp
ip address 10.1.2.2 255.255.255.0
isis enable 1
#
interface Pos2/0/0
link-protocol ppp
ip address 192.168.1.1 255.255.255.0
isis enable 1
#
return
RouterD的配置文件
#
sysname RouterD
#
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface GigabitEthernet3/0/0
ip address 172.17.1.1 255.255.255.0
isis enable 1
#
interface Pos1/0/0
link-protocol ppp
ip address 192.168.0.2 255.255.255.0
isis enable 1
#
interface Pos2/0/0
link-protocol ppp
ip address 192.168.1.2 255.255.255.0
isis enable 1
#
return