Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring an IKE Access Profile for IPsec Dynamic Endpoint Tunnels

Configuring an IKE Access Profile for IPsec Dynamic Endpoint Tunnels

You can configure only one tunnel profile per service set for all dynamic peers. The configured preshared key in the profile is used for IKE authentication of all dynamic peers terminating in that service set.

The IKE tunnel profile specifies all the information needed to complete the IKE negotiation. For more information on access profiles, see the Junos System Basics Configuration Guide.


For dynamic peers, the Junos OS supports only IKE main mode with the preshared key method of authentication. In this mode, an IPv4 or IPv6 address is used to identify a tunnel peer to get the preshared key information. The client value * (wildcard) means that the configuration within this profile is valid for all dynamic peers terminating within the service set accessing this profile.

The following statements are the parts of the IKE profile:

  • allowed-proxy-pair—During phase 2 IKE negotiation, the remote peer supplies its network address (remote) and its peer’s network address (local). Since multiple dynamic tunnels are authenticated through the same mechanism, this statement must include the list of possible combinations. If the dynamic peer does not present a valid combination, the phase 2 IKE negotiation fails.

    By default, remote local is used if no values are configured.

  • pre-shared-key—Mandatory key used to authenticate the dynamic peer during IKE phase 1 negotiation. This key must be configured on both ends of the tunnel and distributed through an out-of-band secure mechanism. You can configure the key value either in hexadecimal or ascii-text format.

  • interface-id—Interface identifier, a mandatory attribute used to derive the logical service interface information for the session.

  • ipsec-policy—Name of the IPsec policy that defines the IPsec policy information for the session. You define the IPsec policy at the [edit services ipsec-vpn ipsec policy policy-name] hierarchy level. If no policy is set, any policy proposed by the dynamic peer is accepted.

Configuring the Service Set for IPsec Dynamic Endpoint Tunnels

To complete a dynamic endpoint tunnel configuration, you need to reference the IKE access profile configured at the [edit access] hierarchy level in the service set. To do this, include the ike-access-profile statement at the [edit services service-set name ipsec-vpn-options] hierarchy level:

You can reference only one access profile in each service set. This profile is used to negotiate IKE and IPsec security associations with dynamic peers only.


If you configure an IKE access profile in a service set, no other service set can share the same local-gateway address.

Configuring the Interface Identifier for IPsec Dynamic Endpoint Tunnels

You can configure an interface identifier for a group of dynamic peers, which specifies which adaptive services logical interface(s) take part in the dynamic IPsec negotiation. By assigning the same interface identifier to multiple logical interfaces, you can create a pool of interfaces for this purpose. To configure, include the ipsec-interface-id statement at the [edit interfaces interface-name] hierarchy level:

Specifying the interface identifier in the dial-options statement makes this logical interface part of the pool identified by the IPsec interface identifier.


Only one interface identifier can be specified at a time. You can include the ipsec-interface-id statement or the l2tp-interface-id statement, but not both simultaneously.

The shared statement enables one logical interface to be shared across multiple tunnels. The dedicated statement specifies that the logical interface is associated with a single tunnel, which is necessary when you are configuring an IPsec link-type tunnel. You must include the dedicated statement when you specify an ipsec-interface-id value.

Configuring Multiple Routed Tunnels in a Single Next-Hop Service Set

You can optionally configure several routed IPSec tunnels within a single next-hop service set. To do so, start by establishing multiple services interfaces as inside interfaces by including the service-domain inside statement at the [edit interfaces sp-fpc/pic/port unit logical-unit-number] hierarchy level. Then, include the ipsec-inside-interface statement at the [edit services ipsec-vpn rule rule-name term term-name from] hierarchy level.


The full IPsec and IKE proposals and policies are not shown in the following example for the sake of brevity.

To confirm that your configuration is working, issue the show services ipsec-vpn ipsec security-associations command. Notice that each IPsec inside interface that you assigned to each IPsec tunnel is included in the output of this command.