Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Load Balancing Using Source or Destination IP Only

date_range 24-Nov-23

In equal-cost multipath, (ECMP) per-subscriber aware environments such as content service providers who service residential customers, traffic in both directions within the service provider network should always pass through the content servers that maintain the subscriber state information for a given subscriber. This is accomplished by calculating the load balancing hash based solely on source address for traffic coming into the service provider network and calculating the load balancing hash based solely on the destination address for traffic leaving the service provider network.

Source and destination only load balancing is generally configured in an ECMP or aggregated ethernet (AE) environment on an service provider network. It is usually applied to all of the PE routers. It is only supported for IPv4 (inet) and IPv6 (inet6) traffic.

You do not need any special configuration in place before starting this configuration.

Note:

This feature will only work on IP-based traffic. In the case of L3VPN traffic, only MPLS lookup will be performed on the PE routers when the default label assignment scheme is used. In order to use source-or-destination only load-balancing with L3VPN, you can either configure vrf-table-label or add a vt- interface in the routing instance.

To configure load balancing using source or destination IP only, you first configure system-wide forwarding options with a prefix-length to use when calculating the hash-key. Then, you configure a policy action of either load-balance source-ip-only or load-balance destination-ip-only within a policy statement.

  1. To configure system-wide prefix length for use with source and destination IP only load balancing, insert the source-destination-only-load-balancing configuration statement at the [edit forwarding-options enhanced-hash-key] hierarchy level and add a prefix length:
    content_copy zoom_out_map
    [edit forwarding-options enhanced-hash-key]
    source-destination-only-load-balancing {
        family inet {
            prefix-length prefix-length;
        }
        family inet6 {
            prefix-length prefix-length;
        }
    }
    
  2. To configure routing policy to use load balancing based on source or destination IP only, insert either the source-ip-only or destination-ip-only as an action statement within a policy statement at the [edit policy-options policy-statement policy-name] hierarchy level:
    content_copy zoom_out_map
    [edit policy-options policy-statement policy-name]
    term term-name {
        from {
            route-filter filter-spec’
        }
        then {
            load-balance (source-ip-only | destination-ip-only);
        }
    }
    
Note:

The source-ip-only and destination-ip-only configuration elements cannot be used together in the same term. This is because of the directional nature of the traffic that we are load balancing. To use the two elements in the same policy statement, you create two separate terms, each using a route filter specification that addresses the same traffic. Then use source-ip-only for the inbound traffic and destination-ip-only for the outbound traffic.

Note:
footer-navigation