Using the Digital Sandbox - standalone

In this use case, all configuration is performed using CLI commands in the Digital Sandbox.

When the Digital Sandbox is used standalone, a number of deployment sessions can be created verses only one deployment session if you are using the Digital Sandbox integrated with the Fabric Services System GUI. The total number is variable based on the DhcpRange specified. In addition, no configuration details are passed back to the Fabric Services System GUI.

Using the Digital Sandbox standalone, you must specify the different Network Elements (NEs) within the topology, and the L2 network segments that exist between the NEs. All elements at the border must be fully specified also.

Creating a deployment

To create a deployment (simulation session) for a standalone Digital Sandbox session, the following command is used:

dsctl create deployment -i <name> -f <file> [-t <tar-file>]

Where:

  • <name> is the user-defined name of the deployment.

  • <file> is the file (path+filename) that contains the desired specification. This is a YAML encoded file used to define the deployment configuration.

  • <tar-file> is a .tar file (path+filename) containing the configuration relevant to the NE defined in the 'file'. The .tar files contain a per-node directory that contain the config.json and state.json files of these nodes.

Using the dsctl create deployment command, there are two approaches to creating and updating a Digital Sandbox deployment:

  • The topology is specified by the user.

  • The topology is automatically derived using configuration/state files of networked SR Linux devices.

The sections that follow show an example of each and show how the .yaml file will differ for each method.

Creating a deployment (user specified topology)

This example shows the command and .yaml file content for an user specified topology.

In this example, the user specifies the different Network Elements (NEs) within the topology, and the L2 network segments that exist between those elements. All elements at the border are also fully specified.

Example:

dsctl create deployment -i star -f 7config.yaml -t 7config.tar

where the file 7config.yaml contains the following:

deriveTopology: false
createSimulators: false
nodes:
  as--sim-1:
    deviceType: Simulator
    interfaces: [simitf-0, simitf-1, simitf-2]
    overrides:
      deriveConfig: false
  dut2:
    deviceType: NokSrLinux
    interfaces: [mgmt0, ethernet-1/1, ethernet-1/2, ethernet-1/3, ethernet-1/4, ethernet-1/5]
    mac: "00:01:02:00:00:00"
    uuid: helper
    chassisID: 00:01:02:ff:00:00
  dut3:
    deviceType: NokSrLinux
    interfaces: [ethernet-1/1, ethernet-1/2, ethernet-1/3, ethernet-1/4, mgmt0, ethernet-1/5]
    mac: "00:01:03:00:00:00"
    chassisID: 00:01:03:ff:00:00
  dut4:
    deviceType: NokSrLinux
    interfaces: [ethernet-1/1, ethernet-1/2, ethernet-1/3, ethernet-1/4, mgmt0, ethernet-1/5]
    mac: "00:01:04:00:00:00"
    chassisID: 00:01:04:ff:00:00
  dut5:
    deviceType: NokSrLinux
    interfaces: [ethernet-1/1, ethernet-1/2, ethernet-1/3, ethernet-1/4, mgmt0, ethernet-1/5]
    mac: "00:01:05:00:00:00"
    chassisID: 00:01:05:ff:00:00
  as--sim-2:
    deviceType: ThirdParty
    template: bgp-simulator
    interfaces: [simitf-1, simitf-2]
    overrides:
      deriveConfig: false
  as--sim-3:
    deviceType: Simulator
    interfaces: [simitf-1, simitf-2]
    overrides:
      deriveConfig: false
links:
- link:
  - node: as--sim-1
    itf: simitf-1
  - node: dut2
    itf: mgmt0
  - node: dut3
    itf: mgmt0
  - node: dut4
    itf: mgmt0
  - node: dut5
    itf: mgmt0
  isMgmtSegment: true
- link:
  - node: as--sim-1
    itf: simitf-0
  - node: dut2
    itf: ethernet-1/1
  isP2PSegment: true
- link:
  - node: as--sim-1
    itf: simitf-2
  - node: dut3
    itf: ethernet-1/1
- link:
  - node: dut2
    itf: ethernet-1/2
  - node: dut3
    itf: ethernet-1/2
  isP2PSegment: true
- link:
  - node: dut2
    itf: ethernet-1/3
  - node: dut4
    itf: ethernet-1/1
- link:
  - node: dut2
    itf: ethernet-1/4
  - node: dut5
    itf: ethernet-1/1
- link:
  - node: dut3
    itf: ethernet-1/3
  - node: dut4
    itf: ethernet-1/2
- link:
  - node: dut3
    itf: ethernet-1/4
  - node: dut5
    itf: ethernet-1/2
- link:
  - node: dut4
    itf: ethernet-1/3
  - node: dut5
    itf: ethernet-1/3
- link:
  - node: dut4
    itf: ethernet-1/4
  - node: as--sim-2
    itf: simitf-1
- link:
  - node: dut4
    itf: ethernet-1/5
  - node: as--sim-3
    itf: simitf-1
- link:
  - node: dut5
    itf: ethernet-1/4
  - node: as--sim-2
    itf: simitf-2
- link:
  - node: dut5
    itf: ethernet-1/5
  - node: as--sim-3
    itf: simitf-2

Creating a deployment (auto-derived topology)

This example shows the command and .yaml file content for an auto-derived topology.

When the .yaml file below is given as input, the Digital Sandbox assumes four SR Linux devices are running on node 10.0.0.1 as docker containers. They make up the network that the user wants to replicate. If no .tar file is provided, the Digital Sandbox will login to the nodes, collect config and state files for the nodes, and auto-derive the topology and generate simulators at the edges of the network.

Example:

dsctl create deployment -i star -f 7live.yaml -t 7live.tar

where the file 7live.yaml contains the following:

deriveTopology: true
createSimulators: true
nodes:
  srlinux_home_jvandena_ws_srlinux4_dut2:
    deviceType: NokSrLinux
    remoteConnect:
      ip: 10.0.0.1
      login: mainuser
      password: pwd01
      connectType: docker
      connectNames: [srlinux_home_jvandena_ws_srlinux4_dut2]
  srlinux_home_jvandena_ws_srlinux4_dut3:
    deviceType: NokSrLinux
    remoteConnect:
      ip: 10.0.0.1
      login: mainuser
      password: pwd01
      connectType: docker
      connectNames: [srlinux_home_jvandena_ws_srlinux4_dut3]
  srlinux_home_jvandena_ws_srlinux4_dut4:
    deviceType: NokSrLinux
    remoteConnect:
      ip: 10.0.0.1
      login: mainuser
      password: pwd01
      connectType: docker
      connectNames: [srlinux_home_jvandena_ws_srlinux4_dut4]
  srlinux_home_jvandena_ws_srlinux4_dut5:
    deviceType: NokSrLinux
    remoteConnect:
      ip: 10.0.0.1
      login: mainuser
      password: pwd01
      connectType: docker
      connectNames: [srlinux_home_jvandena_ws_srlinux4_dut5]

Updating a deployment

When updating a deployment, the following command is used:

dsctl update deployment -i <name> -f <file> [-t <tar-file>]

Example:

dsctl update deployment -i star -f 7live.yaml -t 7live.tar

Assuming the 7live.yaml file content is different from what is currently configured, the Digital Sandbox would automatically determine which nodes are new, updated, or removed, and update the deployment as specified.