«

»

Mar 18

Connect GNS3 Network to Real Networks / Other GNS3 Network

This posts details how to connect GNS3 network to real networks. you can use this post for various scenarios, in fact whatever you can think of. So, say for example you have a physical router connected to your home network and you want to configure VPN between your router and  ASA (or any other device) living in the GNS3 network for testing / lab purposes .OR you may also want to setup VPN / Routing between two GNS3 Networks living on two different PCs (these two PC must be attached to each other either directly or via hub / broadband router).

Setup

Here how it will look like for a normal home user as I suppose you will be doing this lab at home. Otherwise, you can use a hub/switch to connect two PCs together. If you are using home network, reserve the IP addresses used in the lab or use spare IP addresses such that you dont have a conflict. Or use an isolated hub/switch to connect devices together.

 

GNS3 Connection

Configuration

Connecting two GNS3 Networks

1. I will be using GNS with ASA running on it for both PCs. You can use a router if you like. Now, you will have to follow this Post below to get ASA running on GNS3 and to connect it to the host PC. You will have to configure PC1 and PC2 the same way. The only difference is of IP addresses that you will be using for PC1 and PC2 loopback address and ASAs interfaces running on these PCs. However, from the steps in post below you can stop at step 13 if you don't want ASDM loaded on the firewall.

PC 1 IP: 192.168.0.2/24

Loopback IP to connect to GNS3 running on PC1: 10.10.10.2/24

ASA1 Management Interface IP: 10.10.10.1/24

 

PC2 IP: 192.168.0.3/24

Loopback IP to connect to GNS3 running on PC2: 11.11.11.2/24

ASA2 Management Interface IP: 11.11.11.1/24

 

http://www.xerunetworks.com/2012/03/asa-84-asdm-on-gns3-step-by-step-guide/

 

3. Follow this post below to configure both of your PCs to work as router. This step is required such that your PC can accept traffic from 192.168.0.0/24 subnet and pass it onto 10.10.10.0/24  or 11.11.11.0/24  subnet which are used to connect host operating system to GNS3.

http://www.xerunetworks.com/2012/03/windows-7-as-router/

 

2. After you have followed the Steps in two  posts above with  configuring ASAs with right IP addresses as detailed in Step 1 and configure PC as routers, you will go to next step by adding default routes to these devices.

On ASA1, you will use following command in global configuration mode

route management 0.0.0.0 0.0.0.0 10.10.10.2

One ASA2, you will use following command in global configuration mode

route management 0.0.0.0 0.0.0.0 11.11.11.2

 

3. On both PC, you will open command prompt as administrator and use following two commands. These will tell the PCs that to reach 10.10.10.0/24 and 11.11.11.0/24 what next hop IP address they should use.

cmd-as-admin

 

PC1: route -p add 11.11.11.0 mask 255.255.255.0 192.168.0.3

PC1-cmd

PC2: route -p add 10.10.10.0 mask 255.255.255.0 192.168.0.2

PC2-cmd

 

4. With this done, you can try pinging 11.11.11.2 & 1 from PC1 and it should succeed. The same way you can try pinging from PC2 to 10.10.10.2 & 1 and it should succeed. Now that’s your two GNS3 network ready for your labs. If you want to play with routing or VPNs between firewalls or something else you can do that. Next step is to configure router attached to the network for the same.

 

Connecting GNS3 Network to Router

5. Continuing from step 4, attach and connect router to the hub / home router and configure its interface with IP address 192.168.0.4/25

int fa0/1

ip address 192.168.0.5 255.255.255.0

no shut

 

6. Add routes for both GSN3 networks

ip route 10.10.10.0 255.255.255.0 192.168.0.2

ip route 11.11.11.0 255.255.255.0 192.168.0.3

 

7. Try pinging from router to both 10.10.10.1 & 11.11.11.1 and it should succeed.

 

That's you done with your full setup working. Its now upto to you to tweak this setup if you want to GNS3 on a PC to connect with a router. OR you don't want a router in the setup but just two GNS3 networks working together. Configurations are endless, its just you have to add routes to devices and it will all work a breeze. Need any help or questions, leave a message on the post.

1 comment

5 pings

  1. Abdennour

    “OR you may also want to setup VPN / Routing between two GNS3 Networks living on two different PCs”…can you explain,can you explain in more details this scenario ?

  1. ASA 8.4 with ASDM on GNS3 – Step by Step Guide « world in your hand

    […] different PCs together or to connect an external device on physcial network to the GNS3 network. http://www.xerunetworks.com/2012/03/connect-gns3-network-to-real-networks-other-gns3-network/ You can use follwoing Lab guide for NAT migration from pre ASA 8.2 to 8.4 […]

  2. CME 7.1 emulation using 7200 Router in GNS3 | Industry & Technology

    […] Setup CME 7.1 in GNS3 and connect it to the real world Setup GNS3 lab according below topology. For adding default Microsoft Loopback Network Interface, refer to GNS3 Tutorial. Here, the most important step is enabling Routing service on your Windows 7 PC to interconnect different subnets reside on your laptop NIC. Below are the summarized steps: (NOTE: Before your change, Fully export all your registery keys to backup is highly recommended in case any wired problem caused by the change) 1-> Open windows 7 register editor by Clicking “Start”, and input “regedit” in the search bar. 2-> Go to “Computer>HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>services>Tcpip>Parameters”, find the registery key called “IPEnable Router”, change its value from 0 to 1. And restart your PC to let your change take effect. More details, please refer to Windows 7 as Router & Connect GNS3 Network to Real Network / Other GNS3 Network. […]

  3. ASA 8.4 with ASDM on GNS3 – Step by Step Guide - My Tech World » My Tech World

    […] different PCs together or to connect an external device on physcial network to the GNS3 network. http://www.xerunetworks.com/2012/03/connect-gns3-network-to-real-networks-other-gns3-network/ You can use follwoing Lab guide for NAT migration from pre ASA 8.2 to 8.4 […]

Leave a Reply

%d bloggers like this: