Sei sulla pagina 1di 83

AlBalq'a Applied University

Computer Engineering Department

Computer Network Lab


Lab Manual
Prepared by: Eng. Sireen Hiary
List of Laboratory Experiments:

 Lab 1: Cabling

 Lab 2: PC Network TCP/IP Configuration

 Lab 3: IPV4 Address Subnetting

 Lab 4: Packet Tracer

 Lab 5: P.T: Working with the Application


Layer: DHCP, DNS, and HTTP

 Lab 6: Basic Switch Configuration

 Lab 7: Basic VLAN Configuration

 Lab 8: Basic Router Configurations

 Lab 9: Configuring Static Routes

 Lab 10: Configuring Dynamic Routes


Lab. 1: Cabling
Part A: Pre-lab

Objectives

To become familiar with the different types of cables used in the lab.

Components

RJ-45 connector, Crimping Tool, Twisted pair Cable.

Part 1: Cabling

Choosing the cables necessary to make a successful LAN or WAN connection requires
consideration of the different media types. There are many different Physical layer
implementations that support multiple media types.

UTP cabling connections are specified by the Electronics Industry


Alliance/Telecommunications Industry Association (EIA/TIA).

The RJ-45 connector is the male component crimped on the end of the cable. When viewed
from the front, the pins are numbered from 8 to 1. When viewed from above with the
opening gate facing you, the pins are numbered 1 through 8, from left to right. This
orientation is important to remember when identifying a cable.

Types of Interfaces
Typically, when connecting different types of devices, use a straight-through cable and
when connecting the same type of device, use a crossover cable.
Straight-through UTP Cables

A straight-through cable has connectors on each end that are terminated the same in
1
accordance with either the T568A or T568B standards.

Identifying the cable standard used allows you to determine if you have the right cable for
the job. More importantly, it is a common practice to use the same color codes throughout
the LAN for consistency in documentation.

Use straight-through cables for the following connections:


• Switch to a router Ethernet port
• Computer to switch
• Computer to hub

Crossover UTP Cables

For two devices to communicate through a cable that is directly connected between the
two, the transmit terminal of one device needs to be connected to the receive terminal of
the other device.

The cable must be terminated so the transmit pin, Tx, taking the signal from device A at
one end, is wired to the receive pin, Rx, on device B. Similarly, device B's Tx pin must be
connected to device A's Rx pin. If the Tx pin on a device is numbered 1, and the Rx pin is
numbered 2, the cable connects pin 1 at one end with pin 2 at the other end. These "crossed
over" pin connections give this type of cable its name, crossover.

To achieve this type of connection with a UTP cable, one end must be terminated as
EIA/TIA T568A pinout, and the other end terminated with T568B pinout.

To summarize, crossover cables directly connect the following devices on a LAN:


• Switch to switch,
• Switch to hub
• Hub to hub

2
• Router to router Ethernet port connection
• Computer to computer
• Computer to a router Ethernet port

Rollover UTP Cables


In a rolled cable, the colored wires at one end of the cable are in the reverse sequence of
the colored wires at the other end of the cable.

Pre Lab Question


 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

Question 1: What are the layers in OSI Reference Models? Describe each layer
briefly.
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
Question 2: What are the responsibilities of Data Link Layer?
_________________________________________________________________________
_________________________________________________________________________
Question 3: What are the responsibilities of Network Layer?
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
Part B: Procedure:
How to prepare a UTP cable

 Instructions to prepare a Crossover cable 3


You will need:
• RJ-45 Crimping Tool
• Cat-5e Cable
• RJ-45 Connecters
Step 1

Prepare your workspace. Take the roll of UTP cable and cut the cable to length using the
cutting blade on the crimping tool.

Step 2

Splice the end by using the splicing blades to expose the unshielded twisted pairs.
Step 3

Take each twisted pair and make four wire strands, each going out from the center of the
wire.
Step 4

4
Now take the individual twisted wire pairs and untwist them down to individual wires in
the following order: Striped Orange, Orange, Striped Green, Blue, Striped Blue, Green,
Striped Brown, and Brown.

Step 5

Next, grasp the wires with your thumb and index finger of your non-
dominant hand. Take each wire and snug them securely side by side.

Step 6

Using the cutting blade of the crimping tool, cut the ends off of the
wires to make each wire the same height.

Step 7

Still grasping the wires, insert the RJ-45 jack on the wires with the clip
facing away from you.

Step 8

5
Insert the jack into the crimper and press down tightly on the tool to seal
the wires in place.

Step 9

Once the first head is made, repeat steps two through eight. When
untwisting the wires down to sing strands, use the following order:
Striped Green, Green, Striped Orange, Blue, Striped Blue, Orange,
Striped Brown, Brown.

Step 10

Plug in the cable to test connectivity.

Assignment
Problem 1: Draw the wire-map for a “cross over Cat5e UTP cable:

Problem 2: List two of UTP cabling disadvantages reduced by fiber cabling

_________________________________________________________________________
_________________________________________________________________________

Problem 3: Describe the difference between DTE and DCE Devices:

_________________________________________________________________________
_________________________________________________________________________

6
Appendix

1. Repeater: Functioning at Physical Layer. A repeater is an electronic device


that receives a signal and retransmits it at a higher level and/or higher power, or onto
the other side of an obstruction, so that the signal can cover longer distances. Repeater
have two ports, so cannot be use to connect for more than two devices
2. Hub: An Ethernet hub, active hub, network hub, repeater hub, hub or
concentrator is a device for connecting multiple twisted pair or fiber optic Ethernet
devices together and making them act as a single network segment. Hubs work at the
physical layer (layer 1) of the OSI model. The device is a form of multiport repeater.
Repeater hubs also participate in collision detection, forwarding a jam signal to all ports
if it detects a collision.
3. Switch: A network switch or switching hub is a computer networking device
that connects network segments. The term commonly refers to a network bridge that
processes and routes data at the data link layer (layer 2) of the OSI model. Switches that
additionally process data at the network layer (layer 3 and above) are often referred to as
Layer 3 switches or multilayer switches.
4. Bridge: A network bridge connects multiple network segments at the data
link layer (Layer 2) of the OSI model. In Ethernet networks, the term bridge formally
means a device that behaves according to the IEEE 802.1D standard. A bridge and
switch are very much alike; a switch being a bridge with numerous ports. Switch or
Layer 2 switch is often used interchangeably with bridge. Bridges can analyze incoming
data packets to determine if the bridge is able to send the given packet to another
segment of the network.
5. Router: A router is an electronic device that interconnects two or more
computer networks, and selectively interchanges packets of data between them. Each
data packet contains address information that a router can use to determine if the source
and destination are on the same network, or if the data packet must be transferred from
one network to another. Where multiple routers are used in a large collection of
interconnected networks, the routers exchange information about target system
addresses, so that each router can build up a table showing the preferred paths between
any two systems on the interconnected networks.
6. Gate Way: In a communications network, a network node equipped for
interfacing with another network that uses different protocols.
 A gateway may contain devices such as protocol translators, impedance matching
devices, rate converters, fault isolators, or signal translators as necessary to provide
system interoperability. It also requires the establishment of mutually acceptable
administrative procedures between both networks.
 A protocol translation/mapping gateway interconnects networks with different network
protocol technologies by performing the required protocol conversions.

7
Lab. 2: PC Network TCP/IP Configuration
Part A: Pre-lab

Objective

 The purpose of this experiment is to gather network information (IP address,


MAC address…etc).
 learn to use the TCP/IP Packet Internet Groper (ping) command. and learn to use the
Traceroute command from the workstation. You will also be able to observe
name resolution occurrences using DNS servers.
Introduction:
An IP address is a unique network layer numbering system that end systems use in order
to identify and communicate with each other. It is a dotted decimal notation with four
numbers ranging from 0 to 255 separated by periods. The numbers currently used in IP
addresses range from 1.0.0.0 to 255. 255. 255. 255, though some of these values are
reserved for specific purposes. The decimals represent Octets of the bits in the binary
representation of the IP addresses. For example, 255 is equal to28 and represents 11111111.

This does not provide enough possibilities for every Internet device to have its own
permanent number. Subnet routing is one of the methods currently in practice to allow LANs to
use the same IP address as other networks elsewhere, though both are connected to the
Internet.

A Subnet (short for subnetwork) is a division of the network that is identified by a subnet
mask. A subnet mask is an IP address that is used to tell how many bits in an Octet(s)
identify the subnet and how many bits provide room for host addresses. For example, the
Subnet Mask 255. 255. 255.0 tells that the first 24 bits represent the subnet, while the rest
8 bits identify the hosts in the subnet.

A default gateway is a node on a computer network that serves as an access device to


another network. The default gateway address is usually (and applies to this lab) an interface
belonging to the LAN’s border router.

This lab is a non-destructive lab and can be done on any machine without concern of
changing the system configuration. It should be performed in a classroom (or other LAN
environment) that connects to the Internet so that the computer that you use has an IP
address.

8
Packet Internet Groper (ping) command is used to provide a basic test of whether a
particular host is operating properly and is reachable on the network from the testing host.
It provides estimates of round trip time and packet loss rate between hosts.
The traceroute (tracert) traces all the routers that a network layer packet has to pass
through to get to a destination.
Pre Lab Question
 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.
1. What do you mean by NIC?
_______________________________________________________________
___________________________________________________________
2. What are MAC addresses?
______________________________________________________________
______________________________________________________________
3. What are IP addresses?
_____________________________________________________________
_____________________________________________________________
4. What are gateways?
_____________________________________________________________
____________________________________________________________

Part B: Procedure:
A workstation connected to the internet is required.
Experiment
1. Verify the connectivity of your workstation to the internet.
2. Open the Command Prompt of the operating system using either of the
following methods:
 Click on Start > All Programs > Accessories > Command Prompt or
 Click on Start > Run, enter cmd (short for command)
and click on ok. A Command Prompt screen should open.
3. Gather TCP/IP configuration information:
Type ipconfig (short for IP configuration) and press Enter.
The screen will show the IP address, subnet mask, and default gateway for your computer’s
connection.
Notice the values in the Command Prompt. The IP address and the default gateway
should be in the same network or subnet, otherwise this host would not be able to
communicate outside the network. In Fig. 3, the subnet mask tells us that the first three
octets of the IP address and the default gateway must be the same in order to be in the
same network.

9
4. Check more detailed TCP/IP configuration information:
Type ipconfig /all and press Enter. What are the DNS and DHCP server addresses? What
are their functions? What is the MAC of the network interface card?
5. Ping the IP address of another computer. Note that for the ping and tracert commands to
work the PC firewalls have to be disabled. Why do you think this is so?
Ask the IP address of the workstation that is being used by another group of students.
Then type ping, space, and the IP address that you received, then press Enter. Notice the
outputs.

6. Ping the IP address of the gateway router from the details that have been observed in the
output of step 4 above. If the ping is successful, it means that there is a physical
connectivity to the router on the local network and probably the rest of the world.
7. Ping the Loopback IP address of your computer. Type the following command: ping
127.0.0.1.
The IP address 127.0.0.1 is reserved for loopback testing. If the ping is
successful, then TCP/IP is properly installed and functioning on this
computer.
8. You can also ping using names like websites. Ping the IP address of the cisco website.
Type ping, space and www.cisco.com, then press Enter. Notice the outputs. A DNS server will
resolve the name to an IP address and the ping will be successful only in the existence of
the DNS server.
9. Ping www.zuj.edu.jo and observe the results. Is there a difference in time
between the results shown by pinging www.cisco.com and www.zuj.edu.jo If so
why and if not why?
10. Trace the route to the Cisco website. Type tracert www.cisco.com and press enter. In a
successful output, you will see listings of all routers the tracert requests had to pass 10
through to get to the destination.

11. Type tracert www.zuj.edu.jo and press enter. The output should take less time than that of
step 9.

Assignment:
What is the difference between ipconfig and ipconfig /all?
______________________________________________________
______________________________________________________
______________________________________________________
__
Write the steps how to connect two PCs with each other by using
packet tracer
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________
Apply these steps by using the packet tracer:
______________________________________________________
______________________________________________________
______________________________________________________
__
What are the advantages of connecting two PCs?
______________________________________________________
______________________________________________________
______________________________________________________
__

Lab.3: Calculating IPv4 Subnets

Part A: Pre-lab
11
Obje ctives
Part 1: Determine IPv4 Address Subnetting
Part 2: Calculate IPv4 Address Subnetting

Int roducti on
The ability to work with IPv4 subnets and determine network and host
information based on a given IP address and subnet mask is critical to
understanding how IPv4 networks operate. The first part is designed to
reinforce how to compute network IP address information from a given IP
address and subnet mask. When given an IP address and subnet mask, you will
be able to determine other information about the subnet.

Pre Lab Question

 Read thoroughly and prepare the experiment sheet.


 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.
1. What is the minimum and maximum length of the header in the TCP segment
and IP datagram?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
______________________
2. How can you identify the IP class of a given IP address?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
3. What is the range of addresses in the classes of internet addresses?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
4. What is a private IP address?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
Part B: Procedure:
Part 1: Cal c ul at e I P v 4 A d d r e s s S ub ne t t i ng
When given an IPv4 address, the original subnet mask and the new
subnet mask, you will be able to determine:

Network address of this subnet Broadcast address of this subnet Range of host addresses
of this subnet Number of subnets created
Number of hosts per subnet

The following example shows a sample problem along with the solution for solving this
problem:

Given:
12
Host IP Address: 172.16.77.120
Original Subnet Mask 255.255.0.0
New Subnet Mask: 255.255.240.0

Find:

Number of Subnet Bits 4


Number of Subnets Created 16
Number of Host Bits per Subnet 12
Number of Hosts per Subnet 4,094
Network Address of this Subnet 172.16.64.0
IPv4 Address of First Host on this Subnet 172.16.64.1
IPv4 Address of Last Host on this Subnet 172.16.79.254
IPv4 Broadcast Address on this Subnet 172.16.79.255
Lets analyze how this table was completed.

The original subnet mask was 255.255.0.0 or /16. The new subnet mask is
255.255.240.0 or /20. The resulting difference is 4 bits. Because 4 bits were
borrowed, we can determine that 16 subnets were created because 24 = 16.

The new mask of 255.255.240.0 or /20 leaves 12 bits for hosts. With 12
bits left for hosts, we use the following formula: 212 = 4,096 2 = 4,094
hosts per subnet.

Binary ANDing will help you determine the subnet for this problem, which results in the
network 172.16.64.0.
Finally, you need to determine the first host, last host, and broadcast address for each
subnet. One method to determine the host range is to use binary math for the host portion
of the address. In our example, the last 12 bits of the address is the host portion. The first
host would have all significant bits set to zero and the least significant bit set to 1. The last
host would have all significant bits set to 1 and the least significant bit set to 0. In this
example, the host portion of the address resides in the 3rd and 4th octets.

Description 1st Octet 2nd Octet 3rd Octet 4th Octet Description

Network/Host nnnn nnnn nnnn nnnn nnnnhhhh hhhhhhhh Subnet Mask

Binary 10101100 00010000 01000000 00000001 First Host

Decimal 172 16 64 1 First Host

Binary 10101100 00010000 01001111 11111110 Last Host

Decimal 172 16 79 254 Last Host

Binary 10101100 00010000 01001111 11111111 Broadcast


13
Decimal 172 16 79 255 Broadcast

Step 1: Fill out the tables below with appropriate answers given the IPv4 address,
original
subnet m a s k, a nd n e w subnet ma s k.
a. Problem 1:

Given:

Host IP Address: 192.168.200.139


Original Subnet Mask 255.255.255.0
New Subnet Mask: 255.255.255.224

Find:

Number of Subnet Bits


Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet

b. Problem 2:

Given:
Host IP Address: 10.101.99.228
Original Subnet Mask 255.0.0.0
New Subnet Mask: 255.255.128.0

Find:

Number of Subnet Bits


Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet 14
IPv4 Broadcast Address on this Subnet
c. Problem 3:

Given:

Host IP Address: 172.22.32.12


Original Subnet Mask 255.255.0.0
New Subnet Mask: 255.255.224.0

Find:

Number of Subnet Bits


Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet

d. Problem 4:

Given:

Host IP Address: 192.168.1.245


Original Subnet Mask 255.255.255.0
New Subnet Mask: 255.255.255.252

Find:

Number of Subnet Bits


Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet
e. Problem 5:
15
Given:

Host IP Address: 128.107.0.55


Original Subnet Mask 255.255.0.0
New Subnet Mask: 255.255.255.0

Find:

Number of Subnet Bits


Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet

Assignment
Given:

Host IP Address: 192.135.250.180


Original Subnet Mask 255.255.255.0
New Subnet Mask: 255.255.255.248

Find:
Number of Subnet Bits
Number of Subnets Created
Number of Host Bits per Subnet
Number of Hosts per Subnet
Network Address of this Subnet
IPv4 Address of First Host on this Subnet
IPv4 Address of Last Host on this Subnet
IPv4 Broadcast Address on this Subnet

16
Lab. 4 Packet Tracer
Part A: Pre-lab

Objectives

1. To become familiar with the switches and routers used in the lab.
2. To become familiar with the network simulator Packet Tracer.
3. To use the packet tracer to simulate a simple network.

Introduction:

Part 1: Router & Switch

Routers are computers and include many of the same hardware and software components
found in a typical PC, such as CPU, RAM, ROM, and an operating system.

The main purpose of a router is to connect multiple networks and forward packets from
one network to the next. This means that a router typically has multiple interfaces. Each
interface is a member or host on a different IP network.

The router has a routing table, which is a list of networks known by the router. The routing
table includes network addresses for its own interfaces, which are the directly connected
networks, as well as network addresses for remote networks. A remote network is a
network that can only be reached by forwarding the packet to another router.

Remote networks are added to the routing table in two ways: either by the network
administrator manually configuring static routes or by implementing a dynamic routing
protocol. Static routes do not have as much overhead as dynamic routing protocols;
however, static routes can require more maintenance if the topology is constantly changing or
is unstable.

Dynamic routing protocols automatically adjust to changes without any intervention from
the network administrator. Dynamic routing protocols require more CPU processing and also
use a certain amount of link capacity for routing updates and messages. In many cases, a
routing table will contain both static and dynamic routes.

Routers make their primary forwarding decision at Layer 3, the Network layer. However,
router interfaces participate in Layers 1, 2, and 3. Layer 3 IP packets are encapsulated into a
Layer 2 data link frame and encoded into bits at Layer 1. Router interfaces participate in

17
Layer 2 processes associated with their encapsulation. For example, an Ethernet interface on
a router participates in the ARP process like other hosts on that LAN.

Router Components and their Functions

Like a PC, a router also includes:

 Central Processing Unit (CPU)


 Random-Access Memory (RAM)
 Read only memory (ROM) CPU

The CPU executes operating system instructions, such as system initialization, routing
functions, and switching functions.

RAM

RAM stores the instructions and data needed to be executed by the CPU. RAM is used to
store these components:

 Operating System: The Cisco IOS (Internetwork Operating System) is copied into RAM during
bootup.

 Running Configuration File: This is the configuration file that stores the configuration
commands that the router IOS is currently using. With few exceptions, all commands
configured on the router are stored in the running configuration file, known as running-
config.

 IP Routing Table: This file stores information about directly connected and remote
networks. It is used to determine the best path to forward the packet.

 ARP Cache: This cache contains the IPv4 address to MAC address mappings, similar to the
ARP cache on a PC. The ARP cache is used on routers that have LAN interfaces such as
Ethernet interfaces.

 Packet Buffer: Packets are temporarily stored in a buffer when received on an interface or
before they exit an interface.
RAM is volatile memory and loses its content when the router is powered down or
restarted. However, the router also contains permanent storage areas, such as ROM,
flash and NVRAM.

ROM is a form of permanent storage. Cisco devices use ROM to store:

 The bootstrap instructions


 Basic diagnostic software

 Scaled-down version of IOS

ROM uses firmware, which is software that is embedded inside the integrated circuit.
18
Firmware includes the software that does not normally need to be modified or upgraded,
such as the bootup instructions. Many of these features, including ROM monitor software,
will be discussed in a later course. ROM does not lose its contents when the router loses
power or is restarted.

Flash memory is nonvolatile computer memory that can be electrically stored and erased.
Flash is used as permanent storage for the operating system, Cisco IOS. In most models of
Cisco routers, the IOS is permanently stored in flash memory and copied into RAM during
the bootup process, where it is then executed by the CPU. Some older models of Cisco
routers run the IOS directly from flash. Flash consists of SIMMs or PCMCIA cards, which can
be upgraded to increase the amount of flash memory.

Flash memory does not lose its contents when the router loses power or is restarted. NVRAM

NVRAM (Nonvolatile RAM) does not lose its information when power is turned off. This is
in contrast to the most common forms of RAM, such as DRAM, that requires continual
power to maintain its information. NVRAM is used by the Cisco IOS as permanent storage
for the startup configuration file (startup-config). All configuration changes are stored in
the running-config file in RAM, and with few exceptions, are implemented immediately by
the IOS. To save those changes in case the router is restarted or loses power, the running-
config must be copied to NVRAM, where it is stored as the startup-config file. NVRAM
retains its contents even when the router reloads or is powered off.
ROM, RAM, NVRAM, and flash are discussed in the following section which introduces the
IOS and the bootup process. They are also discussed in more detail in a later course relative
to managing the IOS.

It is more important for a networking professional to understand the function of the main
internal components of a router than the exact location of those components inside a
specific router. The internal physical architecture will differ from model to model.

Router Interfaces

Management ports
Routers have physical connectors that are used to manage the router. These connectors are
known as management ports. Unlike Ethernet and serial interfaces, management ports are not
used for packet forwarding. The most common management port is the console port. The
console port is used to connect a terminal, or most often a PC running terminal emulator

19
software, to configure the router without the need for network access to that router. The
console port must be used during initial configuration of the router.

Another management port is the auxiliary port. Not all routers have auxiliary ports. At
times the auxiliary port can be used in ways similar to a console port. It can also be used
to attach a modem.
1. Network Interfaces
The term interface refers to a physical connector on the router whose main purpose is to
receive and forward packets. Routers have multiple interfaces that are used to connect to
multiple networks. Typically, the interfaces connect to various types of networks, which
means that different types of media and connectors are required. Often a router will need
to have different types of interfaces. For example, a router usually has FastEthernet interfaces
for connections to different LANs and various types of WAN interfaces to connect a variety
of serial links including T1, DSL and ISDN.

Like interfaces on a PC, the ports and interfaces on a router are located on the outside
of the router.

Their external location allows for convenient attachment to the appropriate network
cables and connectors.
Pre Lab Question
 Read thoroughly and prepare the experiment sheet.
 Review the sections in Lab1 regarding the types of cables used.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

1. Define the terms Unicasting, Multiccasting and Broadcasting?


_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_______________________________________________________________________

2. What are the differences between Hub, Switch and Router?


_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
3. What is a gateway or Router?
_________________________________________________________________________
_________________________________________________________________________

Part B: Procedure:

20
Packet Tracer

Packet Tracer is a protocol simulator developed by Dennis Frezzo and his team at Cisco
Systems. Packet Tracer (PT) is a powerful and dynamic tool that displays the various
protocols used in networking, in either Real Time or Simulation mode. This includes layer
2 protocols such as Ethernet and PPP, layer 3 protocols such as IP, ICMP, and ARP, and
layer 4 protocols such as TCP and UDP. Routing protocols can also be traced.

Introduction to the Packet Tracer Interface using a Hub Topology

 Add three more hosts.

Adding a Hub

Select a hub, by clicking once on Hubs and once on a Generic hub.

Connect PC0 to Hub0 by first choosing Connections. Click once on the


Copper Straight- through cable.

21
Adding a Switch

Select a switch, by clicking once on Switches and once on a

2950-24 switch. Add the switch by moving the plus sign "+"

below PC2 and PC3 and click once.

 Connect PC2 to Switch0 by first choosing Connections.

 Click once on the Copper Straight-through cable.

22
Configuring IP Addresses and Subnet Masks on the Hosts

 Choose the Config tab. It is here that you can change the name of PC0. It is also here
where you would enter a Gateway IP Address, also known as the default gateway. We will
discuss this later, but this would be the IP address of the local router. If you want, you can
enter the IP Address 192.168.1.1.

Click on FastEthernet. Although we have not yet discussed IP Addresses, add the IP Address

to 192.168.1.10. Click once in the Subnet Mask field to enter the default Subnet Mask. You

can leave this at 255.255.255.0. We will discuss this later.

Also, notice this is where you can change the Bandwidth (speed) and
Duplex of the Ethernet NIC (Network Interface Card). The default is Auto
(autonegotiation), which means the NIC will negotiate with the hub or
switch. The bandwidth and/or duplex can be manually set by removing
the check from the Auto box and choosing the specific option.

Bandwidth – Auto

23
If the host is connected to a hub or switch port which can do 100 Mbps, then the Ethernet
NIC on the host will choose 100 Mbps (Fast Ethernet). Otherwise, if the hub or switch port
can only do 10 Mbps, then the Ethernet NIC on the host will choose 10 Mbps (Ethernet).
Duplex – Auto

Hub: If the host is connected to a hub, then the Ethernet NIC on the host will choose Half
Duplex.

Switch: If the host is connected to a switch, and the switch port is configured as Full
Duplex (or Autonegotiation), then the Ethernet NIC on the host will choose Full Duplex. If
the switch port is configured as Half Duplex, then the Ethernet NIC on the host will choose
Half Duplex. (Full Duplex is a much more efficient option.) The information is automatically
saved when entered

 Repeat these steps for the other hosts. Use the information below for IP
Addresses and Subnet Masks.
Host IP Address Subnet Mask
PC0 192.68.1.10 255.255.255.0
PC1 192.68.1.11 255.255.255.0
PC2 192.68.1.12 255.255.255.0
PC3 192.68.1.13 255.255.255.0

 Verify the information: To verify the information that you entered, move the Select tool
(arrow) over each host.

 Deleting a Device or Link: To delete a device or link, choose the Delete tool and click on
the item you wish to delete.
 To connect like-devices, like a Hub and a Switch, we will use a Cross-over cable. Click
once the Cross-over Cable from the Connections options.

 Move the Connections cursor over Hub0 and click once.

 Select Port2 (actual port does not matter).

24
 Move cursor to the Connections Switch0.

 Click once on Switch0 and choose FastEthernet0/3 (actual port does not matter).
The link light for switch port FastEthernet0/3 will begin as amber and eventually change to
green as the Spanning Tree Protocol transitions the port to forwarding.
Network Simulation

In this part, we are going to use the simulator to simulate traffic between
hosts. For this scenario, delete the switch and host PC3, then connect
host PC2 to the hub.

Task 1: Observe the flow of data from PC0 to PC1 by creating network traffic.
a. Switch to Simulation Mode by selecting the tab that is partially hidden
behind the Real Time tab in the bottom right-hand corner. The tab has
the icon of a stopwatch on it.

NOTE: When Simulation Mode is chosen, a Simulation Panel will appear on the right side of
the screen. This panel can be moved by moving the cursor at the top of the panel until it
changes and then double-clicking on it. The panel can be restored to the original location
by double-clicking on the Title bar. If the panel is closed, click on the Event List button.
b. Click on Edit Filters, and then select All/None to deselect every filter. Then
choose ARP and ICMP and click in the workspace to close the Edit Filters window.

25
c. Select a Simple PDU by clicking the closed envelope in the
Common Tools Bar on the right. Move to PC0 and click to establish the
source. Move to PC1 and click to establish the destination.

Notice that two envelopes are now positioned beside PC0. This is referred
to as a data traffic scenario. One envelope is an ICMP packet, while the
other is an ARP packet. The Event List in the Simulation Panel will identify
exactly which envelope represents ICMP and which represents an ARP.

A scenario may be deleted by clicking on the Delete button in the Scenario panel. Multiple
scenarios can be created by clicking on the New button in the Scenario panel. The scenarios
can then be toggled between without deleting.
Select Auto Capture / Play from the Simulation Panel Play Controls.

Below the Auto Capture / Play button is a horizontal bar, with a vertical button that
controls the speed of the simulation. Dragging the button to the right will speed up the
simulation, while dragging is to the left will slow down the simulation.

d. Choose the Reset Simulation button in the Simulation window.

Notice that the ARP envelope is no longer present. This has reset the simulation but has
not cleared any configuration changes or MAC / ARP table entries.

e. Choose the Capture / Forward button

Notice that the ICMP envelope moved forward one device and stopped. The Capture /
Forward button will allow you to move the simulation one step at a time.
f. Choose the Power Cycle Devices button on the bottom left, above the device icons.

g. Choose Yes
Notice that both the ICMP and ARP envelopes are now present. The Power
Cycle Devices will clear any configuration changes not saved and clear
the MAC / ARP tables.

Task 2: View ARP Tables on each PC.

a. Choose the Auto Capture / Play button and allow the simulation to run
completely.

27
b. Click on PC-0 and select the Desktop tab.

c. Select the Command Prompt and type the command arp -a.
d. Notice that the MAC address for PC2 is in the ARP
table (to view the MAC address of PC2, click on PC2 and select the
Config tab).
e. To examine the ARP tables for PC1 and PC2in another way, click on the Inspect Tool.

Then click on PC1 and the ARP table will appear in a new window.

Note that PC2 does not have an entry in the ARP table yet. Close the ARP

Table window. f.Click on PC2 to view the ARP table. Then close the

ARP Table window.

NOTE: To deactivate the Inspect Tool, click on the Select Tool

Task 3: Adding routers and installing modules

a) In the Network Component Box,


click on the router.
b) Select an 1841 router.
c) Move the cursor to the Logical
Workspace and click on the desired
location.
NOTE: If multiple instances of the same 28
device are needed press and hold the
Ctrl button, click on the desired device,
and then release the Ctrl button. A
copy of the device will be created and
can now be move to the desired
location.

d) Click on the router to bring up the


Configuration Window. This window has
three modes:

Physical, Config, and CLI (Physical is


the default mode).

The Physical mode is used to add modules to a device, such as a WAN Interface Card
(WIC).

The Config mode is used for basic configuration. Commands are entered in a simple GUI
format, with actual equivalent IOS commands shown in the lower part of the window. The
CLI mode allows for advanced configuration of the device. This mode requires the user to
enter the actual IOS commands just as they would on a live device.

e) In the Physical mode, click on the router power switch to turn the device off.

f) Select the WIC-2T module and drag it to Slot 0 on the router. Then drag a WIC
Cover to Slot1.

g) Power the device back on.

h) Click on the Network Component Box and select Connections. Then select a
Copper Straight-through connection to connect the router to the hub.

NOTE: The Smart Connection can be used to automatically select the appropriate cable
type. However, the user will have no choice as to which interface the connection is
assigned to; it will take the first available appropriate interface.

i) Click on the hub and choose Port 3. Then click on the router and
choose interface FastEthernet 0/0.

Task 4: Basic router configuration

a) Click on the Config mode tab of


Router0 to begin configuring the device
b) After the device has finished
booting, change the display name of
the router to CISCO_1. Changing the
display name does not affect the
configuration.
NOTE: If the device hangs up in the
booting process, save the activity.
Then close the application and reopen
the file
c) Click in the Hostname field and
type CISCO_1, then press the TAB

30
key. Note the equivalent IOS command
is entered in the lower portion of the
window.
d) Click on interface FastEthernet 0/0 and assign the IP address 192.168.1.1, then press the
TAB key. Enter the subnet mask 255.255.255.0.
e) Click the Port Status to On to enable the port (no shutdown).

Task 5: Create a copy of the existing router complete with WIC modules already in
place

a) Make sure that the existing router is selected (it will be grayed out).
b) In the Main Tool Bar click on the Copy tool.
c) Click on the Paste tool and the copied device will appear in the work area.

d) Drag the new device to the desired location.


e) Click on the Network Component Box and select Connections. Then select the Serial DCE
connection.

f) Click on the CISCO_1 router and connect to the Serial 0/0/0 interface.
g) Click on the new router (copy CISCO_1) and connect to the Serial 0/0/0 interface.

Task 6: Configuring the WAN link


a) Click on the CISCO_1 router and select the Config mode
b) Select interface Serial 0/0/0
c) Configure the interface Serial 0/0/0 with the IP address 192.168.2.1, then
press the TAB key and enter the subnet mask 255.255.255.0 on the interface.
d) Set the clock rate to 56000
e) Click the Port Status to On to enable the port (no shutdown).
31
f) Click on the new router and select the Config mode.

g) Change the Display Name and Hostname to CISCO_2.


h) Configure the interface Serial 0/0/0 with the IP address 192.168.2.2, then
press the TAB key and enter the subnet mask 255.255.255.0 on the interface.
j) Click the Port Status to On to enable the port (no shutdown).
NOTE: The link lights on the serial link should change from red to green to indicate the link
is active.
Task 7: Configure the routing protocol
a) Click on the CISCO_1 router and select the Config tab. Then click on RIP and
add the network address 192.168.1.0 and 192.168.2.0.
b) Click on the CISCO_2 router and select the Config tab. Then click on RIP and
add the network address 192.168.2.0.
c) Go to each PC and set the Default Gateway to 192.168.1.1

Task 8: Set the default gateway on the PCs


a) Click on PC0 and select the Config tab. Enter the default gateway address 192.168.1.1.
b) Click on PC1 and select the Config tab. Enter the default gateway address 192.168.1.1.
c) Click on PC2 and select the Config tab. Enter the default gateway address 192.168.1.1.

Task 9: Test the connectivity of the network

a) Click on the Simulation mode.

b) Select a Simple PDUand click on PC-A as the source, then click on Cisco_2 as
the destination. The ping should be successful.

Task 10: Save the Packet Tracer file


Assignment:
Problem1: True or false?
1. _____The number of nodes on a network and the length of cable used 32
influence the quality of communication on the network.
2. _____Repeaters and hubs reformat data structures, so they can connect
networks that require different types of frames.
3. ____ Bridges operate at the Network layer of the OSI model.

Problem 2: Fill in the blanks with the correct answer:


1. What are the advantages of using switches over hubs?
___________________________________________________________
______________________________________________________________
____________________________________________________________
2. What are the disadvantages of using routers on the network?
_____________________________________________________
_____________________________________________________
____________________________________________________
____________________________________________________
3. What are the benefits of using full-duplex?
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________

4. Explain why router have different type interfaces such as “Ethernet &
Serial”
__________________________________________________________
__________________________________________________________
Lab 5 :Packet Tracer
Working with the Application Layer: DHCP, DNS,
and HTTP
Part A: Pre-lab

Objective: Setup DNS, HTTP and DHCP server in Cisco Packet tracer

Introduction:
 When you deploy Dynamic Host Configuration Protocol (DHCP) servers on your network, you can
automatically provide client computers and other TCP/IP-based network devices with valid IP
addresses. You can also provide the additional configuration parameters these clients and devices
need, called DHCP options, that allow them to connect to other network resources, such as DNS
servers, and routers.

 Domain Name System (DNS) is the name resolution protocol for TCP/IP networks, such as the
Internet. Client computers query a DNS server to resolve memorable, alphanumeric DNS names to
the IP addresses that computers use to communicate with each other.

 Short for Hyper Text Transfer Protocol, the underlying protocol used by the World Wide Web.
HTTP defines how messages are formatted and transmitted, and what actions Web servers and
browsers should take in response to various commands. For example, when you enter a URL in
your browser, this actually sends an HTTP command to the Web server directing it to fetch and
transmit the requested Web page.

Pre Lab Question


 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.
1. What is HTTP and what port does it use?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
2. Explain DHCP briefly?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
3. Define Static IP and Dynamic IP?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

34
Part B: Procedure:

Instructions:

1. Start Packet Tracer using Realtime mode.


 Options -> Preferences
o Enable “Show Link Lights”
o Disable “Hide Device Label”

2. Configuring the DHCP Server


Add a server.
Global
Settings:
 Change the Display Name to “DHCP Server”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.10
 Set the Subnet Mask to 255.255.0.0
HTTP:
 Set HTTP Service and HTTPS Service to Off
DHCP:
 Set the Default Gateway to 172.16.0.1
 Set the DNS Server to 172.16.0.11
 Set the Start IP Address to 172.16.0.100
DNS:
 Set the Service to Off
3. Configuring the DNS Server
Add a server.
Global Settings:
 Change the Display Name to “DNS Server”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.11
 Set the Subnet Mask to 255.255.0.0
HTTP:
 Set HTTP Service and HTTPS Service to Off

35
DHCP:
 Set the Service to Off
DNS:
 Entering the www.tsrb.edu Domain Name
o Enter for the Domain Name www.tsrb.edu
o Enter for IP Address 172.16.0.20
o Click Add
 Entering the www.internal.com Domain Name
o Enter for the Domain Name www.internal.com
o Enter for IP Address 172.16.0.30
o Click Add
4. Configuring the www.tsrb.edu Web Server
Add a
server.
Global
Settings:
 Change the Display Name to “Web Server: www.tsrb.edu”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.20
 Set the Subnet Mask to 255.255.0.0
DHCP:
 Set the Service to Off
DNS:
 Set the Service to Off
HTTP
 Change the sentence, “<hr>Welcome to Packet Tracer 5.0, the best thing since.....
Packet Tracer 4.0.” to “<hr> Welcome to Tsrb's public web page!” You may add other
information as well.
5. Configuring the www.internal.com Web Server
Add a
server.
Global
Settings:
 Change the Display Name to “Web Server: www.internal.com”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.30
 Set the Subnet Mask to 255.255.0.0
DHCP:
 Set the Service to Off
DNS:
 Set the Service to Off
HTTP
 Change the sentence, “<hr>Welcome to Packet Tracer 5.0, the best thing since.....
Packet Tracer 4.0.” to “<hr> This is the corporate internal network!” You may add other
information as well.
6. Configure Two Client Computers using DHCP
Add two client computers.
Global Settings:
 Change the Display Names to “Dynamic 1” and to “Dynamic 2” respectively

36
 Set the Gateway/DNS to DHCP
 FastEthernet:
 Set the IP Configuration to DHCP

7. Configure One Client Computers using Static IP Addressing


Add two client computers.
Global Settings:
 Change the Display Name to “Static”
 Set the Gateway/DNS to Static
 Set Gateway to 172.16.0.1
 Set the DNS Server to 172.16.0.11
FastEthernet:
 Be sure the configuration is set to Static
 Set the IP address to 172.16.0.90
 Set the Subnet Mask to 255.255.0.0
8. Adding switches
 Add two switches.
 Connect the servers to one switch using a straight-through cable.
 Connect the client computers to the other switch using a straight-through cable.
 Interconnect the two switches using a crossover cable.

9. Verify connectivity
 Ping (ICMP)
o From a client computer use the Desktop Command prompt to ping the other client
computers and the servers.
o Example: From the Dynamic 1 client, C> ping 172.16.0.20
o The first one or two pings may fail, but you should receive a reply on the later pings.
This is due to the ping timing out while the ARP process takes place (later).
 Web Browser (HTTP)
o On the client computers use the Desktop Web Browser, enter the URLs of the Web
Servers www.tsrb.edu and www.internal.com.
o You should see the web pages that you created on these servers.

10. Using Simulation Mode


Click on Simulation.
Note: To reset a simulation, click on “Reset
Simulation” Click on Edit Filters
 Choose Show All/None so that all the boxes (protocols) are unchecked.
 Select (check) the following protocols: DHCP, ICMP, HTTP, DNS.
Web Browser (HTTP)
 On the client computers use the Desktop Web Browser, enter the URLs of the Web
Servers www.tsrb.edu or www.internal.com.
 Click on Auto Capture/Play (automatically forwards the packets) or Capture Forward
(must keep clicking to advance the packets)
DHCP
 Reset the simulation by clicking on “Reset Simulation”
 To view DHCP, on one of the “Dynamic “client computers using DHCP go to the
Desktop Command prompt.
 To have the client computer ask for new IP address and other information from the
DHCP server, enter the command: C> ipconfig /renew
Assignment
 Adjust PC3 in the computer network settings to “Obtain IP
37
address automatically” instead of static IP.
 Apply all test run steps exists in the experiment sheet.

1. Fill the following table:

Your Computer gaia.cs.umass.edu


Internet address
MAC Address
Http version
Destination Port number

2. Write the scenario how to display the web page

38
Lab 6: Basic Switch Configuration
Part A: Pre-lab

Objective: Learn how to configure and manage a Cisco Switch.

Introduction

Addressing Table

Device Interface IP Address Subnet Mask Default Gateway

PC1 NIC 172.17.99.21 255.255.255.0 172.17.99.11

PC2 NIC 172.17.99.32 255.255.255.0 172.17.99.11


S1 VLAN99 172.17.99.11 255.255.255.0 172.17.99.1

Learning Objectives
Upon completion of this lab, you will be able to:
 Cable a network according to the topology diagram
 Clear an existing configuration on a switch
 Examine and verify the default configuration
 Create a basic switch configuration, including a name and an IP address
 Configure passwords to ensure that access to the CLI is secured
 Configure switch port speed and duplex properties for an interface
 Configure basic switch port security
 Manage the MAC address table
 Assign static MAC addresses
 Add and move hosts on a switch

Pre Lab Question


 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

39
1. How many types of modes are used in data transferring through networks?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
2. How a Switch is different from a Hub?

Part B: Procedure:
Scenario
In this lab, you will examine and configure a standalone LAN switch. Although a switch
performs basic functions in its default out-of-the-box condition, there are a number of
parameters that a network administrator should modify to ensure a secure and optimized LAN.
This lab introduces you to the basics of switch configuration.

Task 1: Cable, Erase, and Reload the Switch

Step 1: Cable a network.


Cable a network that is similar to the one in the topology diagram. Create a console
connection to the switch.
You can use any current switch in your lab as long as it has the required interfaces shown in the
topology.
The output shown in this lab is from a 2960 switch. If you use other switches, the switch
outputs and interface descriptions may appear different.
Note: PC2 is not initially connected to the switch. It is only used in Task 5.

Step 2: Clear the configuration on the switch.


Clear the configuration on the switch using the procedure in Appendix 1.
Task 2: Verify the Default Switch Configuration
Step 1: Enter privileged mode.
You can access all the switch commands in privileged mode. However, because many of the
privileged commands configure operating parameters, privileged access should be
password-protected to prevent unauthorized use. You will set passwords in Task 3.
The privileged EXEC command set includes those commands contained in user EXEC

40
mode, as well as the configure command through which access to the remaining
command modes are gained. Enter privileged EXEC mode by entering the enable
command.
Switch>enable Switch#
Notice that the prompt changed in the configuration to reflect privileged EXEC mode.
Step 2: Examine the current switch configuration.
Examine the current running configuration file.
Switch#show running-config
How many Fast Ethernet interfaces does the switch have?
What is the range of
values shown for the vty lines? Examine the current contents
Switch#show startup-config
startup-config is not present
Why does the switch give this response?
Examine the characteristics of the virtual interface VLAN1:
Switch#show interface vlan
Is there an IP address set on the switch?
What is the MAC address of this virtual switch interface?
Is this interface up?
Now view the IP properties of the interface:

Switch#show ip interface vlan1


What output do you see?
Step 3: Display Cisco IOS information.
Examine the following version information that the switch reports.
Switch#show version
What is the Cisco IOS version that the switch is running?
What is the base MAC address of this switch?

Step 4: Examine the Fast Ethernet interfaces.


Examine the default properties of the Fast Ethernet interface used by PC1.

Switch#show interface fastethernet 0/18

Is the interface up or down?


What event would make an interface go up?
What is the MAC address of the interface?
What is the speed and duplex setting of the interface?

Step 5: Examine VLAN information.


Examine the default VLAN settings of the switch.
Switch#show vlan
What is the name of VLAN 1?

Which ports are in this VLAN?


Is VLAN 1 active?
What
type of VLAN is the default VLAN?

Step 6 Examine flash memory.


Issue one of the following commands to examine the contents of the flash directory.
Switch#dir flash:
or
Switch#show flash
Which files or directories are found?
Files have a file extension, such as .bin, at the end of the filename.
Directories do not have a file extension. To examine the files in a directory,
issue the following command using the filename displayed in the output of the
previous command:

Switch#dir flash:c2960-lanbase-mz.122-25.SEE3

The output should look similar to this:


Directory of flash:/c2960-lanbase-mz.122-25.SEE3/
6 drwx 4480 Mar 19 00:04:42 +00:00 html 41
1 93
618 -rwx 467117 Mar 1 19 00:06:0 +00:0 c2960-lanbase-mz.
5 93 6 0
619 -rwx 457 Mar 1 19 00:06:0 +00:0 info
93 6 0
32514048 bytes total (24804864 bytes free)

What is the name of the Cisco IOS image file?

Step 7: Examine the startup configuration file.


To view the contents of the startup configuration file, issue the show startup-config
command in privileged EXEC mode.
Switch#show startup-config
startup-config is not present
Why does this message appear?
Let’s make one configuration change to the switch and then save it. Type the following
commands:

Switch#configure terminal
Enter configuration commands, one per line. End
with CNTL/Z.
Switch(config)#hostname S1
S1(config)#exit S1#
To save the contents of the running configuration file to non-volatile RAM (NVRAM),
issue the the command copy running-config startup-config.
Switch#copy running-config startup-config
Destination filename [startup-config]? (enter) Building configuration...
[OK]

Note: This command is easier to enter by using the copy run start
abbreviation. Now display the contents of NVRAM using the show
startup-config command.
S1#show startup-config
Using 1170 out of 65536 bytes
!
version 12.2 no service pad
service timestamps
debug uptime service
timestamps log uptime
no service password-
encryption
!
hostname S1
!
<output omitted>
The current configuration has been written to NVRAM.

Task 3: Create a Basic Switch Configuration


Step 1: Assign a name to the switch.
In the last step of the previous task, you configured the hostname. Here's a review of the
commands used.
S1#configure terminal
S1(config)#hostname S1
S1(config)#exit
Step 2: Set the access passwords.
Enter config-line mode for the console. Set the login password to cisco. Also configure the
vty lines 0 to 15 with the password cisco. 42
S1#configure terminal
Enter the configuration commands, one for each line. When you are
finished, return to global configuration mode by entering the exit
command or pressing Ctrl-Z.
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#line vty 0 15
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
Why is the login command required?
Step 3. Set the command mode passwords.
Set the enable secret password to class. This password protects access to privileged EXEC mode.
S1(config)#enable secret class
Step 4. Configure the Layer 3 address of the switch.
Before you can manage S1 remotely from PC1, you need to assign the switch an IP address.
The default configuration on the switch is to have the management of the switch controlled
through VLAN 1. However, a best practice for basic switch configuration is to change the
management VLAN to a VLAN other than VLAN 1. The implications and reasoning behind
this action are explained in the next chapter.
For management purposes, we will use VLAN 99. The selection of VLAN 99 is arbitrary
and in no way implies you should always use VLAN 99.
First, you will create the new VLAN 99 on the switch. Then you will set the IP address of
the switch to 172.17.99.11 with a subnet mask of 255.255.255.0 on the internal virtual
interface VLAN 99.
S1(config)#vlan 99
S1(config-vlan)#exit
S1(config)#interface vlan99
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to down
S1(config-if)#ip address 172.17.99.11 255.255.255.0
S1(config-if)#no shutdown
S1(config-if)#exit
S1(config)#
Notice that the VLAN 99 interface is in the down state even though you entered the command
no shutdown. The interface is currently down because no switchports are assigned to VLAN
99.
Assign all user ports to VLAN 99.
S1#configure terminal
S1(config)#interface range fa0/1 - 24
S1(config-if-range)#switchport access vlan 99
S1(config-if-range)#exit
S1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
It is beyond the scope of this lab to fully explore VLANs. This subject is discussed in
greater detail in the next chapter. However, to establish connectivity between the host and
the switch, the ports used by the host must be in the same VLAN as the switch. Notice in
the above output that VLAN 1 interface goes down because none of the ports are assigned
to VLAN 1. After a few seconds, VLAN 99 will come up because at least one port is now
assigned to VLAN 99.
Step 5: Set the switch default gateway.
43
S1 is a layer 2 switch, so it makes forwarding decisions based on the Layer 2 header. If
multiple networks are connected to a switch, you need to specify how the switch forwards the
internetwork frames, because the path must be determined at Layer three. This is done by
specifying a default gateway address that points to a router or Layer 3 switch. Although this
activity does not include an external IP gateway, assume that you will eventually connect the
LAN to a router for external access. Assuming that the LAN interface on the router is
172.17.99.1, set the default gateway for the switch.
S1(config)#ip default-gateway 172.17.99.1
S1(config)#exit
Step 6: Verify the management LANs settings.
Verify the interface settings on VLAN 99.
S1#show interface vlan 99
What is the bandwidth on this interface?
What are the VLAN states? VLAN1 is Line protocol is

What is the queuing strategy?

Step 7: Configure the IP address and default gateway for PC1.


Set the IP address of PC1 to 172.17.99.21, with a subnet mask of 255.255.255.0. Configure a
default gateway of 172.17.99.11. (If needed, refer to Lab 1.3.1 to configure the PC NIC.)
Step 8: Verify connectivity.
To verify the host and switch are correctly configured, ping the IP address of the switch
(172.17.99.11) from PC1.
Was the ping successful?
If not, troubleshoot the switch and host configuration. Note that this may take a couple of
tries for the pings to succeed.
Step 9: Configure the port speed and duplex settings for a Fast Ethernet interface.
Configure the duplex and speed settings on Fast Ethernet 0/18. Use the end
command to return to privileged EXEC mode when finished.
S1#configure terminal
S1(config)#interface fastethernet 0/18
S1(config-if)#speed 100
S1(config-if)#duplex full
S1(config-if)#end
%LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/18, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/18, changed state to down
%LINK-3- UPDOWN: Interface FastEthernet0/18, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/18,
changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
The line protocol for both interface FastEthernet 0/18 and interface VLAN 99 will temporarily go down.
The default on the Ethernet interface of the switch is auto-sensing, so it automatically
negotiates optimal settings. You should set duplex and speed manually only if a port must
operate at a certain speed and duplex mode. Manually configuring ports can lead to duplex
mismatches, which can significantly degrade performance.
Verify the new duplex and speed settings on the Fast Ethernet interface.
S1#show interface fastethernet 0/18
Step 10: Save the configuration. 44
You have completed the basic configuration of the switch. Now back up the running
configuration file to NVRAM to ensure that the changes made will not be lost if the system is
rebooted or loses power.
S1#copy running-config startup-config
Destination filename [startup-config]?[Enter] Building
configuration... [OK]
S1#
Step 11: Examine the startup configuration file.
To see the configuration that is stored in NVRAM, issue the show startup-config
command from privileged EXEC mode.
S1#show startup-config
Are all the changes that were entered recorded in the file?
Task 4: Managing the MAC Address Table
Step 1: Record the MAC addresses of the hosts.
Determine and record the Layer 2 (physical) addresses of the PC network interface cards
using the following commands:
Start > Run > cmd > ipconfig /all
PC1:

PC2:
Step 2: Determine the MAC addresses that the switch has learned.
Display the MAC addresses using the show mac-address-table command in privileged EXEC mode.
S1#show mac-address-table
How many dynamic addresses are there?
How many MAC addresses are there in total?
Do the dynamic MAC addresses match the host MAC addresses?
Step 3: List the show mac-address-table options.
S1#show mac-address-table ?
How many options are available for the show mac-address-table
command?
Show only the MAC addresses from the table that were learned
dynamically.
S1#show mac-address-table address <PC1 MAC here>
How many dynamic addresses are there?
Step 4: Clear the MAC address table.
To remove the existing MAC addresses, use the clear mac-address-table command from
privileged EXEC mode.
S1#clear mac-address-table dynamic
Step 5: Verify the results.
Verify that the MAC address table was cleared.
S1#show mac-address-table

How many static MAC addresses are there?


How many dynamic addresses are there?

Step 6: Examine the MAC table again.


More than likely, an application running on your PC1 has already sent a frame out the NIC 45
to S1. Look at the MAC address table again in privileged EXEC mode to see if S1 has
relearned the MAC address for PC1
S1#show mac-address-table
How many dynamic addresses are there?
Why did this change from the last display?

If S1 has not yet relearned the MAC address for PC1, ping the VLAN 99 IP address of the
switch from PC1 and then repeat Step 6.
Step 7: Set up a static MAC address.
To specify which ports a host can connect to, one option is to create a static mapping of the
host MAC address to a port.
Set up a static MAC address on Fast Ethernet interface 0/18 using the address that was
recorded for PC1 in Step 1 of this task. The MAC address 00e0.2917.1884 is used as an
example only. You must use the MAC address of your PC1, which is different than the one
given here as an example.
S1(config)#mac-address-table static 00e0.2917.1884 interface
fastethernet 0/18 vlan 99
Step 8: Verify the results.
Verify the MAC address table entries.
S1#show mac-address-table
How many total MAC addresses are there?
How many static addresses are there?
Step 10: Remove the static MAC entry.
To complete the next task, it will be necessary to remove the static MAC address table entry.
Enter configuration mode and remove the command by putting a no in front of the command
string.
Note: The MAC address 00e0.2917.1884 is used in the example only. Use the MAC
address for your PC1.
S1(config)#no mac-address-table static 00e0.2917.1884 interface
fastethernet 0/18 vlan 99
Step 10: Verify the results.
Verify that the static MAC address has been cleared.
S1#show mac-address-table
How many total static MAC addresses are there?
Task 5 Configuring Port Security
Step 1: Configure a second host.
A second host is needed for this task. Set the IP address of PC2 to 172.17.99.32, with a subnet mask of
255.255.255.0 and a default gateway of 172.17.99.11. Do not connect this PC to the switch yet.

Step 2: Verify connectivity.


Verify that PC1 and the switch are still correctly configured by pinging the VLAN 99 IP
address of the switch from the host.
Were the pings successful?
If the answer is no, troubleshoot the host and switch
configurations.

Step 3: Copy the host MAC addresses.


Write down the MAC addresses from Task 4, Step 1.

PC1

PC2

Step 4: Determine which MAC addresses that the switch has learned.
46
Display the learned MAC addresses using the show mac-address-table command in
privileged EXEC mode.
S1#show mac-address-table
How many dynamic addresses are there?
Do the MAC addresses match
the host MAC addresses?

Step 5: List the port security options.


Explore the options for setting port security on interface Fast Ethernet 0/18.
S1# configure terminal
S1(config)#interface fastethernet 0/18
S1(config-if)#switchport port-security ?
aging Port-security
aging commands mac-address
Secure mac
address
maximum Max secure
addresses violation
Security
violation mode
<cr>
S1(config-if)#switchport port-security
Step 6: Configure port security on an access port.
Configure switch port Fast Ethernet 0/18 to accept only two devices, to learn the MAC
addresses of those devices dynamically, and to block traffic from invalid hosts if a violation
occurs.
S1(config-if)#switchport mode access
S1(config-if)#switchport port-security
S1(config-if)#switchport port-security maximum 2
S1(config-if)#switchport port-security mac-address sticky
S1(config-if)#switchport port-security violation protect
S1(config-if)#exit
Step 7: Verify the results.
Show the port security settings.
S1#show port-security
How many secure addresses are allowed on Fast Ethernet 0/18?
What is the security action for this port?

Step 8: Examine the running configuration file.


S1#show running-config

Are there statements listed that directly reflect the security implementation of the running configuration?
Step 9: Modify the port security settings on a port.
On interface Fast Ethernet 0/18, change the port security maximum MAC address count to 1
and to shut down if a violation occurs.
S1(config-if)#switchport port-security maximum 1
S1(config-if)#switchport port-security violation shutdown

Step 10: Verify the results.


Show the port security settings.
S1#show port-security
Have the port security settings changed to reflect the modifications in Step 9? 47
Ping the VLAN 99 address of the switch from PC1 to verify connectivity and to refresh the 7
MAC address table. You should now see the MAC address for PC1 “stuck” to the running
configuration.
S1#show run
Building configuration...
<output omitted>
!
interface FastEthernet0/18 switchport access vlan 99 switchport mode access
switchport port-security
switchport port-security mac-address sticky
switchport port-security mac-address sticky 00e0.2917.1884 speed 100
duplex full
!
<output omitted>

Step 11: Introduce a rogue host.


Disconnect PC1 and connect PC2 to port Fast Ethernet 0/18. Ping the VLAN 99 address
172.17.99.11 from the new host. Wait for the amber link light to turn green. Once it turns
green, it should almost immediately turn off.
Record any observations:
Step 12: Show port configuration information.
To see the configuration information for just Fast Ethernet port 0/18, issue the following
command in privileged EXEC mode:
S1#show interface fastethernet 0/18
What is the state of this interface?
Fast Ethernet0/18 is Line protocol is
Step 13: Reactivate the port.
If a security violation occurs and the port is shut down, you can use the no shutdown
command to reactivate it. However, as long as the rogue host is attached to Fast Ethernet
0/18, any traffic from the
host disables the port. Reconnect PC1 to Fast Ethernet 0/18, and enter the following
commands on the switch:
S1# configure terminal
S1(config)#interface fastethernet 0/18
S1(config-if)# no shutdown
S1(config-if)#exit
Note: Some IOS version may require a manual shutdown command before entering the no shutdown
command.
Step 14: Cleanup
Unless directed otherwise, clear the configuration on the switches, turn off the power to the
host computer and switches, and remove and store the cables.

Assignment

Task 1: How Switch Learns Mac Address?


48
______________________________________________________________________

Task 2: What Is A Broadcast Domain And A Collision Domain?


_______________________________________________________________________________
_______________________________________________________________________________
Task 3: What Is A Mac Address Table And How A Switch Will Build A Mac Table?
_______________________________________________________________________________
_______________________________________________________________________________
_____________________
Task 4: Documentation
On each router, capture the following command output to a text (.txt) file and save for future
reference.
• show running-config
• show mac-address-table _
Lab.7: Basic VLAN Configuration

Part A: Pre-lab 49

Objective: Learn how to configure and manage VLAN for the Cisco Switch.

Introduction

Addressing Table
Device
Default Gateway Subnet Mask IP Address Interface
(Hostnam
e)
N/A 255.255.255.0 172.17.99.11 VLAN 99 S1
N/A 255.255.255.0 172.17.99.12 VLAN 99 S2
N/A 255.255.255.0 172.17.99.13 VLAN 99 S3
172.17.10.1 255.255.255.0 172.17.10.21 NIC PC1
172.17.20.1 255.255.255.0 172.17.20.22 NIC PC2
172.17.30.1 255.255.255.0 172.17.30.23 NIC PC3
172.17.10.1 255.255.255.0 172.17.10.24 NIC PC4
172.17.20.1 255.255.255.0 172.17.20.25 NIC PC5
172.17.30.1 255.255.255.0 172.17.30.26 NIC PC6

Initial Port Assignments (Switches 2 and 3)


Network Assignment Ports
172.17.99.0 802.1q Trunks (Native VLAN 99) Fa0/1 – 0/5
/24
172.17.30.0 – Guest (Default) VLAN 30 Fa0/6 – 0/10
/24
172.17.10.0 – Faculty/Staff VLAN 10 Fa0/11 – 0/17
/24
172.17.20.0 – Students VLAN 20 Fa0/18 – 0/24
/24
50
Learning Objectives
Upon completion of this lab, you will be able to:
 Cable a network according to the topology diagram
 Erase the startup configuration and reload a switch to the default state
 Perform basic configuration tasks on a switch
 Create VLANs
 Assign switch ports to a VLAN
 Add, move, and change ports
 Verify VLAN configuration
 Enable trunking on inter-switch connections
 Verify trunk configuration
 Save the VLAN configuration

Pre Lab Question


 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

1. What Is vlan?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
2. What Is Difference Between Vlan Access And Trunk Mode?
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
Part B: Procedure:

Task 1: Prepare the Network


Step 1: Cable a network that is similar to the one in the topology diagram.
You can use any current switch in your lab as long as it has the required interfaces shown in the
topology.
Note: If you use 2900 or 2950 switches, the outputs may appear different. Also, certain
commands may be different or unavailable.

Step 2: Clear any existing configurations on the switches, and initialize all ports in the
shutdown state.
If necessary, refer to Lab 2.5.1, Appendix 1, for the procedure to clear switch configurations.
It is a good practice to disable any unused ports on the switches by putting them in shutdown.
Disable all ports on the switches:
Switch#config term
switch(config)#interface range fa0/1-24
Switch(config-if-range)#shutdown
Switch(config-if-range)#interface range gi0/1-2
Switch(config-if-range)#shutdown

51
Task 2: Perform Basic Switch Configurations
Step 1: Configure the switches according to the following guidelines.
 Configure the switch hostname.
 Disable DNS lookup.
 Configure an EXEC mode password of class.
 Configure a password of cisco for console connections.
 Configure a password of cisco for vty connections.

Step 2: Re-enable the user ports on S2 and S3.


S2(config)#interface range fa0/6, fa0/11, fa0/18
S2(config-if-range)#switchport mode access
S2(config-if-range)#no shutdown
S3(config)#interface range fa0/6, fa0/11, fa0/18
S3(config-if-range)#switchport mode access
S3(config-if-range)#no shutdown
Task 3: Configure and Activate Ethernet Interfaces
Step 1: Configure the PCs.
You can complete this lab using only two PCs by simply changing the IP addressing for the
two PCs specific to a test you want to conduct. For example, if you want to test connectivity
between PC1 and PC2, then configure the IP addresses for those PCs by referring to the
addressing table at the beginning of the lab. Alternatively, you can configure all six PCs with
the IP addresses and default gateways.
Task 4: Configure VLANs on the Switch
Step 1: Create VLANs on switch S1.
Use the vlan vlan-id command in global configuration mode to add a VLAN to switch S1.
There are four VLANS configured for this lab: VLAN 10 (faculty/staff); VLAN 20 (students);
VLAN 30 (guest); and VLAN 99 (management). After you create the VLAN, you will be in
vlan configuration mode, where you can assign a name to the VLAN with the name vlan
name command.
S1(config)#vlan 10
S1(config-vlan)#name faculty/staff
S1(config-vlan)#vlan 20
S1(config-vlan)#name students
S1(config-vlan)#vlan 30
S1(config-vlan)#name guest
S1(config-vlan)#vlan 99
S1(config-vlan)#name management
S1(config-vlan)#end
S1#
Step 2: Verify that the VLANs have been created on S1.
Use the show vlan brief command to verify that the VLANs have been created.
S1#show vlan brief

Ports Status Name VLA


N
----------------------------- --------- ------------------------------ ---
- -
Fa0/1, Fa0/2, Fa0/4, Fa0/5 active default 1 52
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/11, Fa0/12, Fa0/1
Fa0/13 0,
Fa0/15, Fa0/16, Fa0/1
Fa0/17 4,
Fa0/19, Fa0/20, Fa0/1
Fa0/21 8,
Fa0/22, Fa0/23, Fa0/24, Gi0/1
Gi0/2
active faculty/staff 10
active students 20
active guest 30
active management 99

Step 3: Configure and name VLANs on switches S2 and S3.


Create and name VLANs 10, 20, 30, and 99 on S2 and S3 using the commands from Step 1.
Verify the correct configuration with the show vlan brief command.
What ports are currently assigned to the four VLANs you have created?
Step 4: Assign switch ports to VLANs on S2 and S3.
Refer to the port assignment table on page 1. Ports are assigned to VLANs in interface
configuration mode, using the switchport access vlan vlan-id command. You can assign
each port individually or you can use the interface range command to simplify this task, as
shown here. The commands are shown for S3 only, but you should configure both S2 and S3
similarly. Save your configuration when done.
S3(config)#interface range fa0/6-10
S3(config-if-range)#switchport access vlan 30
S3(config-if-range)#interface range fa0/11-17
S3(config-if-range)#switchport access vlan 10
S3(config-if-range)#interface range fa0/18-24
S3(config-if-range)#switchport access vlan 20
S3(config-if-range)#end
S3#copy running-config startup-config
Destination filename [startup-config]?
[enter] Building configuration...
[OK]
Step 5: Determine which ports have been added.
Use the show vlan id vlan-number command on S2 to see which ports are assigned
to VLAN 10. Which ports are assigned to VLAN 10?

Note: The show vlan name vlan-name displays the same output.
You can also view VLAN assignment information using the show interfaces interface switchport
command.
Step 6: Assign the management VLAN.
A management VLAN is any VLAN that you configure to access the management capabilities
of a switch. VLAN 1 serves as the management VLAN if you did not specifically define another
VLAN. You assign the management VLAN an IP address and subnet mask. A switch can be
managed via HTTP, Telnet, SSH, or SNMP. Because the out-of-the-box configuration of a
Cisco switch has VLAN 1 as the default VLAN, VLAN 1 is a bad choice as the management
VLAN. You do not want an arbitrary user who is connecting to a switch to default to the
management VLAN. Recall that you configured the management VLAN as VLAN 99 earlier in
this lab.
From interface configuration mode, use the ip address command to assign the management
IP address to the switches.
53
S1(config)#interface vlan 99
S1(config-if)#ip address 255.255.255
172.17.99.11 .0
S1(config-if)#no shutdown
S2(config)#interface vlan 99
S2(config-if)#ip address 255.255.255
172.17.99.12 .0
S2(config-if)#no shutdown
S3(config)#interface vlan 99
S3(config-if)#ip address 255.255.255
172.17.99.13 .0
S3(config-if)#no shutdown
Assigning a management address allows IP communication between the switches, and
also allows any host connected to a port assigned to VLAN 99 to connect to the switches.
Because VLAN 99 is configured as the management VLAN, any ports assigned to this
VLAN are considered management ports and should be secured to control which devices
can connect to these ports.
Step 7: Configure trunking and the native VLAN for the trunking ports on all switches.
Trunks are connections between the switches that allow the switches to exchange
information for all VLANS. By default, a trunk port belongs to all VLANs, as opposed to an
access port, which can only belong to a single VLAN. If the switch supports both ISL and
802.1Q VLAN encapsulation, the trunks must specify which method is being used.
Because the 2960 switch only supports 802.1Q trunking, it is not specified in this lab.
A native VLAN is assigned to an 802.1Q trunk port. In the topology, the native VLAN is VLAN
99. An 802.1Q trunk port supports traffic coming from many VLANs (tagged traffic) as well as
traffic that does not come from a VLAN (untagged traffic). The 802.1Q trunk port places
untagged traffic on the native VLAN. Untagged traffic is generated by a computer attached to
a switch port that is configured with the native VLAN. One of the IEEE 802.1Q specifications for
Native VLANs is to maintain backward compatibility with untagged traffic common to legacy
LAN scenarios. For the purposes of this lab, a native VLAN serves as a common identifier on
opposing ends of a trunk link. It is a best practice to use a VLAN other than VLAN 1 as the
native VLAN.
Use the interface range command in global configuration mode to simplify configuring trunking.
S1(config)#interface range fa0/1-5
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk vla 9
native n 9
S1(config-if-range)#no shutdown
S1(config-if-range)#end
S2(config)# interface range fa0/1-5
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#switchport trunk vla 9
native n 9
S2(config-if-range)#no shutdown
S2(config-if-range)#end
S3(config)# interface range fa0/1-5
S3(config-if-range)#switchport mode trunk
S3(config-if-range)#switchport trunk vla 9
native n 9
S3(config-if-range)#no shutdown
S3(config-if-range)#end
Verify that the trunks have been configured with the show interface trunk command.
S1#show interface trunk

Native vlan Status Encapsulation Mode Port


99 trunking 802.1q on Fa0/1
99 trunking 802.1q on Fa0/2
54
Vlans allowed on trunk Port
1-4094 Fa0/1
1-4094 Fa0/2

management domain Vlans allowed and active in Port


1,10,20,30,99 Fa0/1
1,10,20,30,99 Fa0/2
Vlans in spanning tree forwarding state and not pruned Port
1,10,20,30,99 Fa0/1
1,10,20,30,99 Fa0/2

Step 8: Verify that the switches can communicate.


From S1, ping the management address on both S2 and S3.
S1#ping 172.17.99.12
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.17.99.12, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms
S1#ping 172.17.99.13
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.17.99.13, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

Step 9: Ping several hosts from PC2.


Ping from host PC2 to host PC1 (172.17.10.21). Is the ping attempt successful?
Ping from host PC2 to the switch VLAN 99 IP address 172.17.99.12. Is the ping attempt successful?
Because these hosts are on different subnets and in different VLANs, they cannot
communicate without a Layer 3 device to route between the separate subnetworks.
Ping from host PC2 to host PC5. Is the ping attempt successful?
Because PC2 is in the same VLAN and the same subnet as PC5, the ping is successful
Step 10: Move PC1 into the same VLAN as PC2.
The port connected to PC2 (S2 Fa0/18) is assigned to VLAN 20, and the port connected
to PC1 (S2 Fa0/11) is assigned to VLAN 10. Reassign the S2 Fa0/11 port to VLAN 20.
You do not need to first remove a port from a VLAN to change its VLAN membership.
After you reassign a port to a new VLAN, that port is automatically removed from its
previous VLAN.
S2#configure terminal
Enter configuration commands, one per line. End
with CNTL/Z.
S2(config)#interface fastethernet 0/11
S2(config- if)#switchport access vlan 20
S2(config-if)#end
Ping from host PC2 to host PC1. Is the ping attempt successful?
Even though the ports used by PC1 and PC2 are in the same VLAN, they are still in
different subnetworks, so they cannot communicate directly.

Step 11: Change the IP address and network on PC1.


Change the IP address on PC1 to 172.17.20.22. The subnet mask and default gateway can
remain the same. Once again, ping from host PC2 to host PC1, using the newly assigned IP
address. 55
Is the ping attempt
successful? Why
was this attempt successful?

Task 5: Document the Switch Configurations


On each switch, capture the running configuration to a text file and save it for future reference.
Task 6: Clean Up
Erase the configurations and reload the switches. Disconnect and store the cabling. For PC
hosts that are normally connected to other networks (such as the school LAN or to the
Internet), reconnect the appropriate cabling and restore the TCP/IP setti ng.

Assignment

Task 1: What Is Difference Between Vlan Access And Trunk Mode?


______________________________________________________________________

Task 2: Which Are The Two Trunking Protocols?


_______________________________________________________________________________
_______________________________________________________________________________
Task 3: Which Is The Command Used To See Trunk Interfaces?
_______________________________________________________________________________
_______________________________________________________________________________
_____________________
Task 4: Documentation
On each switch, capture the following command output to a text (.txt) file and save for future
reference.
• show running-config

Lab. 8: Basic Router Configurations


Part A: Pre-lab
56
Objectives

1. Configure Packet Tracer Terminal to establish a console session with a Cisco IOS
Router/Switch.
2. Configure Cisco router global configuration settings.
3. Configure Cisco router password access.
4. Configure Cisco router interfaces.
5. Save the router configuration file.

Introduction:

Part 1: CISCO Internet Operating System


(IOS) Cisco IOS Command Modes
The following table contains the different IOS command modes, their roles and the shape
of the command prompt that illustrates the mode. Make sure to study this table
carefully as it is essential for proper working with Cisco routers and switches.

Router> - User EXEC mode


Router# - Privileged EXEC mode
- Configuration mode (notice the # sign indicates this is only
Router(config)#
accessible at privileged EXEC mode.)
Router(config-if)# - Interface level within configuration mode.
Router(config-router)# - Routing engine level within configuration mode.
Router(config-line)# - Line level (vty, tty, async) within configuration mode.

User Exec Mode


The user EXEC mode is entered when the router is accessed via a serial
connection or when accessing the router via telnet.
 The command prompt of the user EXEC mode is: Router1>
 The user EXEC mode only offers a small set of commands, such as ping, telnet,
and traceroute.
 Configuration parameters cannot be read or modified in this mode
 Logging the user off, type: Router1> exit

Privileged EXEC Mode


 To change or view configuration information of a router, user must enter system
administrator mode called Privileged EXEC Mode
 The privileged EXEC mode is used to read configuration files, reboot the router, and
set operating parameters.
 Entering the privileged EXEC mode requires to type a password, called the enable secret.
 The privileged EXEC mode is entered by this command: Router1>enable
If a password is set, then the system will require it at this
stage. Typing the password displays the following 57
command prompt:
Router1#
For logging off, type:
Router1#disable

Global Configuration Mode


 The global configuration mode is used to modify system wide configuration
parameters, such as routing algorithms and routing tables.
 This is done by typing: Router1#Configure terminal
 The command prompt in the global configuration mode is: Router1(Config)#
Notes:
 Typing a question mark (?) in a given command mode generates a list of all
available commands in the current command mode. Router1(config-if)#?
 This command helps to determine if a command can be executed in the current
mode
 The question mark can also be used to determine the list of available options of
a command. Router1#configure ?
 If a certain command enables a feature of a router than adding a “no” in front of
that command disables the same feature.
Sometimes it is the other way around, that is, the command to enable a feature uses the
command to disable the feature preceded by a “no”
Examples:
o Enable IP forwarding : ip routing
o Disable IP forwarding : no ip routing
o Add a routing table entry : ip route 10.0.2.0 255.255.255.0 10.0.3.1
o Delete a routing table entry: no ip route 10.0.2.0 255.255.255.0 10.0.3.1
o Disable a network interface: shutdown
o Enable a network interface : no shutdown
Pre Lab Question
 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

1. What is ARP, how does it work?


---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
---
2. What is Round Trip Time?
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------

Part B: Procedure:

58

Task 1:
Device Interface IP Address Subnet Mask Def. Gateway
Fa0/0 192.168.1.1 255.255.255.0 N/A
R1
S0/0/0 192.168.2.1 255.255.255.0 N/A
Fa0/0 192.168.3.1 255.255.255.0 N/A
R2
S0/0/0 192.168.2.2 255.255.255.0 N/A
PC1 N/A 192.168.1.10 255.255.255.0 192.168.1.1
PC2 N/A 192.168.3.10 255.255.255.0 192.168.3.1
Cable the Network
Cable a network that is similar to the one in the Topology Diagram. The output used in this lab is
from 1841 routers. You can use any current router in your lab as long as it has the required
interfaces as shown in the topology. Be sure to use the appropriate type of Ethernet cable to
connect from host to switch, switch to router, and host to router. Be sure to connect the serial DCE
cable to router R1 and the serial DTE cable to router R2.
Answer the following questions:
What type of cable is used to connect the Ethernet interface on a host PC to the
Ethernet interface on a switch? ________________________
What type of cable is used to connect the Ethernet interface on a switch to the Ethernet interface
on a router? __________________________
What type of cable is used to connect the Ethernet interface on a router to the Ethernet interface
on a host PC? _________________________
Task 2: Perform Basic Configuration of Router R1.
Step 1: Establish a HyperTerminal session to router R1. Step 2: Enter privileged EXEC

mode.
Router>enable Router#
Step 3: Enter global configuration mode.
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

Step 4: Configure the router name as R1.


Enter the command hostname R1 at the prompt.
Router(config)#hostname R1
R1(config)#
Step 5: Disable DNS lookup.
Disable DNS lookup with the no ip domain-lookup command.
R1(config)#no ip domain-lookup
R1(config)#
Why would you want to disable DNS lookup in a lab environment?
____________________________________________________________________________ 59

_______________________________________________________________________________
What would happen if you disabled DNS lookup in a production environment?
_______________________________________________________________________________
Step 6: Configure the EXEC mode password.
Configure the EXEC mode password using the enable secret password
command. Use class for the password.
R1(config)#enable secret class
R1(config)#
Why is it not necessary to use the enable password password
command?
_____________________________________________________________

Step 7: Configure a message-of-the-day banner.


Configure a message-of-the-day banner using the banner motd command.
R1(config)#banner motd &
Enter TEXT message. End with the character '&'.
********************************
!!!AUTHORIZED ACCESS ONLY!!!
********************************
&
R1(config)#
When does this banner display?
_____________________________________________________________
Why should every router have a message-of-the-day banner?
_____________________________________________________________
Step 8: Configure the console password on the router.
Use cisco as the password. When you are finished, exit from line configuration mode.
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#
Step 9: Configure the password for the virtual terminal lines.
Use cisco as the password. When you are finished, exit from line configuration mode.
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#
Step 10: Configure the FastEthernet0/0 interface.
Configure the FastEthernet0/0 interface with the IP address 192.168.1.1/24.
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed 60
state to up
R1(config-if)#
Step 11: Configure the Serial0/0/0 interface.
Configure the Serial0/0/0 interface with the IP address 192.168.2.1/24. Set the clock rate to 64000.
Note: The purpose of the clock rate command is explained in Chapter 2: Static Routes.
R1(config-if)#interface serial 0/0/0
R1(config-if)#ip address 192.168.2.1
255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#
Note: The interface will be activated until the serial interface on R2 is configured and activated
Step 12: Return to privileged EXEC mode.
Use the end command to return to privileged EXEC mode.
R1(config-if)#end
R1#
Step 13: Save the R1 configuration.
Save the R1 configuration using the copy running-config startup-config command.
R1#copy running-config startup-config
Building configuration...
R1#
What is a shorter version of this command? ________________________
Task 3: Perform Basic Configuration of Router R2.

Step 1: For R2, repeat Steps 1 through 9 from Task 2.

Step 2: Configure the Serial 0/0/0 interface.

Configure the Serial 0/0/0 interface with the IP address 192.168.2.2/24.


R2(config)#interface serial 0/0/0
R2(config-if)#ip address 192.168.2.2
255.255.255.0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0,
changed state to up
R2(config-if)#
Step 3: Configure the FastEthernet0/0 interface.
Configure the FastEthernet0/0 interface with the IP address 192.168.3.1/24.
R2(config-if)#interface fastethernet
0/0 R2(config-if)#ip address
192.168.3.1 255.255.255.0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
R2(config-if)#

Step 4: Return to privileged EXEC mode.


Use the end command to return to privileged EXEC mode.
R2(config-if)#end
R2#
Step 5: Save the R2 configuration. 61
Save the R2 configuration using the copy running-config startup-config command.
R2#copy running-config startup-config
Building configuration... [OK]
R2#
Task 4: Configure IP Addressing on the Host PCs.
Step 1: Configure the host PC1.
Configure the host PC1 that is attached to R1 with an IP address of
192.168.1.10/24 and a default gateway of 192.168.1.1.
Step 2: Configure the host PC2.
Configure the host PC2 that is attached to R2 with an IP address of
192.168.3.10/24 and a default gateway of 192.168.3.1.
Task 5: Verify and Test the Configurations.
The show ip route command and output will be thoroughly explored in
upcoming chapters. For now, you are interested in seeing that both R1 and R2 have
two routes. Both routes are designated with a C. These are the directly connected
networks that were activated when you configured the interfaces on each router. If
you do not see two routes for each router as shown in the following output, proceed
to Step 2.
R1#show ip route
________________________________________________________________________
R2#show ip route
________________________________________________________________________
Step 2: Verify interface configurations.
Another common problem is router interfaces that are not configured correctly or
not activated. Use the show ip interface brief command to quickly verify
the configuration of each router’s interfaces. Your output should look similar to
the following:
R1#show ip interface brief
________________________________________________________________________
________________________________________________________________________

R2#show ip interface brief


________________________________________________________________________
________________________________________________________________________
Step 3: Test connectivity
Test connectivity by pinging from each host to the default gateway that has been configured for that
host.
From the host attached to R1, is it possible to ping the default
gateway? __________ From the host attached to R2, is it
possible to ping the default gateway? __________
If the answer is no for any of the above questions, troubleshoot the configurations
to find the error using the following systematic process:
1. Check the PCs.
Are they physically connected to the correct router? (Connection could be
through a switch or directly.) ____________
Are link lights blinking on all relevant ports? ____________
2. Check the PC configurations.
Do they match the Topology Diagram? ____________ 62
3. Check the router interfaces using the show ip interface brief command.
Are the interfaces up and up? ____________
If your answer to all three steps is yes, then you should be able to successfully ping the default
gateway.
Step 4: Test connectivity between router R1 and R2
From the router R1, is it possible to ping R2 using the command ping

192.168.2.2? ____________ From the router R2, is it possible to ping R1

using the command ping 192.168.2.1? ____________ If the answer is no for

the questions above, troubleshoot the configurations to find the error using the

following systematic process:


1. Check the cabling.
Are the routers physically connected? ____________
Are link lights blinking on all relevant ports? ____________
2. Check the router configurations.
Do they match the Topology Diagram? ____________
Did you configure the clock rate command on the DCE side of the link? ____________
3. Check the router interfaces using the show ip interface brief command.
Are the interfaces “up” and “up”? ____________

If your answer to all three steps is yes, then you should be able to successfully
ping from R2 to R1 and from R2 to R3.

Assignment

Step 1: Attempt to ping from the host connected to R1 to the host connected to R2.
______________________________________________________________________

Step 2: Attempt to ping from the host connected to R1 to router R2.


______________________________________________________________________

Task 1:What is missing from the network that is preventing communication between these
devices?
_______________________________________________________________________________
_______________________________________________________________________________

Task 2: Documentation
On each router, capture the following command output to a text (.txt) file and save for future
reference.
 show running-config
63
 show ip route
 show ip interface brief

Appendix

Summary Of Important Keys

Delete - Removes one character to the right of the cursor.


Backspac - Removes one character to the left of the cursor.
e
TAB - Finishes a partial command.
Ctrl-A - Moves the cursor to the beginning of the current
line.
Ctrl-R - Redisplays a line.
Ctrl-U - Erases a line.
Ctrl-W - Erases a word.
Ctrl-Z - Ends configuration mode and returns to the EXEC.
Up Arrow - Allows user to scroll forward through former
commands.
Down - Allows user to scroll backward through former
Arrow commands.
Cisco - Cisco Internetworking Operating System
IOS
CLI - Command Line Interface
EXEC - Command line session to the router (could be console, modem, or
telnet)
Flash - Non-Volatile Memory used to store IOS software image
NVRA - Non-Volatile RAM used to store router configuration
M
RAM - Random Access Memory

64
Lab.9: Configuring Static Routes
Part A: Pre-lab

Objective:
Part 1: Set Up the Topology and Initialize Devices
Part 2: Configure Basic Device Settings and Verify Connectivity
Part 3: Configure Static Routes
 Configure a recursive static route.
 Configure a directly connected static route.
 Configure and remove static routes.
Part 4: Configure and Verify a Default Route

Introduction

Setup a network similar to the one in the diagram. Any router that meets the interface
requirements may be used. Possible routers include 800, 1600, 1700, 2500, 2600 and 2900
routers, or a combination. Refer to the chart at the end of the lab to correctly identify the interface
identifiers to be used based on the equipment in the lab. The configuration output used in this lab
is produced from 2900 series routers.
Any other router used may produce slightly different output. The following steps are intended to be
executed on each router unless specifically instructed otherwise.
Start a HyperTerminal session as performed in the Establishing a HyperTerminal session lab.
Note: Go to the erase and reload instructions at the end of this lab. Perform those steps on all
routers in this lab assignment before continuing.

65
Pre Lab Question
 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

1. What Is Routing?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
2. What Is the difference between Static and Dynamic routing?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
3. What Is ARP?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

Part B: Procedure:

Note: In these exercises we will ignore password settings and simply proceed with the interface
configuration

Connect the network


 Connect the network cables.
 Power-up the Routers

Task 1: Configure both routers

a. Enter the global configuration mode and configure the hostname as shown in the chart.
b. Configure interfaces and IP host tables.

Router1
Sub- Task 1: Setting Hostname
In this exercise you will set the hostname for the router. This changes the router prompt. The
default hostname is router.

Step 1: Enter the privileged mode and then the global configuration mode.
Router>enable or en Router#configure
terminal or conf t

Step 2: Change the hostname to GAD.


Router(config)#hostname GAD

Step 3: Exit the global configuration mode.


GAD(config)#exit

66
This changes the prompt to “GAD#”.

Step 4: View the running-config to ensure the new hostname is set.


Type the following command:
GAD#show running-config or sh run
You should see the hostname specified in running-config.
Note: Repeat the same steps on Router 2 to change its hostname to BHM.
Sub- Task 2: Configuring Router Serial and Ethernet Interfaces
Step 1: Enter into the privileged mode and the global configuration mode.
Router>enable
Router#config t
Step 2: Configuring the serial interface of router
Router(config)#host GAD
GAD(config)#interface serial 0/0 OR interface serial 0

Step 3: Set the IP address and the mask for the serial interface. Type in the following command:
GAD(config-if)#ip address 192.168.15.1 255.255.255.0
Assigning IP address and mask to the serial interface of router 1.

Step 4: Set the clock rate for Serial interface. Type in the following command:
GAD(config-if)#clock rate 56000
This command sets the clock rate for a router with a DCE cable to 56K
Important: You configure the clock rate command ONLY on the DCE interface of the router, and ONLY if
you have no other device (CSU/DSU) providing the clocking.
Clock Rate: The clock rate is just a physical setting for the serial port to be able to handle different type of
load and has nothing to do with actually setting up the speed. This command simply sets the Serial interface
clock rate in BPS (bits per second). It is only applicable on a serial interface.

Step 5: Enable the serial interface. Type in the following command:


GAD(config-if)#no shutdown
This command enables the interface.

Step 6: Exit the router serial configuration mode. Type in the following command:
GAD(config-if)#exit

Step 7: Enter the router Ethernet interface configuration mode. Type in the following command:
GAD(config)#interface fast 0/0
This mode is entered by already being in global configuration mode (see the diagram above) and then entering
interface mode for fast Ethernet.
Step 8: Set the IP address and the mask for the Ethernet interface. Type in the following
command:
GAD(config-if)#ip address 192.168.14.1 255.255.255.0
Assigning IP address and mask to the fast Ethernet interface of GAD.

Step 9: Enable the Ethernet interface. Type in the following command:


GAD(config-if)#no shutdown
This command enables the interface.

Step 10: Exit the router Ethernet configuration mode. Type in the following command:
GAD(config-if)#exit
This changes the prompt to ‘GAD(config#)’

67
Step 11: Configure the interfaces, and hostname on the Router 2
On the Router2, enter the global configuration mode and configure the hostname as shown in the chart.
Finally, configure the interfaces on each router.
Router>enable Router#config
t Router2(config)#host BHM
BHM(config)#interface serial 0/0
BHM(config-if)#ip address 192.168.15.2 255.255.255.0
BHM(config-if)#exit
BHM(config)#interface fast 0/0
BHM(config-if)#ip address 192.168.16.1 255.255.255.0
BHM(config-if)#exit
Task 2: Configure the workstations

Configure the workstations with the proper IP address, subnet mask, and default gateway.
a. The configuration for the host connected to the GAD Router is:
IP Address 192.168.14.2
IP subnet mask 255.255.255.0
Default gateway 192.168.14.1
b. The configuration for the host connected to the BHM Router is:
IP Address 192.168.16.2
IP subnet mask 255.255.255.0
Default gateway 192.168.16.1
Task 3: Testing Connectivity/configuring Static Routes

Step 1: Check connectivity between the workstations using ‘ping’.

From the workstation attached to the GAD router, ping the workstation attached to the BHM router.
C:\>ping 192.168.16.2
Pinging 192.168.16.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.16.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Approximate round trip times in milli-seconds: Minimum
= 0ms, Maximum = 0ms, Average = 0ms
Q1.Was the ping successful?
Q2.Why did the ping fail?

Step 2: Check interface status

Q3. Check the interfaces on both routers with the command show ip interface brief. Q4.
Are all the necessary interfaces up?

Step 3: Check the routing table entries

a. Using the command show ip route, view the IP routing table for GAD.
GAD#show ip route

68
output eliminated
Gateway of last resort is not set
C 192.168.14.0/24 is directly connected, FastEthernet0 C
192.168.15.0/24 is directly connected, Serial0
b. Use the command show ip route, view the IP routing table for BHM.
BHM#show ip route

Q3. Are all of the routes needed in the routing tables?


Q4. "Based on the output from the show ip route command on the GAD and BHM routers, can a host
on network 192.168.16.0 connect to a host on network 192.168.14.0?"
If a route is not in the routers to which the host is connected, the host cannot reach the destination host.
Step 4: Adding static routes

1. How can this situation be changed so that the hosts can ping each other?
Add static routes to each router or run a routing protocol.
2. In global configuration mode, add a static route on GAD (Router1) to network
192.168.16.0 and on BHM (Router2) to network 192.168.14.0.

GAD(config)#ip route 192.168.16.0 255.255.255.0 192.168.15.2


BHM(config)#ip route 192.168.14.0 255.255.255.0 192.168.15.1
Step 5: Verify the new routes
a. Use the command show ip route, view the IP routing table for GAD.

GAD#show ip route
output eliminated
Gateway of last resort is not set
C 192.168.14.0/24 is directly connected, FastEthernet0 C
192.168.15.0/24 is directly connected, Serial0
S 192.168.16.0/24 [1/0] via 192.168.15.2
b. Using the command show ip route, view the IP routing table for BHM.
BHM>show ip route
Output eliminated.
Gateway of last resort is not set
S 192.168.14.0/24 [1/0] via 192.168.15.1
C 192.168.15.0/24 is directly connected, Serial0
C 192.168.16.0/24 is directly connected, FastEthernet0
Q5. Can a host on subnet 192.168.16.0 see a host on network 192.168.14.0?

Step 6: ping host to host again

a. Check connectivity between the workstations using ping. From the workstation attached to the GAD
router, ping the workstation attached to the BHM router.

C:\>ping 192.168.16.2
Pinging 192.168.16.2 with 32 bytes of data:
Reply from 192.168.16.2: bytes=32 time=20ms TTL=254
Reply from 192.168.16.2: bytes=32 time=20ms TTL=254
Reply from 192.168.16.2: bytes=32 time=20ms TTL=254

69
Reply from 192.168.16.2: bytes=32 time=20ms TTL=254
Ping statistics for 192.168.16.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate
round trip times in milli-seconds:
Minimum = 20ms, Maximum = 20ms, Average = 20ms
b. If the ping was not successful, check routing table to make sure static routes are entered correctly.
Upon completion of the previous steps, logoff by typing exit. Turn the router off.

Assignment:

In this activity, the basic device configuration is done; all router interfaces and PC’s
are configured with the address delivered in the below addressing table, you should
use static routes to ensure the full connectivity between all devices in the network.
Use the following instructions:
1. Configure Router 1&Router2 static routes use exit interface.
2. Configure Router 0 static routes use next hop ip address.
3. Configure ISP static routes use next hop ip address; note that this route should be
summarized.
. Configure Router 1 last resort as serial 2/0 and router 0 as 60.0.0.2.

Device Interface IP Address Subnet Mask Default Gateway


Fa0/0 192.168.1.65 255.255.255.224 N/A
Fa1/0 192.168.1.97 255.255.255.224 N/A
Router0
S2/0 50.0.0.1 255.255.255.252 N/A
S3/0 60.0.0.1 255.255.255.252 N/A
Fa0/0 192.168.1.1 255.255.255.224 N/A
Router1 Fa1/0 192.168.1.33 255.255.255.224 N/A
S2/0 50.0.0.2 255.255.255.252 N/A
Fa0/0 192.168.1.129 255.255.255.224 N/A
Fa1/0 192.168.1.161 255.255.255.224 N/A
Router2
S2/0 60.0.0.2 255.255.255.252 N/A
S3/0 100.0.0.1 255.255.255.252 N/A
ISP S2/0 100.0.0.2 255.255.255.252 N/A
PC0 Fa0 192.168.1.2 255.255.255.224 192.168.1.1
PC1 Fa0 192.168.1.34 255.255.255.224 192.168.1.33
PC2 Fa0 192.168.1.66 255.255.255.224 192.168.1.65
PC3 Fa0 192.168.1.98 255.255.255.224 192.168.1.97
PC4 Fa0 192.168.1.130 255.255.255.224 192.168.1.129
PC5 Fa0 192.168.1.162 255.255.255.224 192.168.1.161

70
Lab .10: Configuring Dynamic Routes

Part A: Pre-lab

Objective: Configure a Network using Distance Vector Routing protocol.

 RIP

Introduction:

 Routing Information Protocol (RIP) is a dynamic routing protocol which uses hop count as a
routing metric to find the best path between the source and the destination network. It is a distance
vector routing protocol which has Administrative distance (AD) value 120 and works on the
application layer of OSI model. RIP uses port number 520.
 Hop Count:
Hop count is the number of routers occurring in between the source and destination network. The
path with the lowest hop count is considered as the best route to reach a network and therefore
placed in the routing table. RIP prevents routing loops by limiting the number of hopes allowed in a
path from source and destination. The maximum hop count allowed for RIP is 15 and hop count of
16 is considered as network unreachable.

Pre Lab Question


 Read thoroughly and prepare the experiment sheet.
 You should try using Packet Tracer at home before the lab session.
 You must bring a printed copy of this experiment with you to the lab.

1. What is RIP (Routing Information Protocol)?


--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

2. What is the difference between RIP and Distance vetor routing protocol?
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

Part B: Procedure:
1. Develop a Topology shown in figure given below.
3. Configure all Routers
4. Implement RIP protocols in Router to configure Network.

71
Router0 configuration.....

Continue with configuration dialog? [yes/no]: no

Press RETURN to get

started! Router>
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname router0

router0(config)#int lo0

%LINK‐5‐CHANGED: Interface Loopback0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface Loopback0, changed state to up
router0(config‐if)#ip address 10.1.1.1 255.255.255.0
router0(config‐if)#int f0/0
router0(config‐if)#ip address 10.1.12.1
255.255.255.0 router0(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/0, changed state


to up router0(config‐if)#int f 0/1
router0(config‐if)#ip address 10.1.14.1
255.255.255.0 router0(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/1, changed state


to up router0(config‐if)#end

72
%SYS‐5‐CONFIG_I: Configured from console by console router0#wr
Building configuration...
[OK]
router0#
router0#
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

router0 con0 is now available

Press RETURN to get started.

router0>
router0>en
router0#con
fig t
Enter configuration commands, one per line. End with CNTL/Z.
router0(config)#router rip
router0(config‐router)#net 10.0.0.0
router0(config‐router)# router0(config‐
router)#end
%SYS‐5‐CONFIG_I: Configured from console by
console router0#show ip route
Codes: C ‐ connected, S ‐ static, I ‐ IGRP, R ‐ RIP, M ‐ mobile, B ‐
BGP D ‐ EIGRP, EX ‐ EIGRP external, O ‐ OSPF, IA ‐ OSPF inter
area
N1 ‐ OSPF NSSA external type 1, N2 ‐ OSPF NSSA external type
2 E1 ‐ OSPF external type 1, E2 ‐ OSPF external type 2, E ‐ EGP
i ‐ IS‐IS, L1 ‐ IS‐IS level‐1, L2 ‐ IS‐IS level‐2, ia ‐ IS‐IS inter area
* ‐ candidate default, U ‐ per‐user static route, o ‐
ODR P ‐ periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 3 subnets


C 10.1.1.0 is directly connected, Loopback0
C 10.1.12.0 is directly connected, FastEthernet0/0 C 10.1.14.0 is directly connected, FastEthernet0/1
router0#
router0#

Router1 Configuration.....

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo0
%LINK‐5‐CHANGED: Interface Loopback0, changed state to up
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config‐if)#ip address 10.1.2.1 255.255.255.0
Router(config‐if)#no
shut Router(config‐
if)#int f0/1 73
Router(config‐if)#ip address 10.1.23.1
255.255.255.0 Router(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/1, changed state


to up Router(config‐if)#int f0/0
Router(config‐if)#ip address 10.1.12.2
255.255.255.0 Router(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config‐if)#end
%SYS‐5‐CONFIG_I: Configured from console by
console Router#wr
Building configuration...
[OK]
Router#
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/1, changed state

to up Router con0 is now available

Press RETURN to get started.

Router>
Router>en
Router#con t

% Ambiguous command: "con t" Router#co t


% Ambiguous command:
"co t" Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config‐router)#net 10.0.0.0
Router(config‐router)#
Router(config‐router)#
Router(config‐router)#end
%SYS‐5‐CONFIG_I: Configured from console by
console Router#

Router2 Configuration.....

Continue with configuration dialog? [yes/no]: no

Press RETURN to get

74
started! Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo0

%LINK‐5‐CHANGED: Interface Loopback0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config‐if)#ip address 10.1.3.1 255.255.255.0
Router(config‐if)#no shut Router
(config‐if)#int f0/0
Router(config‐if)#ip address 10.1.23.2 255.255.255.0
Router(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config‐if)#int f0/1
Router(config‐if)#ip address 10.1.34.1 255.255.255.0
Router(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/1, changed state


to up Router(config‐if)#End
%SYS‐5‐CONFIG_I: Configured from console by console

Router#wr
Building configuration...
[OK]
Router# Router# Router#
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router con0 is now available

Press RETURN to get started.

Router>
Router>
Router>en
Router#show ip route
Codes: C ‐ connected, S ‐ static, I ‐ IGRP, R ‐ RIP, M ‐ mobile, B ‐
BGP D ‐ EIGRP, EX ‐ EIGRP external, O ‐ OSPF, IA ‐ OSPF inter
area
N1 ‐ OSPF NSSA external type 1, N2 ‐ OSPF NSSA external type
2 E1 ‐ OSPF external type 1, E2 ‐ OSPF external type 2, E ‐ EGP
i ‐ IS‐IS, L1 ‐ IS‐IS level‐1, L2 ‐ IS‐IS level‐2, ia ‐ IS‐IS inter area
* ‐ candidate default, U ‐ per‐user static route, o ‐
ODR P ‐ periodic downloaded static route

Gateway of last resort is not set 10.0.0.0/24 is subnetted, 3 subnets


C 10.1.3.0 is directly connected, Loopback0
C 10.1.23.0 is directly connected,
FastEthernet0/0 C 10.1.34.0 is directly

75
connected, FastEthernet0/1 Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config‐router)#net 10.0.0.0
Router(config‐router)#end
%SYS‐5‐CONFIG_I: Configured from console by
console Router#
Router# Router#show ip route
Codes: C ‐ connected, S ‐ static, I ‐ IGRP, R ‐ RIP, M ‐ mobile, B ‐
BGP D ‐ EIGRP, EX ‐ EIGRP external, O ‐ OSPF, IA ‐ OSPF inter
area
N1 ‐ OSPF NSSA external type 1, N2 ‐ OSPF NSSA external type
2 E1 ‐ OSPF external type 1, E2 ‐ OSPF external type 2, E ‐ EGP
i ‐ IS‐IS, L1 ‐ IS‐IS level‐1, L2 ‐ IS‐IS level‐2, ia ‐ IS‐IS inter area
* ‐ candidate default, U ‐ per‐user static route, o ‐ ODR P ‐ periodic downloaded static route

Gateway of last resort is not set 10.0.0.0/24 is subnetted, 7 subnets


R 10.1.1.0 [120/2] via 10.1.23.1, 00:00:19, FastEthernet0/0
R 10.1.2.0 [120/1] via 10.1.23.1, 00:00:19, FastEthernet0/0
C 10.1.3.0 is directly connected, Loopback0
R 10.1.12.0 [120/1] via 10.1.23.1, 00:00:19, FastEthernet0/0
R 10.1.14.0 [120/2] via 10.1.23.1, 00:00:19, FastEthernet0/0
C 10.1.23.0 is directly connected, FastEthernet0/0

C 10.1.34.0 is directly connected, FastEthernet0/1 Router#


Router#
Router#

Router3 Configuration.......
Continue with configuration dialog? [yes/no]: no

Press RETURN to get

started! Router>
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo0

%LINK‐5‐CHANGED: Interface Loopback0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config‐if)#int f0/0
Router(config‐if)#ip address 10.1.34.2
255.255.255.0 Router(config‐if)#no shut

%LINK‐5‐CHANGED: Interface FastEthernet0/0, changed state to up


%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config‐if)#
Router(config‐if)#int f0/1
Router(config‐if)#ip address 10.1.14.2 255.255.255.0
Router(config‐if)#no shut
%LINK‐5‐CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO‐5‐UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config‐if)#end
%SYS‐5‐CONFIG_I: Configured from console by console Router#wr
Building configuration... 76
[OK]
Router#
Router#
Router#show ip route
Codes: C ‐ connected, S ‐ static, I ‐ IGRP, R ‐ RIP, M ‐ mobile, B ‐
BGP D ‐ EIGRP, EX ‐ EIGRP external, O ‐ OSPF, IA ‐ OSPF inter
area
N1 ‐ OSPF NSSA external type 1, N2 ‐ OSPF NSSA external type
2 E1 ‐ OSPF external type 1, E2 ‐ OSPF external type 2, E ‐ EGP
i ‐ IS‐IS, L1 ‐ IS‐IS level‐1, L2 ‐ IS‐IS level‐2, ia ‐ IS‐IS inter area
* ‐ candidate default, U ‐ per‐user static route, o ‐
ODR P ‐ periodic downloaded static route

Gateway of last resort is not set


10.0.0.0/24 is subnetted, 2 subnets
C 10.1.14.0 is directly connected, FastEthernet0/1 C 10.1.34.0 is directly connected, FastEthernet0/0
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config‐router)#net 10.0.0.0
Router(config‐router)#

Router(config‐router)#end
%SYS‐5‐CONFIG_I: Configured from console by console Router#show ip route
Codes: C ‐ connected, S ‐ static, I ‐ IGRP, R ‐ RIP, M ‐ mobile, B ‐
BGP D ‐ EIGRP, EX ‐ EIGRP external, O ‐ OSPF, IA ‐ OSPF inter
area
N1 ‐ OSPF NSSA external type 1, N2 ‐ OSPF NSSA external type
2 E1 ‐ OSPF external type 1, E2 ‐ OSPF external type 2, E ‐ EGP
i ‐ IS‐IS, L1 ‐ IS‐IS level‐1, L2 ‐ IS‐IS level‐2, ia ‐ IS‐IS inter area
* ‐ candidate default, U ‐ per‐user static route, o ‐
ODR P ‐ periodic downloaded static route

Gateway of last resort is not set 10.0.0.0/24 is subnetted, 7 subnets


R 10.1.1.0 [120/1] via 10.1.14.1, 00:00:09, FastEthernet0/1
R 10.1.2.0 [120/2] via 10.1.34.1, 00:00:14, FastEthernet0/0
[120/2] via 10.1.14.1, 00:00:09, FastEthernet0/1
R 10.1.3.0 [120/1] via 10.1.34.1, 00:00:14, FastEthernet0/0
R 10.1.12.0 [120/1] via 10.1.14.1, 00:00:09, FastEthernet0/1
C 10.1.14.0 is directly connected, FastEthernet0/1
R 10.1.23.0 [120/1] via 10.1.34.1, 00:00:14, FastEthernet0/0
C 10.1.34.0 is directly connected,
FastEthernet0/0
Router#
Assignment:
You are given a network diagram that must be addressed as the below
table, Complete device addressing and network simulation steps
(Use your experiment material to get the complete steps) until you 77
reach 100% score in the activity window.
Use 56000 clock rate between Router0 and Router1.

Device Interface IP Address Subnet Mask Default Gateway


Fa0/0 192.168.1.1 255.255.255.0 N/A
Router 0
S2/0 50.0.0.1 255.0.0.0 N/A
Fa0/0 172.16.1.1 255.255.0.0 N/A
Router 1 Fa1/0 172.17.1.1 255.255.0.0 N/A
S2/0 50.0.0.2 255.0.0.0 N/A
PC 0 NIC 172.16.1.2 255.255.0.0 172.16.1.1
PC 1 NIC 192.168.1.2 255.255.255.0 192.168.1.1
PC 2 NIC 172.17.1.2 255.255.0.0 172.17.1.1
PC 3 NIC 192.168.1.3 255.255.255.0 192.168.1.1
Note: Configure Both Routers with RIPv2 routing protocol by
entering the following commands on the CLI tab:
78

Potrebbero piacerti anche