Connect GNS3 to the Internet (local server) | GNS3 Documentation
intro#
This document explains how to connect gns3 topologies to the internet when using a local gns3 server.
The topology created in this document looks like this:
Local Install#
The following steps show you how to connect a local GNS3 installation to the Internet. In this document a simple topology of two Cisco routers are used to demonstrate:
- add cloud to gns3 topology
- configure ip addressing
- configure dns resolution
- configure nat on cisco router
- ad routes in ospf
- testing
- to create a new gns3 topology, select a device group in the devices toolbar by clicking the browse routers
button
The routers available will depend on your GNS3 configuration. In this example both a local router and GNS3 VM router are available.
Drag and drop a local router to the GNS3 Workspace. An instance of the node becomes available in the Workspace:
Drag and drop another local server router to the GNS3 Workspace:
Click the End devices button:
Drag and drop a Cloud node to the Workspace, select a local server, and then click OK:
The Cloud node will now appear in the Workspace:
Click the Toolbar Device button again to collapse the group:
Right click on the Cloud and then click Configure:
A list of available Ethernet interfaces is listed:
Use of physical interfaces is recommended. However, it is possible to use other interfaces, like a bridge interface, or a wireless interface. Configuring those is outside the scope of this article.
Below are examples of enabling “show special ethernet interfaces”, and then viewing the dropdown list:
- Click the Add a Link button to start adding links to your topology. The mouse cursor will change to indicate that links can be added:
Click on the first router topology to display available interfaces (this is device dependant):
Click the interface and then select the cloud in the topology to connect the interface to it. In this example FastEthernet 0/0 on R1 was selected. Next, click on the Cloud node, to see a list of available interfaces:
(notice that the listed interfaces on the Cloud node matches what we saw in its properties)
- Select an interface on the Cloud to complete the connection. In this example, Ethernet on Cloud 1 was selected:
Add another link between R2 and R1:
Click the Add a Link button to stop adding links. The mouse cursor will change back to normal to indicate that you have stopped adding links:
If not already done, click the Show/Hide interface labels button on the GNS3 Toolbar to display interface labels in your topology:
You are now ready to power on your network devices. Click the Start/Resume button on the GNS3 Toolbar to start up your network devices:
You are now ready to configure your devices. Click the Console connect to all devices button on the Toolbar to open a connection to every device in the topology:
A console connection is opened to each router in the topology:
Configure IP addresses:
Option 1: DHCP If using DHCP, configure R1 as follows:
result: the dhcp server assigns an ip address to the router:
option 2: manual configuration if you configure a static ip address, configure r1 with an ip address on the same subnet as your local pc:
set a default gateway:
- ping the router’s default gateway:
result pings should be successful.
- make sure the router is configured to use the correct dns server:
- ping google.com:
result successful pings.
if your pings are unsuccessful, make sure you have connectivity to your default gateway and make sure the default gateway is set to have nat translate the address assigned to the gns3 router.
- configure ip addressing in the internal gns3 network:
Configuration on the routers:
- Configure OSPF on R1 and R2 and advertise a default route:
- configure dns settings on r2:
- r2 will not be able to ping devices on the internet until you configure nat on r1 (or enable routing between r1 and its internet gateway). In this example, the internet gateway does not support routing, so nat will be configured on r1: r1# configure terminal
- test r2 connectivity to the internet:
result r2 is able to ping devices on the internet.
- congratulations! you have configured the internet connection from gns3.