一、拓扑图
   
     
   
    
    
    二、路由器配置
   
R1
interface GigabitEthernet0/0/0
ip address 14.1.12.1 255.255.255.0 
interface GigabitEthernet0/0/1
ip address 14.1.13.1 255.255.255.0 
interface LoopBack1
ip address 10.1.1.1 255.255.255.0 
interface LoopBack2
ip address 10.2.1.1 255.255.255.0
R2
interface GigabitEthernet0/0/0
ip address 14.1.12.2 255.255.255.0 
interface GigabitEthernet0/0/1
ip address 14.1.24.2 255.255.255.0 
interface LoopBack1
ip address 10.1.2.1 255.255.255.0 
interface LoopBack2
ip address 10.2.2.1 255.255.255.0
R3
interface GigabitEthernet0/0/0
ip address 14.1.34.3 255.255.255.0 
interface GigabitEthernet0/0/1
ip address 14.1.13.3 255.255.255.0 
interface GigabitEthernet0/0/2
ip address 14.0.35.3 255.255.255.0 
interface GigabitEthernet3/0/0
ip address 14.0.36.3 255.255.255.0 
R4
interface GigabitEthernet0/0/0
ip address 14.1.34.4 255.255.255.0 
interface GigabitEthernet0/0/1
ip address 14.1.24.4 255.255.255.0 
interface GigabitEthernet0/0/2
ip address 14.0.46.4 255.255.255.0 
interface GigabitEthernet3/0/0
ip address 14.0.45.4 255.255.255.0 
R5
interface GigabitEthernet0/0/0
ip address 14.0.45.5 255.255.255.0 
interface GigabitEthernet0/0/2
ip address 14.0.35.5 255.255.255.0 
interface LoopBack1
ip address 10.1.5.1 255.255.255.0
interface LoopBack2
ip address 10.2.5.1 255.255.255.0 
R6
interface GigabitEthernet0/0/0
ip address 14.0.36.6 255.255.255.0 
interface GigabitEthernet0/0/0
ip address 14.0.36.6 255.255.255.0 
interface LoopBack1
ip address 10.1.6.1 255.255.255.0 
interface LoopBack2
ip address 10.2.6.6 255.255.255.0
    
    
    三、OSPF配置
   
R1
ospf 1 router-id 1.1.1.1 
area 0.0.0.1 
network 10.1.1.0 0.0.0.255 
network 10.2.1.0 0.0.0.255 
network 14.1.0.0 0.0.255.255
R2
ospf 1 router-id 2.2.2.2 
area 0.0.0.1 
network 10.1.2.0 0.0.0.255 
network 10.2.2.0 0.0.0.255 
network 14.1.0.0 0.0.255.255
R3
ospf 1 router-id 3.3.3.3 
area 0.0.0.1 
network 14.1.0.0 0.0.255.255 
ospf 2 router-id 3.3.3.3 
area 0.0.0.0 
network 14.0.0.0 0.0.255.255
R4
ospf 1 router-id 4.4.4.4 
area 0.0.0.1 
network 14.1.0.0 0.0.255.255 
ospf 2 router-id 4.4.4.4 
area 0.0.0.0 
network 14.0.0.0 0.0.255.255 
R5
ospf 1 router-id 5.5.5.5 
area 0.0.0.0 
network 10.1.5.0 0.0.0.255 
network 10.2.5.0 0.0.0.255 
network 14.0.0.0 0.0.255.255
R6
ospf 1 router-id 6.6.6.6 
area 0.0.0.0 
network 10.1.6.0 0.0.0.255 
network 10.2.6.0 0.0.0.255 
network 14.0.0.0 0.0.255.255
    
    
    四、进行重发布
   
    
    
    1、R3、R4进行如下配置
   
ip ip-prefix a1 permit 10.2.1.0 24
ip ip-prefix a2 permit 10.2.2.0 24
ip ip-prefix a3 permit 10.2.5.0 24
ip ip-prefix a4 permit 10.2.6.0 24
    
    
    2、备份路由配置
   
[Rx]route-policy 1 permit node 10
[Rx-route-policy]if-match ip-prefix a1
[Rx-route-policy]apply cost 10
[Rx-route-policy]q
[Rx]route-policy 1 permit node 20
    
    
    3、重发布调用
   
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]import-route ospf 2 route-policy 3
[R3-ospf-1]import-route ospf 2 route-policy 4
[R3]ospf 2 router-id 3.3.3.3
[R3-ospf-1]import-route ospf 1 route-policy 1
[R3-ospf-1]import-route ospf 1 route-policy 2
 
版权声明:本文为m0_51919218原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
