Ce lab démontre comment utiliser Containerlab pour simuler une paire de switches HPE Aruba AOS-CX en configuration VSX (Virtual Switching Extension) - la technologie d'agrégation multi-châssis d'Aruba. L'objectif est de fournir un environnement reproductible pour découvrir Containerlab avec des équipements Aruba, sans matériel physique.
- Linux (testé sur Fedora 43 et Ubuntu 24.04)
- Containerlab ≥ 0.74
- Docker
- Image vrnetlab AOS-CX :
vrnetlab/vr-aoscx:10.16.1020
- (Optionnel) Extension VS Code Containerlab by srl-labs
L'image AOS-CX Simulator est disponible gratuitement sur le portail HPE Networking (compte requis).
Une fois connecté sur networking.hpe.com :
- Software → AOS-CX Switch Simulator
- Télécharger
AOS-CX_10_16_1020.ova
- Extraire le
.vmdk depuis l'OVA : tar xf AOS-CX_10_16_1020.ova
- Builder l'image Docker via vrnetlab :
┌─────────────────────────────────────────────┐
│ aoscx-vsx │
│ │
│ ┌──────────┐ eth1/eth2 ┌──────────┐ │
│ │ sw1 │◄────ISL─────►│ sw2 │ │
│ │ primary │ (LAG LACP) │secondary │ │
│ │ │◄──keepalive─►│ │ │
│ └──────────┘ eth3 └──────────┘ │
└─────────────────────────────────────────────┘
Les switches sont accessibles en SSH une fois en état healthy (~2-3 minutes) :
Plugin VS Code Containerlab
L'extension Containerlab (srl-labs) pour VS Code offre une interface graphique pour gérer les labs directement depuis l'éditeur :
- Visualisation de la topologie en temps réel
- Deploy / Destroy / Inspect sans quitter VS Code
- Accès SSH direct par clic droit sur un node
- Édition du
topology.yml avec autocomplétion
- Compatible avec VS Code Remote SSH (accès depuis Mac/Windows vers Linux)
Installation : Extensions → rechercher Containerlab → publisher srl-labs
Lab déployé - 2 switches healthy avec leurs IPs
Accès SSH direct depuis le plugin VS Code
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 : L'interface LAG doit avoir no routing avant d'être configurée comme inter-switch-link.
# Sur sw1 et sw2
show vsx status
show lacp interfaces
show interface lag 1
Résultat attendu sur show vsx status :
ISL channel : In-Sync
ISL mgmt channel : operational
Config Sync Status : In-Sync
NAE : peer_reachable
SW1 - VSX established, rôle primary
SW2 - VSX established, rôle secondary
LACP - interfaces 1/1/1 et 1/1/2 en état ALFNCD (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
Source
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
------------------------------