> For the complete documentation index, see [llms.txt](https://aviznetworks.gitbook.io/asn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aviznetworks.gitbook.io/asn/deploying-asn/vasn-aws-deployment-guide.md).

# vASN AWS Deployment Guide

### 1. Architecture & Deployment Models

The vASN/ASN deployment supports multiple source and destination combinations. Choose the deployment model that matches your environment.

#### 1.1 Deployment Models

| Model                 | Source                    | Destination     | Connectivity                      |
| --------------------- | ------------------------- | --------------- | --------------------------------- |
| Cloud-to-Cloud        | vasn\_tap on EC2          | vASN in AWS     | VPC internal (private IPs)        |
| Cloud-to-OnPrem       | vasn\_tap on EC2          | ASN on-premises | VPN / Direct Connect              |
| VPC Traffic Mirroring | AWS VPC Traffic Mirroring | vASN in AWS     | Mirror session to vASN ENI or NLB |

#### 1.2 Model A - Cloud-to-Cloud (vasn\_tap → vASN)

The default hub-and-spoke model within your AWS VPC. Source agents (vasn\_tap) run on workload EC2 instances, capture packets, and encapsulate them via VXLAN or GRE to a central vASN collector instance.

* Source (vasn\_tap): Lightweight agent on workload EC2 instances. Captures via AF\_PACKET or eBPF.
* Transport: VXLAN (UDP 4789) or GRE (Protocol 47) over VPC internal network.
* Collector (vASN): Dedicated EC2 from Aviz AMI. Terminates tunnels and processes data.<br>

Figure 1: Hub & Spoke Architecture — vasn\_tap agents forwarding to central vASN

<figure><img src="https://content.gitbook.com/content/IPuwYU8kWKXe85bX1sjR/blobs/HPw7t0bSUNOTPSAS9633/Figure%201:%20Hub%20&amp;%20Spoke%20Architecture%20%E2%80%94%20vasn_tap%20agents%20forwarding%20to%20central%20vASN" alt=""><figcaption></figcaption></figure>

#### 1.3 Model B - Cloud-to-OnPrem (vasn\_tap → ASN)

Source agents (vasn\_tap) on EC2 instances forward captured traffic to an on-premises ASN appliance. The ASN must be reachable from the AWS VPC via AWS Site-to-Site VPN or AWS Direct Connect.<br>

* Site-to-Site VPN: Encrypted IPsec tunnel over internet.
* Direct Connect: Dedicated private connection to AWS.
* remote\_ip: Points to ASN’s reachable IP (not a VPC IP).
* MTU: May be lower due to VPN overhead — plan accordingly.

Figure 2: Cloud-to-On-Premises Deployment Model

<figure><img src="https://content.gitbook.com/content/IPuwYU8kWKXe85bX1sjR/blobs/rj4lVn7zs49s3nETl0CB/Figure%202:%20Cloud-to-On-Premises%20Deployment%20Model" alt=""><figcaption></figcaption></figure>

#### 1.4 Model C - VPC Traffic Mirroring (→ vASN)

Instead of installing vasn\_tap, you can use AWS VPC Traffic Mirroring to copy network traffic from ENIs directly to a vASN instance. This is agentless — no software installation on workload instances.

**How It Works**

1. Create a Mirror Target pointing to the vASN instance’s ENI (or an NLB in front of it).
2. Create Mirror Filters to select which traffic to capture (by protocol, port, CIDR).
3. Create Mirror Sessions linking source ENIs to the target with the filter applied.<br>

Figure 3: VPC Traffic Mirroring to vASN

<figure><img src="https://content.gitbook.com/content/IPuwYU8kWKXe85bX1sjR/blobs/URNAIfk7pgYDDduvt4co/Figure%203:%20VPC%20Traffic%20Mirroring%20to%20vASN" alt=""><figcaption></figcaption></figure>

**Considerations**

* Traffic is encapsulated in VXLAN (UDP 4789) by AWS automatically.
* Supported on Nitro-based instances only.
* Mirror session limit per ENI and per account — check AWS quotas.
* No agent install required on source instances.

### 2. Phase A - Deploy vASN

The vASN is the central node. It must be deployed first and reachable by all tap agents.

#### 2.1 AMI Selection

Search the AWS Marketplace for Aviz vASN. Select the latest version and subscribe.

| Throughput Tier | Instance Types           | vCPU | RAM   |
| --------------- | ------------------------ | ---- | ----- |
| Up to 1 Gbps    | c5.xlarge / c5n.xlarge   | 4    | 8 GB  |
| Up to 5 Gbps    | c5.2xlarge / c5n.2xlarge | 8    | 16 GB |
| Up to 10 Gbps   | c5n.4xlarge              | 16   | 42 GB |
| Up to 25 Gbps   | c5n.9xlarge              | 36   | 96 GB |

#### 2.2 Launch the Instance

1. Select the Aviz vASN AMI.
2. Choose instance type per throughput tier.
3. Place the instance in the same VPC/subnet as your workload instances (Model A) or in a subnet reachable via VPN (Model B).
4. Attach at least 2 ENIs (one for management, one+ for data ingestion).

#### 2.3 Security Group Rules

| Direction | Protocol       | Port / Type | Purpose                                   |
| --------- | -------------- | ----------- | ----------------------------------------- |
| Inbound   | UDP            | 4789        | VXLAN tunnel from vasn\_tap or VPC mirror |
| Inbound   | IP Protocol 47 | N/A (GRE)   | GRE tunnel from vasn\_tap                 |
| Inbound   | TCP            | 22          | SSH management                            |
| Inbound   | TCP            | 443         | FlowVision UI / REST API                  |
| Outbound  | All            | All         | Default — allow all outbound              |

#### 2.4 Disable Source/Dest Check

Crucial for the vASN to receive tunnelled traffic:

\# Via CLI

```shellscript
aws ec2 modify-instance-attribute --instance-id i-0abcd1234efgh5678 --no-source-dest-check
```

#### 2.5 Verify vASN Service

```shellscript
ssh -i your-key.pem ec2-user@<vASN-IP>
sudo systemctl status vasn
```

#### 2.6 Confirm ENI Attachment

```shellscript
ip link show
```

\# Verify data ENI (e.g. eth1) is UP

#### 2.7 FlowVision for vASN Orchestration

vASN can be configured and managed from Aviz Flow Vision application. Refer FV guide for more details.<br>

### 3. Phase B - Deploy vasn\_tap (Source)

The vasn\_tap agent is installed on each workload EC2 instance you want to monitor.

#### 3.1 Prerequisites

| Requirement         | Detail                                                 |
| ------------------- | ------------------------------------------------------ |
| OS                  | Ubuntu 20.04+, Ubuntu 22.04, Amazon Linux 2023, RHEL 9 |
| Kernel (AF\_PACKET) | ≥ 3.2                                                  |
| Kernel (eBPF)       | ≥ 5.10 with BTF (/sys/kernel/btf/vmlinux)              |
| Privileges          | Root (or CAP\_NET\_RAW, CAP\_NET\_ADMIN)               |
| Dependencies        | None — prebuilt package is statically linked           |

#### 3.2 Transfer & Install

\# Obtain the vasn\_tap-v2.4.tar.gz from Aviz Support

```shellscript
scp -i your-key.pem vasn_tap-v2.4.tar.gz ec2-user@<IP>:/tmp/
```

\# SSH into the source instance

```shellscript
ssh -i your-key.pem ec2-user@<IP>
```

\# Extract and install

```shellscript
tar -xzf /tmp/vasn_tap-v2.4.tar.gz
cd vasn_tap-v2.4
sudo ./install.sh
```

The installer places:

* ```shellscript
  vasn_tap binary → /usr/local/bin/
  ```
* ```shellscript
  Config → /etc/vasn_tap/config.yaml
  ```
* ```shellscript
  vasn_tapctl control script in PATH
  ```
* ```shellscript
  systemd service unit (not auto-started)
  ```

### 4. Phase C - Configuration

Edit the config on each source instance. The remote\_ip must be the IP of your vASN instance (cloud-to-cloud) or ASN appliance (cloud-to-on-prem).

#### 4.1 VXLAN Tunnel (Recommended)

\# /etc/vasn\_tap/config.yaml

<pre class="language-shellscript"><code class="lang-shellscript">runtime:
  input_iface: eth0
  output_iface: eth0
  mode: afpacket
  stats: true
filter:
<strong>  default_action: allow
</strong>rules:
  match: "tcp port 443"
  action: allow
tunnel:
  type: vxlan
  remote_ip: 10.0.1.50  # vASN private IP
  vni: 100
  dstport: 4789
</code></pre>

#### 4.2 GRE Tunnel

```shellscript
tunnel:
  type: gre
  remote_ip: 10.0.1.50
  key: 42
```

#### 4.3 eBPF Capture Mode

```shellscript
runtime:
  mode: ebpf
  input_iface: eth0
  output_iface: eth0
```

#### 4.4 Truncation

```shellscript
runtime:
  truncate:
    enabled: true
    length: 128   # 64–9000 bytes
```

#### 4.5 Configuration Reference

| Section | Key             | Required    | Description                              |
| ------- | --------------- | ----------- | ---------------------------------------- |
| runtime | input\_iface    | Yes         | Input interface name (e.g. eth0)         |
| runtime | output\_iface   | When tunnel | Output interface to reach vASN/ASN       |
| runtime | mode            | Yes         | afpacket or ebpf                         |
| runtime | workers         | No          | Worker count (AF\_PACKET only; 0 = auto) |
| runtime | stats           | No          | Enable file-based stats (default: true)  |
| filter  | default\_action | Yes         | allow or drop                            |
| filter  | rules           | Yes         | Rule list (max 128). First match wins.   |
| tunnel  | type            | When tunnel | vxlan or gre                             |
| tunnel  | remote\_ip      | When tunnel | vASN or ASN IP address                   |
| tunnel  | vni / dstport   | VXLAN       | VNI and UDP port (default 4789)          |
| tunnel  | key             | GRE (opt)   | Optional GRE key                         |

### 5. Phase D - Validation & Handshake

#### 5.1 Validate Configuration

```shellscript
sudo vasn_tapctl validate
```

#### 5.2 Dry Run (Optional)

\# Full init without capturing

```shellscript
sudo vasn_tapctl dry-run
```

| Do not run dry-run while the service is active. Stop first with vasn\_tapctl stop. |
| ---------------------------------------------------------------------------------- |

#### 5.3 Start the Service

```shellscript
sudo vasn_tapctl start
sudo vasn_tapctl status
```

#### 5.4 Verify Traffic Flow

\# Watch live counters

```shellscript
sudo vasn_tapctl counters --watch
```

Confirm TX packet counts are incrementing. If they remain at zero, see Troubleshooting.

### 6. AWS-Specific Constraints

**MTU Management**

AWS VPC supports MTU up to 9001 (Jumbo Frames). VXLAN adds 50 bytes overhead. Ensure your interface MTU accommodates the encapsulated size. Set source interface MTU to ≤ 8951 when using VXLAN with jumbo frames.

**Source/Dest Check**

Must be disabled on the vASN instance. AWS enables this by default, which drops traffic not addressed to the instance’s own IP.

**Security Groups**

Both source and destination SGs must allow the tunnel protocol (UDP 4789 for VXLAN, IP Protocol 47 for GRE).

**Multi-AZ**

vasn\_tap → vASN traffic across AZs incurs inter-AZ data transfer costs. For high-volume deployments, consider one vASN per AZ.<br>

### 7. Operations

#### 7.1 Service Management

```shellscript
sudo vasn_tapctl start
sudo vasn_tapctl stop
sudo vasn_tapctl restart
sudo vasn_tapctl status
```

#### 7.2 Statistics

\# One-shot counters

```shellscript
sudo vasn_tapctl counters
```

\# Live-updating counters

```shellscript
sudo vasn_tapctl counters --watch
```

#### 7.3 Upgrade

```shellscript
sudo vasn_tapctl stop
```

\# Replace the binary

```shellscript
sudo cp vasn_tap_new /usr/local/bin/vasn_tap
sudo vasn_tapctl start
```

\# Version info

```shellscript
vasn_tapctl version
```

#### 7.4 Logs

```shellscript
sudo vasn_tapctl logs
journalctl -u vasn_tap -f
```

### 8. Troubleshooting

| Issue                           | Resolution                                                                                                         |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Tunnel init fails / ARP failed  | Ensure output\_iface can reach remote\_ip. Ping the vASN/ASN IP to populate ARP cache, then restart.               |
| TX always 0                     | Check output\_iface is set. Verify filter default\_action is ‘allow’. Check Security Group allows tunnel protocol. |
| Permission denied               | Run with sudo. vasn\_tap requires root for raw sockets.                                                            |
| Config change not applied       | Restart the service: sudo vasn\_tapctl restart. Config is read only at startup.                                    |
| Interface not found             | Verify names with ‘ip link show’. Use exact name in config.                                                        |
| eBPF: BTF not found             | Use mode: afpacket, or upgrade kernel to ≥ 5.10 with BTF.                                                          |
| Shared library errors           | Contact Aviz — the prebuilt package should have no library dependencies.                                           |
| On-prem ASN unreachable         | Verify VPN/Direct Connect is active. Check route tables. Test with ping or traceroute.                             |
| VPC Mirror traffic not arriving | Confirm mirror session is active. Check vASN SG allows UDP 4789. Ensure source is Nitro-based.                     |

### 9. Support

If traffic is not reaching vASN, contact Aviz Support:

1. Run: sudo vasn\_tapctl show-tech -o /tmp/aviz\_bundle.txt on the source instance.
2. Run: journalctl -u vasn > /tmp/vasn\_logs.txt
3. Send both files to <support@aviznetworks.com><br>

\# Generate tech support bundle

```shellscript
sudo vasn_tapctl show-tech -o /tmp/aviz_bundle.txt
```

\# Or print to stdout

```shellscript
sudo vasn_tapctl show-tech
```

> Automated Deployment with Terraform: All deployment steps can be automated using Terraform. Contact Aviz Support at <support@aviznetworks.com> for pre-validated Terraform scripts.
