OSPF和RIP互相引入、进行互通

实验扑图:

OSPF和RIP互相引入、进行互通_第1张图片

实验配置:
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
[r1-GigabitEthernet0/0/1]un shutdown 

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[r1-GigabitEthernet0/0/0]un shutdown 

[r1]ospf 1 router-id 1.1.1.1    
[r1-ospf-1]area 2    
[r1-ospf-1-area-0.0.0.2]network 192.168.2.0 0.0.0.255    
[r1-ospf-1-area-0.0.0.2]network 192.168.1.0 0.0.0.255    
[r1-ospf-1-area-0.0.0.2]stub 
-------------------------------------------------
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.2.2 24
[r2-GigabitEthernet0/0/0]un shutdown 

[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.3.2 24
[r2-GigabitEthernet0/0/1]un shutdown 

[r2]ospf 1 router-id 2.2.2.2    
[r2-ospf-1]area 0    
[r2-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255


[r2-ospf-1]area 2
[r2-ospf-1-area-0.0.0.2]ne    
[r2-ospf-1-area-0.0.0.2]network 192.168.2.0 0.0.0.255    
[r2-ospf-1-area-0.0.0.2]stub 
    
[r2-ospf-1-area-0.0.0.2]stub no-summary
--------------------------------
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.3.3 24
[r3-GigabitEthernet0/0/1]un shutdown 
 
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.4.3 24
[r3-GigabitEthernet0/0/0]un shutdown 


[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1    
[r3-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255    
[r3-ospf-1-area-0.0.0.1]nssa 
     
[r3-ospf-1]area 0    
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
------------------------------------------------

[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.4.4 24
[r4-GigabitEthernet0/0/0]un shutdown 

[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.5.4 24
[r4-GigabitEthernet0/0/1]un shutdown 
    
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1    
[r4-ospf-1-area-0.0.0.1]network 192.168.4.0 0.0.0.255    
[r4-ospf-1-area-0.0.0.1]nssa 

[r4]rip
[r4-rip-1]version 2    
[r4-rip-1]network 192.168.5.0

------------------------------------------------
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.5.5 24    
[r5-GigabitEthernet0/0/1]un shutdown 
 
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.6.5 24
[r5-GigabitEthernet0/0/0]un shutdown 

[r5]rip    
[r5-rip-1]version 2    
[r5-rip-1]network 192.168.5.0
[r5-rip-1]network 192.168.6.0
----------------------------------------
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 192.168.6.6 24
[r6-GigabitEthernet0/0/0]un shutdown 

[r6]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 192.168.7.6 24
[r6-GigabitEthernet0/0/1]un shutdown 

[r6]rip        
[r6-rip-1]version 2
[r6-rip-1]network 192.168.6.0
[r6-rip-1]network 192.168.7.0
-------------------
[r7]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 192.168.7.7 24
[r7-GigabitEthernet0/0/1]un shutdown 

[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 192.168.8.7 24
[r7-GigabitEthernet0/0/0]un shutdown 

[r7]rip    
[r7-rip-1]version 2    
[r7-rip-1]network 192.168.7.0
[r7-rip-1]network 192.168.8.0
----------------------

[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 192.168.8.8 24
[r8-GigabitEthernet0/0/0]un shutdown 

[r8]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 192.168.9.254 24
[r8-GigabitEthernet0/0/1]un shutdown 

[r8]rip    
[r8-rip-1]version 2
[r8-rip-1]network 192.168.8.0    
[r8-rip-1]network 192.168.9.0
--------------------------------------------
[r4]ospf 1 router-id 4.4.4.4        
[r4-ospf-1]import-route rip 1

    
[r4]rip 1    
[r4-rip-1]import-route ospf 1

---------------------------------
验证命令:
display ip routing-table 
display ip routing-table 

 

 

你可能感兴趣的:(华为网络设备配置技术)