Network foundations A06

View on GitHub

Merging Two Emulations

Overview

This example independently builds two emulation scenarios and then uses merge with the default mergers to combine their compatible network and service layers into a unified emulation environment. The merged scenario connects two autonomous systems through a shared Internet exchange, allowing you to verify communication between nodes originally defined in separate scenarios. This approach is useful for combining networks maintained by different people or modules. It can also be extended to combine teaching scenarios, organize experiments involving services across networks, or compare connectivity and service behavior before and after merging.

Merging Two Emulations

This example demonstrates how we can merge two emulations. These two emulations can come from pre-built emulations. In this example, we first build the emulations A and B separately, and then we merge them.

emu_merged = emuA.merge(emuB, DEFAULT_MERGERS)

Standard Arguments

python examples/basic/A06_merge_emulation/merge_emulation.py amd
python examples/basic/A06_merge_emulation/merge_emulation.py --platform amd --output examples/basic/A06_merge_emulation/output
python examples/basic/A06_merge_emulation/merge_emulation.py --dumpfile examples/basic/A06_merge_emulation/merge_emulation.bin

Supported arguments:

  • amd|arm: optional legacy platform argument.
  • --platform amd|arm: named platform argument.
  • --output PATH: output folder for Docker compiler results.
  • --dumpfile PATH: save a serialized emulator instead of compiling Docker output.
  • --override / --no-override: control whether existing output is replaced.
  • --skip-render: compile without calling emu.render() first.

TestRunner Lifecycle

python seedemu/testing/cli.py all examples/basic/A06_merge_emulation/example.yaml --artifact-dir ci-artifacts/a06

The runtime test verifies that the merged AS150 and AS151 nodes are generated and can reach each other through the merged IX100 topology.

Source: SEED Emulator · A06 README

Explore more network foundations examples