IP CEF load balancing test
33.33.33.33 - f0/13 - 55.55.55.55
- R1 - - R2 -
44.44.44.44 - f0/15 - 56.56.56.56
R1 = IPT-LAB-SWITCH
R2 = C3560-48
R1 is in OSPF totally stub area and receives two default route from R2
IPT-LAB-SWITCH#sh ip route ospf
O*IA 0.0.0.0/0 [110/2] via 10.0.15.5, 00:35:24, FastEthernet0/15
[110/2] via 10.0.13.5, 00:35:24, FastEthernet0/13
IPT-LAB-SWITCH#sh ip cef exact-route 33.33.33.33 55.55.55.55
33.33.33.33 -> 55.55.55.55 => IP adj out of FastEthernet0/13, addr 10.0.13.5
IPT-LAB-SWITCH#sh ip cef exact-route 44.44.44.44 55.55.55.55
44.44.44.44 -> 55.55.55.55 => IP adj out of FastEthernet0/13, addr 10.0.13.5
IPT-LAB-SWITCH#sh ip cef exact-route 33.33.33.33 56.56.56.56
33.33.33.33 -> 56.56.56.56 => IP adj out of FastEthernet0/15, addr 10.0.15.5
IPT-LAB-SWITCH#sh ip cef exact-route 44.44.44.44 56.56.56.56
44.44.44.44 -> 56.56.56.56 => IP adj out of FastEthernet0/15, addr 10.0.15.5
R2 has specific routes from R1
C3560-48#sh ip route ospf
33.0.0.0/32 is subnetted, 1 subnets
O 33.33.33.33 [110/2] via 10.0.15.3, 00:33:41, FastEthernet0/15
[110/2] via 10.0.13.3, 00:33:41, FastEthernet0/13
44.0.0.0/32 is subnetted, 1 subnets
O 44.44.44.44 [110/2] via 10.0.15.3, 00:33:41, FastEthernet0/15
[110/2] via 10.0.13.3, 00:33:41, FastEthernet0/13
C3560-48#sh ip cef exact-route 56.56.56.56 33.33.33.33
56.56.56.56 -> 33.33.33.33 => IP adj out of FastEthernet0/13, addr 10.0.13.3
C3560-48#sh ip cef exact-route 56.56.56.56 44.44.44.44
56.56.56.56 -> 44.44.44.44 => IP adj out of FastEthernet0/13, addr 10.0.13.3
C3560-48#sh ip cef exact-route 55.55.55.55 33.33.33.33
55.55.55.55 -> 33.33.33.33 => IP adj out of FastEthernet0/13, addr 10.0.13.3
C3560-48#sh ip cef exact-route 55.55.55.55 44.44.44.44
55.55.55.55 -> 44.44.44.44 => IP adj out of FastEthernet0/13, addr 10.0.13.3
R1 seems load balanced between the links but NOT R2???
After change the load-sharing algorithm on R2:
C3560-48(config)#ip cef load-sharing algorithm universal FFFFFFFF
C3560-48#sh ip cef exact-route 55.55.55.55 33.33.33.33
55.55.55.55 -> 33.33.33.33 => IP adj out of FastEthernet0/13, addr 10.0.13.3
C3560-48#sh ip cef exact-route 55.55.55.55 44.44.44.44
55.55.55.55 -> 44.44.44.44 => IP adj out of FastEthernet0/15, addr 10.0.15.3
C3560-48#sh ip cef exact-route 56.56.56.56 44.44.44.44
56.56.56.56 -> 44.44.44.44 => IP adj out of FastEthernet0/15, addr 10.0.15.3
C3560-48#sh ip cef exact-route 56.56.56.56 33.33.33.33
56.56.56.56 -> 33.33.33.33 => IP adj out of FastEthernet0/13, addr 10.0.13.3
ip cef load-sharing algorithm
To select a Cisco Express Forwarding (CEF) load balancing algorithm, use the ip cef load-sharing algorithm command in global configuration mode. To return to the default universal load balancing algorithm, use the no form of this command.
ip cef load-sharing algorithm {original | tunnel [id] | universal [id]}
no ip cef load-sharing algorithm {original | tunnel [id] | universal [id]}
original
|
Sets the load balancing algorithm to the original based on a source and destination hash.
|
tunnel
|
Sets the load balancing algorithm for use in tunnel environments or in environments where there are only a few IP source and destination address pairs.
|
universal
|
Sets the load balancing algorithm to the universal algorithm that uses a source and destination, and ID hash.
|
id
|
(Optional) Fixed identifier.
|