OSPF Load Balancing:
[boxads] Today I will show how to configure OSPF load balancing, If we follow bellow example we see a client is connected through two WAN connections with two broadband routers that both are use for Internet routing. We will enable and disable OSPF load balancing packets that are sourcing from the HOST to the WEB SERVER. Â Following the diagram:
Now lets go our OSPF Load Balancing Configuration part………..
Router R1:
R1#
R1#conf t
R1(config)#ip cef
R1(config)#int loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#ip ospf network point-to-point
R1(config-if)#exit
R1(config)#int fa0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#duplex auto
R1(config-if)#speed auto
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#log-adjacency-changes
R1(config-router)# network 0.0.0.0 255.255.255.255 area 0
R1(config-router)#exitÂ
R2(config)#exit
R2#write
Router R2:
R2#
R2#conf t
R2(config)#ip cef
R2(config)#int loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#ip ospf network point-to-point
R2(config-if)#exit
R2(config)#interface fa0/0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#duplex auto
R2(config-if)#speed auto
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int fa0/1
R2(config-if)#ip address 172.16.1.2 255.255.255.0
R2(config-if)#duplex auto
R2(config-if)#speed auto
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#log-adjacency-changes
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0
R2(config-router)#exit
R2(config)#exit
R2#write
Router R3:
R3#
R3#conf t
R3(config)#ip cef
R3(config)#int loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#ip ospf network point-to-point
R3(config-if)#exit
R3(config)#int fa0/0
R3(config-if)#ip address 10.1.1.3 255.255.255.0
R3(config-if)#duplex auto
R3(config-if)#speed auto
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#
R3(config)#int fa0/1
R3(config-if)#ip address 172.16.1.3 255.255.255.0
R3(config-if)#duplex auto
R3(config-if)#speed auto
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#
R3(config)#router ospf 1
R3(config-router)#log-adjacency-changes
R3(config-router)#network 0.0.0.0 255.255.255.255 area 0
R3(config-router)#exit
R3(config)#exit
R3#write
Router R4:
R4#
R4#conf t
R4(config)#ip cef
R4(config)#int loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#ip ospf network point-to-point
R4(config-if)#exit
R4(config)#
R4(config)#int fa0/0
R4(config-if)#ip address 172.16.1.4 255.255.255.0
R4(config-if)#duplex auto
R4(config-if)#speed auto
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#log-adjacency-changes
R4(config-router)#network 0.0.0.0 255.255.255.255 area 0
R4(config-router)#exit
R4(config)#exit
R4#write
Verify our OSPF Load balancing Configuration:
[adsense]
When i type show ip route command in router R1 then we found OSPF reach R4 via two path.
1. R1 reach R4 via R2 [via 10.1.1.2]
2. R1 reach R4 via R3 [via 10.1.1.3]
After we do a TRACEROUTE to the destination we can see that the packets are passing trough two routers and thus load balancing the traffic. So our configuration part is ok.
Now we disable OSPF Load Balancing by maximum-paths command.
 Router R1:
R1#conf t
R1(config)#router ospf 1
R1(config-router)#maximum-paths 1
R1(config-router)#exit
R1(config)#
Again when i type show ip route command in router R1 then we found OSPF reach R4 via one path.
1. R1 reach R4 via R3 [via 10.1.1.3] path
Also after we do a TRACEROUTE to the destination we can see that the packets are passing trough one routers so load balancing is not working.
If any one face bellow message in GNS3 environment,please follow bellow steps.
%OSPF-4-ERRRCV: Received invalid packet: Bad LLS Checksum from x.x.x.x, FastEthernet0/0
Solution:
applying bellow command to each router interface:
ip ospf network point-to-point
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 7 123456
The above md5 digest key settings have stopped the errors from occuring.