Connect GNS3 to the internet
Hi All!
I have not create any new posts for a while now and it is because my CCIE R&S lab exam in Belgium is approaching really fast in exactly 68 days and I must admit I have never studied harder probably in my entire life !
I have been using this set up for a few months and it is great for instance if your doing NAT or QOS cause you can literally see how the traffic is classified , you can shape it , police it using legacy and MQC QOS techniques and basically you can practice tons of things with it and it’s really simple to set up.
In order to connect your GNS3 network to the internet you have to do the following :
1- Build your network
2- Go to command prompt CMD and type “hdwwiz.exe” and hit enter
3- Wizard window will open. Click NEXT and choice Install the hardware that I manually choice from the list.
4- Choice Network Adapters and click NEXT.
5- Choice Microsoft category from the list at the left side of the windows and than Microsoft Loopback Adapter. Click next. After installing a new adapter will appear at your network devices window
6- Now you need to allow your PC interface that connects to the internet to be used by other networks. I use wireless adapter to connect to the internet so simply go to your Network Connections , select the adapter you use to connect to the internet , Right click on it and select Properties, now go to the Sharing tab.
7-Select Allow other network users to connect through this computer`s internet connection: check box, and select the previously created Microsoft Loopback Adapter as it shown on the picture (mine is called Local Area Connection 2)
You have just shared your real internet connection adapter with your created loopback so all you have to do now is go back to your GNS3 and associate your loopback with the GNS3 cloud.
BTW IP address should automatically be generated to this loopback by your real internet adapter. In my case it is 192.168.137.1 /24
Go to your GNS3 router and give it an ip address from the same subnet , I’ve assigned 192.168.37.10 255.255.255.0
You also need to create a default static route as you would normally do in the real world on a perimeter of your network pointing to the clouds (loopback) ip address which essentially from now is acting like an ISP
and that’s all !
From the router you should now be able to ping whatever it is out that is pingable 🙂 , let say global DNS ? or bbc.co.uk or google etc …..
You need to enable ip domain-lookup to get DNS name resolved.
Great thing about this set up is that you build your network behind R1 in our case , connect few more router , switches , VM and , practise NAT , NTP , Routing Protocols (if your home router support them) and many more.
I personally use this sort of gns3-internet connectivity mostly for QOS , shaping , policing and other congestion avoidance and management techniques because once you configure for instance MQC shaping on R1 F0/0 or policing on F0/1 and start doing some file transfers from your VM etc you can clearly see and manipulate traffic differently and to have even more fun you can involve your home router and configure QOS on it if of course it supports it ….
One more thing , every device which is behind R1 (to the left) in our topology in order to get out to the internet you will need to configure NAT on R1 so let’s say if our N1 machine was a windows XP VM , you will have to configure static , overload , pool or whatever NAT you fancy in order for it to access any websites out there , and then you add some QOS and police HTTP traffic from this VM and the fun begins all over again 🙂
Enjoy !
Tom
Tom Sorry friend i disturb you in the middle of your lab prep…but thanks again for your effort and only have one query …i try PAT on R1 but i don’t know why its not work but when i did static NAT and Bind LAN IP with 192.168.137.0 pool ip then it work could you pls tell why PAT not work…second if i am tryin to ping from my LAPTOP to Gns3 router its also not ping do i need NAT for outside as well………
Hello Raipraveen83,
No problem at all! PAT uses unique source port numbers on the Inside Global IP address to distinguish between translations so it could be something to do with returing traffic from the internet to your LAN , could you post the PAT config so I can take a look ?
As it is a P2P connection between your laptop card and the router you then should be able to ping between these devices and if you only can from you PC NIC to a GNS3 Router that only tells one thing , firewall is blocking the connection. When you load your GNS3 IOS and console to your router you can ping it from your PC because there is no firewall coded into Cisco IOS by default unless you configure it CBAC, ZBF etc … For instance when you use ASA for the same you will not be able to ping it unless you allow icmp via ACL beforehand.
The same applies here , windows by default will block ICMP which is the reason why you can only ping from “IT” back to back to “IT”. Go into your PC control panel, windows firewall , and allow ICMP in the inbound acl rules.
Best
Tom
In the newest version of GNS3, it is fairly easy to configure a router for Internet access (no need for loopback adapter necessarily). However, after configuring the Internet access, I was left wondering … why do I need Internet access in GNS3 lab/study environment? Could you help identify some of the good use case, any topology for studies where Internet access could be utilized?
There are many reasons why you would want to try this. For example, you can safely see if a default route is being propagated through a lab, or, for the purposes of CCNP, you can see if a default route is being originated correctly.
I followed all the steps give above but still i am unable to ping my laptop loopback 192.168.137.1 with my R1 router 192.168.137.10 please help me as soon as possible because i have to submit my collage project.
Most probably Windows firewall on your PC is blocking ICMP
Temporarily disable your firewall and if the ping started working then you will need to allow ICMP inbound on your PC depending on a firewall you use
sorry but still its not working
i have to submit a major project based on networking will you please guide me that what i have to prepare.
Because this is a very simple set up with direct P2P links (no vlans or other filtering in between) that requires very minimum amount of configuration firewall is practically the only device/software that could be causing it
Start checking from the basics IP Addressing , Subnet Mask etc …and again double check your windows firewall configuration depending on what software you’re using
ok please tell me after configuring ip addressing what about natting i have to do that natting with my wireless ip or with my virtual adapter ip
thanks sir i done that thanks a lot.