> 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/asn-package-installation.md).

# ASN Package Installation

## Prerequisites

* Enable internet and DNS to install packages via Ubuntu apt
* Disable all of CPU virtualization features (e.g. VT-x)
* Check if number of NUMA nodes is 2, same as number of CPU sockets and NICs

## Packages to Install in Ubuntu Server

* Extract the image ` tar -xf`` `` `*`asn-image-v*.tar.gz`*
* Change to the extracted directory *`cd asn-image-v*`*
* Run the installation script for the ASN server *`install-asn-server.sh`*
* Reboot the server `sudo reboot`
* After rebooting, install DPDK ports *`install-dpdk-ports.sh`*
* Execute the ASN script  *`sudo ./run-asn.sh --imgage=platform --mode=TELCO`*&#x20;
* Set the core allocation for Kafka and KPI value in <kbd>ONES UI boot configuration</kbd> page.
* Execute the ASN script `sudo ./run-asn.sh --image=generic --mode=DC`&#x20;
* Use the [*ONES UI*](/asn/asn-gui-administration/monitor/viewing-the-ones.md) to control/manage ASN
* To check the Dev console of ASN-Server
  * *`sudo conspy 20`*
  * Press ESC three times to exit

## Switching Between Application and Subscriber Modes

ASN can operate in two modes: **Application mode** and **Subscriber mode**. When transitioning between these modes, follow the steps below carefully to ensure a clean restart.

**Step 1: Stop Existing ASN Services**

Run the following commands to stop all active ASN services:

```bash
sudo systemctl stop asn-core
sudo systemctl stop asn-mgmt
sudo systemctl stop asn-snmp-trap
sudo systemctl stop asn-rest-server
```

**Step 2: Flush Redis Database**

Clear the Redis database to remove any residual data before switching modes:

```bash
redis-cli "flushall"
```

**Step 3: Reinstall ASN Server**

Run the installation script to ensure the correct mode is set:

```bash
./install-asn-server.sh
```

**Step 4: Start ASN in the Desired Mode**

* To run ASN in **Subscriber mode**, execute:

  ```bash
  sudo ./run-asn.sh

  ```
* To run ASN in **Application mode**, execute:

  ```bash
  sudo ./run-asn.sh --mode=DC
  ```

{% hint style="warning" %}
If any prerequisite or dependency is installed after completing the ASN installation, the following script must be re-executed:

$$sudo ./run-asn.sh$$
{% endhint %}

## Packages to Install in RHEL Server

* Extract the image <kbd><mark style="color:$info;">tar -xvf asn-generic-image-v2\_3-20260112.tar.gz<mark style="color:$info;"></kbd>

* Change to the extracted directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>

* Run the installation script for the ASN server&#x20;

* Reboot the server <kbd><mark style="color:$info;">sudo reboot<mark style="color:$info;"></kbd>

* After rebooting, install DPDK ports incase of intel NIC connection *`install-dpdk-ports.sh`*

* Set the value of hugepage in the shell script <kbd><mark style="color:$info;">install-asn-hugepages.sh<mark style="color:$info;"></kbd> example <kbd>huge\_page=150</kbd>

* Run the hugepage script <kbd><mark style="color:$info;">sudo ./install-asn-hugepages.sh<mark style="color:$info;"></kbd>

* Verify the hugepage config <kbd><mark style="color:$info;">sudo dpdk-hugepages.py -s<mark style="color:$info;"></kbd>

* Change to directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>

* Set the core allocation for Kafka and KPI count, total ports, overall core in <kbd>ONES boot configuration</kbd> page.

* Execute the script  <mark style="color:$primary;">`sudo /run-asn-rhel.sh --image=generic --nic=All --mode=DC`</mark> to run ASN in Application mode

* Execute the script <mark style="color:$primary;">`sudo /run-asn-rhel.sh --image=generic --nic=All --mode=TELCO`</mark> to run ASN in Subscriber mode

* To check the Dev console of ASN-Server
  * <kbd><mark style="color:$info;">sudo conspy 20<mark style="color:$info;"></kbd>
  * Press ESC three times to exit

## Configure Static IP Address on RHEL

#### Check Available Network Connections

* List all network connections and identify the connection name associated with your interface (`ens34`).

```
nmcli connection show
```

* Example output:

```
NAME          UUID                                  TYPE      DEVICE
System ens34  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  ethernet  ens34
```

#### **Configure the Static IP Address**

* Modify the connection settings with the required IP address, gateway, DNS servers, and set the IPv4 method to manual.

```
nmcli connection modify ens34 \
ipv4.addresses 192.168.1.100/24 \
ipv4.gateway 192.168.1.1 \
ipv4.dns "8.8.8.8 1.1.1.1" \
ipv4.method manual
```

#### Apply the Changes

* After modifying the connection profile, bring the interface down and back up so that NetworkManager applies the new IP, gateway, and DNS settings.

```
nmcli connection down ens34
nmcli connection up ens34
```

## Packages to Install in AWS cloud Server -DPDK Mode

* Extract the image <kbd><mark style="color:$info;">tar -xvf asn-generic-image-v2\_3-20260112.tar.gz<mark style="color:$info;"></kbd>
* Change to the extracted directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>
* Run the installation script for the ASN server <kbd><mark style="color:$info;">sudo ./install-asn-server-aws.sh<mark style="color:$info;"></kbd>
* Reboot the server <kbd><mark style="color:$info;">sudo reboot<mark style="color:$info;"></kbd>
* After rebooting, install DPDK ports incase of ENA connection sudo *`install-dpdk-ports-aws.sh`*
* Set the value of hugepage in the shell script <kbd><mark style="color:$info;">HUGEPAGE\_GB=20<mark style="color:$info;"></kbd> in case of Telco mode and excute, default <kbd><mark style="color:$info;">value 8GB<mark style="color:$info;"></kbd> is applicable for DC mode
* Verify the port binding config <kbd><mark style="color:$info;">sudo dpdk-devbind.py -s<mark style="color:$info;"></kbd>
* Change to directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>
* Set the core allocation for Kafka and KPI count, total ports, overall core in <kbd>FV boot configuration</kbd> page.
* Execute the script <kbd><mark style="color:$info;">sudo ./run-asn-aws.sh --mode=DC<mark style="color:$info;"></kbd> to run ASN in Application mode
* Execute the script <kbd><mark style="color:$info;">sudo ./run-asn-aws.sh<mark style="color:$info;"></kbd> to run ASN in Subscriber mode
* To check the Dev console of ASN-Server
  * <kbd><mark style="color:$info;">sudo conspy 20<mark style="color:$info;"></kbd>
  * Press ESC three times to exit

## Packages to Install in AWS cloud Server -AF\_Packet Mode

* Extract the image <kbd><mark style="color:$info;">tar -xvf asn-generic-image-v2\_3-20260112.tar.gz<mark style="color:$info;"></kbd>
* Change to the extracted directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>
* Run the installation script for the ASN server <kbd><mark style="color:$info;">sudo ./install-asn-server-aws.sh<mark style="color:$info;"></kbd>
* Reboot the server <kbd><mark style="color:$info;">sudo reboot<mark style="color:$info;"></kbd>
* Change to directory <kbd><mark style="color:$info;">cd asn-core-install/<mark style="color:$info;"></kbd>
* Set the core allocation for Kafka and KPI count, total ports, overall core in <kbd>FV boot configuration</kbd> page.
* Execute the script <kbd><mark style="color:$info;">sudo ./run-asn-aws.sh --mode=DC<mark style="color:$info;"></kbd> to run ASN in Application mode
* Execute the script <kbd><mark style="color:$info;">sudo ./run-asn-aws.sh<mark style="color:$info;"></kbd> to run ASN in Subscriber mode
* To check the Dev console of ASN-Server
  * <kbd><mark style="color:$info;">sudo conspy 20<mark style="color:$info;"></kbd>
  * Press ESC three times to exit

## Configuring ASN NIC Ports

To ensure ASN uses the intended NIC interfaces, explicitly define the PCI devices in `config.json` under `eal-args`.

#### Steps

* Identify the required NIC PCI addresses:

```
dpdk-devbind.py -s
```

* from the `asn-core-install` directory, navigate to config.json:

<pre><code><strong>sudo vi config.json
</strong></code></pre>

* Specify the NiC ports to be handled by ASN in `config.json` after lcores info,\
  (“a” → PCI List to be handled by ASN). as shown by the example:-

**Example-**

{% code overflow="wrap" %}

```
"eal-args": {
        "lcores": "16-127",
        "a": [
            "0000:01:00.0",
            "0000:01:00.1",
            "0000:e1:00.0",
            "0000:e1:00.1"
        ]
    },
```

{% endcode %}

* Save the configuration.
* From the `asn-core-install` directory, restart ASN services/application for changes to take effect.<br>

**TELCO:**

```
sudo ./run-asn.sh --mode=TELCO    
```

**DC:**

```
sudo ./run-asn.sh --mode=DC
```

## ASN 2.5 and later

```
sudo ./run-asn.sh --image=platform --mode=TELCO --nic=Intel
sudo ./run-asn-rhel.sh --image=generic --mode=DC --nic=All
sudo ./run-asn-aws.sh --image=platform    
```

```
Options:
  --nic=All         Include both Intel and Mellanox NIC support (default)
  --nic=Intel       Include only Intel NIC support
  --os=<os_id>      Override detected OS ID (e.g. ubuntu, rhel, rocky, amzn)
                    Supported values: ubuntu, debian, rhel, centos, rocky, almalinux, amzn
```

`Usage: ./prep-asn-tar.sh [--nic=All|Intel] [--os=<os_id>]`

After executing the respective command, ASN will initialize in the selected mode.

#### Note

ASN probes the configured PCI devices in numerical order internally, irrespective of the sequence mentioned in the configuration list.
