Wednesday, January 20, 2021

Huawei NE40 & CE12800 on EVE-NG

If  you ever wanted to simulate a Huawei NE40 router or Huawei 12800 series switches, you might heard of eNSP (enterprise Network Simulator).  Unfortunately Huawei stopped developing eNSP and is not sharing the program anymore. You might still found it on the internet of course but it makes your job harder if you ever wanted to simulate a multi-vendor environment with Huawei software.

On Eve-NG website, Huawei NE40 and Huawei 12800 is not listed under how-to's part. But if you dig in Huawei forums, you could find that it is possible.  

Huawei CE12800

On this forum page you could find each and every detail to make Huawei CE12800  image work on EVE-NG: 

https://forum.huawei.com/enterprise/en/run-ce12800-ne40e-in-eve-ng/thread/653457-861?page=4 

You need to register to find to see the links. 

I'm just sharing again the info on the forum page. I tested it and yes it works: 

  • Download the CE12800 images and configuration file, also the CE12800 icon. And extract the download image.
  • Upload the configuration(huaweice12800.yml) into the EVE-NG path: /opt/unetlab/html/templates/intel/ If you are using the AMD CPU, the accordingly path is /opt/unetlab/html/templates/amd/ 

  • Upload the ce icon file(ce.png) into the EVE-NG path: /opt/unetlab/html/images/icons/
  • Upload the CE12800 image into the EVE-NG path: /opt/unetlab/addons/qemu/ 

When adding new images to eve-ng, the trick is that the naming convention of the .yml file need to match with the folder name. Folder name might have version but after the right name.

  • Fix the permission using command: /opt/unetlab/wrappers/unl_wrapper -a fixpermissions

Huawei NE40

NE40 img is shared also on the forum page: https://forum.huawei.com/enterprise/en/run-ne40-ce12800-in-eve-ng/thread/672651-865 .Unfortunately these images are most probabily converted from eNSP images, so there is no newer version. VRP8R11 is the latest version. If you can manage to convert an standart image (.img to qcow2 in the right  way ?!) newer versions might work also. 

Here are the files (link is shared on Huawei forum page): https://mega.nz/file/sQEyTRbB#PnT37xH0tHXjeJWTd8xu9L1jdeiHkBnsGCzju3z3DmY

The instructions are same with Huawei12800, just be careful with naming the .yml file and img folder to be consistent with each other.



MISSING FEATURES 

I realized that there are some limitations with eNSP images, here are the ones i found: 
  • Subinterface only works if you configure static arp entries. 
  • Gig 0/0/0 always use same mac address. So if you use more than one router to a mngt network etc, use Ethernet instead of gig0/0/0 cause you cant  assign static mac to Gig0/0/0










Sunday, January 17, 2021

Microsoft Sonic Virtual Switch on Eve-NG

Microsoft, SONiC is probabily the most popular open-source network operating system which is  currently being developed by a community of network market leaders: Broadcom, Marvell, Dell, Mellanox/NVIDIA, Intel, Microsoft and others. IT supports 101 whitebox platforms (by January 2021)  which you could find the latest list in https://github.com/Azure/SONiC/wiki/Supported-Devices-and-Platforms. 

To test and see how Sonic works it’s better to create a virtual topology (e.g. a data center Clos topology.) with a network emulation tool like GNS3, Eve-NG etc. On Sonic Github page there is a script to make Sonic-Virtual-Switch image with GNS3 but not for EVE-NG. I make Sonic work on Eve-NG. Here are the instructions: 

EVE-NG Sonic Configuration

I assume that you already installed Eve-NG and started using it. 

  • Copy the mssonic.yml file into “/opt/unetlab/html/templates/intel” or “/opt/unetlab/html/templates/amd” based on your cpu. 
  • Create a folder under “opt/unetlab/addons/qemu/” with name “mssonic-version/” . Folder name is really important since eve-ng understands that it is a a sonic image folder with naming convention. The first part of the folder name  must be "mssonic" if you are using my yml file and later you could add version to the folder name, e.g: "mssonic-202012"

        # mkdir pt/unetlab/addons/qemu/mssonic-202012
Copy sonic-vs.img.gz file (instructions are below) and move it to this folder.
  • Extract sonic-vs.img.gz 
  • Rename sonic-vs.img to virtioa.qcow2 (just rename,  no convert) 
        root@EVENG-SRLAB:/opt/unetlab/addons/qemu/mssonic-202012# mv sonic-vs.img virtioa.qcow2
As a last step you need to execute the command below, which should be done for any new image 
        /opt/unetlab/wrappers/unl_wrapper -a fixpermissions

Downloading Sonic-VS

Go to https://github.com/Azure/sonic-buildimage  and scroll down the page, click the build you would like to download (For EVE-NG it is VS) and go for the last stable build and download sonic-vs.img.gz. 




Management Ethernet

On Sonic, eth0 is the management interface and on Eve-NG i named management ethernet for sonic as "eth0_Management". If you would like to connect management ethernet of Sonic-VS to a cloud, switch etc., you could do it like in below picture. 

Keep in mind that Sonic 202012 does not support in-band management vrf, support will come with version 202106. 

Data Plane Ethernets

  • EVE-NG ethernet 0 == Sonic Ethernet0 
  • EVE-NG ethernet 1 == Sonic Ethernet4 (40G interfaces uses 4 lanes,) 

Chassis Mac Address 

Sonic-VS default configuration contains same router MAC address so you need to change it manually in config_db.json under DEVICE_METADATA section to make the MAC address unique for each switch. 

    "DEVICE_METADATA": {
        "localhost": {
            "bgp_asn": "65100",
            "buffer_model": "traditional",
            "default_bgp_status": "up",
            "default_pfcwd_status": "disable",
            "hostname": "sonic",
            "hwsku": "Force10-S6000",
            "mac": "52:54:00:12:34:56",
            "platform": "x86_64-kvm_x86_64-r0",
            "type": "LeafRouter"
        }
    },

Other Static Configs

Unfortunately Sonic-VS is pre-configured for a specific test environment all VS images will have the same ethernet, loopback ip address and bgp configurations, you need to manually erase them or import a base "config_db.json" file and execute ."config reload -y" 

What's Not Working on Sonic-VS 

Since there is no underlying chip, some features are not working or not implemented on Sonic-VS. Here are the ones i know of: 

  • Static-VXLAN is not working, only dynamic ones are working. 
  • Interface counters are not working these since there is no underlying chip / chip simulator. You have to rely on ‘ifconfig’ to track stats. 
  • Static-routes are not saved upon reboot. It is integrated on 2020-12 master branch but you need to:
    • Refer to PR https://github.com/Azure/SONiC/pull/585 for configuring the STATIC_ROUTE in config-DB and make sure to set “frr_mgmt_framework_config” to “true” in DEVICE_METADATA table.
    • Templates: https://github.com/Azure/sonic-buildimage/tree/202012/src/sonic-frr-mgmt-framework/templates/staticd 


 

Internetworking Hints Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger