A-A+

多区域OSPF和路由再发布,实现不同网段互相通信

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

1、要求:

现有两台路由器,一台交换机和四台防火墙,要求模拟多区域OSPF的配置。其中有三个区域配置的路由协议为OSPF,另一个区域配置的路由协议时RIP,并且每个区域都在不同的网段,要求所有区域的不同网段能够实现相互通信。
2、网络拓扑图:

用亿图绘制出网络逻辑拓扑图如图1所示:

3、设备中OSPF的配置:

(1)R1的配置

  1. [Router]sysname R1  
  2. [R1]int s0  
  3. [R1-Serial0]ip add 192.168.2.1 24  
  4. [R1-Serial0]  
  5. %01:16:08: Line protocol ip on the interface Serial0 is UP  
  6. [R1-Serial0]shut  
  7. % Interface Serial0 is down  
  8. [R1-Serial0]  
  9. %01:16:14: Interface Serial0 is DOWN  
  10. [R1-Serial0]undo shut  
  11. % Interface Serial0 is reset  
  12. [R1-Serial0]  
  13. %01:16:26: Interface Serial0 is UP  
  14. [R1-Serial0]int et0  
  15. [R1-Ethernet0]ip add 192.168.1.1 24  
  16. [R1-Ethernet0]loop  
  17.  Ethernet0 running on loopback mode  
  18. [R1]ospf enable  
  19.  Start OSPF task...  
  20.  OSPF enabled  
  21. [R1-ospf]int et0  
  22. [R1-Ethernet0]ospf enable area 1   
  23. [R1-Ethernet0]int s0  
  24. [R1-Serial0]ospf enable area 1  

(2)R2的配置

  1. Router]sysname R2  
  2. [R2]int s?  
  3.  Serial  
  4. [R2]int s10  
  5.  No such interface  
  6.   
  7. [R2]int s0  
  8. [R2-Serial0]ip add 192.168.2.2 255.255.255.0  
  9. [R2-Serial0]  
  10. %01:10:18: Line protocol ip on the interface Serial0 is UP  
  11. [R2-Serial0]shut  
  12. % Interface Serial0 is shut down  
  13. [R2-Serial0]  
  14. %01:10:30: Interface Serial0 is DOWN    
  15. [R2-Serial0]undo shut  
  16. % Interface Serial0 is reset  
  17. [R2-Serial0]  
  18. %01:10:53: Interface Serial0 is UP  
  19. [R2-Serial0]int et0  
  20. [R2-Ethernet0]ip add 192.168.3.1 24    
  21. [R2-Ethernet0]  
  22. %01:11:37: Line protocol ip on the interface Ethernet0 is UP  
  23. [R2-Ethernet0]int et1  
  24. [R2-Ethernet1]ip add 192.168.7.1 24  
  25. [R2-Ethernet1]  
  26. %01:12:00: Line protocol ip on the interface Ethernet1 is UP  
  27. [R2]ospf enable  
  28.  Start OSPF task...  
  29.  OSPF enabled  
  30. [R2-ospf]int s0  
  31. [R2-Serial0]ospf enable area 1  
  32. [R2-Serial0]int et0  
  33. [R2-Ethernet0]ospf enable area 0  
  34. [R2]rip  
  35.    waiting...  
  36.  RIP is running  
  37.   
  38.   
  39. [R2-rip]net 192.168.2.0  
  40. [R2-rip]net 192.168.3.0  
  41. [R2-rip]net 192.168.7.0  

(3)R3的配置

  1. <Quidway>system-view  
  2. Enter system view , return user view with Ctrl+Z.  
  3. [Quidway]sysname R3  
  4. [R3]vlan 10  
  5. [R3-vlan10]port et0/24  
  6. [R3-vlan10]vlan 20  
  7. [R3-vlan20]port et0/22R4的配置  
  8. [R3]int vlan 10  
  9. [R3-Vlan-interface10]  
  10. %Apr  9 18:10:23 2014 R3 L2INF/5/VLANIF LINK STATUS CHANGE:Slot=1;  
  11. Vlan-interface10: turns into UP state  
  12. [R3-Vlan-interface10]ip address 192.168.3.2 255.255.255.0  
  13. [R3-Vlan-interface10]  
  14. %Apr  9 18:11:22 2014 R3 IFNET/5/UPDOWN:Slot=1;Line protocol on the interface Vlan-interface10 turns into UP state  
  15. [R3-Vlan-interface10]int vlan 20  
  16. [R3-Vlan-interface20]  
  17. %Apr  9 18:11:32 2014 R3 L2INF/5/VLANIF LINK STATUS CHANGE:Slot=1;  
  18. Vlan-interface20: turns into UP state  
  19. [R3-Vlan-interface20]ip add  
  20. [R3-Vlan-interface20]ip address 192.168.4.1 255.255.255.0   
  21. [R3-Vlan-interface20]  
  22. %Apr  9 18:12:05 2014 R3 IFNET/5/UPDOWN:Slot=1;Line protocol on the interface Vlan-interface20 turns into UP state  
  23. R3-Vlan-interface20]quit  
  24. [R3]router id 3.3.3.3  
  25. [R3]ospf enable  
  26.         ^  
  27. % Too many parameters found at '^' position.  
  28. [R3]ospf        
  29. [R3-ospf]area 0  
  30. [R3-ospf-area-0.0.0.0]net  
  31. [R3-ospf-area-0.0.0.0]network 192.168.3.2 0.0.0.0 ?  
  32.  <cr>    
  33. [R3-ospf-area-0.0.0.0]network 192.168.3.2 0.0.0.0  
  34. [R3-ospf-area-0.0.0.0]network 192.168.4.1 0.0.0.0  

(4)R4的配置

  1. <H3C> system-view  
  2. System View: return to User View with Ctrl+Z.  
  3. [H3C]sysname R4  
  4. [R4]int et0/0  
  5. [R4-Ethernet0/0]undo ip add  
  6. [R4-Ethernet0/0]undo ip address  
  7. [R4-Ethernet0/0]ip address 192.168.4.2 24  
  8. [R4-Ethernet0/0]  
  9. %Apr 10 07:57:47:047 2013 R4 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is UP    
  10. [R4-Ethernet0/0]int et0/1  
  11. [R4-Ethernet0/1]ip add  
  12. [R4-Ethernet0/1]ip address 192.168.5.1 24  
  13. [R4-Ethernet0/1]  
  14. %Apr 10 07:58:34:061 2013 R4 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/1 is UP    
  15. [R4-Ethernet0/1]quit  
  16. [R4]firewall zone trust  
  17. [R4-zone-trust]add interface ?  
  18.  Ethernet  Ethernet interface  
  19. [R4-zone-trust]add interface et  
  20. [R4-zone-trust]add interface Ethernet0/1  
  21. [R4]router ip 4.4.4.4  
  22.           ^  
  23. [R4]ospf  
  24. [R4-ospf-1]area 0  
  25. [R4-ospf-1-area-0.0.0.0]net  
  26. [R4-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0  
  27. [R4-ospf-1-area-0.0.0.0]quit  
  28. [R4-ospf-1]area 2  
  29. [R4-ospf-1-area-0.0.0.2]net  
  30. [R4-ospf-1-area-0.0.0.2]network 192.168.5.1 0.0.0.0  

(5)R5的配置

  1. H3C>system-view  
  2. System View: return to User View with Ctrl+Z.  
  3. [H3C]sysname R5  
  4. [R5]int et0/0  
  5. [R5-Ethernet0/0]undo ip add   
  6. [R5-Ethernet0/0]  
  7. %Apr 10 02:41:41:654 2014 R5 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is DOWN    
  8. [R5-Ethernet0/0]ip add  
  9. [R5-Ethernet0/0]ip address 192.168.5.2 24  
  10. [R5-Ethernet0/0]  
  11. %Apr 10 02:41:58:624 2014 R5 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is UP    
  12. [R5-Ethernet0/0]int et0/1  
  13. [R5-Ethernet0/1]ip add  
  14. [R5-Ethernet0/1]ip address 192.168.6.1 24  
  15. [R5-Ethernet0/1]loo  
  16. [R5-Ethernet0/1]loopback  
  17. [R5-Ethernet0/1]quit  
  18. [R5]firewall zone t  
  19. [R5]firewall zone trust  
  20. [R5-zone-trust]add int  
  21. [R5-zone-trust]add interface et0/1  
  22. //OSPF的配置  
  23. [R5]router id 5.5.5.5  
  24. [R5]ospf  
  25. [R5-ospf-1]area 2  
  26. [R5-ospf-1-area-0.0.0.2]net  
  27. [R5-ospf-1-area-0.0.0.2]network 192.168.5.2 0.0.0.0  
  28. [R5-ospf-1-area-0.0.0.2]network 192.168.6.1 0.0.0.0  

(6)R6的配置

  1. <H3C>system-view  
  2. System View: return to User View with Ctrl+Z.  
  3. [H3C]sysname R6   
  4. [R6]int et0/0  
  5. [R6-Ethernet0/0]undo ip address  
  6. [R6-Ethernet0/0]  
  7. %Apr 11 15:33:55:255 2014 R6 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is DOWN    
  8. [R6-Ethernet0/0]ip add  
  9. [R6-Ethernet0/0]ip address 192.168.7.2 24  
  10. [R6-Ethernet0/0]  
  11. %Apr 11 15:34:13:683 2014 R6 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is UP    
  12. [R6-Ethernet0/0]int et0/1  
  13. [R6-Ethernet0/1]ip add  
  14. [R6-Ethernet0/1]ip address 192.168.8.1 24  
  15. %Apr 11 15:35:12:544 2014 R6 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/1 is UP    
  16. [R6-Ethernet0/1]quit  
  17. [R6]firewall zone trust  
  18. [R6-zone-trust]add int  
  19. [R6-zone-trust]add interface et0/1  
  20. //RIP的配置  
  21. [R6-zone-trust]quit  
  22. [R6]rip  
  23. [R6-rip]net  
  24. [R6-rip]network 192.168.7.0  
  25. [R6-rip]network 192.168.8.0  
  26. [R6-rip]quit  

(7)R7的配置

  1. <H3C>system-view  
  2. System View: return to User View with Ctrl+Z.   
  3. [H3C]sysname R7  
  4. [R7]int et0/0  
  5. [R7-Ethernet0/0]ip add  
  6. [R7-Ethernet0/0]ip address 192.168.8.2 24  
  7. [R7-Ethernet0/0]  
  8. %Apr 11 16:22:22:724 2014 R7 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/0 is UP    
  9. [R7-Ethernet0/0]int et0/1  
  10. [R7-Ethernet0/1]ip add  
  11. [R7-Ethernet0/1]ip address 192.168.9.1 24  
  12. [R7-Ethernet0/1]loopback  
  13. [R7-Ethernet0/1]  
  14. %Apr 11 16:23:40:045 2014 R7 PHY/1/PHY:    Ethernet0/1: change status to up  
  15. %Apr 11 16:23:40:046 2014 R7 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/1 is UP    
  16. [R7-Ethernet0/1]quit  
  17. [R7] firewall packet-filter default permit  
  18. [R7]fir  
  19. [R7]firewall zone trust  
  20. [R7-zone-trust]add int et0/0  
  21. [R7-zone-trust]add int et0/1  
  22. [R7-zone-trust]quit  
  23. //RIP的配置  
  24. [R7]rip  
  25. [R7-rip]net  
  26. [R7-rip]network 192.168.8.0  
  27. [R7-rip]network 192.168.9.0  

4、验证:

(1)查看R1的路由表:

  1. [R1]dis ip rout   
  2. Routing Tables:  
  3.  Destination/Mask  Proto   Pref     Metric     Nexthop    Interface  
  4.   127.0.0.0/8   Direct    0         0        127.0.0.1 LoopBack0            
  5.   127.0.0.1/32  Direct    0         0        127.0.0.1 LoopBack0            
  6.   192.168.1.0/24  Direct    0         0      192.168.1.1 Ethernet0        
  7.   192.168.1.1/32  Direct    0         0      127.0.0.1 LoopBack0          
  8.   192.168.2.0/24  Direct    0         0      192.168.2.2 Serial0          
  9.   192.168.2.1/32  Direct    0      0        127.0.0.1 LoopBack0          
  10.   192.168.2.2/32  Direct    0         0      192.168.2.2 Serial0              
  11.   192.168.3.0/24    OSPF   10      1572      192.168.2.2 Serial0              
  12.   192.168.4.0/24    OSPF   10      1582      192.168.2.2 Serial0              
  13.   192.168.5.0/24    OSPF   10      1583      192.168.2.2 Serial0              
  14.   192.168.6.0/24    OSPF   10      1584      192.168.2.2 Serial0  

(2)查看R2的路由表:

  1. [R2]dis ip routing  
  2. Routing Tables:  
  3.  Destination/Mask  Proto   Pref     Metric     Nexthop    Interface  
  4.   127.0.0.0/8   Direct    0         0       127.0.0.1   LoopBack0    
  5.   27.0.0.1/32  Direct    0         0      127.0.0.1     LoopBack0    
  6.  192.168.1.0/24    OSPF   10      1572     192.168.2.1   Serial0   
  7.   192.168.2.0/24  Direct    0      0      192.168.2.1     Serial0      
  8.   192.168.2.1/32  Direct    0       0      192.168.2.1    Serial0      
  9.   192.168.2.2/32  Direct    0       0     127.0.0.1     LoopBack0      
  10.   192.168.3.0/24  Direct    0       0      192.168.3.   1 Ethernet0      
  11.   192.168.3.1/32  Direct    0       0      127.0.0.1    LoopBack0    
  12.  192.168.4.0/24    OSPF   10      20     192.168.3.2   Ethernet0      
  13.    192.168.5.0/24    OSPF   10    21     192.168.3.2    Ethernet0    
  14.    192.168.6.0/24    OSPF   10     22     192.168.3.2   Ethernet0    
  15.    192.168.7.0/24  Direct    0      0     192.168.7.1  Ethernet1      
  16.    192.168.7.1/32  Direct    0     0        127.0.0.1 LoopBack0    

(3)查看R3的路由表:

  1. <R3>dis ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol   Pre   Cost   Nexthop      Interface  
  4. 127.0.0.0/8       DIRECT     0    0    127.0.0.1    InLoopBack0   
  5. 127.0.0.1/32     DIRECT     0     0     127.0.0.1    InLoopBack0  
  6. 192.168.1.0/24   OSPF   10   1582    192.168.3.1   Vlan-interface10  
  7. 192.168.2.0/24   OSPF    10    1572   192.168.3.1  Vlan-interface10  
  8. 192.168.3.0/24   DIRECT    0    0    192.168.3.2  Vlan-interface10  
  9. 192.168.3.2/32   DIRECT   0     0    127.0.0.1       InLoopBack0  
  10. 192.168.4.0/24   DIRECT   0     0    192.168.4.1  Vlan-interface20  
  11. 192.168.4.1/32     DIRECT     0     0   127.0.0.1  InLoopBack0  
  12. 192.168.5.0/24   OSPF    10    11    192.168.4.2   Vlan-interface20   
  13. 192.168.6.0/24   OSPF   10    12    192.168.4.2   Vlan-interface20  

(4)查看R4的路由表:

  1. [R4]dis ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol Pre  Cost     Nexthop         Interface  
  4. 127.0.0.0/8    DIRECT   0    0     127.0.0.1       InLoopBack0  
  5. 127.0.0.1/32    DIRECT   0    0      127.0.0.1       InLoopBack0  
  6. 192.168.1.0/24   OSPF     10   1583     192.168.4.1  Ethernet0/0  
  7. 192.168.2.0/24     OSPF   10   1573    192.168.4.1     Ethernet0/0  
  8. 192.168.3.0/24   OSPF   10   11      192.168.4.1     Ethernet0/0   
  9. 192.168.4.0/24     DIRECT   0    0     192.168.4.2     Ethernet0/0  
  10. 192.168.4.2/32     DIRECT   0   0    127.0.0.1       InLoopBack0  
  11. 192.168.5.0/24    DIRECT   0    0       192.168.5.1   Ethernet0/1  
  12. 192.168.5.1/32     DIRECT   0    0      127.0.0.1    InLoopBack0  
  13. 192.168.6.0/24     OSPF     10   2      192.168.5.2   Ethernet0/1  

(5)查看R5的路由表:

  1. [R5]dis ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol Pre  Cost   Nexthop       Interface  
  4. 127.0.0.0/8        DIRECT   0    0     127.0.0.1    InLoopBack0   
  5. 127.0.0.1/32       DIRECT   0    0      127.0.0.1    InLoopBack0  
  6. 192.168.1.0/24     OSPF     10   1584    192.168.5.1  Ethernet0/0  
  7. 192.168.2.0/24   OSPF     10   1574    192.168.5.1     Ethernet0/0  
  8. 192.168.3.0/24    OSPF     10   12     192.168.5.1     Ethernet0/0  
  9. 192.168.4.0/24     OSPF     10   2     192.168.5.1     Ethernet0/0  
  10. 192.168.5.0/24     DIRECT   0    0     192.168.5.2     Ethernet0/0  
  11. 192.168.5.2/32    DIRECT   0    0    127.0.0.1       InLoopBack0   
  12. 192.168.6.0/24    DIRECT   0    0      192.168.6.1     Ethernet0/1  
  13. 192.168.6.1/32    DIRECT   0    0    127.0.0.1       InLoopBack0  

(6)查看R6的路由表:

  1. <R6>dis ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol Pre  Cost     Nexthop         Interface  
  4. 127.0.0.0/8        DIRECT   0    0     127.0.0.1    InLoopBack0  
  5. 127.0.0.1/32       DIRECT   0    0     127.0.0.1   InLoopBack0  
  6. 192.168.7.0/24     DIRECT   0    0    192.168.7.2     Ethernet0/0   
  7. 192.168.7.2/32     DIRECT   0    0       127.0.0.1   InLoopBack0  
  8. 192.168.8.0/24     DIRECT   0    0    192.168.8.1     Ethernet0/1  
  9. 192.168.8.1/32     DIRECT   0    0   127.0.0.1       InLoopBack0  
  10. 192.168.9.0/24     RIP      100  1     192.168.8.2     Ethernet0/1  

5、路由再发布的配置和验证:

从上面的路由表可以OSPF区域的路由器的路由表中没有RIP区域的网段,RIP区域的路由器的路由表里没有OSPF区域的网段,所以RIP区域和其他OSPF区域是不能相通的,如果要实现相通这就需要配置路由再发布。

(1)路由再发布的配置:

  1. [R2]ospf  
  2. //在OSPF上注入RIP(不包括直连的)协议  
  3. [R2-ospf]import-route ?  
  4.  bgp                     Border Gateway Protocol(BGP)   
  5.  direct                  Routes on directly-connected segments  
  6.  rip                     Routing Information Protocol(RIP)  
  7.  static                  Static routes  
  8. [R2-ospf]import-route rip ?  
  9.  cost                    cost of import route  
  10.  route-policy            Specify a route-policy  
  11.  tag                     Set tag for routes imported into OSPF  
  12.  type                    Ospf exterior cost type for imported routes   
  13.  <cr>  
  14. [R2-ospf]import-route rip cost ?  
  15.  INTEGER<1-4294967295>   cost value  
  16. [R2-ospf]import-route rip cost 50  
  17. //在OSPF上注入RIP(直连的)协议  
  18. [R2-ospf]import-route direct ?  
  19.  cost                    cost of import route  
  20.  route-policy            Specify a route-policy  
  21.  tag                     Set tag for routes imported into OSPF  
  22.  type                    Ospf exterior cost type for imported routes  
  23.  <cr>  
  24. [R2-ospf]import-route direct  
  25. //配置默认路由协议,并把静态有注入到RIP协议中使其R7、R6能够与外界OSPF区域相通:  
  26. [R2]int null ?   
  27.  INTEGER<0-0>             Null interface number  
  28. [R2]int null 0  
  29. [R2-Null0]quit  
  30. [R2]ip route-static 0.0.0.0 0.0.0.0 ?  
  31.  X.X.X.X           NextHop IP address  
  32.  Async             Async interface  
  33.  Aux               Aux interface  
  34.  Ethernet          IEEE802.3  
  35.  Null              Null interface  
  36.  Serial            Serial  
  37. [R2]ip route-static 0.0.0.0 0.0.0.0 null ?  
  38.  INTEGER<0-0>             Null interface number  
  39. [R2]ip route-static 0.0.0.0 0.0.0.0 null 0   
  40. //向RIP中注入默认路由  
  41. [R2]rip  
  42. [R2-rip]  
  43. [R2-rip]import-route ?  
  44.  bgp                     Border Gateway Protocol(BGP)  
  45.  direct                  Routes on directly-connected segments  
  46.  ospf                    Open Shortest Path First(OSPF)  
  47.  ospf-ase                OSPF external route  
  48.  static                  Static routes  
  49. [R2-rip]import-route static  

(2)验证:

1)查看R2的路由表:

  1. [R2]dis ip rout          
  2. Routing Tables:  
  3.  Destination/Mask  Proto   Pref     Metric     Nexthop    Interface   
  4.  127.0.0.0/8   Direct    0         0        127.0.0.1 LoopBack0            
  5.  127.0.0.1/32  Direct    0         0        127.0.0.1 LoopBack0            
  6.  192.168.1.0/24    OSPF   10      1572      192.168.2.1 Serial0  
  7.  192.168.2.0/24  Direct    0         0      192.168.2.1 Serial0              
  8.  192.168.2.1/32  Direct    0         0      192.168.2.1 Serial0              
  9.  192.168.2.2/32  Direct    0         0        127.0.0.1 LoopBack0            
  10.  192.168.3.0/24  Direct    0         0      192.168.3.1 Ethernet0            
  11.  192.168.3.1/32  Direct    0         0        127.0.0.1 LoopBack0            
  12.  192.168.4.0/24    OSPF   10        20      192.168.3.2 Ethernet0            
  13.  192.168.5.0/24    OSPF   10        21      192.168.3.2 Ethernet0            
  14.  192.168.6.0/24    OSPF   10        22      192.168.3.2 Ethernet0  
  15.  192.168.7.0/24  Direct    0         0      192.168.7.1 Ethernet1            
  16.  192.168.7.1/32  Direct    0         0        127.0.0.1 LoopBack0            
  17.  192.168.8.0/24     RIP  100         1      192.168.7.2 Ethernet1            
  18.  192.168.9.0/24     RIP  100         2      192.168.7.2 Ethernet1  

2)查看R5的路由表:www.xiaoxiongboke.com

  1. <R5>dis ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol Pre  Cost      Nexthop         Interface  
  4. 127.0.0.0/8      DIRECT   0    0    127.0.0.1       InLoopBack0  
  5. 127.0.0.1/32     DIRECT   0    0     127.0.0.1       InLoopBack0  
  6. 192.168.1.0/24   OSPF   10  1584      192.168.5.1     Ethernet0/0  
  7. 192.168.2.0/24     OSPF   10   1574     192.168.5.1    Ethernet0/0  
  8. 192.168.2.1/32   O_ASE  150  1       192.168.5.1     Ethernet0/0  
  9. 192.168.3.0/24   OSPF   10   12      192.168.5.1     Ethernet0/0   
  10. 192.168.4.0/24   OSPF   10   2       192.168.5.1     Ethernet0/0  
  11. 192.168.5.0/24   DIRECT   0   0     192.168.5.2     Ethernet0/0  
  12. 192.168.5.2/32   DIRECT   0   0      127.0.0.1       InLoopBack0  
  13. 192.168.6.0/24   DIRECT   0   0      192.168.6.1     Ethernet0/1  
  14. 192.168.6.1/32   DIRECT   0   0      127.0.0.1       InLoopBack0  
  15. 192.168.7.0/24   O_ASE   150  1       192.168.5.1     Ethernet0/0  
  16. 192.168.8.0/24   O_ASE   150  50     192.168.5.1     Ethernet0/0   
  17. 192.168.9.0/24    O_ASE   150  50     192.168.5.1     Ethernet0/0  

3)查看R7的路由表:

  1. <R7>display ip routing-table  
  2. Routing Table: public net  
  3. Destination/Mask   Protocol Pre  Cost      Nexthop         Interface  
  4. 0.0.0.0/0        RIP      100  2       192.168.8.1     Ethernet0/0  
  5. 127.0.0.0/8      DIRECT   0    0      127.0.0.1     InLoopBack0  
  6. 127.0.0.1/32    DIRECT   0    0        127.0.0.1    InLoopBack0  
  7. 192.168.7.0/24    RIP   100  1         192.168.8.1     Ethernet0/0   
  8. 192.168.8.0/24    DIRECT   0    0      192.168.8.2     Ethernet0/0  
  9. 192.168.8.2/32    DIRECT   0   0     127.0.0.1       InLoopBack0  
  10. 192.168.9.0/24    DIRECT   0   0      192.168.9.1     Ethernet0/1  
  11. 192.168.9.1/32    DIRECT   0    0      127.0.0.1     InLoopBack0  

4)在R7上ping192.168.1.1

  1. <R7>ping 192.168.1.1  
  2.  PING 192.168.1.1: 56  data bytes, press CTRL_C to break  
  3.    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=253 time=40 ms  
  4.    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=253 time=31 ms  
  5.    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=253 time=29 ms  
  6.    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=253 time=35 ms   
  7.    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=253 time=29 ms  
  8.  --- 192.168.1.1 ping statistics ---  
  9.    5 packet(s) transmitted  
  10.    5 packet(s) received  
  11.    0.00% packet loss  
  12.    round-trip min/avg/max = 29/32/40 ms  

5)在R7上ping192.168.6.1

  1. <R7>ping 192.168.6.1  
  2.  PING 192.168.6.1: 56  data bytes, press CTRL_C to break  
  3.    Reply from 192.168.6.1: bytes=56 Sequence=1 ttl=251 time=26 ms  
  4.    Reply from 192.168.6.1: bytes=56 Sequence=2 ttl=251 time=8 ms  
  5.    Reply from 192.168.6.1: bytes=56 Sequence=3 ttl=251 time=8 ms  
  6.    Reply from 192.168.6.1: bytes=56 Sequence=4 ttl=251 time=11 ms  
  7.    Reply from 192.168.6.1: bytes=56 Sequence=5 ttl=251 time=8 ms  
  8.  --- 192.168.6.1 ping statistics ---  
  9.    5 packet(s) transmitted  
  10.    5 packet(s) received  
  11.    0.00% packet loss  
  12.    round-trip min/avg/max = 8/12/26 ms  
标签:

给我留言