Žilinská univerzita > Fakulta riadenia a informatiky > Katedra informačných sietí

Connect GNS3 to a real network via host WiFi adapter sharing on windows 10

Here i will describe how to interconnect a GNS3 running router with a real network throught a MS loopback adapter and a wireless adapter sharing under windows 10. I will use a connection sharing option, i.e. the connection will be NATed through windows wifi adapter. The solution is tested under Win 10 Enterprise and the gns3 version 1.3.13. I'm using an instance of Cisco 2961 router.

 

As the prerequisities we have to have:

So we will go through step-by-ste. Now we will interconnect the loopback adapter (in my case named MS-Loop) to the wifi adapter.

1) To do that right click on the Start menu icon and select Network connections. The Network connection window will open immediatelly with the list of your installed network adapters.

 

2) Make a right click on the wifi adapter (in my case named Wi-Fi) and select Properties. The WiFi properties window will open with two tabs: Networking and Sharing.

 

3) Select Sharing tab, and within the Internet connection Sharing check the "Allow other network users to connect through this computer's Internet connection" option (check box).

 

4) then from the popup list under Home networking connection select your's Loopback adapter (which will share the WiFi connection).

 

5) finally click OK, and then Ok again will close all windows.

 

6) now start GNS3 and make a simple topo with one router and one cloud

 

6) make a right click on the cloud instance and select Configure. The Node configuration window will open. Click on the Cloud_X (cloud 1 in my case) within "Cloud group"  (left side of the node window) and then add an Ethernet NIO adapter -> i.e. select the loop adapter from the list (the ethernet tab and there Generic Ethernet NIO). Click on the Add button. Click on Apply and then on Ok buttons to close all node configuration windows.

 

7) within the GNS3 topology use the GNS3 "Add link" tool to interconnect the router interface and just configured cloud interface. In my case router's fastethernet 0/0 interface is connected to the cloud mapped Loop interface (named in in my case "nio_gen_eth:MS-Loop").

 

8) start the router and go to the interface configure mode, where we will configure the dhcp address assignment:

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int fa 0/0
R1(config-if)#no shut
R1(config-if)#ip add
R1(config-if)#ip address dhcp
*Mar  1 00:10:33.999: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:10:34.999: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip address dhcp
R1(config-if)#
*Mar  1 00:10:46.619: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 192.168.137.163, mask 255.255.255.0, hostname R1
after a while  we may observe the log message saying that the DHCP address was assigned. Here 192.168.137.163 /24
 
9) after that we should check routing
R1(config-if)#do sh ip route
...
Gateway of last resort is 192.168.137.1 to network 0.0.0.0

C    192.168.137.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [254/0] via 192.168.137.1
 
where we may see that a default route have been installed. If not, just add a static route
ip route 0.0.0.0 0.0.0.0 fastethernet 0/0 192.168.137.1
10) finally if we would like to use a dns we may configure it together with enabled dns lookup:
R1(config)#ip name-server 8.8.8.8
R1(config)#ip domain lookup
11) and at last check the connectivity
R1#ping 8.8.8.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/72/176 ms
 
or trace the path
R1#traceroute 8.8.8.8

Type escape sequence to abort.
Tracing the route to google-public-dns-a.google.com (8.8.8.8)

  1 PSNB.mshome.net (192.168.137.1) 4 msec *  4 msec
  2  *  *  *
  3 DD-WRT (10.1.1.1) 12 msec 16 msec 4 msec
  4 
and so on.....
 
14  *  *  *
 15 google-public-dns-a.google.com (8.8.8.8) 28 msec 28 msec 52 msec
12) working!
 

 

Groups: