Adding hosts to your Topologies

There are four possible ways to add a computer to your topology. If you just need to check for connectivity using ping or traceroute, the best way is to use the Virtual PC Simulator. The second way is to use a Qemu or VirtualBox guest (Qemu and VirtualBox support are integrated into GNS3). Third way is adding another router but configure it to act like a PC. Finally, you may use your real PC as described in the Connecting GNS3 to real networks tutorial.

Using the Virtual PC Simulator (and the Symbol Library)

The Virtual PC Simulator is a program that runs within Windows orLinux. It has limited functionality, but most important, it allows pings and traceroutes. These are the most common testing commands used during CCNA or CCNP training and are often the only commands needed. Using VPCS you will save memory and CPU cycles. If you do not need more functionality in a workstation within your topology, I highly recommend VPCS. The Virtual PC Simulator is a free product available to download here.

Extract the archive to your PC, and then in Windows run vpcs.exe

If you are running Linux, following these additional steps: right-click the vpcs (not vpcs.exe) and choose Properties. Click on the Permissions tab. Then click on the box next to Execute. Click Close. Now right-click the desktop and choose Create Launcher. Click the down arrow next to Type and choose Application in Terminal. For Name, type VPCS. For Command, you may browse to the vpcs program. For Comment, type Virtual PCs. Click OK.

Now just click the VPCS icon on your desktop as it is best to open the Virtual PC Simulator before starting GNS3.

For help, just type ? at the prompt. VPCS supports up to nine PCs. Just type a number to switch to another PC. Use the Show command to view a PC’s IP or MAC address. To assign an IP address, subnet mask, and default gateway to a PC, follow this format at the prompt.

ip 192.168.1.1 192.168.1.254 24

The above command assigns the PC an IP address of 192.168.1.1 with a /24 subnet mask and a default gateway of 192.168.1.254. To switch to PC2, just type a 2 and press Enter and assign connectivity settings to PC2:

ip 192.168.2.1 192.168.2.254 24


The program is very easy to use. You’ll find more information at the official Web site.

To integrate VPCS into GNS3, we will first make use of the Symbol Library. Choose Symbol Manager on the Edit menu after opening GNS3.

Click the computer symbol under Available symbols, then click right arrow button between the windows. This will move the symbol into the Customized nodes column. In the Name box, type PC. Use the drop-down arrow to change the type to Cloud, if necessary. Click the Apply button. Then click OK. In the GNS3 Nodes Types column, you should now see a computer icon.

Drag 2 PCs into the workspace along with a router. Right-click on C1 and choose Configure. Click on C1 under Clouds. Click the NIO UDP tab.

Type in the following values under Settings:

Local port: 30000

Remote host: 127.0.0.1

Remote port: 20000

These settings correspond to VPCS 1. Click the Add button and then OK.

Assign the following settings to C2 in the same way as C1:

Local port: 30001

Remote host: 127.0.0.1

Remote port: 20001

We have just configured each of the PCs as clouds that connect with GNS3 through the UDP ports designated. Now you can connect your PCs to the router using Ethernet links.

Now it’s time to configure your router to act as a gateway for your PCs.

R1>en
R1#conf t
R1(config)#int e0/0
R1(config-if)#ip add 192.168.1.254 255.255.255.0
R1(config-if)#no shut
R1(config)#int e0/1
R1(config-if)#ip add 192.168.2.254 255.255.255.0
R1(config-if)#no shut

Ping from VPCS1 to VPCS2 to verify connectivity. You can also ping from your router.

Using a Router that Acts Like a PC

You may also simply add another router (preferably c1700) to your topology and configure it to act like a PC. This method would use more memory and processor cycles than the previous method, so I would only recommend this method as a secondary choice.

Just add a router and enter the following commands:

Router(config)# no ip routing                        !Turns off IP routing function
Router(config)# interface fa0/0                      !Switches to FastEthernet interface
Router(config-if)# ip address address subnet_mask    !Assigns IP address and subnet mask to interface
Router(config-if)# no shutdown                       !Turns interface on
Router(config-if)# exit                              !Returns to global configuration mode
Router(config)# ip default-gateway gateway_address   !Configures the default gateway
Router(config)# ip http server                       !Optional – starts http server process

Connect the router (acting as a PC) to the rest of your topology.

What next?

You may also like these posts


Leave a comment

If you have a question, update, or comment about the article, please leave a comment. We try and respond to every comment, though it may take a few days, so please check back soon.

1 comment to Building More Complex Topologies

  • Dave

    Note: while doing this exercise I had to use the “write” command as a last command for each of the 3 consoles, otherwise it wouldn’t save my work!