GNS3 Lab Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 101

Introduction

By : Yaser Rahmati

Instagram : instagram.com/yaser.rahmati/

Contents at a Glance

Introduction
About GNS3
GNS3 Architecture
Windows Installation
Linux Installation
Cisco IOS images for Dynamips
Add Router IOS Image in GNS3
Add a Virtual Machine in GNS3
Upgrade The GNS3 VM
L2 Switching Simulation
L3 switching Simulation
Lab 1 : Connect 2 PCs
Lab 2 : Connect Router to Cloud in GNS3
Lab 3 : Configure Static Route in GNS3
Lab 4 : Syslog Server for Cisco Router in GNS3
Lab 5 : DHCP configuration in GNS3
Lab 6 : Router Remote Access via Telnet
About GNS3

GNS3 is used by hundreds of thousands of network engineers worldwide to emulate, configure, test
and troubleshoot virtual and real networks. GNS3 allows you to run a small topology consisting of
only a few devices on your laptop, to those that have many devices hosted on multiple servers or
even hosted in the cloud.

Testing networks

TodayYou have multiple choices when studying and testing networks:

1. GNS3
2. Cisco Packet Tracer
3. Cisco VIRL
4. Physical equipment
5. Others
. GNS3 Ethernet Switch

GNS3 Advantages

1. Free software
2. Open Source software
3. No monthly or yearly license fees
4. No limitation on number of devices supported (only limitation is your hardware: CPU and
memory)
5. Supports multiple switching options (ESW16 Etherswitch, IOU/IOL Layer 2 images, VIRL
IOSvL2):
. Supports all VIRL images (IOSv, IOSvL2, IOS-XRv, CSR1000v, NX-OSv, ASAv)
7. Supports multi vendor environments
. Can be run with or without hypervisors
9. Supports both free and paid hypervisors (Virtualbox, VMware workstation, VMware player, ESXi,
Fusion)
10. Downloadable, free, pre-configured and optimized appliances available to simplify deployment
11. Native support for Linux without the need for need for additional virtualization software
12. Software from multiple vendors freely available
13. Large and active community (800,000+ members)

Disadvantages:

1. Cisco images need to be supplied by user (download from Cisco.com, or purchase VIRL
license, or copy from physical device).
2. Not a self contained package, but requires a local installation of software (GUI).
3. GNS3 can be affected by your PC’s setup and limitations because of local installation (firewall
and security settings, company laptop policies etc).

Source

https://docs.gns3.com/1PvtRW5eAb8RJZ11maEYD9_aLY8kkdhgaMB0wPCz8a38/index.html
GNS3 Architecture

GNS3 is splitted in four part:

1. the GUI (project gns3-gui, gns3-web)


2. the controller (project gns3-server)
3. the compute (project gns3-server)
4. the emulators (qemu, iou, dynamips...)

Note

The controller pilot everything it’s the part that manage the state of a project, save it on disk.
Only one controller exists.
The GUI display the topology. The GUI has only direct contact with the controller.
The compute are where emulator are executed. If the compute is on the same server as the
controller, they are in the same process.
For each node of the topology will start an emulator instance.

A small schema:

1 +---------------+ +----------+ +------+


2 | | | COMPUTE +-----> QEMU |
3 | GNS3 GUI | +---> SERVER 1 | +------+
4 | QT interface +-----+ | +----------+
5 | | | | +---+
6 +---------------+ +v--------++ +--->IOU|
7 |CONTROLLER| | +---+
8 +---------+ +^--------++ +---------+ |
9 | GNS3 WEB+-----+ | | COMPUTE +--+
10 +---------+ +---> SERVER 2+--+ +--------+
11 +---------+ +--->DYNAMIPS|
12 +--------+
Windows Installation

1. SUPPORTED OPERATING SYSTEMS

Windows 7 SP1 (64 bit)


Windows 8 (64 bit)
Windows 10 (64 bit)
Windows Server 2012 (64 bit)
Windows Server 2016 (64 bit)

2. REQUIREMENTS

MINIMUM RECOMMENDED
ITEM OPTIMAL REQUIREMENTS
REQUIREMENTS REQUIREMENTS

Operating Windows 7 (64


Windows 7 (64 bit) or later Windows 7 (64 bit) or later
System bit) or later

4 or more Logical cores -


2 or more Logical
Processor AMD-V / RVI Series or Intel i7 CPU
cores
VT-X / EPT

Virtualization
extensions Virtualization extensions Virtualization extensions
required. You may required. You may need to required. You may need to
Virtualization
need to enable enable this via your enable this via your
this via your computer's BIOS. computer's BIOS.
computer's BIOS.

Memory 4 GB RAM 8 GB RAM 16 GB RAM


1GB available
space (Windows Solid-state Drive (SDD) , 35 Solid-state Drive (SDD) , 35
Storage
Installation is < GB available space GB available space
200MB).

Virtualizing devices is Virtualizing devices is


You may need
processor and memory processor and memory
additional storage
Additional intensive. More is better but intensive. More is better but
for your operating
Notes properly configured device properly configured device
system and
trumps RAM and Processing trumps RAM and Processing
device images.
power. power.

3. DOWNLOAD AND INSTALL GNS3

Follow these steps to download GNS3 on a local Windows PC.

Using a web browser, browse to https://gns3.com and click the Free Download link:

If you have not already registered on the GNS3 site,

create an account and then click Create Account & Continue :


Or, if you already have an account, click Login, fill in the

your details and then click Login & Continue: After login,

you will be prompted to select the version of GNS3 to download. In this guide, we will select the
Windows installation. Click the Download button to download the GNS3-all-in-one package:

The GNS3-all-in-one package will automatically be

downloaded to your PC: Navigate in Windows Explorer to

your Downloads folder and then double click the GNS3-1.5.0-all-in-one.exe file:
If displayed, click the Run button to start the GNS3

installation:

GNS3 comes bundled with various prerequisite and optional software. By default most software is
selected for installation, but you can decide to only install specific software.

Item Required? Description

Required to connect GNS3 to your computer network. If you


WinPCAP Required don’t install this devices in GNS3 will not be able to
communicate with the real world.

Required to run a local installation of GNS3 with Cisco routers.


Dynamips Required
Only unselect if you are going to exclusively use the GNS3 VM.

A computer emulator used to emulate a full computer which


QEMU 2.4.0
Required could for example be Linux. The older Qemu version 0.11.0 is
and 0.11.0
installed in order to support old ASA devices.

GNS3 Required The core GNS3 software. This is always required.


Used to avoid QEMU using 100% of your CPU (when it is
Cpulimit Required
running).

Allows you to capture and view network traffic sent between


Wireshark Recommended
devices.

A very light PC emulator that supports basic commands like


VPCS Recommended
ping.

TightVNC A VNC client used to connect to appliance graphical user


Recommended
Viewer interfaces.

Modern replacement to WinPCAP know to fix issues with


Npcap Optional
Win10 but less tested than WinPCAP.

SolarWinds
Optional software for viewing captured traffic in an easy to read
Response Optional
format.
Time Viewer

Source

https://docs.gns3.com/11YYG4NQlPSl31YwvVvBS9RAsOLSYv0Ocy-uG2K8ytIY/index.html
Cisco IOS images for Dynamips

GNS3 offers multiple ways to emulate IOS.


1. For older images, we use and maintain Dynamips;
1. An emulator dedicated to emulate some Cisco hardware.
2. Dynamips can run unmodified IOS images.
2. In the new GNS3 1.4, there is a way to run a second category of switches and routers.
1. These are classified as Routing and Switching virtual machines (or R+Svms) for short.

Differences between IOS images and R+Svms

1. IOS images are usually run in Dynamips however R+Svms are housed in a virtual machine.
2. IOS images are lower in cpu and memory so you can fit more of them in one topology.
3. R+Svms are all vendor Routing and Switching images that are larger in size but can be
imported into GNS3 for real world network emulation.

Idle-PC value

This settings will help Dynamips to consume less CPU. It’s specific to each different IOS image.

Recommended images

We really recommend using c3640, c3660, c3725, c3745 and c7200 IOS images.
They have proven to be the most stable in GNS3 provided you use the right amount of RAM and
Idle-PC value.
Series File name Proposed idle-PC value

c3640

c3660 c3660-a3jk9s-mz.124-25d.bin 0x606071f8

c3725 c3725-adventerprisek9-mz.124-15.T14.bin 0x60c09aa0

c3745 c3745-adventerprisek9-mz.124-15.T14.bin 0x602701e4

c7200 c7200-adventerprisek9-mz.152-4.M7.bin

Source

1 http://docs.gns3.com/1-kBrTplBltp9P3P-AigoMzlDO-ISyL1h3bYpOl5Q8mQ/
2 http://www.ciscopress.com/articles/article.asp?p=2106547
3 http://sfree.ws/model?main_group_id=1&child_group_id=104&model_id=1407&releas
Add Router IOS Image in GNS3

After installing GNS3, you need to add router IOS image in GNS3. To do so, you need to perform the
following steps:

Step 1 :

In the GNS3 console, click Edit and select Preferences to open the Preferences window. Click
Next to add a new router IOS image in GNS3, as shown in the following figure.
Step 2 :

In the IOS image page, select the New Image radio button, click Browse and select the router
IOS image that you want to add in GNS3. In this case, e will use Cisco router c2691 IOS image.
Click Next to proceed, as shown in the following figure.

Step 3 :

In the Name and platform window, specify the name and platform for the IOS image and then
click Next as shown in the following figure.
Step 4 :

In the Memory page, set the desired Default RAM size and then click Next as shown in the
following figure.
Step 5 :

In the Network adapters page, ensure that slot 0 is already listed and selected. Select the
additional slots, if required, and then click Next as shown in the following figure.
Step 6 :

In the WIC modules page, select the WIC modules to add additional modules as per your
requirement, and then click Next as shown in the following figure.
Step 7 :

On the Idle-pc page, click Finish and then click OK to close the Preferences window.

Step 8 :

In the GNS3 console, you can see that c2691 router is added. Drag it to the work view area as
shown in the following figure. Right-click on the added router and then select Start to start it.
Step 9 :

Open the console of the router as shown in the following figure.


Source

https://protechgurus.com/how-to-add-router-ios-image-in-gns3/
Add a Virtual Machine in GNS3

In order to add a virtual machine in GNS3, you need to perform the following steps:

Step 1 :

First, create a virtual machine in VMware workstation. We assume that you have already
created a virtual machine using VMware workstation. In the following figure, you can see we
have created two virtual machines named SVR1 and SVR2. In this demonstration, we will add
SVR1 virtual machine to GNS3.
Step 2 :

Once you have created the virtual machine, open the GNS3 console, click Edit and select
Preferences.
On the Preferences window, select VMware VMs in the left pane and click New to add a new
VMware virtual machine in GNS3.

Step 3 :

In the VMware Virtual Machine page, your virtual machine should be available in the VM list
drop-down menu as shown in the following figure. Select your virtual machine that you want to
add in GNS3 and then click Finish.
Step 4 :

In the GNS3 console, drag your virtual machine in the work view area. Right-click virtual
machine and select Start to start it.
Step 5 :

Now, this virtual machine can be connected to routers, switches and other devices in GNS3.
Open the console of the virtual machine and use it as a real machine to perform the hands-on
lab exercises.
Source

https://protechgurus.com/add-virtual-machine-in-gns3/
Upgrade The GNS3 VM

Your GNS3 VM version need to the same as the GNS3 client.

Step 1 :

In order to upgrade it go to the information and click on OK.

Step 2 :
Select the upgrade option and run it:

Step 3 :

You can also change the version branch use by your GNS3:
Source

https://docs.gns3.com/1u6099Ru5cEpuszknnCRtfVF0qQZC7sDtWwjlGt4dAeQ/index.html
L2 Switching Simulation

To add and configure switches in GNS3 (Switching Simulation), you need to perform the following
steps:

Step 1 :

Download and extract the IOSv-L2 VMDK image file.

Step 2 :

Once you have downloaded the VMDK file, open the Preferences window in GNS3 by navigating
Edit and Preferences in the GNS3 console.

Step 3 :

Select Qemu VMs in the left pane and then click New to add a new Qemu VM template.
Step 4 :

On the QEMU VM Type page, select IOSv-l2 in from the Type drop-down list and then click
Next.

Step 5 :

On the QEMU VM name page, specify a name for this Qemu VM in the Name text box. Click
Next to proceed.

Step 6 :

In the QEMU binary and memory page, select the binary directory. If you select x86 binary for
the 64-bit system, you might get an error during opening the console of the switch in GNS3.
Hence, select the appropriate binary depending on the type of architecture of your system. Click
Next to proceed.
Step 7 :

On the Disk image page, select the New Image radio button. Browse and select the IOSv2-l2
VMDK file that you have downloaded previously. Click Finish to close the New QEMU VM
template window.
Step 8 :

Drag the recently added switch in the work view area and start the switch.

Step 9 :

Open the console of the added switch. Let’s complete the booting process. If everything goes in
the right way, the console of the switch will be displayed.

Source
https://protechgurus.com/add-use-switch-gns3-switching-simulation/
L3 switching Simulation

Adding a Layer 3 Switch in GNS3

To add a layer 3 switch in GNS3, you need to perform the following steps:

Step 1 :

First of all, download the Cisco 3640 series IOS image file.

Step 2 :

Once you have downloaded the Cisco 3640 series IOS image, open the Preferences window by
clicking the Edit and then Preferences in the GNS3 console.

Step 3 :

In the Preferences window, select IOS routers in the left pane. Here, you will see all the added
IOS router templates. To add a new IOS router template, click New as shown in the following
figure.
Step 4 :

On the New IOS router template window, select the New Image radio button.

Step 5 :

Click Browse and navigate to the location where you have downloaded the 3640 IOS image file,
and then select it.

Step 6 :
In the IOS Image message box, click Yes to decompress the selected image, and then click
Next.

Step 7 :

On the Name and platform page, type a name such as Layer 3 Switch in the Name text box,
select the This is an EtherSwitch router check box and then click Next.
Step 8 :

On the Memory page, accept the default memory size or set the desired value, and click Next.

Step 9 :

On the Network adapters page, select NM-16ESW from the slot 0 drop-down list and then click
Next.
Step 10 :

On the Idle-PC Finder page, click Finish and close the Preferences window.

Step 11 :

You will see that a layer 3 switch in GNS3 console has been added. Drag it to the work view
area.

Step 12 :

Right-click layer 3 switch (ESW1) and select Start to start it.


Step 13 :

Once it is started, select and right-click again it and select Console to open its console.

Step 14 :

On the ESW1 console, type the following commands to verify that it works as a Layer 3 switch.

1 ESW1#config t
2 ESW1(config)#hostname Switch1
3 Switch1(config)#exit
4 Switch1#vlan database
5 Switch1(vlan)#exit
6 Switch1#show vlan database

Step 15 :

The following figure shows that the preceding commands are successfully executed on the
layer 3 switch that you have added in GNS3.
Source

https://protechgurus.com/use-add-layer-3-switches-gns3/
Lab 01 : Connect 2 PCs

CREATE YOUR TOPOLOGY

To create a new GNS3 topology, click the Browse End Devices button on the Devices Toolbar:

The toolbar will expand to show available devices of that

type. In this example VPCS is one of the available devices:


Drag and drop the VPCS node (device) to the GNS3 Workspace. An instance of the node becomes
available in the Workspace. In this example a new VPCS with the name PC1 is now available:

Drag and drop the VPCS node again into the GNS3 Workspace. In this example, another VPCS was
added to the GNS3 workspace (PC2):

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 PC1 in your topology to display available

interfaces. In this example Ethernet0 is available (this is device dependant):

Click Ethernet0 on PC1 and then select PC2:


Select Ethernet0 on R2 to complete the connection.

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:
GNS3 indicates that the devices have been powered on

by turning the interface connectors from red to green. This can also be seen in the Topology
Summary:

You are now ready to configure your devices. Click the

Console connect to all devices button on the GNS3 Toolbar to open a connection to every device in
the topology:
A console connection is opened to every device in the topology.

Configure your PCs with IP addresses and default

gateways as follows (a default gateway is configured in this example but is not used):

PC1> ip 10.1.1.1 255.255.255.0 10.1.1.254

PC2> ip 10.1.1.2 255.255.255.0 10.1.1.254

PC1 should now be able to ping PC2 (use the key sequence Ctrl-C to stop the ping):
1 PC1> ping 10.1.1.2
2 84 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=0.098 ms
3 84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=0.209 ms
4 84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=0.197 ms
5 ^C
6 PC1>

Result Pings succeed.

To save your PC configurations use the save command:

1 PC1> save
2 Saving startup configuration to startup.vpc
3 . done
4 PC1>
5
6 PC2> save
7 Saving startup configuration to startup.vpc
8 . done
9 PC2>

Source

https://docs.gns3.com/1wr2j2jEfX6ihyzpXzC23wQ8ymHzID4K3Hn99-qqshfg/
Lab 02 : Configuring Ethernet and Serial
Interfaces

Topology Diagram

Objectives

Configure a LAN Ethernet interface.


Configure a WAN serial interface.
Verify the interface configurations.

Task 1

Configure the LAN Ethernet interface.


1 R1#configure terminal
2 R1(config)#interface fastEthernet 0/0
3 R1(config-if)#ip address 192.168.1.1 255.255.255.0
4 R1(config-if)#no shutdown
5 R1(config-if)#description LAN-INT

Task 2

Verify the LAN interface configuration.

1 R1#show ip interface brief


2 Interface IP-Address OK? Method Status Pro
3 FastEthernet0/0 192.168.1.1 YES manual up up
4 FastEthernet0/1 unassigned YES unset administratively down dow
5 Serial1/0 unassigned YES unset administratively down dow
6 Serial1/1 unassigned YES unset administratively down dow
7 Serial1/2 unassigned YES unset administratively down dow
8 Serial1/3 unassigned YES unset administratively down dow
9 R1#

Task 3

Configure the WAN serial interface.

1 R1(config)#interface s1/0
2 R1(config-if)#ip address 10.0.0.1 255.255.255.252
3 R1(config-if)#no shut
4 R1(config-if)#description TO-WAN

Task 4

Configure a default route using the ISP WAN IP address as the next-hop IP address.

R1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2


Task 5

Verify the default route configuration.

1 R1#show ip route
2 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
3 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
4 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
5 E1 - OSPF external type 1, E2 - OSPF external type 2
6 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
7 ia - IS-IS inter area, * - candidate default, U - per-user static route
8 o - ODR, P - periodic downloaded static route
9
10 Gateway of last resort is 10.0.0.2 to network 0.0.0.0
11
12 10.0.0.0/30 is subnetted, 1 subnets
13 C 10.0.0.0 is directly connected, Serial1/0
14 C 192.168.1.0/24 is directly connected, FastEthernet0/0
15 S* 0.0.0.0/0 [1/0] via 10.0.0.2
16 R1#
Lab 03 : Basic switch setup

Objective

A new switch just purchased from Cisco contains no default configuration. You need to configure
the switch with setup mode or from scratch using the command line interface (CLI) before
connecting it in your network environment.

Network diagram

Lab instructions
This lab will test your ability to configure basic settings such as hostname, motd banner, encrypted
passwords, and terminal options on a Cisco Catalyst 2960 switch simulated in GNS3.

Task 1

Configure Switch hostname as LOCAL-SWITCH

vIOS-L2-01(config)#hostname LOCAL-SWITCH

Task 2

Configure the message of the day as "Unauthorized access is forbidden"

1 LOCAL-SWITCH(config)#banner motd #
2 Unauthorized access is forbidden#

Task 3

Configure the password for privileged mode access as "cisco". The password must be md5
encrypted

LOCAL-SWITCH(config)#enable secret cisco

Task 4

Configure password encryption on the switch using the global configuration command

LOCAL-SWITCH(config)#service password-encryption
Task 5

Configure CONSOLE access with the following settings :


Login enabled
Password : ciscoconsole
History size : 15 commands
Timeout : 6'45''
Synchronous logging

1 LOCAL-SWITCH(config)#line con 0
2 LOCAL-SWITCH(config-line)#password ciscoconsole
3 LOCAL-SWITCH(config-line)#logging synchronous
4 LOCAL-SWITCH(config-line)#login
5 LOCAL-SWITCH(config-line)#history size 15
6 LOCAL-SWITCH(config-line)#exec-timeout 6 45

Task 6

Configure TELNET access with the following settings :


Login enabled
Password : ciscotelnet
History size : 15 commands
Timeout : 8'20''
Synchronous logging

1 LOCAL-SWITCH(config)#line vty 0 15
2 LOCAL-SWITCH(config-line)#exec-timeout 8 20
3 LOCAL-SWITCH(config-line)#password ciscotelnet
4 LOCAL-SWITCH(config-line)#logging synchronous
5 LOCAL-SWITCH(config-line)#login
6 LOCAL-SWITCH(config-line)#history size 15

Task 7

Configure the IP address of the switch as 192.168.1.2/24 .


1 LOCAL-SWITCH(config)#interface Vlan1
2 LOCAL-SWITCH(config-if)#ip address 192.168.1.2 255.255.255.0
Lab 04: Basic router setup

Objective

This lab will test your ability to configure the basic security settings of a Cisco ISR router and help
you to get ready for the router configuration simulation activities.

Network diagram

Lab instructions

The aim of this lab is to test your ability to perform a basic router setup.

Task 1

Configure the router hostname to "GATEWAY"

1 Router>enable
2 Router#configure terminal
3 Enter configuration commands, one per line. End with CNTL/Z.
4 Router(config)#hostname GATEWAY
Task 2

Configure the enable secret to "cisco"

Task 3

Configure password encryption on the router to secure stored passwords

GATEWAY(config)#service password-encryption

Task 4

Configure the console access :


Login : yes
Password : "cisco"
History : 10 commands
Logging synchronous
Timeout : 2 minutes 45 seconds.

1 GATEWAY(config)#line console 0
2 GATEWAY(config-line)#password cisco
3 GATEWAY(config-line)#login
4 GATEWAY(config-line)#logging synchronous
5 GATEWAY(config-line)#exec-timeout 2 45
6 GATEWAY(config-line)#history size 10
Lab 05: Connect Router to Cloud in GNS3

Sometimes, it is important to connect the routers to cloud in GNS3, especially when you plan to
perform lab exercises on a Laptop that is not connected to a network. There is a solution that allows
you to connect GNS3 routers to your local system using the loopback adapter.

Install a loopback adapter

Step 1 :

Open the Device Manager. To do so, type devmgmt.msc in the Run dialog box, and then press
Enter.

Step 2 :

In the Device Manager window, select and right-click your computer name and then select Add
legacy hardware as shown in the following figure.
Step 3 :

On the Welcome page, click Next.

Step 4 :

On The wizard can help you install other hardware page, accept the default selection and click
Next.
Step 5 :

Navigate to the From the list below, select the type of hardware you are installing page and
then click Next.
Step 6 :

On the Select the device you want to install for this hardware page, select Microsoft under the
Manufacturer Select Microsoft KM-Test Loopback Adapter under the Model section, and then
click Next.
Step 7 :

On the Wizard is ready to install hardware page, click Next.

Step 8 :

Click Finish, once the installation is completed.

Step 9 :

Now, you have installed the loopback adapter on your local system. The next step is to
configure TCP/IP settings for the loopback adapter. For this, type ncpa.cpl in the Run and then
press Enter.

Step 10 :

On the Network Connections window, select and right-click the loopback adapter. Select
Properties to open its properties dialog box.
Step 11 :

On the Properties dialog box, select TCP/IPv4, and then click Properties.

Step 12 :

On the TCP/IPv4 Properties dialog box, configure the following TCP/IP settings:

1 IP address: 192.168.1.100
2 Subnet mask: 255.255.255.0
3 Default gateway: 192.168.1.1

Step 13 :

Click OK and then click Close to close the properties dialog box. Open Command Prompt, type
ping 192.168.1.100 and then press Enter.
It is highly recommended to reboot your local system.

Connect Router to Cloud in GNS3

Step 1 :

Add a Router and a Cloud in the topology view.

Step 2 :

Right-click Cloud and then select Configure to configure it.


On the Node Properties dialog box, select the name of your loopback adapter, in this case,
Ethernet. Click Add and then click OK to close the properties dialog box.
Step 3 :

Now, connect your router using the Fa0/0 interface to the cloud’s Ethernet, as shown in the
following figure. Here, you can choose your Ethernet adapter that you want to bind with GNS3
router. It may be either loopback or the physical network adapter.
Step 4 :

Start your router, open the console of R1 and configure 192.168.1.1/24 IP address on its Fa0/0
interface. To do so, execute the following commands:

1 R1(config)#interface fa0/0
2 R1(config-if)#ip add 192.168.1.1 255.255.255.0
3 R1(config-is)#no shut
4 R1(config-f)#exit

Step 5 :

Once you have configured the appropriate IP address, execute the ping 192.168.1.100
command to check the connectivity between R1 and local system using Cloud.

R1#ping 192.168.1.100

The following figure shows the router’s IP configuration in GNS3.


Source

The following figure shows the router’s IP configuration in GNS3.


Lab 06: Router Remote Access via Telnet

Objective

Learn how to access a router remotely by using Telnet.

Lab Topology

The topology diagram below represents the NetMap in the Simulator.

Task 1:

Configure all three routers with the appropriate settings.

R1 router

1 R1#configure terminal
2 R1(config)#interface s1/0
3 R1(config-if)#ip add 10.10.10.1 255.255.255.252
4 R1(config-if)#no shut
5 R1(config-if)#clock rate 64000
6 R1(config-if)#exit
7 R1(config)#interface loopback 0
8 R1(config-if)#ip address 172.168.0.1 255.255.0.0
9 R1(config-if)#no shut
10 R1(config-if)#exit
11 R1(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.2
12 R1(config)#

R2 router

1 R2#configure terminal
2 R2(config)#interface s1/0
3 R2(config-if)#ip address 10.10.10.2 255.255.255.252
4 R2(config-if)#no shut
5 R2(config-if)#exit
6 R2(config)#interface loopback 0
7 R2(config-if)#ip address 192.168.0.1 255.255.255.0
8 R2(config-if)#exit
9 R2(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1
10 R2(config)#

Task 2:

Configure remote access to R1 using its virtual terminal (vty) lines:

R1(config)#line vty 0 4

Issue the following commands to configure the router to require the use of a login password for
remote access to R1:

1 R1(config-line)#login
2 % Login disabled on line 2, until 'password' is set
3 % Login disabled on line 3, until 'password' is set
4 % Login disabled on line 4, until 'password' is set
5 % Login disabled on line 5, until 'password' is set
6 % Login disabled on line 6, until 'password' is set
7 R1(config-line)#

Issue the following command to configure rahmati as the password that will be used to
authenticate the Telnet session:

R1(config-line)#password rahmati

From R2, issue the following commands to Telnet to R1’s Serial 1/0 interface:

1 R2#telnet 10.10.10.1
2 Trying 10.10.10.1 ... Open
3
4
5 User Access Verification
6
7 Password:rahmati
8 R1>

From R2, issue the following commands to Telnet to R1’s Loopback0 interface:

1 R2#telnet 172.168.0.1
2 Trying 172.168.0.1 ...
3 % Destination unreachable; gateway or host down
4
5 R2#telnet 172.16.0.1
6 Trying 172.16.0.1 ... Open
7
8 User Access Verification
9
10 Password:rahmati
11 R1>
Lab 07: Configure Static Route in GNS3

Static route tells the device exactly where to send traffic, no matter what.
Static route is often used when your network has only a few routers or there is only one route
from a source to a destination.

Syntax of static route:

ip route destination-network-address subnet-mask {next-hop-IP-address | exit-int

1. destination-network-address: destination network address of the remote network


2. subnet mask: subnet mask of the destination network
3. next-hop-IP-address: the IP address of the receiving interface on the next-hop router
4. exit-interface: the local interface of this router where the packets will go out

1. Scenario

Suppose that your company has 2 branches located in Tehran and Shiraz.
As the administrator of the network, you are tasked to connect them so that employees in the
two LANs can communicate with each other.
After careful consideration you decided to connect them via static route.

2. Physical Topology
3. Configuring interfaces on R1

1 R1#configure terminal
2 R1(config)#interface fastEthernet 0/0
3 R1(config-if)#ip address 192.168.1.1 255.255.255.0
4 R1(config-if)#no shut
5 R1(config-if)#exit
6 R1(config)#interface serial 1/0
7 R1(config-if)#ip address 10.0.0.1 255.255.255.252
8 R1(config-if)#no shut
9 R1(config-if)#clock rate 64000

4. Configuring interfaces on R2

1 R2#configure terminal
2 R2(config)#interface serial 1/0
3 R2(config-if)#ip address 10.0.0.2 255.255.255.252
4 R2(config-if)#no shut
5 R2(config-if)#exit
6 R2(config)#interface fastEthernet 0/0
7 R2(config-if)#ip address 172.16.0.1 255.255.0.0
8 R2(config-if)#no shut
9 R2(config-if)#exit

5. show ip route command

1 R1#show ip route
2
3 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
4 C 10.0.0.0/30 is directly connected, Serial1/0
5 L 10.0.0.1/32 is directly connected, Serial1/0
6 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
7 C 192.168.1.0/24 is directly connected, FastEthernet0/0
8 L 192.168.1.1/32 is directly connected, FastEthernet0/0
9 R1#

1 R2#show ip route
2
3 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
4 C 10.0.0.0/30 is directly connected, Serial1/0
5 L 10.0.0.2/32 is directly connected, Serial1/0
6 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
7 C 172.16.0.0/16 is directly connected, FastEthernet0/0
8 L 172.16.0.1/32 is directly connected, FastEthernet0/0
9 R2#

6. Configuring static route on R1

1 R1(config)#ip route 172.16.0.0 255.255.0.0 10.0.0.2


2 R1(config)#exit
3 R1#show ip route
4
5 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
6 C 10.0.0.0/30 is directly connected, Serial1/0
7 L 10.0.0.1/32 is directly connected, Serial1/0
8 S 172.16.0.0/16 [1/0] via 10.0.0.2
9 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
10 C 192.168.1.0/24 is directly connected, FastEthernet0/0
11 L 192.168.1.1/32 is directly connected, FastEthernet0/0
12 R1#

7. Configuring static route on R2

1 R2(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1


2 R2(config)#exit
3 R2#show ip route
4
5 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
6 C 10.0.0.0/30 is directly connected, Serial1/0
7 L 10.0.0.2/32 is directly connected, Serial1/0
8 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
9 C 172.16.0.0/16 is directly connected, FastEthernet0/0
10 L 172.16.0.1/32 is directly connected, FastEthernet0/0
11 S 192.168.1.0/24 [1/0] via 10.0.0.1
12 R2#

8. Manually set an IP on PC1

1 PC1> ip 192.168.1.100 255.255.255.0 192.168.1.1


2 Checking for duplicate address...
3 PC1 : 192.168.1.100 255.255.255.0 gateway 192.168.1.1
4
5 PC1>

9. Manually set an IP on PC2


1 PC2> ip 172.16.0.100 255.255.0.0 172.16.0.1
2 Checking for duplicate address...
3 PC1 : 172.16.0.100 255.255.0.0 gateway 172.16.0.1
4
5 PC2>

10. Try to ping each far end network

1 PC2> ping 192.168.1.100


2 84 bytes from 192.168.1.100 icmp_seq=1 ttl=62 time=34.043 ms
3 84 bytes from 192.168.1.100 icmp_seq=2 ttl=62 time=42.031 ms
4 84 bytes from 192.168.1.100 icmp_seq=3 ttl=62 time=31.992 ms
5 84 bytes from 192.168.1.100 icmp_seq=4 ttl=62 time=38.026 ms
6 84 bytes from 192.168.1.100 icmp_seq=5 ttl=62 time=38.034 ms
7
8 PC2>

Source

http://www.9tut.com/configure-static-route-gns3-lab
Lab 08: Syslog Server for Cisco Router in GNS3

Monitoring the status of a device is really helpful, especially in troubleshooting the devices.
Almost all the networking devices such as PCs, Servers, Switches, and Routers, have their own
method to provide log information about the usage of devices.
Administrators use these logs to find the solutions to troubleshoot the issues caused by these
devices.
However, collecting and monitoring logs on each and every device might be a difficult job on a
network that have 100 of devices. To overcome this problem, you can use Syslog Server to
collect all the logs in a central location and then you can use these logs for the troubleshooting
devices.

Physical Topology

We will use the following topology to configure logging in Cisco IOS using GNS3. Router R1 is
connected to the local system using a Loopback interface.
Prerequisites

Install a Loopback adapter on your local system.


Configure 192.168.10.100/24 IP address on the Loopback adapter.
Download Kiwi Syslog Server tool (free edition).

Kiwi Syslog Server

Install Kiwi Syslog Server tool on your local system.

Once the installation of Kiwi Syslog Server is finished , next, you need to define the IP
addresses from which you want to receive the logs. To do so, in the Kiwi Syslog Server
console, click File and select Setup.
In the settings options, select Inputs, type 192.168.10.1 in the IP address box, click Add, and
then click OK. The following figure shows the settings options for Kiwi Syslog Server.
Now, your Syslog Server is ready to receive the logs. However, you may also need to disable the
firewall.
Configure Syslog Server in Cisco IOS

Open the console of R1 and execute the following commands to configure IP address on R1.

1 R1(config)#interface fa0/0
2 R1(config)-if#ip add 192.168.1.1 255.255.255.0
3 R1(config-if)#no shutdown

Next, use the logging host <syslog server IP address> command to specify the syslog server
address.

R1(config)#logging host 192.168.10.100

Next, make a loopback interface and shut it down and again no shut.

1 R1(config)#int loopback 0
2 R1(config-if)#shut
3 R1(config-if)#no shut

Next, move on to Kiwi Syslog Server console, and examine the output.

Source
https://protechgurus.com/configure-syslog-server-cisco-router-gns3/
Lab 09: DHCP configuration in GNS3

Objective

A DHCP server is used to automatically provide IP addresses to clients. In this lab, you will configure
a Dynamic Host Configuration Protocol (DHCP) server and two clients.

Lab Topology

The topology diagram below represents the NetMap in the GNS3.

IP Addresses

The IP addresses and subnet masks used in this lab are shown in the table below:
Device Interface IP Address Subnet Mask

R1 fa0/0 192.168.1.1 255.255.255.0

Server e0 192.168.1.50 255.255.255.0

Task 1:

On R1, issue the following commands to configure the router to respond to DHCP requests and
to enable the DHCP server process:

1 R1#configure terminal
2 R1(config)#service dhcp

Task 2:

On R1, issue the following command to add a range of IP addresses from 192.168.1.1 to
192.168.1.99 to the exclude list for all DHCP pools, which will prevent the DHCP server from
allocating those IP addresses to a DHCP client:

R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.99

Task 3:

On R1, issue the following command to configure pool name of LANPOOL:

1 R1(config)#ip dhcp pool LANPOOL


2 R1(dhcp-config)#

Task 4:

On R1, issue the following command to configure LANPOOL to assign IP addresses to DHCP
clients:

R1(dhcp-config)#network 192.168.1.0 255.255.255.0

Task 5:

On R1, issue the following command to configure LANPOOL to lease each IP address for 2
days, which is equivalent to 48 hours:

The syntax of the lease command is lease {days [hours [minutes]], where days is an integer value
from 0 through 365, hours is an integer value from 0 through 23, and minutes is an integer value
from 0 through 59.

1 R1(dhcp-config)#lease ?
2 <0-365> Days
3 infinite Infinite lease
4
5 R1(dhcp-config)#lease 2
Task 6:

On R1, issue the following command to configure LANPOOL to use the IP address configured
on the FastEthernet 0/1 interface as the default gateway for DHCP clients from this pool:

R1(dhcp-config)#default-router 192.168.1.1

The default router is also known as the default gateway. A client directs a packet to its default
gateway if it does not have a direct route to the destination IP address in a packet’s header.

Task 7:

After you start the VPCS node you can connect to the console and issue the following
command:

1 PC1> dhcp
2 DORA IP 192.168.1.100/24 GW 192.168.1.1
3
4 PC1> show ip
5
6 NAME : PC1[1]
7 IP/MASK : 192.168.1.100/24
8 GATEWAY : 192.168.1.1
9 DNS :
10 DHCP SERVER : 192.168.1.1
11 DHCP LEASE : 172796, 172800/86400/151200
12 MAC : 00:50:79:66:68:00
13 LPORT : 10002
14 RHOST:PORT : 192.168.56.1:10003
15 MTU: : 1500
16
17 PC1>
Task 8:

On Server, issue the following command:

1 Server> ip 192.168.1.50/24 192.168.1.1


2 Checking for duplicate address...
3 PC1 : 192.168.1.50 255.255.255.0 gateway 192.168.1.1
4
5 Server> show ip
6
7 NAME : Server[1]
8 IP/MASK : 192.168.1.50/24
9 GATEWAY : 192.168.1.1
10 DNS :
11 MAC : 00:50:79:66:68:01
12 LPORT : 10005
13 RHOST:PORT : 192.168.56.1:10004
14 MTU: : 1500
15
16 Server>

Task 9:

Verify DHCP Server Functionality

1 R1#show dhcp lease


2 R1#show ip dhcp bi
3 R1#show ip dhcp binding
4 Bindings from all pools not associated with VRF:
5 IP address Client-ID/ Lease expiration Type
6 Hardware address/
7 User name
8 192.168.1.100 0100.5079.6668.00 Apr 16 2018 12:32 PM Automatic

Task 10:
On R1, issue the show ip dhcp server statistics command to examine a general summary of
each DHCP server’s operating statistics. The command output includes statistics about the
numbers of configured address pools, automatic and manual bindings, and types of DHCP
messages sent and received.

1 R1#show ip dhcp server statistics


2 Memory usage 31951
3 Address pools 1
4 Database agents 0
5 Automatic bindings 1
6 Manual bindings 0
7 Expired bindings 0
8 Malformed messages 0
9 Secure arp entries 0
10
11 Message Received
12 BOOTREQUEST 0
13 DHCPDISCOVER 3
14 DHCPREQUEST 2
15 DHCPDECLINE 0
16 DHCPRELEASE 0
17 DHCPINFORM 0
18
19 Message Sent
20 BOOTREPLY 0
21 DHCPOFFER 2
22 DHCPACK 2
23 DHCPNAK 0
24 R1#

Task 11:

On R1, issue the show ip dhcp pool command to verify the address ranges of the configured
DHCP pools and their respective number of leased addresses. The output includes the number
of currently leased addresses, the IP address range of the pool, and the value of the IP address
that will be offered to the next client.

1 R1#show ip dhcp pool


2
3 Pool LANPOOL :
4 Utilization mark (high/low) : 100 / 0
5 Subnet size (first/next) : 0 / 0
6 Total addresses : 254
7 Leased addresses : 1
8 Pending event : none
9 1 subnet is currently in the pool :
10 Current index IP address range Leased addresses
11 192.168.1.101 192.168.1.1 - 192.168.1.254 1
12 R1#
Lab 10: PPP Configuration

Objective

This tutorial includes :

Basic Configuration tasks on a router,


Configuring OSPF routing protocol,
Configuring PPP PAP and CHAP authentication.

Network diagram.

Task 1
configure the interfaces on R1

1 R1#enable
2 R1#configure terminal
3 R1(config)#interface s1/1
4 R1(config-if)#ip address 10.1.1.2 255.255.255.252
5 R1(config-if)#no shut
6 R1(config-if)#clock rate 64000
7 R1(config-if)#exit
8 R1(config)#interface s1/2
9 R1(config-if)#ip add 10.2.2.2 255.255.255.252
10 R1(config-if)#no shut
11 R1(config-if)#clock rate 64000
12 R1(config-if)#exit
13 R1(config)#interface loopback 0
14 R1(config-if)#ip address 209.165.200.225 255.255.255.248

Task 2

configure the interfaces on R2

1 R2#enable
2 R2#configure terminal
3 R2(config)#interface s1/0
4 R2(config-if)#ip add 10.1.1.1 255.255.255.252
5 R2(config-if)#no shut
6 R2(config-if)#exit
7 R2(config)#interface fastEthernet 0/0
8 R2(config-if)#ip address 192.168.10.1 255.255.255.0
9 R2(config-if)#no shut

Task 3

configure the interfaces on R3

1 R3#enable
2 R3#configure terminal
3 R3(config)#interface s1/0
4 R3(config-if)#ip address 10.2.2.1 255.255.255.252
5 R3(config-if)#no shut
6 R3(config-if)#exit
7 R3(config)#interface fastEthernet 0/0
8 R3(config-if)#ip address 192.168.30.1 255.255.255.0
9 R3(config-if)#no shut

Task 4

Now that all devices are connected we can start by configuring OSPF (so that each router
knows about each other network). (On the R1 we are going to use the process ID of 1)

1 R1(config)#router ospf 1
2 R1(config-router)#network 10.1.1.0 0.0.0.3 area 0
3 R1(config-router)#network 10.2.2.0 0.0.0.3 area 0
4 R1(config-router)#network 209.165.200.224 0.0.0.31 area 0

Task 5

Next we will move to R2 and configure OSPF the output is:

1 R2(config)#router ospf 1
2 R2(config-router)#network 192.168.10.0 0.0.0.255 area 0
3 R2(config-router)#network 10.1.1.0 0.0.0.3 area 0

Task 6

The last router (R3) is ready to be configured with OSPF (Again remember to use the process ID
of 1)

1 R3(config)#router ospf 1
2 R3(config-router)#network 10.2.2.0 0.0.0.3 area 0
3 R3(config-router)#network 192.168.30.0 0.0.0.255 area 0
Task 7

With OSPF setup you want to verify that you have full network connectivity (Every device should
be able to ping each other) This is R1’s output of the command show ip route.

1 R1#show ip route
2 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
3 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
4 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
5 E1 - OSPF external type 1, E2 - OSPF external type 2
6 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
7 ia - IS-IS inter area, * - candidate default, U - per-user static route
8 o - ODR, P - periodic downloaded static route
9
10 Gateway of last resort is not set
11
12 O 192.168.30.0/24 [110/65] via 10.2.2.1, 00:00:31, Serial1/2
13 O 192.168.10.0/24 [110/65] via 10.1.1.1, 00:00:31, Serial1/1
14 209.165.200.0/29 is subnetted, 1 subnets
15 C 209.165.200.224 is directly connected, Loopback0
16 10.0.0.0/30 is subnetted, 2 subnets
17 C 10.2.2.0 is directly connected, Serial1/2
18 C 10.1.1.0 is directly connected, Serial1/1
19 R1#

Task 8

This output of R2 when issuing the command show ip route also R2.

1 R2#show ip route
2 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
3 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
4 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
5 E1 - OSPF external type 1, E2 - OSPF external type 2
6 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
7 ia - IS-IS inter area, * - candidate default, U - per-user static route
8 o - ODR, P - periodic downloaded static route
9
10 Gateway of last resort is not set
11
12 O 192.168.30.0/24 [110/129] via 10.1.1.2, 00:01:08, Serial1/0
13 C 192.168.10.0/24 is directly connected, FastEthernet0/0
14 209.165.200.0/32 is subnetted, 1 subnets
15 O 209.165.200.225 [110/65] via 10.1.1.2, 00:01:08, Serial1/0
16 10.0.0.0/30 is subnetted, 2 subnets
17 O 10.2.2.0 [110/128] via 10.1.1.2, 00:01:08, Serial1/0
18 C 10.1.1.0 is directly connected, Serial1/0
19 R2#

Task 9

This output of R3 when issuing the command show ip route also R3.

1 R3#show ip route
2 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
3 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
4 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
5 E1 - OSPF external type 1, E2 - OSPF external type 2
6 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
7 ia - IS-IS inter area, * - candidate default, U - per-user static route
8 o - ODR, P - periodic downloaded static route
9
10 Gateway of last resort is not set
11
12 C 192.168.30.0/24 is directly connected, FastEthernet0/0
13 O 192.168.10.0/24 [110/129] via 10.2.2.2, 00:01:33, Serial1/0
14 209.165.200.0/32 is subnetted, 1 subnets
15 O 209.165.200.225 [110/65] via 10.2.2.2, 00:01:33, Serial1/0
16 10.0.0.0/30 is subnetted, 2 subnets
17 C 10.2.2.0 is directly connected, Serial1/0
18 O 10.1.1.0 [110/128] via 10.2.2.2, 00:01:33, Serial1/0
19 R3#

Task 10

Type the command show interface serial1/1 in R1 notice in the output the encapsulation type,
which is HDLC.

1 R1#show interface serial1/1


2 Serial1/1 is up, line protocol is up
3 Hardware is M4T
4 Internet address is 10.1.1.2/30
5 MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,
6 reliability 255/255, txload 1/255, rxload 1/255
7 Encapsulation HDLC, crc 16, loopback not set
8 Keepalive set (10 sec)
9 ...........

This is the default encapsulation on serial interfaces with Cisco Routers.


To change the encapsulation from HDLC to PPP on R1, go to the interface of the serial
connection and type encapsulation ppp.

1 R1(config)#interface serial 1/1


2 R1(config-if)#encapsulation ppp

Notice how OSPF is going down because of the different encapsulation. R2 is still running
HDLC, therefore, the link is down.

1 R1(config-if)#
2 *Mar 1 00:22:40.431: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.1 on Serial1/1
3 R1(config-if)#
4 *Mar 1 00:22:43.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/

Change R2 to the proper encapsulation type so communication between the routers are again
connected and to get OSPF working again.

1 R2(config)#interface serial1/0
2 R2(config-if)#encapsulation ppp

This example on R2 notice that once the encapsulation was changed to PPP the link went back
up and OSPF found an adjacent neighbor.

1 R2(config-if)#
2 *Mar 1 00:24:43.471: %OSPF-5-ADJCHG: Process 1, Nbr 209.165.200.225 on Serial
3 R2(config-if)#
4 *Mar 1 00:24:46.087: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/
5 R2(config-if)#

Task 11

Now we can also give the encapsulation protocol (PPP) some authentication.
To set up PAP the username and password must match the other router. So for this example,
R1’s username is R1 and the password is knowing.

1 R1(config)#username R2 password knowing


2 R1(config)#interface Serial1/1
3 R1(config-if)#ppp authentication pap

And for R2, we have :

1 R2(config)#username R1 password knowing


2 R2(config)#interface Serial1/0
3 R2(config-if)#ppp authentication pap

Task 12

Check the connectivity of 2 PCs.

1 PC-1> ping 192.168.30.10


2 84 bytes from 192.168.30.10 icmp_seq=1 ttl=61 time=52.507 ms
3 84 bytes from 192.168.30.10 icmp_seq=2 ttl=61 time=36.504 ms
4 84 bytes from 192.168.30.10 icmp_seq=3 ttl=61 time=38.005 ms
5 84 bytes from 192.168.30.10 icmp_seq=4 ttl=61 time=39.005 ms
6 84 bytes from 192.168.30.10 icmp_seq=5 ttl=61 time=52.507 ms
7
8 PC-1>
Lab 11: Configuring Switch Security Features

Topology

Objectives

Configure and Verify SSH Access on ESW1


Configure SSH access
Modify SSH parameters
Verify the SSH configuration
Configure and Verify Security Features on ESW1
Configure and verify general security features
Configure and verify port security

Task 1

Configure an IP address on PC-1

1 PC-1> ip 172.16.99.100 255.255.255.0 172.16.99.1


2 Checking for duplicate address...
3 PC1 : 172.16.99.100 255.255.255.0 gateway 172.16.99.1
4
5 PC-1> show ip
6
7 NAME : PC-1[1]
8 IP/MASK : 172.16.99.100/24
9 GATEWAY : 172.16.99.1
10 DNS :
11 MAC : 00:50:79:66:68:00
12 LPORT : 10001
13 RHOST:PORT : 127.0.0.1:10002
14 MTU: : 1500
15
16 PC-1>

Task 2

Configure interface IP address as shown in the topology.


Assign class as the privileged EXEC mode password.
Assign cisco as the console and vty password and enable login.
Encrypt plain text passwords.
Save the running configuration to startup configuration.

1 R1#configure terminal
2 R1(config)#interface fastEthernet 0/0
3 R1(config-if)#ip address 172.16.99.1 255.255.255.0
4 R1(config-if)#no shut
5 R1(config-if)#exit
6 R1(config)#enable secret class
7 R1(config)#line vty 0 4
8 R1(config-line)#password cisco
9 R1(config-line)#login
10 R1(config-line)#exit
11 R1(config)#line console 0
12 R1(config-line)#password cisco
13 R1(config-line)#login
14 R1(config-line)#exit
15 R1(config)#service password-encryption
16 R1(config)#exit
17 R1#write memory
18 Building configuration...
19 [OK]
20 R1#

Task 3

Configure SSH access on ESW1.


Enable SSH on ESW1. Create a domain name of KELASPAR.
Create a local user database entry for use when connecting to the switch via SSH. The user
should have administrative level access.
Configure the transport input for the vty lines to allow SSH connections only.
Generate an RSA crypto key using a modulus of 1024 bits.

1 ESW1#configure terminal
2 ESW1(config)#hostname SWLAN
3 SWLAN(config)#ip domain-name KELASPAR
4 SWLAN(config)#username yaser privilege 15 secret rahmati
5 SWLAN(config)#line vty 0 15
6 SWLAN(config-line)#transport input ssh
7 SWLAN(config-line)#login local
8 SWLAN(config-line)#exit
9 SWLAN(config)#crypto key generate rsa
10 The name for the keys will be: SWLAN.KELASPAR
11 Choose the size of the key modulus in the range of 360 to 2048 for your
12 General Purpose Keys. Choosing a key modulus greater than 512 may take
13 a few minutes.
14
15 How many bits in the modulus [512]: 1024
16 % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
17
18 SWLAN(config)#
19 *Mar 1 00:02:08.147: %SSH-5-ENABLED: SSH 1.99 has been enabled
20 SWLAN(config)#

Task 4

Verify the SSH configuration and answer the questions below.

1 SWLAN#show ip ssh
2 SSH Enabled - version 1.99
3 Authentication timeout: 120 secs; Authentication retries: 3

Question 1: What version of SSH is the switch using?

1.99

Question 2: How many authentication attempts does SSH allow?


3

Task 5

Create VLAN 99 on the switch and name it Management.

1 SWLAN#configure terminal
2 SWLAN(config)#vlan 99
3 SWLAN(config-vlan)#name management
4 SWLAN(config-vlan)#exit
5 SWLAN(config)#

Task 6

Configure the VLAN 99 management interface IP address and enable the interface.

1 SWLAN(config)#interface vlan 99
2 SWLAN(config-if)#ip address 172.16.99.11 255.255.255.0
3 SWLAN(config-if)#no shutdown
4 SWLAN(config-if)#end
5 SWLAN#

Task 7

Issue the show vlan command on ESW1.

1 SWLAN#vlan database
2 % Warning: It is recommended to configure VLAN from config mode,
3 as VLAN database mode is being deprecated. Please consult user
4 documentation for configuring VTP/VLAN in config mode.
5
6 SWLAN(vlan)#show
7 VLAN ISL Id: 1
8 Name: default
9 Media Type: Ethernet
10 VLAN 802.10 Id: 100001
11 State: Operational
12 MTU: 1500
13 Translational Bridged VLAN: 1002
14 Translational Bridged VLAN: 1003
15
16 VLAN ISL Id: 99
17 Name: management
18 Media Type: Ethernet
19 VLAN 802.10 Id: 100099
20 State: Operational
21 MTU: 1500
22
23 VLAN ISL Id: 1002
24 Name: fddi-default
25 Media Type: FDDI
26 VLAN 802.10 Id: 101002
27 State: Operational
28 MTU: 1500
29 Bridge Type: SRB
30 Translational Bridged VLAN: 1
31 Translational Bridged VLAN: 1003
32
33 VLAN ISL Id: 1003
34 Name: token-ring-default
35 Media Type: Token Ring
36 VLAN 802.10 Id: 101003
37 State: Operational
38 MTU: 1500
39 Bridge Type: SRB
40 Ring Number: 0
41 Bridge Number: 1
42 Parent VLAN: 1005
43 Maximum ARE Hop Count: 7
44 Maximum STE Hop Count: 7
45 Backup CRF Mode: Disabled
46 Translational Bridged VLAN: 1
47 Translational Bridged VLAN: 1002
48
49 VLAN ISL Id: 1004
50 Name: fddinet-default
51 Media Type: FDDI Net
52 VLAN 802.10 Id: 101004
53 State: Operational
54 MTU: 1500
55 Bridge Type: SRB
56 Bridge Number: 1
57 STP Type: IBM
58
59 VLAN ISL Id: 1005
60 Name: trnet-default
61 Media Type: Token Ring Net
62 VLAN 802.10 Id: 101005
63 State: Operational
64 MTU: 1500
65 Bridge Type: SRB
66 Bridge Number: 1
67 STP Type: IBM
68
69 SWLAN(vlan)#

Task 8

Issue the show ip interface brief command on ESW1.


Question 1: What is the status and protocol for management interface VLAN 99?

Status is up, and protocol is down.

1 SWLAN#show ip interface brief


2 Interface IP-Address OK? Method Status Pro
3 FastEthernet0/0 unassigned YES NVRAM administratively down dow
4 FastEthernet0/1 unassigned YES NVRAM administratively down dow
5 FastEthernet1/0 unassigned YES unset up dow
6 FastEthernet1/1 unassigned YES unset up dow
7 FastEthernet1/2 unassigned YES unset up dow
8 FastEthernet1/3 unassigned YES unset up dow
9 FastEthernet1/4 unassigned YES unset up dow
10 FastEthernet1/5 unassigned YES unset up dow
11 FastEthernet1/6 unassigned YES unset up dow
12 FastEthernet1/7 unassigned YES unset up dow
13 FastEthernet1/8 unassigned YES unset up dow
14 FastEthernet1/9 unassigned YES unset up dow
15 FastEthernet1/10 unassigned YES unset up dow
16 FastEthernet1/11 unassigned YES unset up dow
17 FastEthernet1/12 unassigned YES unset up dow
18 FastEthernet1/13 unassigned YES unset up dow
19 FastEthernet1/14 unassigned YES unset up dow
20 FastEthernet1/15 unassigned YES unset up dow
21 Vlan1 unassigned YES NVRAM administratively down dow
22 Vlan99 172.16.99.11 YES manual up dow

Question 2: Why is the protocol down, even though you issued the no shutdown command for
interface VLAN 99?

No physical ports on the switch have been assigned to VLAN 99.


Task 9

Assign ports F0/0 and F0/1 to VLAN 99 on the switch.

1 SWLAN#(config)# interface f0/0


2 SWLAN#(config-if)# switchport mode access
3 SWLAN#(config-if)# switchport access vlan 99
4 SWLAN#(config-if)# interface f0/1
5 SWLAN#(config-if)# switchport mode access
6 SWLAN#(config-if)# switchport access vlan 99
7 SWLAN#(config-if)# end
Lab 12: Configuring VLANs and Trunking

Topology

Objectives

Part 1: Build the Network and Configure Basic Device Settings


Part 2: Create VLANs and Assign Switch Ports
Part 3: Maintain VLAN Port Assignments and the VLAN Database
Part 4: Configure an 802.1Q Trunk between the Switches
Part 5: Delete the VLAN Database

You might also like