A-A+

Cisco路由的RIP配置的一个案例

2016年02月20日 站长资讯 暂无评论

今天尝试了让三台Cisco路由器R1、R2和R3连接成链式网络,通过模拟器来完成。R1的端口ip是1.1.1.1,R2是1.1.1.2和2.2.2.2,而R3是2.2.2.3,要配置RIP,具体的命令行如下:

  1. R1#conf t   
  2. R1(config)#int fa 0/0  
  3. R1(config-if)#ip add 1.1.1.1 255.255.255.0  
  4. R1(config-if)#no sh   
  5. R1(config-if)#exit   
  6. R1(config)#router rip   
  7. R1(config-router)#network 1.1.1.0   
  8. R1(config-router)#version 2  
  9.   
  10. R2#conf t  
  11. R2(config)# int fa 0/0  
  12. R2(config-if)#ip add 1.1.1.2 255.255.255.0  
  13. R2(config-if)#no sh   
  14. R2(config-if)#exit   
  15. R2(config)#int fa 1/0  
  16. R2(config-if)#ip add 2.2.2.2 255.255.255.0  
  17. R2(config-if)#no sh   
  18. R2(config-if)#exit   
  19. R2(config)#router rip   
  20. R2(config-router)#vers  
  21. R2(config-router)#version 2  
  22. R2(config-router)#net  
  23. R2(config-router)#network 1.1.1.0    
  24. R2(config-router)#net  
  25. R2(config-router)#network 2.2.2.0  
  26. R2(config-router)#exit  
  27.   
  28. R3#conf t   
  29. R3(config)#int fa 0/0  
  30. R3(config-if)#ip add 2.2.2.3 255.255.255.0  
  31. R3(config-if)#no sh   
  32. R3(config-if)#exit   
  33. R3(config)#router   
  34. R3(config)#router rip   
  35. R3(config-router)#ver    
  36. R3(config-router)#version 2  
  37. R3(config-router)#net  
  38. R3(config-router)#network 2.2.2.0  
  39. R3(config-router)#exit  
  40.   
  41. R3#ping 1.1.1.1  
  42.   
  43. Type escape sequence to abort.  
  44. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:  
  45. !!!!!  
  46. Success rate is 100 percent (5/5), round-trip min/avg/max = 36/42/56 ms  

测试成功

·配置完成之后可以通过sh ip rip database 查看RIP的数据库

  1. R1#sh ip rip database  
  2. 1.0.0.0/8    auto-summary  
  3. 1.1.1.0/24    directly connected, FastEthernet0/0  
  4. 2.0.0.0/8    auto-summary  
  5. 2.0.0.0/8  
  6. [1] via 1.1.1.2, 00:00:01, FastEthernet0/0  

·RIP有两个版本,分别为Version1 、 Version2

RIPv2 为无类,采用组播 224.0.0.9 ,支持VLSM MD5认证 以及不连续网络

RIPv1 有类,基于广播,不支持VLSM 不设认证 ,不支持不连续网络

·抑制RIP的传播

使用passive-interface 端口号 在指定借口上阻止RIP 更新的对外广播,又不影响该借口对RIP的更新接收

本人是个菜鸟,欢迎各位提出意见及不足,谢谢。

标签:

给我留言