---
title: IPsec-VPP Case
slug: routing/ipsec-vpp-case
createdAt: 2026-01-30T02:47:31.014Z
---

# <font color="#1d50a2">**Introduction**</font>

This guide provides a comprehensive, step-by-step tutorial for establishing secure IP Security (IPSec) VPN tunnels on the Asterfusion ET2500 Open Intelligent Gateway. By leveraging the high-performance VPP data plane, you will learn how to build encrypted networks that are both secure and scalable.

## <font color="#1d50a2">**What This Guide Will Accomplish**</font>

By following this guide, you will learn how to deploy robust VPN architectures ranging from simple point-to-point connections to complex multi-site enterprise networks. The scenarios covered are:

- **Scenario 1: Site-to-Site VPN (Direct Connection)**
  Establishing a standard point-to-point tunnel between two gateways.
- **Scenario 2: Hub-and-Spoke VPN (Multi-Site)**
  Configuring a central Hub gateway to accept concurrent connections from multiple Branch offices.
- **Scenario 3: NAT Traversal (NAT-T)**
  Deploying a branch gateway behind a NAT device using ID Masquerading.

***

# <font color="#1d50a2">**Scenario 1\: Site-to-Site VPN (Direct Connection)**</font>

### 1. Scenario Overview

We establish a standard tunnel between two sites. To optimize the process, we assign distinct roles:

- **Site B (Responder):** Configures parameters and passively waits.
- **Site A (Initiator):** Configures parameters and **triggers** the negotiation by binding the policy to the interface.

### 2. Network Topology Plan

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/V56fgqtz9x8wduBn6Ew_j-20260130-033104.png)

| **Role**               | **Device** | **WAN IP (Underlay)** | **LAN IP (Overlay)** | **Protected Subnet** |
| ---------------------- | ---------- | --------------------- | -------------------- | -------------------- |
| **Site A (Initiator)** | AsterNOS   | 192.168.200.166       | 20.20.20.1           | 20.20.20.0/24        |
| **Site B (Responder)** | AsterNOS   | 192.168.200.177       | 10.10.10.1           | 10.10.10.0/24        |

### 3. Configuration Steps

### Step 1: Initialize Network (Interfaces & Routing)

:::BlockQuote
sonic# configure terminal
 <font color="#5fd74e"># Example on Site A (.166)\:</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 192.168.200.166/24
sonic(config-if-1)# exit

sonic(config)# ip route 0.0.0.0/0 192.168.200.1
 <font color="#5fd74e"># (Perform symmetrical configuration on Site B .177)</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 192.168.200.177/24
sonic(config-if-1)# exit

sonic(config)# ip route 0.0.0.0/0 192.168.200.1
:::

### Step 2: Configure Site B (Responder - .177)

Define the policy globally, then bind it to the interface to enable listening.

:::BlockQuote
<font color="#5fd74e"># Define Global Policy</font>
sonic(config)# ipsec test
sonic(config-ipsec-test)# shared\_key\_mic string test1234
sonic(config-ipsec-test)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
sonic(config-ipsec-test)# ike local type ip4 data 192.168.200.177
sonic(config-ipsec-test)# ike remote type ip4 data 192.168.200.166
 <font color="#5fd74e"># Traffic Selector (Local\: 10.x &lt;-&gt; Remote\: 20.x)</font>
sonic(config-ipsec-test)# ike traffic\_selector local ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
sonic(config-ipsec-test)# ike traffic\_selector remote ip4 addr\_start 20.20.20.0 addr\_end 20.20.20.255
sonic(config-ipsec-test)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-test)# sa tunnel ip4 src\_ip 192.168.200.177 dst\_ip 192.168.200.166 next\_hop 192.168.200.166 remote\_ip 20.20.20.0/24 shared\_interface Ethernet1
sonic(config-ipsec-test)# exit
:::

### Step 3: Configure Site A (Initiator - .166)

Define the policy globally. **The final step of binding it to the interface triggers the negotiation.**

:::BlockQuote
<font color="#5fd74e"># 1. Define Global Policy</font>
sonic(config)# ipsec test
sonic(config-ipsec-test)# shared\_key\_mic string test1234
sonic(config-ipsec-test)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
sonic(config-ipsec-test)# ike local type ip4 data 192.168.200.166
sonic(config-ipsec-test)# ike remote type ip4 data 192.168.200.177
 <font color="#5fd74e"># Traffic Selector (Local\: 20.x &lt;-&gt; Remote\: 10.x)</font>
sonic(config-ipsec-test)# ike traffic\_selector local ip4 addr\_start 20.20.20.0 addr\_end 20.20.20.255
sonic(config-ipsec-test)# ike traffic\_selector remote ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
sonic(config-ipsec-test)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-test)# sa tunnel ip4 src\_ip 192.168.200.166 dst\_ip 192.168.200.177 next\_hop 192.168.200.177 remote\_ip 10.10.10.0/24 shared\_interface Ethernet1
sonic(config-ipsec-test)# exit
 <font color="#5fd74e"># 2. Bind to WAN Interface (Triggers Connection)</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ipsec test peer ip4 192.168.200.177
sonic(config-if-1)# exit
:::

### 4. Verification

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/qlA5uqgHbuAo1T1gPemPA-20260130-033607.png)

***

# <font color="#1d50a2">**Scenario 2\: Hub-and-Spoke VPN (Multi-Site)**</font>

### 1. Scenario Overview

- **Hub (.188) - Responder:** Configures policies globally and binds them to the interface to listen.
- **Spokes (.166 / .177) - Initiators:** Configure policies globally and **trigger negotiation** by binding to the interface.

### 2. Network Topology Plan

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/WRTaiKT-8zSOyCHG-mLNu-20260130-033644.png)

| **Role** | **Device** | **WAN IP (Underlay)** | **LAN IP (Overlay)** | **Protected Subnet** |
| -------- | ---------- | --------------------- | -------------------- | -------------------- |
| Hub (HQ) | AsterNOS   | 192.168.200.188       | 30.30.30.1           | 30.30.30.0/24        |
| Spoke 1  | AsterNOS   | 192.168.200.166       | 20.20.20.1           | 20.20.20.0/24        |
| Spoke 2  | AsterNOS   | 192.168.200.177       | 10.10.10.1           | 10.10.10.0/24        |

### 3. Configuration Steps

### Step 1: Initialize Hub Network (.188)

:::BlockQuote
<font color="#5fd74e"># WAN</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 192.168.200.188/24
sonic(config-if-1)# no shutdown
sonic(config-if-1)# exit
 <font color="#5fd74e"># LAN</font>
sonic(config)# interface ethernet 2
sonic(config-if-2)# ip address 30.30.30.1/24
sonic(config-if-2)# no shutdown
sonic(config-if-2)# exit
 <font color="#5fd74e"># Route</font>
sonic(config)# ip route 0.0.0.0/0 192.168.200.1
sonic(config)# exit
:::

### Step 2: Configure Hub (Responder - .188)

Define two separate policies (one for each spoke) and bind both to the WAN interface.

:::BlockQuote
<font color="#5fd74e"># --- Policy 1\: For Spoke 1 ---</font>
sonic(config)# ipsec peer\_spoke1
sonic(config-ipsec-peer\_spoke1)# shared\_key\_mic string test1234
sonic(config-ipsec-peer\_spoke1)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
sonic(config-ipsec-peer\_spoke1)# ike local type ip4 data 192.168.200.188
sonic(config-ipsec-peer\_spoke1)# ike remote type ip4 data 192.168.200.166
 <font color="#5fd74e"># Selector\: Hub (30.x) &lt;-&gt; Spoke 1 (20.x)</font>
sonic(config-ipsec-peer\_spoke1)# ike traffic\_selector local ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
sonic(config-ipsec-peer\_spoke1)# ike traffic\_selector remote ip4 addr\_start 20.20.20.0 addr\_end 20.20.20.255
sonic(config-ipsec-peer\_spoke1)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-peer\_spoke1)# sa tunnel ip4 src\_ip 192.168.200.188 dst\_ip 192.168.200.166 next\_hop 192.168.200.166 remote\_ip 20.20.20.0/24 shared\_interface Ethernet1
sonic(config-ipsec-peer\_spoke1)# exit
 <font color="#5fd74e"># --- Policy 2\: For Spoke 2 ---</font>
sonic(config)# ipsec peer\_spoke2
sonic(config-ipsec-peer\_spoke2)# shared\_key\_mic string test1234
 <font color="#5fd74e"># ... (Same crypto settings) ...</font>
sonic(config-ipsec-peer\_spoke2)# ike local type ip4 data 192.168.200.188
sonic(config-ipsec-peer\_spoke2)# ike remote type ip4 data 192.168.200.177
 <font color="#5fd74e"># Selector\: Hub (30.x) &lt;-&gt; Spoke 2 (10.x)</font>
sonic(config-ipsec-peer\_spoke2)# ike traffic\_selector local ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
sonic(config-ipsec-peer\_spoke2)# ike traffic\_selector remote ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
sonic(config-ipsec-peer\_spoke2)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-peer\_spoke2)# sa tunnel ip4 src\_ip 192.168.200.188 dst\_ip 192.168.200.177 next\_hop 192.168.200.177 remote\_ip 10.10.10.0/24 shared\_interface Ethernet1
sonic(config-ipsec-peer\_spoke2)# exit
:::

### Step 3: Configure Spoke 1 (Initiator - .166)

:::BlockQuote
<font color="#5fd74e"># 1. Global Policy</font>
sonic(config)# ipsec to\_hub
sonic(config-ipsec-to\_hub)# shared\_key\_mic string test1234
sonic(config-ipsec-to\_hub)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
sonic(config-ipsec-to\_hub)# ike local type ip4 data 192.168.200.166
sonic(config-ipsec-to\_hub)# ike remote type ip4 data 192.168.200.188
sonic(config-ipsec-to\_hub)# ike traffic\_selector local ip4 addr\_start 20.20.20.0 addr\_end 20.20.20.255
sonic(config-ipsec-to\_hub)# ike traffic\_selector remote ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
sonic(config-ipsec-to\_hub)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-to\_hub)# sa tunnel ip4 src\_ip 192.168.200.166 dst\_ip 192.168.200.188 next\_hop 192.168.200.188 remote\_ip 30.30.30.0/24 shared\_interface Ethernet1
sonic(config-ipsec-to\_hub)# exit
 <font color="#5fd74e"># 2. Interface Binding (Trigger)</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ipsec to\_hub peer ip4 192.168.200.188
sonic(config-if-1)# exit
:::

### Step 4: Configure Spoke 2 (Initiator - .177)

:::BlockQuote
<font color="#5fd74e"># 1. Global Policy</font>
sonic(config)# ipsec to\_hub
sonic(config-ipsec-to\_hub)# shared\_key\_mic string test1234
sonic(config-ipsec-to\_hub)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
sonic(config-ipsec-to\_hub)# ike local type ip4 data 192.168.200.177
sonic(config-ipsec-to\_hub)# ike remote type ip4 data 192.168.200.188
sonic(config-ipsec-to\_hub)# ike traffic\_selector local ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
sonic(config-ipsec-to\_hub)# ike traffic\_selector remote ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
sonic(config-ipsec-to\_hub)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
sonic(config-ipsec-to\_hub)# sa tunnel ip4 src\_ip 192.168.200.177 dst\_ip 192.168.200.188 next\_hop 192.168.200.188 remote\_ip 30.30.30.0/24 shared\_interface Ethernet1
sonic(config-ipsec-to\_hub)# exit <font color="#5fd74e">
# 2. Interface Binding (Trigger)</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ipsec to\_hub peer ip4 192.168.200.188
sonic(config-if-1)# exit
:::

### 4. Verification

We verify the multi-site connectivity by generating traffic from each Spoke to the Hub and analyzing the captured packets using Wireshark.

### A. Traffic Generation

Initiate continuous UDP traffic from both Branch Offices to the Headquarters using `iperf3` to generate a stable stream of encrypted packets.

**1. From Spoke 1 (PC A):**

```bash
# Send 10Mbps UDP traffic to Hub LAN (30.30.30.100)
iperf3 -c 30.30.30.100 -u -b 10M -t 100
```

**2. From Spoke 2 (PC B):**

```bash
# Send 10Mbps UDP traffic to Hub LAN (30.30.30.100)
iperf3 -c 30.30.30.100 -u -b 10M -t 100
```

### B. Capture Analysis (Tunnel 1: Spoke 1 -> Hub)

The screenshot below confirms that traffic from Spoke 1 (`.166`) is arriving at the Hub (`.188`) as encrypted ESP packets.

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/i7PJWej1DU7dqneG9A54w-20260130-034446.png)



### C. Capture Analysis (Tunnel 2: Spoke 2 -> Hub)

The screenshot below confirms that traffic from Spoke 2 (`.177`) is also arriving at the Hub (`.188`) as a distinct stream of encrypted ESP packets.

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/tCerTqmGxzLl5kBboTkIz-20260130-034559.png)



# <font color="#1d50a2">**Scenario 3\: NAT Traversal (NAT-T) with ID Masquerading**</font>

### 1. Scenario Overview

In this scenario, the Branch Gateway is deployed behind a NAT device (e.g., an ISP optical modem) and does not have a public IP address.

**Key Configuration Strategy (ID Masquerading):**

- **Branch Side:** The Branch Gateway "masquerades" its identity by claiming to be the NAT device's Public IP (`.166`) during IKE negotiation.
- **HQ Side:** The HQ Gateway is configured to peer with the NAT device's Public IP (`.166`) directly.

### 2. Network Topology Plan (Linear Chain)

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/4B5Q9dlY1JASz7LdNViPx-20260130-060105.png)

| **Role**           | **Device**    | **Interface**         | **IP Address**  | **Function**            | **Subnet Protected** |
| ------------------ | ------------- | --------------------- | --------------- | ----------------------- | -------------------- |
| HQ (Responder)     | AsterNOS      | Eth1 (WAN)            | 192.168.200.188 | Public VPN Gateway      | 10.10.10.0/24        |
| Eth2 (LAN)         | 10.10.10.1    | Gateway for HQ PC     |                 |                         |                      |
| NAT Router         | AsterNOS      | Eth1 (WAN)            | 192.168.200.166 | Simulates ISP Router    | N/A                  |
| Eth2 (LAN)         | 192.168.100.1 | Simulates LAN Gateway |                 |                         |                      |
| Branch (Initiator) | AsterNOS      | Eth1 (WAN)            | 192.168.100.2   | Private IP (Behind NAT) | 30.30.30.0/24        |
| Eth2 (LAN)         | 30.30.30.1    | Gateway for Branch PC |                 |                         |                      |

### 3. Configuration Steps

### Step 1: Configure the Intermediate NAT Router (.166)

This device acts purely as a NAT router. It translates the Branch's private IP (`.100.x`) to the Public WAN IP (`.200.166`).

:::BlockQuote
<font color="#5fd74e"># 1. Configure WAN Interface (Public)</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 192.168.200.166/24
sonic(config-if-1)# nat-zone 1
sonic(config-if-1)# exit
 <font color="#5fd74e"># 2. Configure LAN Interface (Private)</font>
sonic(config)# interface ethernet 2
sonic(config-if-2)# ip address 192.168.100.1/24
sonic(config-if-2)# exit
 <font color="#5fd74e"># 3. Configure SNAT Rule</font> <font color="#5fd74e"># Translates all traffic from 192.168.100.0/24 to Public IP 192.168.200.166</font>
sonic(config)# nat pool pool1 192.168.200.166
sonic(config)# nat binding bind1 pool1
sonic(config)# nat enable
 <font color="#5fd74e"># 4. Default Route</font>
sonic(config)# ip route 0.0.0.0/0 192.168.200.1
sonic(config)# exit
:::

### Step 2: Configure HQ Gateway (.188)

The HQ gateway is on the public network. It is configured to peer directly with the NAT device's Public IP.

:::BlockQuote
sonic(config)# ipsec from\_branch
sonic(config-ipsec)# shared\_key\_mic string test1234
sonic(config-ipsec)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
&#x20; <font color="#5fd74e"># Identity Configuration
# Local\: My Public IP (.188)</font>
sonic(config-ipsec)# ike local type ip4 data 192.168.200.188
 <font color="#5fd74e"># Remote\: The NAT Device's PUBLIC IP (.166)
# HQ expects the peer to identify as .166</font>
sonic(config-ipsec)# ike remote type ip4 data 192.168.200.166
&#x20; <font color="#5fd74e"># Traffic Selector (Local\: 10.x &lt;-&gt; Remote\: 30.x)</font>
sonic(config-ipsec)# ike traffic\_selector local ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
sonic(config-ipsec)# ike traffic\_selector remote ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
&#x20; <font color="#5fd74e"># SA Parameters</font>
sonic(config-ipsec)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
&#x20; <font color="#5fd74e"># Tunnel Definition
# dst\_ip\: Points to the physically reachable NAT Public IP (.166)
# next\_hop\: Points to the next hop gateway (or directly to .166 if L2 connected)</font>
sonic(config-ipsec)# sa tunnel ip4 src\_ip 192.168.200.188 dst\_ip 192.168.200.166 next\_hop 192.168.200.166 remote\_ip 30.30.30.0/24 shared\_interface Ethernet1
sonic(config-ipsec)# exit
:::

### Step 3: Configure Branch Gateway (.100.2)

The Branch gateway is behind NAT. It must "masquerade" its Identity to match the HQ's expectation.

:::BlockQuote
sonic(config)# ipsec to\_hq
sonic(config-ipsec)# shared\_key\_mic string test1234
sonic(config-ipsec)# ike crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96 dh modp-2048
&#x20; <font color="#5fd74e"># Identity Configuration
# Local\: MASQUERADED ID -&gt; We claim to be the Public NAT IP (.166)</font>
sonic(config-ipsec)# ike local type ip4 data 192.168.200.166
 <font color="#5fd74e"># Remote\: HQ Public IP (.188)</font>
sonic(config-ipsec)# ike remote type ip4 data 192.168.200.188
&#x20; <font color="#5fd74e"># Traffic Selector (Local\: 30.x &lt;-&gt; Remote\: 10.x)</font>
sonic(config-ipsec)# ike traffic\_selector local ip4 addr\_start 30.30.30.0 addr\_end 30.30.30.255
sonic(config-ipsec)# ike traffic\_selector remote ip4 addr\_start 10.10.10.0 addr\_end 10.10.10.255
&#x20; <font color="#5fd74e"># SA Parameters</font>
sonic(config-ipsec)# sa crypto\_alg aes-cbc crypto\_alg\_size 256 integ\_alg sha1-96
&#x20; <font color="#5fd74e"># Tunnel Definition
# src\_ip\: Must be the REAL Private IP (.100.2) to send packets
# next\_hop\: Points to the internal NAT Gateway (.100.1)</font>
sonic(config-ipsec)# sa tunnel ip4 src\_ip 192.168.100.2 dst\_ip 192.168.200.188 next\_hop 192.168.100.1 remote\_ip 10.10.10.0/24 shared\_interface Ethernet1
sonic(config-ipsec)# exit
 <font color="#5fd74e"># Bind to WAN Interface</font>
sonic(config)# interface ethernet 1
sonic(config-if-1)# ipsec to\_hq peer ip4 192.168.200.188
sonic(config-if-1)# exit
:::

### 4. Verification

### Data Plane Verification (NAT-T Encapsulation)

To confirm that NAT Traversal is functioning correctly, we perform a continuous ping from the Branch side (30.x) to the HQ side (10.x) and capture traffic at the **NAT Device's WAN Interface**.

1. **Generate Traffic (Continuous Ping from Branch):**
   From a PC or the Gateway on the Branch side (subnet `30.30.30.0/24`), ping a target IP on the HQ side (subnet `10.10.10.0/24`).

```bash
# From Branch PC (e.g., 30.30.30.100)
ping 10.10.10.100 -t
```

1. **Capture Packets (On NAT Device .166):**
   Monitor traffic on the **NAT Device's WAN Interface (Ethernet 1)**.

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/dVeLS28ZCl28QAWNa3OE3-20260130-060202.png)



# <font color="#1d50a2">**Conclusion**</font>

This guide demonstrates that AsterNOS is a robust IPsec VPN solution capable of handling Site-to-Site, Hub-and-Spoke, and NAT-T scenarios. The validated configurations prove that the Asterfusion ET2500 ensures secure, encrypted connectivity across complex topologies. Specifically, the successful NAT Traversal implementation confirms the gateway's ability to reliably connect branch offices located behind ISP NAT devices.
