Tutorial: Switch only operation with Dell Enterprise SONiC in GNS3

This tutorial will walk you through the steps needed to build up a topology in GNS3 and use MetalSoft to control the fabric.

Prerequisites

For this tutorial you will need a working CLI setup.

The tutorial doesn’t use ZTP due to complications with L2 setups on laptops thus the switch needs to be already configured with:

  1. Management interface

In addition, if EVPN is used the following must be configured:

  1. A VTEP interface

  2. A ASN

  3. A Loopback interface

And provided below to the switch as configuration.

Download and install the agent OVA

agent: 1CPU 4GB RAM

  1. click import in VMWare fusion

  2. Click Finish

Wait until the VM booted up and login to the VM

  • Username: root

  • Password: MetalsoftR0cks@$@$

DHCP is enabled by default. If necessary edit the netplan /etc/netplan/00-installer-config.yaml file (OS is Ubuntu) to suit your needs.

Configure the agent

  1. create a file such as local-dc.yaml. Most of the settings can be left as they are. Modify just the BSIMachinesSubnetIPv4CIDR, BSIVRRPListenIPv4 and BSIMachineListenIPv4List to match your agent’s IP.

    BSIMachinesSubnetIPv4CIDR: 192.168.1.11/24
    BSIVRRPListenIPv4: 192.168.1.11
    BSIMachineListenIPv4List:
        - 192.168.1.11
    BSIExternallyVisibleIPv4: 209.43.59.203
    repoURLRoot: http://<repo>
    repoURLRootQuarantineNetwork: http://<repo>
    SANRoutedSubnet: 100.96.0.0/16
    NTPServers:
        - 45.55.58.103
    DNSServers:
        - 1.1.1.1
        - 8.8.8.8
    KMS: 84.40.58.70:1688
    TFTPServerWANVRRPListenIPv4: 10.73.252.10
    dataLakeEnabled: false
    latitude: 41.8426112
    longitude: 87.6695329
    serverRegisterUsingGeneratedIPMICredentialsEnabled: false
    serverRegisterUsingProvidedIPMICredentialsEnabled: true
    switchProvisioner:
        LAGRanges:
            - 5-25
        LANVLANRange: 400-450
        MLAGRanges:
            - 26-27
        SANVLANRange: 300-399
        WANVLANRange: 100-199
        allocateDefaultLANVLAN: true
        allocateDefaultSANVLAN: false
        allocateDefaultWANVLAN: true
        leafSwitchesHaveMLAGPairs: false
        preventCleanupForVLANs:
            - 301
            - 1602
        preventCleanupForVLANsFromExternalConnectionUplinks:
            - 301
            - 1602
        preventUsageOfVLANs:
            - 301
            - 1602
        quarantineVLANID: 5
        storageHasSeparateFabric: false
        type: EVPNVXLANL2Provisioner
        zeroTouchRegistrationEnabled: true
    enableTenantAccessToIPMI: false
    allowVLANOverrides: true
    allowNetworkProfiles: true
    enableServerRegistrationStartedByInBandDHCP: false
    extraInternalIPsPerSubnet: 0
    extraInternalIPsPerSANSubnet: 0
    serverRAIDConfigurationEnabled: true
    webProxy:
        ip: 10.73.252.10
        port: 3128
    isKubernetesDeployment: false
    allowInstanceArrayFirmwarePolicies: false
    provisionUsingTheQuarantineNetwork: true
    enableDHCPRelaySecurityForQuarantineNetwork: false
    enableDHCPRelaySecurityForClientNetworks: false
    enableDHCPBMCMACAddressWhitelist: true
    dhcpBMCMACAddressWhitelist:
        - 6C:2B:59:7C:0F:D3
        - CC:48:3A:09:EB:97
    defaultServerCleanupPolicyID: 0
    defaultDeploymentMechanism: virtual_media
    defaultCleanupAndRegistrationMechanism: bmc
    NFSServer: 172.18.38.38
    Option82ToIPMapping: {}
    flags: "" 
    
  2. Run datacenter create:

    % metalcloud-cli datacenter create --config local-dc.yaml --format yaml --id local-dc-1 --title "Local DC 1"
    
  3. Get the datacenter auth URL

    metalcloud-cli datacenter get --id local-dc-1 --return-config-url
    https://us05.metalsoft.io/api/url?rqi=br._mJHHCUMW7I1kwwNjYNh3HWcpwwvfwVo7RKlQVLGn9PbElV_hxvDq4CE79bFrw70MYmANJmtorHvwupXZG2OWTNm5Eszg84QVq5z8Cm19qU&v=YojW5IXpEARy6VA4_EUHNw&filename=datacenter.json&datacenter_name=local-dc-1
    
  4. SSH into the agent using the following username and pass:

    • Username: metalsoft

    • Password: MetalsoftR0cks@$@$

    TODO: add command
    
  5. Check if the agents are now connected

    TODO: Show how to create an “unmanaged server type”

Import metalsoft VM into GNS3

This example uses GNS3 version 2.2.33.1 but should apply to all GNS3 versions

  1. Create a GNS3 project

  2. Import agent appliance by:

    1. Go to on File > New Template > Manually create a new template

    2. VMWare Fusion > New Select the agent VM from the list:

    3. Click finish

Build the topology in GNS3

  1. Add the agent vm a switch and two hosts.

Note that connecting the agent to the “Cloud” is not strictly required if the virtual machine is connected to the host’s NAT the effect would be the same. However zero touch provisioning might not work.

Register the switch in MetalSoft using the CLI

  1. Create a file called sw.yaml. Most of the settings can be left to the defaults, you can alter just the managementAddress field and the managementPassword field. Note also the VTEP, ASN and Loopback fields that need to be set if EVPN is used.

    identifierString: sonic01
    datacenterName: local-dc-1
    provisionerType: evpnvxlanl2
    provisionerPosition: leaf
    driver: sonic_enterprise
    managementUsername: admin
    managementPassword: YourPaSsWoRd
    managementAddress: 192.168.1.25
    managementAddressMask: 255.255.255.248
    managementAddressGateway: 192.168.255.1
    managementMACAddress: 8c:04:ba:ea:60:c0
    primaryWANIPv4SubnetPool: 10.0.0.1
    primaryWANIPv4SubnetPrefixSize: 24
    primarySANSubnetPrefixSize: 24
    quarantineSubnetStart: 192.168.67.1
    quarantineSubnetEnd: 192.168.67.254
    quarantineSubnetPrefixSize: 24
    quarantineSubnetGateway: 192.168.67.1
    tags:
    - tag
    requiresOSInstall: false
    isBorderDevice: false
    isStorageSwitch: false
    networkTypesAllowed:
    - wan
    - san
    - lan
    - quarantine
    LoopbackAddress: 10.0.90.3
    VTEPAddress: 10.0.91.2
    ASN: 65102
    
  2. Run switch create

./metalcloud-cli switch create --raw-config sw.yaml --format yaml

This command might take up to 30 seconds.

The switch should now be in active state:

Create a network profile

This is not strictly required but if you decided not to use EVPN this is how you would disable it:

  1. If you are reusing an existing datacenter rather than create a new one using the configuration above, make sure to enable network profiles and automatic VLAN allocation by navigating to the Datacenters >