14 Your First Network

Mathew J. Heath Van Horn, PhD

A user’s experience with network devices varies widely.  Gamers are probably familiar with port forwarding on their home router, but may not understand why these actions are needed. Others may have never been interested in how the magic network box in their home works.

This exercise helps all users get familiar with using the GNS3 environment.  We used a typical home environment because some users have probably encountered this type of setup before.  However, our testers found that even the most novice users could follow these instructions to gain an understanding of using GNS3.

We had to take some liberties since many home network devices are all-in-one solutions, but learners should focus on using the tools and not how close it resembles “real life”.

Estimated time for completion: 15 minutes

Learning Objectives

  • Create a typical home network in the GNS3 network
  • Become familiar with labels and symbols in the GNS3 network

Prerequisites

Deliverables

  • One screenshot of the completed GNS3 Environment

Resources

  • N/A

Contributors and testers

  • Jacob M. Christensen, Cybersecurity Student, ERAU-Prescott
  • Sawyer Hanson, Cybersecurity Student, ERAU-Prescott
  • Julian Romano, Cybersecurity Student, ERAU-Prescott
  • Quinton D. Heath Van Horn, 7th Grade
  • David Reese, Mathematics Student, SUNY Brockport
  • Cody Shinkyu Park, Honeywell Software Engineer, ERAU-Prescott Alumni
  • Dante Rocca, Cybersecurity Student, ERAU-Prescott

Phase I – Background Information

This LAB is designed to resemble a typical home network.  Some adjustments will need to be made because you are unable to see the device or the wireless signals.  So, we will take this opportunity to familiarize you with the setup and then you can add your own devices.

Explanation of symbols
Figure 1 – Explanation of Symbols

In this lab, the typical all-in-one device is split apart for better visualization. Look at the figures below to compare a typical home environment with our lab environment.  You can trace the route of the internet from the ISP to the PC in both images.

Picture of final outcome
Figure 2 – Picture of final outcome

Phase II – Setup

These steps are necessary to prepare the playing field.  There a quite a few of them, but they are simple.  Complete them one at a time and you will have a working learning environment in no time.

  1.  Start the GNS3 application
  2. Create a new project
    1. Start by clicking File  > New Blank Project on the upper left-hand side
    2. For this example, we are using the name LAB_01
    3. Select OK
  3. Under the Servers Summary section in the bottom-left-hand corner of the workspace, verify that both the host machine and GNS3 VM are connected by looking for the two green lights
    Showing green lights of GNS3 working environment
    Figure 3 – GNS3 Working Environment is ready to go

    NOTE: This can take some time depending on the hardware being used. It will be gray before it turns green. If the VM does not start automatically, restart GNS3 and click Help > Setup Wizard to reestablish the link to VirtualBox as outlined in Chapter 2. Do not manually start GNS3 VM before launching GNS3.

  4. Connect the OpenWrt router to your simulated ISP
    1. Complete Chapter 4
    2. On the left side of the GNS3 environment, you can see various tools. Click on Browse all devices as shown hereFigure 4 - Browse all Devices Icon
    3. A sub-menu will appear. Click the picture of a cloud with the word NAT next to it and drag it to the workspace
      Device icons
      Figure 4 – Device icons
      Inserting the cloud
      Figure 5 – Add a NAT cloud to GNS3

      NOTE: Whenever you are asked to choose a server, use the dropdown menu to select the GNS3 VM (GNS3 VM) option.

    4. Change the name from “NAT1” to “ISP” by double-clicking on the name and pressing OK
      Change name on device
      Figure 6 – Change NAT cloud name to ISP
    5. Again, click on the Browse all devices
    6. Drag the device called OpenWrt to the workplace
      Add WRT router
      Figure 7 – add OpenWRT router
    7. The default symbol for the OpenWrt router is the universal symbol for routers, but it can be hard to see at times. Change the symbol by right-clicking on the router and then selecting Change Symbol on the menu
      Change the router symbol
      Figure 8 – Changing the Router Symbol
    8. Select the Affinity-square-red option and look for the router symbol, then click on OK
      Select a red symbol
      Figure 9 – Select the red router symbol
    9. Double-click on the router name and change it from “OpenWrt-1” to Router
  5. Add a network switch
    1. Click on the Browse all devices button again
    2. This time drag the Ethernet switch to the workspace
    3. Use the GNS3 VM to host the switch
    4. Rename the device to “Switch”
    5. Change the symbol to the Affinity-square-red option for the switch, by right-clicking on the switch and selecting the change symbol option.  The workspace should now look similar to the following
      Adding a switch
      Figure 10 – add a switch
  6. Add a VM with an Internet browser
    1. Add a VM to GNS3 (we are using Ubuntu Mate, but any VM with a browser should work)
    2. Allow GNS3 to configure VirtualBox network settings
      1. Go to File > Preferences
      2. Navigate to the VirtualBox VMs section
      3. Double click on your imported VM
      4. Under the Network tab, check the box that says Allow GNS3 to use any configured any VirtualBox adapters
    3. Rename the device to “PC” and your workspace should look like the following
      Network built so far
      Figure 11 – the network built so far

      NOTE: We generally use GNS3’s built-in virtual personal computer simulators (VPCS) because using too many VirtualBox VMs can drag down your system’s performance. However, the VPCS does not have a browser to use the GUI interface of the OpenWrt router.

  7. Link the devices together
    1. Return to the GNS3 workspace
    2. On the left side of the GNS3 workspace click on the Add a link buttonFigure 13 - add link button
    3. Click on the ISP cloud and then click on the nat0 port in the sub-menu
      Link cloud to router
      Figure 12 – Select NAT interface
    4. Click on the Router and then select the Ethernet1 port in the sub-menu. It is VERY IMPORTANT that this cable is connected to port Ethernet1. This is like plugging (screwing) in a cable from the ISP to your home router/switch/modem port that is commonly labeled “Internet”
    5. Click on the Router and then click on the Ethernet0 port in the sub-menu. This is like plugging a cable into your home router/switch/modem port that is commonly labeled “1” or “PC”
    6. Click on the switch and select any red (unused) port
    7. Now click on the switch and select  another unused port and attach it to the PC’s Ethernet0 port
    8. Show the interface labels by clicking on the Show/Hide interface labels button Figure 15 show interfaces
  8. Your workspace should now look like the following
    all devices connected
    Figure 13 – All devices connected

    NOTE: Notice that some of the ends show red, this means that the device is turned off or the interface has been disabled.

  9. Now press the big green arrow to start all the devices Figure 17 - start arrow. All cable points should eventually turn green as all the devices boot up
    all device interfaces are green
    Figure 14 – all connections are green

Phase III – Interface with the Home Router

Most home routers are configured by using a PC or laptop.  We are going to use our virtualized PC to do the same thing.

  1. Navigate to your VM instance and log in. Remember, in this example, we are using Ubuntu Mate
    ubuntu mate
    Figure 15 – Ubuntu Mate
  2. Access the OpenWrt router management webpage
    1. Open a browser application (ex. Firefox)
    2. In the navigation bar type 192.168.1.1 and press Enter
    3. You should be at the OpenWrt GUI interface
      OpenWRT web interface
      Figure 16 – Web interface for OpenWRT
    4. The username is “root” and there is no password, so just click Login
  3. It will take you to the status overview section. You can scroll through this information and see that devices are connected to the router. The network information is the ISP and the DHCP leases show the VM you are using now
    network leases
    Figure 17 – OpenWRT network leases
  4. If you click around on the OpenWrt router, you can see it has many of the same settings as a Linksys or TP-Link router. Don’t change any settings at this time. We want to add more devices

Phase IV – Add More Devices to the Home Network

Rarely do home networks have only a single device.  So we are going to add a few more.

  1. Click on the Browse all devices button and drag a VPCS device to the workspace
    adding a VPCS
    Figure 18 – Add a VPCS

    NOTE: This device is very lightweight and does not require nearly as many resources as a VirtualBox VM. Don’t forget to use the GNS3 VM when asked

  2. Use the techniques learned earlier and make the following changes
    1. Change the VPCS symbol to a laptop
    2. Change the name to “Laptop”
    3. Connect a cable from the laptop to the switch
      making the network look more real
      Figure 19 – Changing to laptop
  3. Laptops are typically wireless, so let’s change the connecting line to reflect this
    1. Right-click on the cable and select Style
    2. On the submenu change the border style to Dash Dot Dot.
    3. Press Apply and OK to close the submenu
  4. Turn on the laptop by right-clicking and selecting Start
  5. Add the laptop to the network
    1. Right-click on the laptop and click on Console
    2. Read the opening statements. Note that if you get lost, you can always enter the question mark to get assistance
    3. At the prompt type the following command to request an IPv4 address  and press Enter

      > ip dhcp

    4. After a few seconds, you will get a message reporting which IP address was assigned
      VPCS interface
      Figure 20 – VPCS (laptop) showing DHCP connection

      NOTE: If you get lost, you can always enter a question mark [?]  to get assistance such as available commands and their syntax.

  6. While there is no browser application to open, you can still test Internet connectivity via the ping command

    > ping www.google.com

 

pinging devices
Figure 21 – Pinging devices

Congratulations!
You have built your first network in GNS3!

 

End of Lab

 

Deliverables

One screenshot is needed of your GNS3 environment:

  • Click on the Add a note button at the top of the workspace and put your name, class, and section on your workspace
  • Select the Take a screenshot button to save a of your workspace and submit it per the instructor’s instructions to receive credit for completing this activity
  • Example  output…
    example
    Figure 22 – Example

Homeworks

Assignment 1 – Add more devices

  • Add another VPCS and change the label connection and picture to resemble a Cell Phone
  • Add another VPCS and change the device’s  label and picture to resemble a desktop printer
  • RECOMMENDED GRADING CRITERIA
    • Screenshot of the new GNS3 working environment with everything labeled

License

Icon for the Creative Commons Attribution 4.0 International License

Mastering Enterprise Networks Copyright © 2024 by Mathew J. Heath Van Horn is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book