配置IS-IS的负载分担示例

学习精彩网络技术老师:华为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。

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

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。

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

IS-IS基本功能的配置,请参见配置IS-IS基本功能示例

  1. 在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为唯一最优路由。

  1. 在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)均成为有效路由。

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

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

[RouterA] isis

[RouterA-isis-1] nexthop 10.1.2.2 weight 1

[RouterA-isis-1] quit

  1. 验证配置结果

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

精彩网络技术

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值