OSPF load balancing not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2011 08:37 PM - edited 03-04-2019 01:03 PM
it must be something to do with CEF.
I've set up a simple scenario, please see the attached picture. R1 (two loop addreses) as source, R4 (3 loop addresses) as destination. I did ping from R1 to R4. every time, the traffic goes through R3. As shown in "show interface s0/0 and s0/1" on R4.
I have hunch it is something to do with CEF, but can't figure it out.
any idea would be great,
thanks,
====R1===
hostname R1
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 1.1.2.1 255.255.255.0
!
interface Serial0/0
ip address 1.1.12.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 1.1.13.1 255.255.255.0
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
====R2====
R2#sh run
Building configuration...
!
hostname R2
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
ip audit po max-events 100
!
!
!
interface Serial0/0
ip address 1.1.12.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 1.1.24.2 255.255.255.0
serial restart-delay 0
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
end
R2#
======R3======
R3#sh run
Building configuration...
Current configuration : 845 bytes
!
version 12.3
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
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
interface Serial0/0
ip address 1.1.13.3 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 1.1.34.3 255.255.255.0
serial restart-delay 0
!
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
no ip http server
no ip http secure-server
ip classless
!
!
end
R3#
====R4====
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
ip audit po max-events 100
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Loopback1
ip address 4.4.5.4 255.255.255.0
!
interface Loopback2
ip address 4.4.6.4 255.255.255.0
!
interface Serial0/0
ip address 1.1.24.4 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 1.1.34.4 255.255.255.0
serial restart-delay 0
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
!
end
R4#
- Labels:
-
Routing Protocols
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2011 10:35 PM
ok here there are couple of points you need to check
first is the two interfaces have the same cost
do simply show ip route and make sure that your routing table shows two possible routes to the destination you want to reach
if the above is not valid then make sure both interface have the same cost
once you have the interfaces installed in te routing table for the required destination route
by default the cef load balancing is oer session you could change it per pack to get more even load balancing ( on the exit interfaces of R1 use the command load-shapre then chose the per packet option )
but i am assuming this is for testing as per packet load balancing cause some out of synic packets ..etc need to be careful with it in a production environment
good luck
HTH
if helpful Rate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2011 11:31 PM
Hi,
AFAIK, CEF should be always using per-packet load sharing for packets originated by the router itself.
It would be worth checking the existence of multiple routing paths by
show ip cef 4.4.4.4 internal
and some other checkes listed in
http://www.cisco.com/en/US/tech/tk827/tk831/technologies_tech_note09186a0080094806.shtml#verifyload
It's also possible the per-packet load sharing is working fine in your case, just the hash function is using R3 as the first hop in all cases you used for your tests.
Do you always see 1.1.34.4 in the traceroute outputs as the folllowing hop?
Or is there 1.1.24.4 sometimes (depending on source/destination pair)?
HTH,
Milan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2011 01:21 PM
HI
You can manipulate the preffered path by distance/cost/bandwdth or maxing out the lsa for one path.
Also the next hop is defined by the ospf network type, on point-to-point its not the orignating router its advertising the router
can you post ospf route table.
show ip route ospf
show ip route x.x.x.x
res
Paul
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
