AOS-CX Switch Simulator

 View Only
last person joined: yesterday 

AOS-CX with Infra as a Code tools

This thread has been viewed 25 times
  • 1.  AOS-CX with Infra as a Code tools

    Posted Aug 29, 2023 04:45 AM

    We all know AOS-CX can successfully be used with GNS3, EVE-NG, or directly on top of VMWare ESXi or KVM.

    But, if you want to run it in a "Infrastructure-as-a-Code" fashion, now it is officially supported on Containerlab (, from release 0.44 (!.

    You just need to create your AOS-CX container with vrnetlab (, and then you can create complex networking topologies simply writing a yaml file.

    Have a look at this example:

    name: mclag




          kind: vr-aoscx

          image: vrnetlab/vr-aoscx:20230531220439

          startup-config: coresw1.cfg


          kind: vr-aoscx

          image: vrnetlab/vr-aoscx:20230531220439

          startup-config: coresw2.cfg


          kind: vr-aoscx

          image: vrnetlab/vr-aoscx:20230531220439

          startup-config: access1.cfg


          kind: vr-aoscx

          image: vrnetlab/vr-aoscx:20230531220439

          startup-config: access2.cfg


          kind: linux

          image: alpine:latest


          kind: linux

          image: alpine:latest


    # ISL on port 9

      - endpoints: ["coresw1:eth9", "coresw2:eth9"]

    # MCLAG between access1 and coresw{1,2}

      - endpoints: ["access1:eth1", "coresw1:eth1"]

      - endpoints: ["access1:eth2", "coresw2:eth1"]

    # MCLAG between access2 and coresw{1,2}

      - endpoints: ["access2:eth1", "coresw1:eth2"]

      - endpoints: ["access2:eth2", "coresw2:eth2"]

    # Link access1 (port 5) - host1

      - endpoints: ["access1:eth5", "host1:eth1"]

    # Link access2 (port 5) - host2

      - endpoints: ["access2:eth5", "host2:eth1"]

    Nice, isn't it? 😉

    Do you want more? Are you tired of manually configuring point-to-point interfaces and addressing, and creating OSPF or BGP configuration from scratch every time you run a lab?

    AOS-CX is officially supported also by netlab (, "the swiss knife for network simulations".

    Netlab will help you be more proficient once you decide to drop GUI-based virtual networking labs and build your labs using CLI and infrastructure-as-code principles; it is a "wrapper on steroids" for containerlab (or vagrant/libvirt), which "under the hood" creates a clab (or vagrant) config file, start the lab, and configure your nodes using Ansible.

    As an example, if you have the following netlab topology file:

    module: [ bgp ]



        device: arubacx 65001


        device: arubacx 65002


        device: arubacx 65003


        device: linux

        module: []

    links: [ a-b, b-y, y-linux ]

    and you start netlab, after some minutes you will have an infrastructure running 3 AOS-CX nodes, with P-t-P connectivity, and BGP peering configured.


    And of course you can extend netlab to load your additional ansible/jinja configuration templates, or take this as a starting point to apply your preferred configuration.

    I hope all this can be useful for you how much it was for me 😉