03-07-2018 07:27 AM - edited 03-08-2019 02:09 PM
Hi.
I have an L3 switch with ospf connected to two DNS servers. Each DNS server propagates an IP listener by OSPF.
I understand, that OSPF having routes of equal cost, should balance the load by default, but this is not happening. So, how do I configure the L3 Switch to perform load balancing of the same path in OSPF?
For the load balancing to work in OSPF, should it have a lot of traffic?
Switch Capture:
O E2 210.0.0.4 [110/20] via 30.0.0.2, 00:39:07, Vlan30
[110/20] via 20.0.0.3, 00:39:07, Vlan20
Topology:
SWITCH L3--------->DNS server VLAN20
--------->DNS srver VLAN 30
Verifying the tests, from both DNS servers, only one server receives responses from one of the routes.
What I did was:
add "maximum-paths 2" in OSPF
Vlan20 and Vlan 30 interface add the "ip load-sharing per-packet"
and enable IP cef.
Thanks you!
03-07-2018 08:05 AM
03-07-2018 08:48 AM
Hi Mark, Leo,
The ip load-sharing per-packet command is typically not even available on multilayer switches, so this is most likely not a feasible approach.
Back to the issue at hand, for ECMP, Cisco's CEF implementation takes both the source and destination IP address into account when selecting a particular path toward destination. You can test the path the packet would be forwarded through using the
show ip cef exact-route source-IP destination-IP
command. The source-IP and destination-IP are, obviously, the source and destination IP addresses of the packet being handled (they can be entirely fictious, though here, the destination is obviously 210.0.0.4). Note that for a particular [Source,Destination] pair, CEF will always select the same path. With the fixed destination 210.0.0.4, you would need to send packets from multiple sources to see that they are being load-shared across the multiple paths.
What I suggest is just testing various source addresses in the show ip cef exact-route command, and then trying to actually configure them and use them to see if the traffic gets finally spread to both servers as expected.
Best regards,
Peter
03-07-2018 09:19 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide