A-A+

思科和华为的路由重发布的实验拓扑和配置

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

今天将采用思科cisco和华为huawei路由设备来进行路由从发布的实验。这个实验设计到rip和oispf这两个组网协议,下面是拓扑图和具体的配置命令行。熟悉并掌握这两个在通信领域非常常见的大品牌设备的操作方式,对以后工作和维护都会起到很大的帮助的。

这次实验的网络拓扑图如下,会用到两台PC机客户端和三台router:

R1 的配置

  1. R1(config)#int e0/0  
  2. R1(config-if)#ip add 192.168.1.1 255.255.255.0  
  3. R1(config-if)#no shu  
  4. R1(config-if)#int s1/0  
  5. R1(config-if)#ip add 192.168.2.1 255.255.255.0  
  6. R1(config-if)#no shut  
  7. R1(config-if)#exit  
  8. R1(config)#router rip  
  9. R1(config-router)#netw 192.168.1.0   
  10. R1(config-router)#netw 192.168.2.0   
  11. R1(config-router)#exit  
  12. R1(config)#exit  
  13. R1#show ip rout  

R2的配置

  1. R2(config)#int s0/0  
  2. R2(config-if)#ip add 192.168.2.2 255.255.255.0  
  3. R2(config-if)#no shu  
  4. R2(config-if)#int s0/1                          
  5. R2(config-if)#ip add 192.168.3.1 255.255.255.0  
  6. R2(config-if)#no shu  
  7. R2(config-if)#exit  
  8. R2(config)#router rip  
  9. R2(config-router)#network 192.168.2.0  
  10. R2(config-router)#redistribute ospf 1 met 1   
  11. R2(config-router)#redistribute connected   
  12. R2(config)#router ospf 1  
  13. R2(config-router)#network 192.168.3.0 0.0.0.255 area 0  
  14. R2(config)#router ospf 1  
  15. R2(config-router)#re  
  16. R2(config-router)#redistribute rip  
  17. % Only classful networks will be redistributed  
  18. R2(config-router)#redistribute connected  

R3的配置

  1. R3(config-if)#ip add 192.168.4.2 255.255.255.0  
  2. R3(config-if)#exit  
  3. R3(config)#router ospf 1  
  4. R3(config-router)#network 192.168.3.0 0.0.0.255 area 0  
  5. R3(config-router)#network 192.168.4.0 0.0.0.255 area 0  

华为 在ensp 模拟上与实际做的命令不太相同 配置ospf 很大都是不同

对于R1配置

  1. [R1]rip   
  2. [R1-rip-1]un sum  
  3. [R1-rip-1]network 192.168.1.0  
  4. [R1-rip-1]network 192.168.2.0  
  5. [R1-Ethernet0/0/0]ip add 192.168.1.1 24  
  6. hernet0/0/0]rip ver 2  
  7. [R1-rip-1]int s0/0/0  
  8. [R1-Serial0/0/0]rip ver 2  
  9. [R1-Serial0/0/0]ip add 192.168.2.1 24  
  10. [R1-Serial0/0/0]sh  
  11. [R1-Serial0/0/0]un sh  
  12. [R1]dis ip rout  

对于R2配置

  1. [R2]rip  
  2. [R2-rip-1]netw 192.168.2.0  
  3. [R2-rip-1]im ospf 1   
  4. [R2]int s0/0/0  
  5. [R2-Serial0/0/0]ip add 192.168.2.2 24  
  6. [R2-Serial0/0/0]rip ver 2  
  7. [R2-Serial0/0/0]sh  
  8. [R2-Serial0/0/0]un sh  
  9. [R2]rip  
  10. [R2-rip-1]netw 192.168.2.0   
  11. [R2-rip-1]import ospf 1   
  12. [R2-rip-1]int s0/0/1  
  13. int s0/0/1  
  14. [R2-Serial0/0/1]ip add 192.168.3.1 24  
  15. [R2]ospf  
  16. [R2-ospf-1]import-route rip  
  17. [R2-ospf-1]area 0  
  18. [R2-ospf-1-area-0.0.0.0]netw 192.168.3.0 0.0.0.255   
  19. 对于R3  
  20. [R3]int s0/0/0  
  21. int s0/0/0  
  22. [R3-Serial0/0/0]ip add 192.168.3.2 24  
  23. [R3-Serial0/0/0]sh  
  24. [R3-Serial0/0/0]un sh  
  25. [R3-Ethernet0/0/0]ip add 192.168.4.1 24  
  26. [R3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255  
  27. [R3-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255  

#有点像三层交换机

验证:

R1上

注:实际的华为设备ospf协议命令如下:

[Huawei]int s0/0/0

[Aweigh-Serial0/0/0]ospf enable area 0

进入端口配置协议

标签:

给我留言