Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring Next-Hop Style Services on an Aggregated Multiservices Interface

Hardware and Software Requirements

MX Series routers with services interfaces installed and running Junos OS Release 13.2.

Overview

Starting with Release 13.2, Junos OS extends next-hop style services support to aggregated multiservices (AMS) interfaces. In releases earlier than 12.3, only interface style services configurations were supported on AMS interfaces.

The next-hop style services configuration on AMS interfaces is different from the interface style services configuration. For next-hop style services, the load-balancing hash keys are defined as part of the logical unit configuration of the AMS interface. For interface style services, the hash keys configuration falls under the service-set configuration.

This example explains the next-hop style services configuration on an AMS interface, and shows the verification steps to verify that the configuration is working correctly.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Configuring an aggregated multiservices interface

set interfaces ams0 load-balancing-options member-interface mams-1/0/0set interfaces ams0 load-balancing-options member-interface mams-1/1/0set interfaces ams0 load-balancing-options member-interface mams-2/0/0set interfaces ams0 load-balancing-options member-interface mams-2/1/0set interfaces ams0 unit 1 family inetset interfaces ams0 unit 1 service-domain insideset interfaces ams0 unit 2 family inetset interfaces ams0 unit 2 service-domain outside

Configuring Routing Instances that Use AMS interfaces

set routing-instances ri-internal instance-type virtual-routerset routing-instances ri-internal interface ge-0/0/2.0set routing-instances ri-internal interface ams0.1set routing-instances ri-internal routing-options static route 22.22.22.0/24 next-hop ams0.1set routing-instances ri-external instance-type virtual-routerset routing-instances ri-external interface ge-2/0/6.0set routing-instances ri-external interface ams0.2set routing-instances ri-external routing-options static route 0.0.0.0/0 next-hop ams0.2

Configuring Hash Keys

set interfaces ams0 unit 1 load-balancing-options hash-keys ingress-key source-ip protocolset interfaces ams0 unit 2 load-balancing-options hash-keys ingress-key destination-ip protocol

Configure Next Hop Services

set services service-set ams-test stateful-firewall-rules sfw1set services service-set ams-test next-hop-service inside-service-interface ams0.1set services service-set ams-test next-hop-service outside-service-interface ams0.2

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see “Using the CLI Editor in Configuration Mode” in the CLI User Guide.

  1. Configure an aggregated multiservices interface and the load-balancing options.
    [edit interfaces ams0]user@router1# set load-balancing-options member-interface mams-1/0/0user@router1# set load-balancing-options member-interface mams-1/1/0user@router1# set load-balancing-options member-interface mams-2/0/0user@router1# set load-balancing-options member-interface mams-2/1/0user@router1# set unit 1 family inetuser@router1# set unit 1 service-domain insideuser@router1# set unit 2 family inetuser@router1# set unit 2 service-domain outside
  2. Configure routing instances that use the aggregated multiservices interfaces configured in the first step.
    [edit routing-instances]user@router1# set ri-internal instance-type virtual-routeruser@router1# set ri-internal interface ge-0/0/2.0user@router1# set ri-internal interface ams0.1user@router1# set ri-internal routing-options static route 22.22.22.0/24 next-hop ams0.1user@router1# set ri-external instance-type virtual-routeruser@router1# set ri-external interface ge-2/0/6.0user@router1# set ri-external interface ams0.2user@router1# set ri-external routing-options static route 0.0.0.0/0 next-hop ams0.2
  3. Configure hash keys for the aggregated multiservices interfaces.

    Note: Unlike in the interface-style configuration where hash keys are defined in the service-set configuration, for next-hop services, the hash keys are specified in the AMS configuration under the logical units.

    [edit interfaces ams0]user@router1# set unit 1 load-balancing-options hash-keys ingress-key source-ip protocoluser@router1# set unit 2 load-balancing-options hash-keys ingress-key destination-ip protocol
  4. Configure next-hop style services under the service-set configuration.
    [edit services service-set ams-test]user@router1# set stateful-firewall-rules sfw1user@router1# set next-hop-service inside-service-interface ams0.1user@router1# set next-hop-service outside-service-interface ams0.2
  5. Commit the configuration.
    [edit]user@router1# commit

Results

From the configuration mode, confirm your configuration by entering the show interfaces ams0, show routing-instances, and show services service-set ams-test commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

user@router1# show interfaces ams0
load-balancing-options {member-interface mams-1/0/0;member-interface mams-1/1/0;member-interface mams-2/0/0;member-interface mams-2/1/0;member-failure-options {redistribute-all-traffic {enable-rejoin;}}}unit 1 {family inet;service-domain inside;load-balancing-options {hash-keys {ingress-key [ source-ip protocol ];}}}unit 2 {family inet;service-domain outside;load-balancing-options {hash-keys {ingress-key [ destination-ip protocol ];}}}
user@router1# show routing-instances
ri-internal {instance-type virtual-router;interface ge-0/0/2.0;interface ams0.1routing-options {static {route 22.22.22.0/24 next-hop ams0.1;}}}ri-external {instance-type virtual-router;interface ge-2/0/6.0;interface ams0.2routing-options {static {route 0.0.0.0/0 next-hop ams0.2; }}}
user@router1# show services service-set amsstateful-firewall-rules sfw1;
next-hop-service {inside-service-interface ams0.1; outside-service-interface ams0.2;}

Published: 2013-07-25