多点双向重发布 之 双向负载均衡
在R1-R2-R3之间配置OSPF
在R1-R4-R3之间配置EIGRP
在R1和R3上分别重发布OSPF到EIGRP 和 EIGRP 到 OSPF
这样配置后  R4-->R2负载均衡
               R2-->R4不能负载均衡
原因:当在R1上线重发布后 它将通告区域内的其他路由器 使得区域的路由器上的所有路由器的信息一致!!!  由于OSPF的管理距离为110 而EIGRP 的外部路由管理距离为170 根据路由策略选择 OSPF协议来管理链路,即R3到R4的数据包走R3-R2-R1-R4的线路 R2到R4的路由走R2-R1-R4 ,不会负载!!!
为了实现双向的负载均衡必需修改OSPF的管理距离!即把管理距离小的改成大的!!!把OSPF的AD改成180.
 
 
 
在R1与R3上设置OSPF的管理距离为180 ,来达到负载均衡!!!
 
R1#show run
Building configuration...
Current configuration : 993 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
ip subnet-zero
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 193.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 192.1.12.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router eigrp 99
 redistribute ospf 100 metric 100 100 255 1 1500
 network 193.1.1.0
 auto-summary
!
router ospf 100
 log-adjacency-changes
 redistribute eigrp 99 metric 200 subnets
 network 1.1.1.0 0.0.0.255 area 1
 network 192.1.12.0 0.0.0.255 area 1
 
distance 180 3.3.3.3 0.0.0.0
!
ip classless
ip http server
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
end
 
 
 
R2#show run
Building configuration...
Current configuration : 897 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
ip subnet-zero
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.1.12.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 192.1.23.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 100
 log-adjacency-changes
 redistribute connected subnets
 network 192.1.12.0 0.0.0.255 area 1
 network 192.1.23.0 0.0.0.255 area 1
!
router ospf 10
 log-adjacency-changes
!
ip classless
ip http server
!
!
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 : 991 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
ip subnet-zero
!
!
!
!
!
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 193.1.1.3 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.1.23.3 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router eigrp 99
 redistribute ospf 100 metric 100 100 255 1 1500
 network 193.1.1.0
 auto-summary

!
router ospf 100
 log-adjacency-changes
 redistribute eigrp 99 metric 200 subnets
 network 3.3.3.0 0.0.0.255 area 1
 network 192.1.23.0 0.0.0.255 area 1
 distance 180 1.1.1.1 0.0.0.0
!
ip classless
ip http server
!
!
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 : 770 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
ip subnet-zero
!
!
!
!
!
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
 ip address 193.1.1.4 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router eigrp 99
redistribute connected
            //这边应该是用redistribute connected 而不能用network 4.4.4.4 255.255.255.0  否则在R1\R3上学习到得是EIGRP的内部路由
 network 193.1.1.0
 auto-summary
!
ip classless
ip http server
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
end
 
 
 

 ===========================================================================================================
 
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     192.1.12.0/30 is subnetted, 1 subnets
C       192.1.12.0 is directly connected, Serial1/0
     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       1.1.1.1/32 [110/65] via 192.1.12.1, 00:30:52, Serial1/0
O E2    1.1.1.0/24 [110/200] via 192.1.23.3, 00:30:52, Serial1/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       3.3.3.3/32 [110/65] via 192.1.23.3, 00:30:52, Serial1/1
O E2    3.3.3.0/24 [110/200] via 192.1.12.1, 00:30:53, Serial1/0
     4.0.0.0/24 is subnetted, 1 subnets
O E2    4.4.4.0 [110/200] via 192.1.12.1, 00:06:58, Serial1/0
                [110/200] via 192.1.23.3, 00:06:58, Serial1/1
C    192.1.23.0/24 is directly connected, Serial1/1
O E2 193.1.1.0/24 [110/200] via 192.1.12.1, 00:30:53, Serial1/0
                  [110/200] via 192.1.23.3, 00:30:53, Serial1/1
 
 
 
 
 
R4#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     192.1.12.0/30 is subnetted, 1 subnets
D EX    192.1.12.0 [170/25628160] via 193.1.1.1, 00:07:20, FastEthernet0/0
                   [170/25628160] via 193.1.1.3, 00:07:20, FastEthernet0/0
     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D EX    1.1.1.1/32 [170/25628160] via 193.1.1.3, 00:07:20, FastEthernet0/0
D EX    1.1.1.0/24 [170/25628160] via 193.1.1.1, 00:30:01, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
D EX    2.2.2.0 [170/25628160] via 193.1.1.1, 00:07:20, FastEthernet0/0
                [170/25628160] via 193.1.1.3, 00:07:20, FastEthernet0/0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D EX    3.3.3.3/32 [170/25628160] via 193.1.1.1, 00:07:54, FastEthernet0/0
D EX    3.3.3.0/24 [170/25628160] via 193.1.1.3, 00:30:01, FastEthernet0/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
D EX 192.1.23.0/24 [170/25628160] via 193.1.1.3, 00:07:54, FastEthernet0/0
                   [170/25628160] via 193.1.1.1, 00:07:54, FastEthernet0/0
C    193.1.1.0/24 is directly connected, FastEthernet0/0