Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring Junos VPN Site Secure on MS MIC and MS-MPC

    Note: You can follow the same procedure and use the same configuration given in this example, to configure Junos VPN Site Secure (previously known as IPsec features) on MS-MPCs.

    This example contains the following sections:

    Requirements

    This example uses the following hardware and software components:

    • Two MX Series routers with MS-MICs
    • Junos OS Release 13.2 or later

    Overview

    Junos OS, Release 13.2, extends support for Junos VPN Site Secure (formerly known as IPsec features) to the newly-introduced Multiservices MIC and MPC (MS-MIC and MS-MPC) on MX Series routers. The Junos OS extension-provider packages come preinstalled and preconfigured on the MS-MIC and MS-MPC.

    The following Junos VPN Site Secure features are supported on the MS-MIC and MS-MPC in Release 13.2:

    • Dynamic End Points (DEP)
    • Encapsulating Security Payload (ESP) protocol
    • Dead Peer Detection (DPD) trigger messages
    • Sequence Number Rollover notifications
    • Static IPsec tunnels with next-hop-style and interface-style service sets

    However, in Junos OS, Release 13.2, the Junos VPN Site Secure support on the MS-MIC and MS-MPC is limited to IPv4 traffic.

    This example shows configuration of two routers, Router 1 and Router 2, that have an IPsec VPN tunnel configured between them.

    While configuring the routers, note the following points:

    • The IP address you configure for source-address under the [edit services ipsec-vpn rule name term term from] hierarchy level on Router 1 must be the same as the IP address you configure for destination-address under the same hierarchy on Router 2, and vice versa.
    • The IP address of the remote-gateway you configure under the [edit services ipsec-vpn rule name term term then] hierarchy level should match the IP address of the local-gateway you configure under the [edit services service-set name ipsec-vpn-options] hierarchy level of Router 2, and vice versa.

    Configuration

    This section contains:

    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 Interfaces on Router 1

    set interfaces ms-4/0/0 unit 0 family inetset interfaces ms-4/0/0 unit 1 family inetset interfaces ms-4/0/0 unit 1 family inet6set interfaces ms-4/0/0 unit 1 service-domain insideset interfaces ms-4/0/0 unit 2 family inetset interfaces ms-4/0/0 unit 2 family inet6set interfaces ms-4/0/0 unit 2 service-domain outsideset interfaces xe-0/2/0 unit 0 family inet address 10.0.1.1/30

    Configuring IPsec VPN Service on Router 1

    set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 from source-address 30.0.0.0/16set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 from destination-address 80.0.0.0/16set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then remote-gateway 10.0.1.2set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then dynamic ike-policy ike_policy_ms_4_0_0set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then dynamic ipsec-policy ipsec_policy_ms_4_0_0set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then anti-replay-window-size 4096set services ipsec-vpn rule vpn_rule_ms_4_0_01 match-direction inputset services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 protocol espset services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 authentication-algorithm hmac-sha1-96set services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 encryption-algorithm 3des-cbcset services ipsec-vpn ipsec policy ipsec_policy_ms_4_0_0 perfect-forward-secrecy keys group2set services ipsec-vpn ipsec policy ipsec_policy_ms_4_0_0 proposals ipsec_proposal_ms_4_0_0set services ipsec-vpn ike proposal ike_proposal_ms_4_0_0 authentication-method pre-shared-keysset services ipsec-vpn ike proposal ike_proposal_ms_4_0_0 dh-group group2set services ipsec-vpn ike policy ike_policy_ms_4_0_0 version 2set services ipsec-vpn ike policy ike_policy_ms_4_0_0 proposals ike_proposal_ms_4_0_0set services ipsec-vpn ike policy ike_policy_ms_4_0_0 pre-shared-key ascii-text secret-data

    Configuring a Service Set on Router 1

    set services service-set ipsec_ss_ms_4_0_01 next-hop-service inside-service-interface ms-4/0/0.1set services service-set ipsec_ss_ms_4_0_01 next-hop-service outside-service-interface ms-4/0/0.2set services service-set ipsec_ss_ms_4_0_01 ipsec-vpn-options local-gateway 10.0.1.1set services service-set ipsec_ss_ms_4_0_01 ipsec-vpn-rules vpn_rule_ms_4_0_01

    Configuring Routing Options on Router 1

    set routing-options static route 80.0.0.0/16 next-hop ms-4/0/0.1

    Configuring Interfaces on Router 2

    set interfaces ms-1/0/0 unit 0 family inetset interfaces ms-1/0/0 unit 1 family inetset interfaces ms-1/0/0 unit 1 family inet6set interfaces ms-1/0/0 unit 1 service-domain insideset interfaces ms-1/0/0 unit 2 family inetset interfaces ms-1/0/0 unit 2 family inet6set interfaces ms-1/0/0 unit 2 service-domain outsideset interfaces ge-2/0/0 unit 0 family inet address 10.0.1.2/30

    Configuring IPsec VPN Service on Router 2

    set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 from source-address 80.0.0.0/16set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 from destination-address 30.0.0.0/16set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then remote-gateway 10.0.1.1set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then dynamic ike-policy ike_policy_ms_5_2_0set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then dynamic ipsec-policy ipsec_policy_ms_5_2_0set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then anti-replay-window-size 4096set services ipsec-vpn rule vpn_rule_ms_5_2_01 match-direction inputset services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 protocol espset services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 authentication-algorithm hmac-sha1-96set services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 encryption-algorithm 3des-cbcset services ipsec-vpn ipsec policy ipsec_policy_ms_5_2_0 perfect-forward-secrecy keys group2set services ipsec-vpn ipsec policy ipsec_policy_ms_5_2_0 proposals ipsec_proposal_ms_5_2_0set services ipsec-vpn ike proposal ike_proposal_ms_5_2_0 authentication-method pre-shared-keysset services ipsec-vpn ike proposal ike_proposal_ms_5_2_0 dh-group group2set services ipsec-vpn ike policy ike_policy_ms_5_2_0 version 2set services ipsec-vpn ike policy ike_policy_ms_5_2_0 proposals ike_proposal_ms_5_2_0set services ipsec-vpn ike policy ike_policy_ms_5_2_0 pre-shared-key ascii-text secret-dataset services ipsec-vpn establish-tunnels immediately

    Configuring a Service Set on Router 2

    set services service-set ipsec_ss_ms_5_2_01 next-hop-service inside-service-interface ms-1/0/0.1set services service-set ipsec_ss_ms_5_2_01 next-hop-service outside-service-interface ms-1/0/0.2set services service-set ipsec_ss_ms_5_2_01 ipsec-vpn-options local-gateway 10.0.1.2set services service-set ipsec_ss_ms_5_2_01 ipsec-vpn-rules vpn_rule_ms_5_2_01

    Configuring Routing Options on Router 2

    set routing-options static route 30.0.0.0/16 next-hop ms-1/0/0.1

    Configuring Router 1

    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.

    Note: Starting with Release 13.2, the Junos OS extension-provider packages come preinstalled on multiservices MICs and MPCs (MS-MICs and MS-MPCs). The adaptive-services configuration at the [edit chassis fpc number pic number] hierarchy level is preconfigured on these cards.

    1. Configure the interface properties.
      user@router1# set interfaces ms-4/0/0 unit 0 family inetuser@router1# set interfaces ms-4/0/0 unit 1 family inetuser@router1# set interfaces ms-4/0/0 unit 1 family inet6user@router1# set interfaces ms-4/0/0 unit 1 service-domain insideuser@router1# set interfaces ms-4/0/0 unit 2 family inetuser@router1# set interfaces ms-4/0/0 unit 2 family inet6user@router1# set interfaces ms-4/0/0 unit 2 service-domain outsideuser@router1# set interfaces xe-0/2/0 unit 0 family inet address 10.0.1.1/30
    2. Configure IPsec properties.
      user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 from source-address 30.0.0.0/16user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 from destination-address 80.0.0.0/16user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then remote-gateway 10.0.1.2user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then dynamic ike-policy ike_policy_ms_4_0_0user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then dynamic ipsec-policy ipsec_policy_ms_4_0_0user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 term term11 then anti-replay-window-size 4096user@router1# set services ipsec-vpn rule vpn_rule_ms_4_0_01 match-direction inputuser@router1# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 protocol espuser@router1# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 authentication-algorithm hmac-sha1-96user@router1# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_4_0_0 encryption-algorithm 3des-cbcuser@router1# set services ipsec-vpn ipsec policy ipsec_policy_ms_4_0_0 perfect-forward-secrecy keys group2user@router1# set services ipsec-vpn ipsec policy ipsec_policy_ms_4_0_0 proposals ipsec_proposal_ms_4_0_0user@router1# set services ipsec-vpn ike proposal ike_proposal_ms_4_0_0 authentication-method pre-shared-keysuser@router1# set services ipsec-vpn ike proposal ike_proposal_ms_4_0_0 dh-group group2user@router1# set services ipsec-vpn ike policy ike_policy_ms_4_0_0 version 2user@router1# set services ipsec-vpn ike policy ike_policy_ms_4_0_0 proposals ike_proposal_ms_4_0_0user@router1# set services ipsec-vpn ike policy ike_policy_ms_4_0_0 pre-shared-key ascii-text secret-key
    3. Configure a service set.
      user@router1# set services service-set ipsec_ss_ms_4_0_01 next-hop-service inside-service-interface ms-4/0/0.1user@router1# set services service-set ipsec_ss_ms_4_0_01 next-hop-service outside-service-interface ms-4/0/0.2user@router1# set services service-set ipsec_ss_ms_4_0_01 ipsec-vpn-options local-gateway 10.0.1.1user@router1# set services service-set ipsec_ss_ms_4_0_01 ipsec-vpn-rules vpn_rule_ms_4_0_01
    4. Configure routing options.
      user@router1# set routing-options static route 80.0.0.0/16 next-hop ms-4/0/0.1

    Results

    From the configuration mode of Router 1, confirm your configuration by entering the show interfaces, show services ipsec-vpn, and show services service-set commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

    user@router1# show interfaces
    ms-4/0/0{unit 0 {family inet;}unit 1 {family inet;family inet6;service-domain inside;}unit 2 {family inet;family inet6;service-domain outside;}}
    xe-0/2/0 {unit 0 {family inet {address 10.0.1.1/30;}}}
    user@router1# show services ipsec-vpn
    rule vpn_rule_ms_4_0_01 {term term11 {from {source-address {30.0.0.0/16;}destination-address {80.0.0.0/16;}}then {remote-gateway 10.0.1.2;dynamic {ike-policy ike_policy_ms_4_0_0;ipsec-policy ipsec_policy_ms_4_0_0;}anti-replay-window-size 4096;}}match-direction input;}ipsec {proposal ipsec_proposal_ms_4_0_0 {protocol esp;authentication-algorithm hmac-sha1-96;encryption-algorithm 3des-cbc;}policy ipsec_policy_ms_4_0_0 {perfect-forward-secrecy {keys group2;}proposals ipsec_proposal_ms_4_0_0;}}ike {proposal ike_proposal_ms_4_0_0 {authentication-method pre-shared-keys;dh-group group2;}policy ike_policy_ms_4_0_0 {version 2;proposals ike_proposal_ms_4_0_0;pre-shared-key ascii-text "$9$-tbYoDi.z39JG39ApREdbs"; ## SECRET-DATA}}
    user@router1# show services service-set
    ipsec_ss_ms_4_0_01 {next-hop-service {inside-service-interface ms-4/0/0.1;outside-service-interface ms-4/0/0.2;}ipsec-vpn-options {local-gateway 10.0.1.1;}ipsec-vpn-rules vpn_rule_ms_4_0_01;}

    Configuring Router 2

    Step-by-Step Procedure

    1. Configure the interfaces.
      user@router2# set interfaces ms-1/0/0 services-options inactivity-non-tcp-timeout 600user@router2# set interfaces ms-1/0/0 unit 0 family inetuser@router2# set interfaces ms-1/0/0 unit 1 family inetuser@router2# set interfaces ms-1/0/0 unit 1 family inet6user@router2# set interfaces ms-1/0/0 unit 1 service-domain insideuser@router2# set interfaces ms-1/0/0 unit 2 family inetuser@router2# set interfaces ms-1/0/0 unit 2 family inet6user@router2# set interfaces ms-1/0/0 unit 2 service-domain outsideuser@router2# set interfaces ge-2/0/0 unit 0 family inet adddress 10.0.1.2/30
    2. Configure IPsec properties.
      user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 from source-address 80.0.0.0/16user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 from destination-address 30.0.0.0/16user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then remote-gateway 10.0.1.1user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then dynamic ike-policy ike_policy_ms_5_2_0user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then dynamic ipsec-policy ipsec_policy_ms_5_2_0user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 term term11 then anti-replay-window-size 4096user@router2# set services ipsec-vpn rule vpn_rule_ms_5_2_01 match-direction inputuser@router2# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 protocol espuser@router2# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 authentication-algorithm hmac-sha1-96user@router2# set services ipsec-vpn ipsec proposal ipsec_proposal_ms_5_2_0 encryption-algorithm 3des-cbcuser@router2# set services ipsec-vpn ipsec policy ipsec_policy_ms_5_2_0 perfect-forward-secrecy keys group2user@router2# set services ipsec-vpn ipsec policy ipsec_policy_ms_5_2_0 proposals ipsec_proposal_ms_5_2_0user@router2# set services ipsec-vpn ike proposal ike_proposal_ms_5_2_0 authentication-method pre-shared-keysuser@router2# set services ipsec-vpn ike proposal ike_proposal_ms_5_2_0 dh-group group2user@router2# set services ipsec-vpn ike policy ike_policy_ms_5_2_0 version 2user@router2# set services ipsec-vpn ike policy ike_policy_ms_5_2_0 proposals ike_proposal_ms_5_2_0user@router2# set services ipsec-vpn ike policy ike_policy_ms_5_2_0 pre-shared-key ascii-text "$9$jokmT69pRhrz3hrev7Nik."user@router2# set services ipsec-vpn establish-tunnels immediately
    3. Configure a service set.
      user@router2# set services service-set ipsec_ss_ms_5_2_01 next-hop-service inside-service-interface ms-1/0/0.1user@router2# set services service-set ipsec_ss_ms_5_2_01 next-hop-service outside-service-interface ms-1/0/0.2user@router2# set services service-set ipsec_ss_ms_5_2_01 ipsec-vpn-options local-gateway 10.0.1.2user@router2# set services service-set ipsec_ss_ms_5_2_01 ipsec-vpn-rules vpn_rule_ms_5_2_01
    4. Configure routing options.
      user@router2# set routing-options static route 30.0.0.0/16 next-hop ms-1/0/0.1

    Results

    From the configuration mode of Router 2, confirm your configuration by entering the show interfaces, show services ipsec-vpn, and show services service-set commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

    user@router2# show interfaces
    ms-1/0/0 {unit 0 {family inet;}unit 1 {family inet;family inet6;service-domain inside;}unit 2 {family inet;family inet6;service-domain outside;}}
    ge-2/0/0 {unit 0 {family inet {address 10.0.1.2/30;}}}
    user@router2# show services ipsec-vpn
    rule vpn_rule_ms_5_2_01 {term term11 {from {source-address {80.0.0.0/16;}destination-address {30.0.0.0/16;}}then {remote-gateway 10.0.1.1;dynamic {ike-policy ike_policy_ms_5_2_0;ipsec-policy ipsec_policy_ms_5_2_0;}anti-replay-window-size 4096;}}match-direction input;}ipsec {proposal ipsec_proposal_ms_5_2_0 {protocol esp;authentication-algorithm hmac-sha1-96;encryption-algorithm 3des-cbc;}policy ipsec_policy_ms_5_2_0 {perfect-forward-secrecy {keys group2;}proposals ipsec_proposal_ms_5_2_0;}}ike {proposal ike_proposal_ms_5_2_0 {authentication-method pre-shared-keys;dh-group group2;}policy ike_policy_ms_5_2_0 {version 2;proposals ike_proposal_ms_5_2_0;pre-shared-key ascii-text "$9$jokmT69pRhrz3hrev7Nik."; ## SECRET-DATA}}
    establish-tunnels immediately;
    user@router2# show services service-set
    ipsec_ss_ms_5_2_01 {next-hop-service {inside-service-interface ms-1/0/0.1;outside-service-interface ms-1/0/0.2;}ipsec-vpn-options {local-gateway 10.0.1.2;}ipsec-vpn-rules vpn_rule_ms_5_2_01;}
    user@router2 #show routing-options
    static {route 30.0.0.0/16 next-hop ms-1/0/0.1;}

    Verification

    Verifying Tunnel Creation

    Purpose

    Verify that Dynamic End Points are created.

    Action

    Run the following command on Router 1:

    user@router1 >show services ipsec-vpn ipsec security-associations detail
    Service set: ipsec_ss_ms_4_0_01, IKE Routing-instance: default
    
      Rule: vpn_rule_ms_4_0_01, Term: term11, Tunnel index: 1
      Local gateway: 10.0.1.1, Remote gateway: 10.0.1.2
      IPSec inside interface: ms-4/0/0.1, Tunnel MTU: 1500
      Local identity: ipv4_subnet(any:0,[0..7]=30.0.0.0/16)
      Remote identity: ipv4_subnet(any:0,[0..7]=80.0.0.0/16)
    
        Direction: inbound, SPI: 112014862, AUX-SPI: 0
        Mode: tunnel, Type: dynamic, State: Installed
        Protocol: ESP, Authentication: hmac-sha1-96, Encryption: 3des-cbc
        Soft lifetime: Expires in 24556 seconds
        Hard lifetime: Expires in 25130 seconds
        Anti-replay service: Enabled, Replay window size: 4096
    
        Direction: outbound, SPI: 1469281276, AUX-SPI: 0
        Mode: tunnel, Type: dynamic, State: Installed
        Protocol: ESP, Authentication: hmac-sha1-96, Encryption: 3des-cbc
        Soft lifetime: Expires in 24556 seconds
        Hard lifetime: Expires in 25130 seconds
        Anti-replay service: Enabled, Replay window size: 4096
    
    
    

    Meaning

    The output shows that the IPSec SAs are up on the router with their state as Installed. The IPSec tunnel is up and ready to send traffic over the tunnel.

    Verifying Traffic Flow Through the DEP Tunnel

    Purpose

    Verify traffic flow across the newly-created DEP tunnel.

    Action

    Run the following command on Router 2:

    user@router2> show services ipsec-vpn ipsec statistics
    PIC: ms-1/0/0, Service set: ipsec_ss_ms_5_2_01
    
    ESP Statistics:
      Encrypted bytes:           153328
      Decrypted bytes:           131424
      Encrypted packets:           2738
      Decrypted packets:           2738
    AH Statistics:
      Input bytes:                    0
      Output bytes:                   0
      Input packets:                  0
      Output packets:                 0
    Errors:
      AH authentication failures:     0
      ESP authentication failures:    0
      ESP decryption failures:        0
      Bad headers: 0, Bad trailers: 0
      Replay before window drops: 0, Replayed pkts: 0
      IP integrity errors: 0, Exceeds tunnel MTU: 0
      Rule lookup failures: 0, No SA errors: 0
      Flow errors: 0, Misc errors: 0

    Verifying IPsec Security Associations for the Service Set

    Purpose

    Verify that the security associations configured for the service set are functioning correctly.

    Action

    Run the following command on Router 2:

    user@router2> show services ipsec-vpn ipsec security-associations ipsec_ss_ms_5_2_01
    Service set: ipsec_ss_ms_5_2_01, IKE Routing-instance: default
    
      Rule: vpn_rule_ms_5_2_01, Term: term11, Tunnel index: 1
      Local gateway: 10.0.1.2., Remote gateway: 10.0.1.1
      IPSec inside interface: ms-1/0/0.1, Tunnel MTU: 1500
        Direction SPI         AUX-SPI     Mode       Type     Protocol
        inbound   1612447024  0           tunnel     dynamic  ESP       
        outbound  1824720964  0           tunnel     dynamic  ESP
    
    

    Published: 2013-07-22