华为路由器配置IS-IS的负载分担实例

更新时间:2023-11-10 03:05:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

华为路由器配置IS-IS的负载分担实例

举例说明通过IS-IS协议实现路由负载分担的配置方法。

组网需求

如图1所示:

? RouterA、RouterB、RouterC和RouterD之间通过IS-IS协议达到IP网络互连的目的。 ? RouterA、RouterB、RouterC和RouterD同属于区域10,都是Level-2路由器。 ? 要求配置负载分担,使得RouterA的流量,可以分别通过路由器RouterB和RouterC发

送到路由器RouterD。

图1 配置IS-IS的负载分担组网图

Device RouterA Interface GE 3/0/0 POS 1/0/0 POS 2/0/0 POS 1/0/0 POS 2/0/0 IP Address 172.16.1.1/24 10.1.1.1/24 10.1.2.1/24 10.1.1.2/24 192.168.0.1/24 Device RouterC Interface POS 1/0/0 POS 2/0/0 IP Address 10.1.2.2/24 192.168.1.1/24 RouterB RouterD GE 3/0/0 POS 1/0/0 POS 2/0/0 172.17.1.1/24 192.168.0.2/24 192.168.1.2/24 配置思路

采用如下的思路配置IS-IS的负载分担:

1. 在各路由器上使能IS-IS基本功能,实现互连。 2. 取消负载分担,查看路由表信息。

3. 在RouterA上配置负载分担功能,查看路由表信息。 4. (可选)在RouterA上配置等价路由优先级。

数据准备

为完成此配置例,需准备如下的数据:

? 四台路由器的级别和所属区域地址。 ? RouterA上负载分担数目为1。 ? RouterC的等价路由优先级权值为1。

操作步骤

1. 配置各接口的IP地址(略) 2. 配置IS-IS的基本功能

IS-IS基本功能的配置,请参见配置IS-IS基本功能示例。 3. 在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为唯一最优路由。 4. 在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

从路由表可以看出,当取消负载分担设置即恢复缺省配置后,由于最大等价路由条数的缺省值为3,因此RouterA的两个下一跳10.1.1.2(RouterB)和10.1.2.2(RouterC)均成为有效路由。

说明:

不同的产品,不同协议,最大等价路由条数可能会不同,这个最大值可以通过购买许可证文件来调整。

5. (可选)在RouterA上配置等价路由优先级

如果不希望RouterB和RouterC形成负载分担,可以配置等价路由优先级,指定下一跳。

[RouterA] isis

[RouterA-isis-1] nexthop 10.1.2.2 weight 1 [RouterA-isis-1] quit 6. 验证配置结果

# 查看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

本文来源:https://www.bwwdw.com/article/i89v.html

Top