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
- The material in Mastering Enterprise Networks
- Two WiFi-capable PCs
- One wireless router
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.
- 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“.
- Join your PC to the WiFi network

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.
- Verify that BLUE has Network Discovery enabled
- Open Settings from the Start Menu

Figure 2 – windows settings - Select Network & internet

Figure 3 – network and internet - Select Advanced network settings

Figure 4 – advanced network settings - Select Advanced sharing settings

Figure 5 – advanced sharing settings - Ensure to have Network discovery enabled under Private networks

Figure 6- sharing is turned on
- Open Settings from the Start Menu
- Check to see if an IP address was assigned over the wireless connection
ipconfig

Figure 7- wireless address assigned - Record your wireless IP address. You will need it later
In this example, BLUE is assigned “10.0.0.13“.
- Repeat these steps for RED
Phase II – PC BLUE (DEFENDER)
- Start GNS3 and start a new project or use an existing one
- 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.
- We changed the cloud symbol to a wireless dongle to enhance understanding between the physical and virtual worlds
- The dotted lines indicate real-world connections
- The solid lines indicate virtual GNS3 connections
- We included the Physical PC1 (RED) in our diagram so we can see how the two GNS3 environments are connected via the physical world
- We threw a couple of VPCs and an unmanaged switch to serve as a basic network

Figure 8- physical PC 2 (BLUE) setup so far
- We changed the cloud symbol to a wireless dongle to enhance understanding between the physical and virtual worlds
- Right-Click on the cloud (WiFi Dongle) and click Configure

Figure 9- configure the cloud (wifi dongle) - Open the UDP Tunnels tab and make the following settings
- Name: To RED Network
- Local Port: 30000 (other PC will be 20000)
- Remote Host: <the physical wireless IP of the OTHER PC) 10.0.0.12
- Remote Port: 20000 (other PC will be 30000)
- Click Add to create the UDP tunnel
- Click on Apply, then OK

Figure 10- create a new UDP Tunnel
- 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

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
- Name: To RED Network
- Local Port: 20000 (other PC is already 30000)
- Remote Host: <the physical wireless IP of the OTHER PC) 10.0.0.13
- Remote Port: 30000 (other PC is already 20000)
- Click Add to create the UDP tunnel
- Click on Apply, then OK

Figure 12- complete the configuration on PC1 - 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
- 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
- On the BLUE physical PC, navigate to GNS3, start a VPCS, and set its IP address to 192.168.1.1/24
- Try to ping each other and verify they can communicate over the UDP tunnel

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
- 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
- 150.30.30.5/24 is the DHCP server IP address
- 150.30.30.0/24 network is the backbone server network running on the physical BLUE PC
- 200.20.20.0/24 is the GNS3 Blue network running on the physical BLUE PC
- 100.10.10.0/24 is the GNS3 Red network running on the physical RED PC

Figure 14 – DHCP setup on physical BLUE PC inside the GNS3 environment - 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

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

Figure 00 – Contact us via prmaster@erau.edu