首页 > 代码库 > 【思科】IS-IS基本配置、重发布实验

【思科】IS-IS基本配置、重发布实验

简介:IS-IS协议同标准协议OSPF一样,是一种链路状态动态路由协议,但是它比ospf做了很多优化,减少了路由类型、LSA的泛洪,在现网中的应用也十分的广泛。


实验拓扑:

wKioL1QPrKWg-uTRAAHkPOs26io388.jpg


实验目的:1.在R1—R5上运行IS-IS协议,R1-R6上运行RIPv2协议

          2.进行路由重发布,实现R5、R6互通

          3.实现域间和外部路由汇总


实验步骤:1.在R1到R6上做基本配置,以及环回口。(略)


          2.运行IS-IS协议和RIP协议

R1(config)#router isis 

R1(config-router)#net 49.0001.0001.0001.0001.00    //指定NSAP地址,相当于router ID

R1(config-router)#ex

R1(config)#int range f0/0 ,l0

R1(config-if-range)#ip router isis                //进接口后宣告该接口下的网段


R2(config)#router isis 

R2(config-router)#net 49.0001.0002.0002.0002.00

R2(config-router)#ex

R2(config)#int range f0/0 -1 ,l0

R2(config-if-range)#ip router isis 


R3(config)#router isis 

R3(config-router)#net 49.0000.0003.0003.0003.00

R3(config-router)#ex

R3(config)#int range f0/0 -1 ,l0

R3(config-if-range)#ip router isis 


R4(config)#router isis 

R4(config-router)#net 49.0000.0004.0004.0004.00

R4(config-router)#ex

R4(config)#int range f0/0 -1 ,l0

R4(config-if-range)#ip router isis 


R5(config)#router isis 

R5(config-router)#net 49.0002.0005.0005.0005.00

R5(config-router)#ex

R5(config)#int range f0/1 ,l0

R5(config-if-range)#ip router isis 


R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#no auto-summary 

R1(config-router)#network 16.0.0.0


R6#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R6(config)#router rip

R6(config-router)#version 2

R6(config-router)#no auto-summary 

R6(config-router)#network 16.0.0.0

R6(config-router)#network 6.6.6.6 


可以对IS-IS协议作一些优化,由于ISIS协议路由器默认使用的选择级别是level 1-2,会同时发送两种LSP,这是没有必要的,十分浪费路由资源。


将R1改为level 1

R1(config)#router isis

R1(config-router)#is-type level-1              //修改路由器的路由选择级别

  

将R3,R4改为level 2

R3(config)#router isis

R3(config-router)#is-type level-2


R4(config)#router isis

R4(config-router)#is-type level-2


将R5的f0/1接口改为level 2

R5#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R5(config)#int f0/1

R5(config-if)#isis circuit-type level-2-only    //修改接口的选择级别


3.路由重发布

R1(config)#router isis

R1(config-router)#redistribute rip ?

  level-1      IS-IS level-1 routes only

  level-1-2    IS-IS level-1 and level-2 routes

  level-2      IS-IS level-2 routes only

  metric       Metric for redistributed routes

  metric-type  OSPF/IS-IS exterior metric type for redistributed routes

  route-map    Route map reference

  <cr>


R1(config-router)#redistribute rip level-1

R1(config-router)#ex


R1(config)#router rip 

R1(config-router)#redistribute isis ?

  WORD       ISO routing area tag

  level-1    IS-IS level-1 routes only

  level-1-2  IS-IS level-1 and level-2 routes

  level-2    IS-IS level-2 routes only

  metric     Metric for redistributed routes

  route-map  Route map reference

  <cr>


R1(config-router)#redistribute isis level-1 metric 2


查看一下R5的路由表


R5#show ip route

....

     34.0.0.0/24 is subnetted, 1 subnets

i L2    34.0.0.0 [115/20] via 45.0.0.4, FastEthernet0/1

     16.0.0.0/24 is subnetted, 1 subnets

i L2    16.0.0.0 [115/40] via 45.0.0.4, FastEthernet0/1

     1.0.0.0/32 is subnetted, 1 subnets

i L2    1.1.1.1 [115/50] via 45.0.0.4, FastEthernet0/1

     2.0.0.0/24 is subnetted, 1 subnets

i L2    2.2.2.0 [115/40] via 45.0.0.4, FastEthernet0/1

     3.0.0.0/32 is subnetted, 1 subnets

i L2    3.3.3.3 [115/30] via 45.0.0.4, FastEthernet0/1

     4.0.0.0/32 is subnetted, 1 subnets

i L2    4.4.4.4 [115/20] via 45.0.0.4, FastEthernet0/1

     5.0.0.0/32 is subnetted, 1 subnets

C       5.5.5.5 is directly connected, Loopback0

     6.0.0.0/32 is subnetted, 1 subnets

i L2    6.6.6.6 [115/40] via 45.0.0.4, FastEthernet0/1

     23.0.0.0/24 is subnetted, 1 subnets

i L2    23.0.0.0 [115/30] via 45.0.0.4, FastEthernet0/1

     45.0.0.0/24 is subnetted, 1 subnets

C       45.0.0.0 is directly connected, FastEthernet0/1


测试一下R5能否连通R6

R5#p 6.6.6.6


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 88/122/140 ms


可见,R5已经学习到R6的路由了。


4.域间路由汇总和外部路由汇总

假设在R5上有4条路由,192.168.0.1-192.168.3.1

可以在R5上进行汇总

R5(config)#router isis

R5(config-router)#summary-address 192.168.0.0 255.255.252.0


这时候,在R4上面查看路由表会发现一条汇总路由


R4#show ip r

*Mar  1 01:09:31.227: %SYS-5-CONFIG_I: Configured from console by console

R4#show ip route

....

     34.0.0.0/24 is subnetted, 1 subnets

C       34.0.0.0 is directly connected, FastEthernet0/1

     16.0.0.0/24 is subnetted, 1 subnets

i L2    16.0.0.0 [115/30] via 34.0.0.3, FastEthernet0/1

     1.0.0.0/32 is subnetted, 1 subnets

i L2    1.1.1.1 [115/40] via 34.0.0.3, FastEthernet0/1

     2.0.0.0/24 is subnetted, 1 subnets

i L2    2.2.2.0 [115/30] via 34.0.0.3, FastEthernet0/1

     3.0.0.0/32 is subnetted, 1 subnets

i L2    3.3.3.3 [115/20] via 34.0.0.3, FastEthernet0/1

     4.0.0.0/32 is subnetted, 1 subnets

C       4.4.4.4 is directly connected, Loopback0

     5.0.0.0/32 is subnetted, 1 subnets

i L2    5.5.5.5 [115/20] via 45.0.0.5, FastEthernet0/0

     6.0.0.0/32 is subnetted, 1 subnets

i L2    6.6.6.6 [115/30] via 34.0.0.3, FastEthernet0/1

     23.0.0.0/24 is subnetted, 1 subnets

i L2    23.0.0.0 [115/20] via 34.0.0.3, FastEthernet0/1

     12.0.0.0/24 is subnetted, 1 subnets

i L2    12.0.0.0 [115/30] via 34.0.0.3, FastEthernet0/1

     45.0.0.0/24 is subnetted, 1 subnets

C       45.0.0.0 is directly connected, FastEthernet0/0

i L2 192.168.0.0/22 [115/20] via 45.0.0.5, FastEthernet0/0


这样可以节省路由器的资源。

同样的,假设在R6上有4条路由172.16.0.1-172.16.3.1

可以在R1上进行路由汇总


R1(config)#router isis

R1(config-router)#summary-address 172.16.0.0 255.255.252.0 level-1


注意:在对外部路由进行汇总的时候,最后要加上level-x ,否则无效


在R2上查看一下路由汇总是否生效。


R2#show ip route

.....

     34.0.0.0/24 is subnetted, 1 subnets

i L2    34.0.0.0 [115/20] via 23.0.0.3, FastEthernet0/0

     16.0.0.0/24 is subnetted, 1 subnets

i L1    16.0.0.0 [115/10] via 12.0.0.1, FastEthernet0/1

     1.0.0.0/32 is subnetted, 1 subnets

i L1    1.1.1.1 [115/20] via 12.0.0.1, FastEthernet0/1

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     3.0.0.0/32 is subnetted, 1 subnets

i L2    3.3.3.3 [115/20] via 23.0.0.3, FastEthernet0/0

     4.0.0.0/32 is subnetted, 1 subnets

i L2    4.4.4.4 [115/30] via 23.0.0.3, FastEthernet0/0

     5.0.0.0/32 is subnetted, 1 subnets

i L2    5.5.5.5 [115/40] via 23.0.0.3, FastEthernet0/0

     6.0.0.0/32 is subnetted, 1 subnets

i L1    6.6.6.6 [115/10] via 12.0.0.1, FastEthernet0/1

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, FastEthernet0/0

     172.16.0.0/22 is subnetted, 1 subnets

i L1    172.16.0.0 [115/10] via 12.0.0.1, FastEthernet0/1

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, FastEthernet0/1

     45.0.0.0/24 is subnetted, 1 subnets

i L2    45.0.0.0 [115/30] via 23.0.0.3, FastEthernet0/0

i L2 192.168.0.0/22 [115/40] via 23.0.0.3, FastEthernet0/0


汇总完毕,实验结束




本文出自 “NE之路” 博客,请务必保留此出处http://332162926.blog.51cto.com/8831013/1550436

【思科】IS-IS基本配置、重发布实验