这是一种很特殊的情况,一般不会出现,这里只是用于实验。

实验TOP:

 

跟据TOP完成配置:

R1#show running-config
Building configuration...

Current configuration : 978 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
 ip address 192.168.1.1 255.255.255.0
 serial restart-delay 0
!
interface Serial0/1
 ip address 192.168.2.1 255.255.255.0
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
!        
no ip http server
no ip http secure-server
!
!
!
control-plane
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

==================================================================

R2#show running-config
Building configuration...

Current configuration : 970 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
 ip address 192.168.1.2 255.255.255.0
 serial restart-delay 0
!
interface Serial0/1
 ip address 192.168.3.1 255.255.255.0
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 1
 log-adjacency-changes
 area 1 stub no-summary
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 1
!        
no ip http server
no ip http secure-server
!
!
!
control-plane
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

==================================================================

R3#show running-config
Building configuration...

Current configuration : 912 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
interface Serial0/0
 ip address 192.168.2.2 255.255.255.0
 serial restart-delay 0
!        
interface Serial0/1
 ip address 192.168.4.1 255.255.255.0
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 1
 log-adjacency-changes
 area 1 stub no-summary
 network 192.168.2.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 1
!
no ip http server
no ip http secure-server
!        
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!        
end

==================================================================

R4#show running-config
Building configuration...

Current configuration : 901 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!        
interface Serial0/0
 ip address 192.168.4.2 255.255.255.0
 serial restart-delay 0
!        
interface Serial0/1
 ip address 192.168.3.2 255.255.255.0
 serial restart-delay 0
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 1
 log-adjacency-changes
 area 1 stub
 network 192.168.3.0 0.0.0.255 area 1
 network 192.168.4.0 0.0.0.255 area 1
!
no ip http server
no ip http secure-server
!        
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!        
end

==================================================================

完成配置之后在R4上查看路由表,会发现有两条默认路由。

 

 

由此可见,两个ABR都向R4发部了一条3类的默认路由,并且实现了负载均衡。

那现在我们就要考虑一个问题了,R2和R3上会不会出现默认路由呢,照理说,它们

都会收到对方发送的3类的默认路由,应该会有0.0.0.0的那条默认路由的,可是如果有默认路由的话,它们之间又会形成环路,所以我们还是先看看它们的路由表吧:

 

 

可以看见没有默认路由,那看看有没有收到那条3类的LSA呢:

 

 

可以看见,都收到了对方发送的LSA,可为什么没有路由呢,这里我们来分析一下它们的OSPF  Database

 

 

 

可以看见R4上的每个LSA上面都携带了一个Routing Bit,而且这两个LSA都设置了Routing Bit。而R2和R3的LSA上面都没有,注意OSPF对于Type-3的LSA,如果未设置Routing-bit,这个3类LSA是无法加入到路由表中的。这里ABR有个约定,如果自己是个ABR而同时它又收到同区域另一个ABR的Type-3的关于Default-route的LSA,那么这个LSA不会设置Routing-bit。不只如此,如果这个ABR收到了另一个ABR的非默认路由的LSA,它也不会使用,不过这个原因在于区域内的路由由于区域间的路由。所以在R3和R4上看不见那条默认路由。