GNS3 Network Simulation Guide
上QQ阅读APP看书,第一时间看更新

Jumping in the deep end – a basic two-router configuration>

If you have completed all of the setup steps from Chapter 1, Clearing the First Hurdle, start by opening GNS3 and following the enlisted steps. If you haven't completed your setup, then don't try this yet.

Step 1: Open the workspace

If you have just launched GNS3, you will see the New Project dialogue box opened. If you already have GNS3 opened, navigate to File | New Blank Project to reach the New Project dialogue box. In the Project Name: field, type Basic2Routers, or some other name of your choice. Note that as you type the name of your project, the name of the project directory is filled in for you automatically.

Check the Save nvrams including EtherSwitch VLANs and crypto keys option. Normally you would leave this option unchecked, but you will see the effect this has in the following section. Also check the Save traffic captures option. Leave the Unbase images… option unchecked.

Now click on OK to start your project. The main workspace screen will open with your project name in the GNS3 window Title Bar. I have labeled several other parts of the entire GNS3 Windows for later reference in the following diagram:

Note particularly the Devices Toolbar, the main Topology Graphic View or area Workspace, the docking windows for the GNS3 Management Console, and the Topology Summary. You can see the names of each of the areas and other tooltips by hovering the mouse cursor over the area. Note that you will often see additional information in the Status Bar area as well. You won't see the Routers dock until the next step.

Step 2: Add routers to your topology

Click on the Router Jumping in the deep end – a basic two-router configuration icon in the Devices Toolbar (on the left hand side of your screen), and you will see the Routers dock appear, showing the routers supported by GNS3. These icons will be greyed out unless you have an image of a particular router type. You can see in the preceding figure that this installation has router images for both the Cisco c3700 and c7200 series router.

As always, I will assume that you have an image for a c3700 router—but the following exercises could just as easily be conducted with any other model equipped with at least two FastEthernet interfaces by default, such as a c2621.

Click on the Router c3700 icon and drag it onto the workspace. The first time you do this, Dynamips will start up and you may notice a delay of a couple of seconds before the image drops and a router called R1 appears.

Tip

You can hold down the <Shift> key as you drag the router icon into the workspace and you will presented with a dialog box allowing you to drop multiple routers into the workspace in a straight line or a circular fashion.

Now repeat the process, dragging another c3700 router across so that you have two routers in your workspace. Notice how the second router (R2) dropped onto the workspace more quickly because Dynamips is already running. Your workspace should now look something like the following figure:

Step 3: Connect the routers together

To do this, click on the Add a link tool Jumping in the deep end – a basic two-router configuration in the left hand pane (If a pop-up menu appears, choose FastEthernet). The icon will change to include a white-on-red X to indicate that the Add a link tool is active, and you cursor will change to a + shape.

Click your cursor on one router, select the f0/0 interface, then click on the other router and again select the f0/0 interface. You can now either hit the <Esc> key or click on the now modified Add a link icon Jumping in the deep end – a basic two-router configuration to get your normal cursor back.

You will now have connected the two router interfaces. If you don't see the red connection status indicators (the two little red dots on the link between the routers) then move your routers a little further apart until they appear.

It is almost time to configure the routers, but before you do, take a look at the Topology Summary in the bottom right hand pane. Click on each of the triangular icons next to the router names (R1 and R2) and you will see a summary of the connections you just completed.

Step 4: Start your routers

Navigate to Control | Start/Resume all devices (or click on the green Start/Resume all devices icon in the toolbar—also known as the "Play" button). After some time (it may be several seconds), your connection indicators on the link between the two routers should turn green, and the Status Indicators next to the router names in your Topology Summary list should also turn green.

Step 5: Configure your routers

Now that the routers are running, navigate to Control | Console connect to all devices, and your terminal application should open windows or tabs to each of your routers. The following figure is taken from GNS3 running on Windows that has been configured to use SuperPutty as the terminal application. Other terminal applications are discussed in Chapter 3, Enhancing GNS3.

Tip

Troubleshooting: If your terminal application doesn't open, go to GNS3 Preferences (by navigating to Edit | Preferences on Windows or GNS3 | Preferences on OS X) at the General settings and click on the Terminal tab. Check that the command in the Terminal command: field is valid for your installation. For help read the Terminal Tips section in Chapter 3, Enhancing GNS3.

Notice that SuperPutty has two tabs labeled R1 and R2. Other terminal applications will have something similar, or may open two separate windows. Simply click on the tab/window of the router you wish to configure.

Tip

If you only want to open the console to a single router, you can simply double-click on the router icon. If the router is running, the console will open. (If the router is not running, the Node configurator dialog box will open).

However, be careful that you don't get carried away double-clicking, or else you may find that you have multiple sessions to the same router!

SuperPutty troubleshooting: I have found that SuperPutty doesn't always open console connections to all routers. If you see only one router opened, return to the main GNS3 window and double-click on the router that doesn't have a console opened yet.

For this exercise, configure the f0/0 interface of each router on the same subnet and bring the interfaces up as follows—just type the commands as you see them (the commands are the words written in italics):

On router R1

R1# configure terminal
R1(config)# interface f0/0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end

The commands to configure router R2 are exactly the same, except we use the IP address 10.0.0.2 on interface f0/0. When completed, ping the other router using the following command line:

R2# ping 10.0.0.1

If you didn't make any mistakes, you should get at least some ping replies (you rarely get 100 percent ping replies the first time you send a ping, because of the time the ARP process takes to complete).

Congratulations—you have built your first working simulation. But of course you will want to save this masterpiece.

Step 6: Save your configuration

Saving your configuration is NOT a single action process. There is more than one thing to save, firstly your router configurations must be saved within the emulated router environment itself, and the GNS3 configuration (the types of routers in your topology, their position on the workspace and so on) also needs to be saved.

Start by saving the configurations on each of your routers with the write memory command (or the copy running-config startup-config command if you prefer) as in the following command:

Rx# write memory

Next, back in the GNS3 main window, navigate to File | Save Project and your project will be saved in the directory indicated when you created the project. If you didn't name a project back in Step 1 then GNS3 will stop your devices (after warning you) before the save takes place.

Tip

Before you save your project, make sure your Topology Graphic View window is showing all your devices, because GNS3 automatically takes a screenshot as you save and place a file called topology.png in your chosen Project_Name directory.

In the following section, you will explore exactly what files make up a Project like the one you just saved.