This lab demonstrates how to use Containerlab to simulate a pair of HPE Aruba AOS-CX switches in a VSX (Virtual Switching Extension) configuration - Aruba's multi-chassis aggregation technology. The goal is to provide a reproducible environment for discovering Containerlab with Aruba equipment, without physical hardware.
- Linux (tested on Fedora 43 and Ubuntu 24.04)
- Containerlab ≥ 0.74
- Docker
- vrnetlab AOS-CX image:
vrnetlab/vr-aoscx:10.16.1020
- (Optional) VS Code extension Containerlab by srl-labs
The AOS-CX Switch Simulator image is available for free on the HPE Networking portal (account required).
Once logged in at networking.hpe.com:
- Software → AOS-CX Switch Simulator
- Download
AOS-CX_10_16_1020.ova
- Extract the
.vmdk from the OVA: tar xf AOS-CX_10_16_1020.ova
- Build the Docker image via vrnetlab:
┌─────────────────────────────────────────────┐
│ aoscx-vsx │
│ │
│ ┌──────────┐ eth1/eth2 ┌──────────┐ │
│ │ sw1 │◄────ISL─────►│ sw2 │ │
│ │ primary │ (LAG LACP) │secondary │ │
│ │ │◄──keepalive─►│ │ │
│ └──────────┘ eth3 └──────────┘ │
└─────────────────────────────────────────────┘
| Link |
Interfaces |
Role |
| ISL-1 |
sw1:eth1 ↔ sw2:eth1 |
Inter-Switch Link (LAG) |
| ISL-2 |
sw1:eth2 ↔ sw2:eth2 |
Inter-Switch Link (LAG) |
| Keepalive |
sw1:eth3 ↔ sw2:eth3 |
VSX Keepalive |
Switches are accessible via SSH once in healthy state (~2-3 minutes):
VS Code Containerlab Extension
The Containerlab extension (srl-labs) for VS Code provides a GUI to manage labs directly from the editor:
- Real-time topology visualization
- Deploy / Destroy / Inspect without leaving VS Code
- Direct SSH access via right-click on a node
topology.yml editing with autocompletion
- Compatible with VS Code Remote SSH (access from Mac/Windows to Linux)
Install: Extensions → search Containerlab → publisher srl-labs
Deployed lab - 2 healthy switches with IPs
Direct SSH access from the VS Code plugin
configure terminal
interface lag 1
no shutdown
no routing
vlan trunk allowed all
lacp mode active
interface 1/1/1
no shutdown
lag 1
interface 1/1/2
no shutdown
lag 1
interface 1/1/3
no shutdown
ip address 192.168.255.0/31
vsx
system-mac 02:01:00:00:00:01
inter-switch-link lag 1
role primary
keepalive peer 192.168.255.1 source 192.168.255.0
configure terminal
interface lag 1
no shutdown
no routing
vlan trunk allowed all
lacp mode active
interface 1/1/1
no shutdown
lag 1
interface 1/1/2
no shutdown
lag 1
interface 1/1/3
no shutdown
ip address 192.168.255.1/31
vsx
system-mac 02:01:00:00:00:01
inter-switch-link lag 1
role secondary
keepalive peer 192.168.255.0 source 192.168.255.1
⚠️ Important: The LAG interface must have no routing before being configured as inter-switch-link.
# On both sw1 and sw2
show vsx status
show lacp interfaces
show interface lag 1
Expected output on show vsx status:
ISL channel : In-Sync
ISL mgmt channel : operational
Config Sync Status : In-Sync
NAE : peer_reachable
SW1 - VSX established, primary role
SW2 - VSX established, secondary role
LACP - interfaces 1/1/1 and 1/1/2 in ALFNCD state (Active, Forwarding, Collecting, Distributing)
LAG 1 - Aggregate up, 2000 Mb/s (2x1G LACP)
sudo containerlab destroy -t topology.yml --cleanup
- AOS-CX vrnetlab images take ~2-3 minutes to boot - wait for
healthy state before SSH
- The ISL LAG interface must have
no routing before being configured as inter-switch-link
- Default credentials:
admin/admin
- Tested with Containerlab 0.74.3 and AOS-CX 10.16.1020
Sources
netdevops/containerlab/aoscx-vsx at main · Luconik/netdevops
| GitHub |
remove preview |
|
| netdevops/containerlab/aoscx-vsx at main · Luconik/netdevops |
| NetDevOps lab - HPE Aruba AOS-CX automation with Ansible & Terraform - netdevops/containerlab/aoscx-vsx at main · Luconik/netdevops |
| View this on GitHub > |
|
|
------------------------------
Nicolas Culetto
Channel SE HPE Aruba Networking
France
------------------------------