This article demonstrates Load Balancing using Source IP only configuration.
A simple configuration example is available in the technical document, Configuring Load Balancing Using Source or Destination IP Only , but there is no actual configuration described with the output.
Steps to set load balancing by source IP only configuration:
Without setting the 'source-destination-only-loadbalancing' knob, load balancing is expected to occur as below:
'source-destination-only-loadbalancing'
Note: In this example, ssh and telnet is used. Two different protocols accessing via remote device, which ensures the Source IP is the same and the Port is different.
> ssh 88.88.88.1 Link: ge-2/0/5.0 Input : 33 1 5039 1352 <-- increasing this interface Input counter Output: 25 1 4415 904 ge-2/0/6.0 Input : 0 0 0 0 Output: 13 0 683 0 > telnet 88.88.88.1 Link: ge-2/0/5.0 Input : 44 0 6083 0 Output: 38 0 5403 0 ge-2/0/6.0 Input : 26 3 1609 1856 <-- increasing this interface Input counter Output: 47 4 2619 1904
Add the 'source-destination-only-loadbalancing' configuration:
[edit] lab@MX# show forwarding-options enhanced-hash-key { source-destination-only-loadbalancing { family inet { prefix-length 30; } } } [edit] lab@MX# show policy-options policy-statement Test { term 1 { from { route-filter 172.16.0.1/30 exact; } then { load-balance source-ip-only ; } } } [edit] lab@MX# show routing-options static { route 88.88.88.0/30 next-hop 192.168.1.2; } forwarding-table { export Test ; }
lab@MX# run show interfaces ae1 extensive Physical interface: ae1, Enabled, Physical link is Up Interface index: 539, SNMP ifIndex: 668, Generation: 715 Link: ge-2/0/5.0 Input : 0 0 0 0 <-- initial state Output: 0 0 0 0 ge-2/0/6.0 Input : 0 0 0 0 <-- initial state Output: 0 0 0 0 > ssh 88.88.88.1 Link: ge-2/0/5.0 Input : 18 0 3937 0 <-- increased this interface Input counter Output: 1 0 42 0 ge-2/0/6.0 Input : 0 0 0 0 <-- this interface Input stays as initial state Output: 19 0 4023 0 > telnet 88.88.88.1 Link: ge-2/0/5.0 Input : 45 0 5918 0 <-- increased this interface counter Output: 31 0 1766 0 ge-2/0/6.0 Input : 0 0 0 0 Output: 22 0 4235 0