70 Connecting two GNS3 Environments Together (Windows)

Mathew J. Heath Van Horn, PhD

In order for learners to gain more experience in cyber security, they must learn to adjust to changing situations.  In order to accomplish this, they must face a human opponent. In this lab, we are using two physical machines running Windows 11, each running its own instance of GNS3, to practice being an attacker and defender in a safe GNS3 environment. We are trying to connect two physical PC’s, each running its own instance of GNS3 to talk to each other.

LEARNING OBJECTIVES

  • Connect two GNS3 environments together to form one complete network environment.

PREREQUISITES

DELIVERABLES

  • None – this is a preparatory lab that supports other labs in this book

RESOURCES

Contributers and Testers

  • Jake Christensen

phase I – Physical Setup

These instructions are for PCs running Windows 11. This phase involves setting up the physical machines for the connection process.

The two physical PCs will be reference as BLUE and RED for the rest of this chapter.

  1. Set up the Wifi router for DHCP

    In this example, the routers’s IP is “10.0.0.10/24” broadcasting the SID “Purple_2026_2.4G” offering the address range “10.0.0.11-10.0.0.250“.

  2. Join your PC to the WiFi network
    Desktop Purple - Figure 1 - connect physical machine wireless
    Figure 1 – Connect the physical machine wireless

    NOTE: Don’t worry if it says “no internet”; we aren’t trying to perform any Internet-related functions.

  3. Verify that BLUE has Network Discovery enabled
    1. Open Settings from the Start Menu
      Desktop Purple - Figure 2 - windows settings
      Figure 2 – windows settings
    2. Select Network & internet
      Desktop Purple - Figure 3 - network and internet
      Figure 3 – network and internet
    3. Select Advanced network settings
      Desktop Purple - Figure 4 - advanced network settings
      Figure 4 – advanced network settings
    4. Select Advanced sharing settings
      Desktop Purple - Figure 5 - advanced sharing settings
      Figure 5 – advanced sharing settings
    5. Ensure to have Network discovery enabled under Private networks
      Desktop Purple - Figure 6- sharing is turned on for all
      Figure 6- sharing is turned on
  4. Check to see if an IP address was assigned over the wireless connection

    ipconfig

    Desktop Purple - Figure 7- wireless address assigned
    Figure 7- wireless address assigned
  5. Record your wireless IP address. You will need it later

    In this example, BLUE is assigned “10.0.0.13“.

  6.  Repeat these steps for RED

Phase II – PC BLUE (DEFENDER)

Configure GNS3 on the physical computer BLUE to connect to a remote GNS3 environment.
  1. Start GNS3 and start a new project or use an existing one
  2. Select All Devices on the left, then drag a Cloud into the environment

    When asked to run the cloud on the physical host or the GNS3 VM, choose the physical host. If the wireless adapter is not detected, try restarting GNS3.

    1. We changed the cloud symbol to a wireless dongle to enhance understanding between the physical and virtual worlds
      1. The dotted lines indicate real-world connections
      2. The solid lines indicate virtual GNS3 connections
    2. We included the Physical PC1 (RED) in our diagram so we can see how the two GNS3 environments are connected via the physical world
    3. We threw a couple of VPCs and an unmanaged switch to serve as a basic network
      Desktop Purple - Figure 8- physical PC 2 (BLUE) setup so far
      Figure 8- physical PC 2 (BLUE) setup so far
  3. Right-Click on the cloud (WiFi Dongle) and click Configure
    Desktop Purple - Figure 9- configure the cloud (wifi dongle)
    Figure 9- configure the cloud (wifi dongle)
  4. Open the UDP Tunnels tab and make the following settings
    1. Name: To RED Network
    2. Local Port: 30000 (other PC will be 20000)
    3. Remote Host: <the physical wireless IP of the OTHER PC) 10.0.0.12
    4. Remote Port: 20000 (other PC will be 30000)
    5. Click Add to create the UDP tunnel
    6. Click on Apply, then OK
      Desktop Purple - Figure 10- create a new UDP Tunnel
      Figure 10- create a new UDP Tunnel
  5. Connect the switch to the Cloud (UDPconnection) and select the port “To RED Network” that we created earlier. This is what connects GNS3 to the physical world
    Desktop Purple - Figure 11- connect the GNS3 environment to the physical world
    Figure 11- connect the GNS3 environment to the physical world

PHASE III – PC RED (ATTACKER)

Configure GNS3 on the physical PC identified as PC RED to connect to another GNS3 environment. Repeat the process we performed for the BLUE PC, but MIRROR the settings

  1. Name: To RED Network
  2. Local Port: 20000 (other PC is already 30000)
  3. Remote Host: <the physical wireless IP of the OTHER PC) 10.0.0.13
  4. Remote Port: 30000 (other PC is already 20000)
  5. Click Add to create the UDP tunnel
  6. Click on Apply, then OK
    Desktop Purple - Figure 12- complete the configuration on the PC1
    Figure 12- complete the configuration on PC1
    1. On the BLUE physical PC, navigate to GNS3, start a VPCS, and set its IP address to 192.168.1.1/24

      ip 192.168.1.1/24

    2. On the RED  physical PC, navigate to GNS3, start a VPCS, and set its IP address to 192.168.1.2/24

      ip 192.168.1.2/24

  7. Try to ping each other and verify they can communicate over the UDP tunnel
    Desktop Purple - Figure 13- the two virtual PCs running on different GNS3 environments can communicate
    Figure 13- the two virtual PCs running on different GNS3 environments can communicate

phase iv – offer DHCP service to both environments

You can now offer DHCP service to both GNS3 environments to further show the interactivity between Physical PC’s

  1. We added a DHCP server and MikroTik router relay to our GNS3 environment running on our physical BLUE PC. The DHCP offers DORA responses depending on where the responses come from
    1. 150.30.30.5/24 is the DHCP server IP address
    2. 150.30.30.0/24 network is the backbone server network running on the physical BLUE PC
    3. 200.20.20.0/24 is the GNS3 Blue network running on the physical BLUE PC
    4. 100.10.10.0/24 is the GNS3 Red network running on the physical RED PC
      Desktop Purple - Figure 14 - DHCP setup on physical BLUE PC inside the GNS3 environment
      Figure 14 – DHCP setup on physical BLUE PC inside the GNS3 environment
    5. We can see that our GNS3 environment on the physical RED PC is receiving DHCP DORA messages from the DHCP server in the BLUE’s GNS3 network
      Desktop Purple - Figure 15 - the GNS3 environment on physical RED PC is recieving DHCP DORA from the GNS3 environment running on the physical BLUE PC
      Figure 15 – the GNS3 environment on the physical RED PC is receiving DHCP DORA from the GNS3 environment running on the physical BLUE PC

      End of Lab

      Feedback email
      Figure 00 – Contact us via prmaster@erau.edu

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Mastering Enterprise Networks (3rd Ed) Copyright © 2026 by Mathew J. Heath Van Horn is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.