Hello Boris
These are excellent examples that very appropriately show the distinction between the various load balancing methods and the scenarios for which they are useful.
Remember first of all that load balancing must be employed on a per direction basis. This means that if you have a topology like this: SW1===SW2, then you must configure the load balancing that will be employed for each direction. For traffic from SW1 to SW2, you configure the load balancing on SW1. For traffic from SW2 to SW1, you configure the load balancing on SW2. The same goes for connections to servers, as you have in your first scenario.
For this first scenario, for traffic that flows from the router to the server, you shouldn’t balance based on either source or destination MAC. Since there is only one MAC on each end (the server and the router) only one of the links will be used. So IP addresses must be used. So which end of the communication will have multiple IP addresses? Not the server side, but the clients themselves (which are assumed to be somewhere behind the router) are assumed to be many.
- So for traffic from the Switch to the Server, source IP address should be used for load balancing.
- For traffic from the server to the router, destination IP address should be used for load balancing.
For your second scenario, the server end of the etherchannel still has a single MAC and a single IP address, but now you have multiple MACs and multiple IP addresses on the switch side. Here you will also have to evaluate how much traffic to and from the server you expect to come from the computers, and the router. If we assume an even distribution between all the PCs and the router, then their MAC or IP addresses can be used. If the router will have a disproportionally larger amount of traffic, then you should use only IP addresses.
- So for traffic from the Switch to the Server, source IP address or source MAC address should be used for load balancing.
- For traffic from the server to the router, destination IP address or MAC address should be used for load balancing.
Note that since there is only one single server on one end of the Etherchannel, the use of src-dst-ip
and src-dst-mac
will not make a difference, since on one end you only have a single IP/MAC. These algorithms are useful in randomizing traffic balancing when you have multiple hosts on both ends.
I hope this has been helpful!
Laz