A-A+

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

2015年12月24日 路由器高级应用 暂无评论 阅读 4 views 次

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

实验拓扑:(略)

实验目的:

1.在R1—R5上运行IS-IS协议,R1-R6上运行RIPv2协议。

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

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

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

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

  1. R1(config)#router isis  
  2. R1(config-router)#net 49.0001.0001.0001.0001.00 //指定NSAP地址,相当于router ID  
  3. R1(config-router)#ex  
  4. R1(config)#int range f0/0 ,l0  
  5. R1(config-if-range)#ip router isis //进接口后宣告该接口下的网段  
  6.    
  7. R2(config)#router isis  
  8. R2(config-router)#net 49.0001.0002.0002.0002.00  
  9. R2(config-router)#ex  
  10. R2(config)#int range f0/0 -1 ,l0  
  11. R2(config-if-range)#ip router isis   
  12.    
  13. R3(config)#router isis  
  14. R3(config-router)#net 49.0000.0003.0003.0003.00  
  15. R3(config-router)#ex  
  16. R3(config)#int range f0/0 -1 ,l0  
  17. R3(config-if-range)#ip router isis   
  18.    
  19. R4(config)#router isis  
  20. R4(config-router)#net 49.0000.0004.0004.0004.00  
  21. R4(config-router)#ex  
  22. R4(config)#int range f0/0 -1 ,l0  
  23. R4(config-if-range)#ip router isis   
  24.    
  25. R5(config)#router isis  
  26. R5(config-router)#net 49.0002.0005.0005.0005.00  
  27. R5(config-router)#ex  
  28. R5(config)#int range f0/1 ,l0  
  29. R5(config-if-range)#ip router isis   
  30.    
  31. R1(config)#router rip  
  32. R1(config-router)#version 2  
  33. R1(config-router)#no auto-summary  
  34. R1(config-router)#network 16.0.0.0  
  35.    
  36. R6#conf t http://www.19216811.la/  
  37. Enter configuration commands, one per line. End with CNTL/Z.  
  38. R6(config)#router rip  
  39. R6(config-router)#version 2  
  40. R6(config-router)#no auto-summary  
  41. R6(config-router)#network 16.0.0.0  
  42. 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.路由重发布

  1. R1(config)#router isis  
  2. R1(config-router)#redistribute rip ?  
  3. level-1 IS-IS level-1 routes only  
  4. level-1-2 IS-IS level-1 and level-2 routes  
  5. level-2 IS-IS level-2 routes only  
  6. metric Metric for redistributed routes  
  7. metric-type OSPF/IS-IS exterior metric type for redistributed routes  
  8. route-map Route map reference  
  9. <cr>  
  10.    
  11. R1(config-router)#redistribute rip level-1  
  12. R1(config-router)#ex  
  13.    
  14. R1(config)#router rip  
  15. R1(config-router)#redistribute isis ?  
  16. WORD ISO routing area tag  
  17. level-1 IS-IS level-1 routes only  
  18. level-1-2 IS-IS level-1 and level-2 routes  
  19. level-2 IS-IS level-2 routes only  
  20. metric Metric for redistributed routes  
  21. route-map Route map reference  
  22. <cr>  
  23.    
  24. R1(config-router)#redistribute isis level-1 metric 2  

查看一下R5的路由表

  1. R5#show ip route  
  2. ....  
  3. 34.0.0.0/24 is subnetted, 1 subnets  
  4. i L2 34.0.0.0 [115/20] via 45.0.0.4, FastEthernet0/1  
  5. 16.0.0.0/24 is subnetted, 1 subnets  
  6. i L2 16.0.0.0 [115/40] via 45.0.0.4, FastEthernet0/1  
  7. 1.0.0.0/32 is subnetted, 1 subnets  
  8. i L2 1.1.1.1 [115/50] via 45.0.0.4, FastEthernet0/1  
  9. 2.0.0.0/24 is subnetted, 1 subnets  
  10. i L2 2.2.2.0 [115/40] via 45.0.0.4, FastEthernet0/1  
  11. 3.0.0.0/32 is subnetted, 1 subnets  
  12. i L2 3.3.3.3 [115/30] via 45.0.0.4, FastEthernet0/1  
  13. 4.0.0.0/32 is subnetted, 1 subnets  
  14. i L2 4.4.4.4 [115/20] via 45.0.0.4, FastEthernet0/1  
  15. 5.0.0.0/32 is subnetted, 1 subnets  
  16. C 5.5.5.5 is directly connected, Loopback0  
  17. 6.0.0.0/32 is subnetted, 1 subnets  
  18. i L2 6.6.6.6 [115/40] via 45.0.0.4, FastEthernet0/1  
  19. 23.0.0.0/24 is subnetted, 1 subnets  
  20. i L2 23.0.0.0 [115/30] via 45.0.0.4, FastEthernet0/1  
  21. 45.0.0.0/24 is subnetted, 1 subnets  
  22. C 45.0.0.0 is directly connected, FastEthernet0/1  

测试一下R5能否连通R6

  1. R5#p 6.6.6.6  
  2.    
  3. Type escape sequence to abort.  
  4. Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:  
  5. !!!!!  
  6. 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上面查看路由表会发现一条汇总路由

  1. R4#show ip r  
  2. *Mar 1 01:09:31.227: %SYS-5-CONFIG_I: Configured from console by console  
  3. R4#show ip route  
  4. ....  
  5. 34.0.0.0/24 is subnetted, 1 subnets  
  6. C 34.0.0.0 is directly connected, FastEthernet0/1  
  7. 16.0.0.0/24 is subnetted, 1 subnets  
  8. i L2 16.0.0.0 [115/30] via 34.0.0.3, FastEthernet0/1  
  9. 1.0.0.0/32 is subnetted, 1 subnets  
  10. i L2 1.1.1.1 [115/40] via 34.0.0.3, FastEthernet0/1  
  11. 2.0.0.0/24 is subnetted, 1 subnets  
  12. i L2 2.2.2.0 [115/30] via 34.0.0.3, FastEthernet0/1  
  13. 3.0.0.0/32 is subnetted, 1 subnets  
  14. i L2 3.3.3.3 [115/20] via 34.0.0.3, FastEthernet0/1  
  15. 4.0.0.0/32 is subnetted, 1 subnets  
  16. C 4.4.4.4 is directly connected, Loopback0  
  17. 5.0.0.0/32 is subnetted, 1 subnets  
  18. i L2 5.5.5.5 [115/20] via 45.0.0.5, FastEthernet0/0  
  19. 6.0.0.0/32 is subnetted, 1 subnets  
  20. i L2 6.6.6.6 [115/30] via 34.0.0.3, FastEthernet0/1  
  21. 23.0.0.0/24 is subnetted, 1 subnets  
  22. i L2 23.0.0.0 [115/20] via 34.0.0.3, FastEthernet0/1  
  23. 12.0.0.0/24 is subnetted, 1 subnets  
  24. i L2 12.0.0.0 [115/30] via 34.0.0.3, FastEthernet0/1  
  25. 45.0.0.0/24 is subnetted, 1 subnets  
  26. C 45.0.0.0 is directly connected, FastEthernet0/0  
  27. 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上查看一下路由汇总是否生效。

  1. R2#show ip route  
  2. .....  
  3.    
  4. 34.0.0.0/24 is subnetted, 1 subnets  
  5. i L2 34.0.0.0 [115/20] via 23.0.0.3, FastEthernet0/0  
  6. 16.0.0.0/24 is subnetted, 1 subnets  
  7. i L1 16.0.0.0 [115/10] via 12.0.0.1, FastEthernet0/1  
  8. 1.0.0.0/32 is subnetted, 1 subnets  
  9. i L1 1.1.1.1 [115/20] via 12.0.0.1, FastEthernet0/1  
  10. 2.0.0.0/24 is subnetted, 1 subnets  
  11. C 2.2.2.0 is directly connected, Loopback0  
  12. 3.0.0.0/32 is subnetted, 1 subnets  
  13. i L2 3.3.3.3 [115/20] via 23.0.0.3, FastEthernet0/0  
  14. 4.0.0.0/32 is subnetted, 1 subnets  
  15. i L2 4.4.4.4 [115/30] via 23.0.0.3, FastEthernet0/0  
  16. 5.0.0.0/32 is subnetted, 1 subnets  
  17. i L2 5.5.5.5 [115/40] via 23.0.0.3, FastEthernet0/0  
  18. 6.0.0.0/32 is subnetted, 1 subnets  
  19. i L1 6.6.6.6 [115/10] via 12.0.0.1, FastEthernet0/1  
  20. 23.0.0.0/24 is subnetted, 1 subnets  
  21. C 23.0.0.0 is directly connected, FastEthernet0/0  
  22. 172.16.0.0/22 is subnetted, 1 subnets  
  23. i L1 172.16.0.0 [115/10] via 12.0.0.1, FastEthernet0/1  
  24. 12.0.0.0/24 is subnetted, 1 subnets  
  25. C 12.0.0.0 is directly connected, FastEthernet0/1  
  26. 45.0.0.0/24 is subnetted, 1 subnets  
  27. i L2 45.0.0.0 [115/30] via 23.0.0.3, FastEthernet0/0  
  28. i L2 192.168.0.0/22 [115/40] via 23.0.0.3, FastEthernet0/0  

汇总完毕,实验结束。

标签:

给我留言