Table of Contents
Benefits of Docker Containers
GNS3 also supports Docker containers, which allow you to run hosts on your GNS3 project with low CPU and memory resource consumption. You can use VPCS as a host, but VPCS has some functional limitations.
This page explains how to add a Linux (Alpine Linux) host for a Docker container. It will be easier to do various verifications using a lightweight Linux host.
Refer to the official website of GNS3. Docker support in GNS3
Alpine Linux Web Site
Steps to add Docker containers
The steps to add a Docker container Linux host are as follows
- Creating a container template(Alpine Linux)
- Add a Docker container host to the project
- Host network configuration
Please note that this page is based on the following environment.
|GNS3 VM version
|VMware Workstation 16.6.2
Creating a container template(Alpine Linux)
First, create a Docker container template for Alpine Linux. On GNS3, go to [Edit] > [Preferences] > [Docker Containers] and click [New].
Select [Run this Docker container on the GNS3 VM] and click [Next].
Select [New Image], enter “alpine:latest” in Image name, and click [Next].
Then, enter a display name for the container and click [Next].
Then, decide the number of network interfaces (Adapters) for the host, and click [Next].
Enter the command to be executed at startup. Enter “sh” to start a shell.
Specify the console type. For normal CLI, you can leave the default “telnet”.
You can specify environment variables if necessary. Click [Finish] to finish creating the template.
Add a Docker container host to the project
Once you have created a template of the Docker container for Alpine Linux, it will appear in the [End Device] toolbar.
Drag and drop the Alpine Linux template onto your workspace. The docker pull command will automatically download the container image of the template from Docker Hub to the GNS3 VM. The container image will be downloaded only for the first time, and the log of executing docker pull command will be displayed on the console of GNS3.
After that, you just need to set up a link between your router or other devices and the Linux host of the Docker container.
You can then launch the container and double-click the icon to access the CLI.
Host network configuration
To configure the network configuration, edit the file “/etc/network/interfaces”. You can edit it from the CLI of Alpine Linux, but you can also edit it on GNS3 by right-clicking on the icon placed in the workspace and clicking [Edit Config].
The following web site is very helpful for understanding the network configuration of Alpine Linux.
- Installation of GNS3 (Windows10)
- How to Upgrade GNS3 version
- How to download IOS of the real router to PC
- Creating IOS Router Template
- Setting up the GNS3 VM server
- What to do when GNS3 VM does not turn green in Servers Summary?
- Creating an IOS router template (VM server)
- How to Use IOU(IOS on Unix) on GNS3
- How to Use CSR1000v on GNS3
- Creating GNS3 project
- Link to Host OS
- Example of linking to the host OS
- How to add a VMware virtual machine to a GNS3 topology
- VPCS Configuration and Operation
- How to Add Docker Container Linux Hosts
- How to use FRR (Free Range Routing) container on GNS3
- How to Use GNS3 Appliances
- Managing Snapshots
- Export/Import configuration
- Packet Capture
- Edit startup-config directly
- How to change the Solar-PuTTY font and background color