配置IS-IS的路由渗透功能示例
组网需求
如图1所示,网络中的六台路由器都配置了IS-IS路由协议。其中RouterA、RouterB作为Level-1路由器,RouterC、RouterD作为Level-1–2路由器都属于Area10。RouterE、RouterF作为Level-2路由器属于Area20。除了RouterC上GE1/0/0接口的开销值被设为40,其他所有接口的开销值都为缺省值10。要求将Level-2区域中的路由信息渗透到Level-1区域,使得RouterA到RouterF的路由为最优路由。
配置思路
采用如下的思路配置IS-IS路由参透:
- 配置各路由器的接口IP地址以及IS-IS路由协议,实现网络互联。
- 配置RouterA、RouterB作为Level-1路由器,RouterC、RouterD作为Level-1–2路由器都属于Area10。配置RouterE、RouterF作为Level-2路由器属于Area20。
- 配置RouterC上GE1/0/0接口的开销值为40,其他所有接口的开销值都为缺省值10。
- 配置将Level-2区域中的路由信息渗透到Level-1区域,使得RouterA到RouterF的路由为最优路由。
操作步骤
- 配置各路由器接口的IP地址
# 配置RouterA。RouterB、RouterC、RouterD、RouterE和RouterF的配置同RouterA(略)。
<Huawei> system-view [Huawei] sysname RouterA [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 24 [RouterA-GigabitEthernet1/0/0] quit
- 配置IS-IS基本功能
# 配置RouterA。
[RouterA] isis 10 [RouterA-isis-10] is-level level-1 [RouterA-isis-10] network-entity 10.0000.0000.0001.00 [RouterA-isis-10] quit [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] isis enable 10 [RouterA-GigabitEthernet1/0/0] quit
# 配置RouterB。
[RouterB] isis 10 [RouterB-isis-10] is-level level-1 [RouterB-isis-10] network-entity 10.0000.0000.0002.00 [RouterB-isis-10] quit [RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] isis enable 10 [RouterB-GigabitEthernet1/0/0] quit
# 配置RouterC。
[RouterC] isis 10 [RouterC-isis-10] network-entity 10.0000.0000.0003.00 [RouterC-isis-10] quit [RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] isis enable 10 [RouterC-GigabitEthernet1/0/0] isis cost 40 level-2 [RouterC-GigabitEthernet1/0/0] quit
# 配置RouterD。
[RouterD] isis 10 [RouterD-isis-10] network-entity 10.0000.0000.0004.00 [RouterD-isis-10] quit [RouterD] interface gigabitethernet 1/0/0 [RouterD-GigabitEthernet1/0/0] isis enable 10 [RouterD-GigabitEthernet1/0/0] quit
# 配置RouterE。
[RouterE] isis 10 [RouterE-isis-10] is-level level-2 [RouterE-isis-10] network-entity 20.0000.0000.0005.00 [RouterE-isis-10] quit [RouterE] interface gigabitethernet 1/0/0 [RouterE-GigabitEthernet1/0/0] isis enable 10 [RouterE-GigabitEthernet1/0/0] quit
# 配置RouterF。
[RouterF] isis 10 [RouterF-isis-10] is-level level-2 [RouterF-isis-10] network-entity 20.0000.0000.0006.00 [RouterF-isis-10] quit [RouterF] interface gigabitethernet 1/0/0 [RouterF-GigabitEthernet1/0/0] isis enable 10 [RouterF-GigabitEthernet1/0/0] quit
GigabitEthernet 2/0/0和GigabitEthernet 3/0/0的配置与GigabitEthernet 1/0/0相同,不再赘述。
- 在RouterD上配置路由参透
[RouterD] isis 10 [RouterD-isis-10] import-route isis level-2 into level-1 [RouterD-isis-10] quit
- 验证配置结果
# 在RouterD上配置路由渗透之前,在RouterA上执行命令tracert 192.168.6.2,发现从RouterA到RouterF的路径为RouterA->RouterC->RouterE->RouterF。整条链路的开销值为10+40+10=60。
# 在RouterD上配置路由渗透之后,在RouterA上执行命令tracert 192.168.6.2,发现从RouterA到RouterF的路径为RouterA->RouterB->RouterD->RouterE->RouterF。此时整条链路的开销值为10+10+10+10=40。由此可知配置路由渗透后,RouterA到RouterF在路由为最优路由。
配置文件
-
RouterA的配置文件
# sysname RouterA # isis 10 is-level level-1 network-entity 10.0000.0000.0001.00 # interface GigabitEthernet1/0/0 ip address 192.168.1.1 255.255.255.0 isis enable 10 # interface GigabitEthernet2/0/0 ip address 192.168.2.1 255.255.255.0 isis enable 10 #
-
RouterB的配置文件
# sysname RouterB # isis 10 is-level level-1 network-entity 10.0000.0000.0002.00 # interface GigabitEthernet1/0/0 ip address 192.168.1.2 255.255.255.0 isis enable 10 # interface GigabitEthernet2/0/0 ip address 192.168.3.1 255.255.255.0 isis enable 10 #
-
RouterC的配置文件
# sysname RouterC # isis 10 network-entity 10.0000.0000.0003.00 # interface GigabitEthernet1/0/0 ip address 192.168.4.1 255.255.255.0 isis enable 10 isis cost 40 level-2 # interface GigabitEthernet2/0/0 ip address 192.168.2.2 255.255.255.0 isis enable 10 #
-
RouterD的配置文件
# sysname RouterD # isis 10 network-entity 10.0000.0000.0004.00 import-route isis level-2 into level-1 # interface GigabitEthernet1/0/0 ip address 192.168.3.2 255.255.255.0 isis enable 10 # interface GigabitEthernet2/0/0 ip address 192.168.5.1 255.255.255.0 isis enable 10 #
-
RouterE的配置文件
# sysname RouterE # isis 10 is-level level-2 network-entity 20.0000.0000.0005.00 # interface GigabitEthernet1/0/0 ip address 192.168.4.2 255.255.255.0 isis enable 10 # interface GigabitEthernet2/0/0 ip address 192.168.5.2 255.255.255.0 isis enable 10 # interface GigabitEthernet3/0/0 ip address 192.168.6.1 255.255.255.0 isis enable 10 #
-
RouterF的配置文件
# sysname RouterF # isis 10 is-level level-2 network-entity 20.0000.0000.0006.00 # interface GigabitEthernet1/0/0 ip address 192.168.6.2 255.255.255.0 isis enable 10 #