A-A+

RIP动态路由的配置的通讯实验

2015年11月21日 站长资讯 暂无评论

今天要完成的通讯实验目标是实现RIP动态路由,这个实验并不复杂,组网拓扑就不说了,只是把命令行给大家列出来,供给大家参考和学习:

  1. Router>  
  2. Router>en  
  3. Router#conf t  
  4. Router(config)#host r1  
  5. r1(config)#int e0  
  6. r1(config-if)#ip add 172.16.1.1 255.255.255.0  
  7. r1(config-if)#no shutdown  
  8. r1(config-if)#exit  
  9. r1(config)#int s0  
  10. r1(config-if)#ip add 172.16.2.1 255.255.255.0  
  11. r1(config-if)#no shutdown  
  12. r1(config-if)#clock rate 56000  
  13. r1(config-if)#no shutdown  
  14. r1(config-if)#exit  
  15. r1(config)#router rip  
  16. r1(config-router)#net 172.16.0.0  
  17. r1(config-router)#^Z  

RIP协议启用前的路由表

  1. r1#show ip route  
  2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP  
  3.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  4.        E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP  
  5.        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default  
  6.        U - per-user static route  
  7.   
  8.   
  9. Gateway of last resort is not set  
  10. C      172.16.1.0/24 is directly connected, Ethernet0  
  11. C      172.16.2.0/24 is directly connected, Serial0  

RIP协议启用后的路由表

  1. r1#show ip route  
  2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP  
  3.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  4.        E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP  
  5.        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default  
  6.        U - per-user static route  
  7. Gateway of last resort is not set  
  8. C      172.16.1.0/24 is directly connected, Ethernet0  
  9. C      172.16.2.0/24 is directly connected, Serial0  
  10. R      172.16.3.0/24 [120/1] via 172.16.2.2, 00:01:37, Serial0   
  11. R      172.16.4.0/24 [120/1] via 172.16.2.2, 00:07:21, Serial0  
  12. R      172.16.5.0/24 [120/2] via 172.16.2.2, 00:05:21, Serial0  

2. R2上的配置:

  1. Router>  
  2. Router>en  
  3. Router#conf t  
  4. Router(config)#host r2  
  5. r2(config)#int s1  
  6. r2(config-if)#ip add 172.16.2.2 255.255.255.0  
  7. r2(config-if)#no shutdown  
  8. r2(config-if)#exit  
  9. r2(config)#int s0  
  10. r2(config-if)#ip add 172.16.4.0 255.255.255.0  
  11. r2(config-if)#ip add 172.16.4.1 255.255.255.0  
  12. r2(config-if)#clock rate 56000  
  13. r2(config-if)#no shutdown  
  14. r2(config-if)#exit  
  15. r2(config)#int e0  
  16. r2(config-if)#ip add 172.16.3.1 255.255.255.0  
  17. r2(config-if)#no shutdown  
  18. r2(config-if)#exit  
  19. r2(config)#router rip  
  20. r2(config-router)#net 172.16.0.0  
  21. r2(config-router)#^Z  
  22. r2#show ip route  
  23. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP  
  24.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  25.        E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP  
  26.   
  27.   
  28.        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default  
  29.        U - per-user static route  
  30. Gateway of last resort is not set  
  31. C      172.16.2.0/24 is directly connected, Serial1  
  32. C      172.16.3.0/24 is directly connected, Ethernet0  
  33. C      172.16.4.0/24 is directly connected, Serial0  
  34. R      172.16.1.0/24 [120/1] via 172.16.2.1, 00:09:13, Serial1  
  35. R      172.16.5.0/24 [120/1] via 172.16.4.2, 00:09:13, Serial0  

3. R3上的配置:

  1. Router>  
  2. Router>en  
  3. Router#conf t  
  4. Router(config)#int s1  
  5. Router(config-if)#ip add 172.16.4.2 255.255.255.0  
  6. Router(config-if)#no shutdown  
  7. Router(config-if)#exit  
  8. Router(config)#int e0  
  9. Router(config-if)#ip add 172.16.5.1 255.255.255.0  
  10. Router(config-if)#no shutdown  
  11. Router(config-if)#exit  
  12. Router(config)#host r3  
  13. r3(config)#  
  14. r3(config)#router rip  
  15. r3(config-router)#net 172.16.0.0  
  16. r3(config-router)#^Z  
  17. r3#show ip route  
  18. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP  
  19.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  20.        E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP  
  21.        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default  
  22.        U - per-user static route   
  23. Gateway of last resort is not set  
  24. C      172.16.4.0/24 is directly connected, Serial1  
  25. C      172.16.5.0/24 is directly connected, Ethernet0  
  26. R      172.16.1.0/24 [120/1] via 172.16.4.1, 00:05:32, Serial1  
  27. R      172.16.2.0/24 [120/1] via 172.16.4.1, 00:08:19, Serial1  
  28. R      172.16.3.0/24 [120/1] via 172.16.4.1, 00:05:32, Serial1  

4. RIP动态路由的测试:

  1. r1#  
  2. r1#ping  
  3. Protocol [ip]:  
  4. Target IP address: 172.16.5.2  
  5. Repeat count [5]:  
  6. Datagram size [100]:  
  7. Timeout in seconds [2]:  
  8. Extended commands [n]:  
  9. Type escape sequence to abort.  
  10. Sending 5, 100-byte ICMP Echos to 172.16.5.2, timeout is 2 seconds:  
  11. !!!!!  
  12. Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms  

PC机上的配置为:

PC1:IP为172.16.1.2 网关:172.16.1.1

PC2:IP为172.16.3.2 网关:172.16.3.1

PC3:IP为172.16.5.2 网关:172.16.5.1

标签:

0 条留言  访客:1 条  博主:0 条

  1. Koolight

    现在没有刻意而为之了。

给我留言