EEE314 LabManual ModassirIshfaq
EEE314 LabManual ModassirIshfaq
Supervised By
Dr. Ali Nawaz Khan
Semester ___________________________
Revision History
S.No. Update Date Performed by
Learning Outcomes
Theory CLOs:
1. Describe and identify data communications and networks, OSI and TCP/IP models (PLO1-C1)
2. Analyse the ubiquitous service architectures and important application-level protocols along with
their corresponding associated applications in conjunction with transport layer services. (PLO2-
C4)
3. Analyse modern transport, routing, switching, addressing techniques and create small to large
enterprise business solutions with higher robustness. (PLO2-C4)
Lab CLOs
4. Design and analyze networks with the help of simulators and tools (wireshark, packet tracer,
OPNET) based on modern networking techniques(PLO5-P7)
5. To be able to compare, contrast and analyze various network algorithms/protocols and propose
feasible solutions to computer network problems based on network theory (PLO2-C4)
6. To explain and write effective lab reports of experiments performed during lab based on lab
performance during scheduled classes. (PLO10-A3)
PLO3
PLO4
PLO5
CLO
CLO1 X C1
CLO2 X C4
CLO3 X C4
CLO4 X P7
CLO5 X C4 A3
CLO6 X A3
Lab 10
Lab 11
Lab 12
Lab 13
Lab 14
Lab 1
Lab 2
Lab 3
Lab 4
Lab 5
Lab 6
Lab 7
Lab 8
Lab 9
CLO
CLO4 X X X X X X X X X
CLO5 X X X X X
CLO6 X X X X X X X X X X X X X X
Grading Policy
S-I 0.5*(S-I Exam result) + 0.5* (average of lab evaluation of Lab 1-4)
S-II 0.5*(S-II Exam result) + 0.5*[(average of lab evaluation of Lab 5-8) * 1.5]
Terminal 0.5*(Terminal Exam result) +0.25*[(average of lab evaluation of Lab 9-12) *5] + 0.10*[(average
of lab evaluation of Lab 5-8)*5] + 0.15*[(average of lab evaluation of Lab 1-4)*5]
Software Resources
Wireshark Packet Sniffer
Cisco Packet Tracer
OPNET IT GURU v9.1
Lab Instructions
All labs comprise of three parts: Pre-Lab, In-Lab and Post-Lab Exercises
The students should complete and demonstrate each lab task separately for step-wise evaluation
(please ensure that course instructor/lab engineer has signed each step after ascertaining its functional
verification)
Only those tasks that completed during the allocated lab time will be credited to the students. Students
are however encouraged to practice on their own in spare time for enhancing their skills
Lab objectives
Configuration codes
Conclusions
Students should display and must be prepared to show student ID card when requested by lab staff
Note the location of the Emergency Disconnect (red button near the door) to shut off power in an
emergency
Students are allowed in the laboratory only when the instructor is present
When the lab exercise is over, all instruments, except computers, must be turned off. Return all
equipment to the designated location. Your lab grade will be affected if your laboratory station is not
tidy when you leave
Do not move instruments from one lab station to another lab station
Do not place books or personal belonging on any printer, monitor or computer equipment. This can
interfere with hardware operation and/or inhibit proper cooling functions for the equipment
Do not download software from the internet onto the computer in the lab unless authorized to do so
Once a computer is turned on, leave it on. Never shut down a computer
Do not leave important data file on the hard drive of the computer in the lab. We routinely go through
the machines and delete files that are not part of the normal software suite
To explain the Basic Idea about OSI Reference Model, Networking Devices and
Transmission Media based on networking standards
Objectives
Identifyand distinguishmultiple transmission media and devices based on IETF & IEEE
standards.
To comprehend the concept of layers using OSI reference model and TCP IP protocol stack.
Pre-Lab Reading
Read this experiment in its entirety to become familiar with objectives of this lab. Also review the portions of
chapter 2 and 4 of your text book and try to understand the OSI Reference Model and transmission media.You
may record the terms and sections that require more elaboration for reference. The instructor may provide the
class some time to reflect upon these before proceeding with the lab.
TheOSIReferenceModel
OSI stands for Open Systems Interconnection, is a logical model, not a physical one. It’s essentially a set of
guidelines that developers can use to create and implement applications to run on a network. It also provides a
framework for creating and implementing networking standards, devices, and internetworking schemes. One
of best gifts the OSI specifications gives us is paving the way for the data transfer between disparate hosts
running different operating systems, like Unix hosts, Windows machines, Macs, smartphones, and so on. The
OSI reference model has the following seven layers:
Application layer (layer 7)
Presentation layer (layer 6)
Session layer (layer 5)
Transport layer (layer 4)
Network layer (layer 3)
Data Link layer (layer 2)
Physical layer (layer 1)
The OSI seven different layers, divided into two groups. The top three layers define how the applications
within the end stations will communicate with each other as well as with users. The bottom four layers define
how data is transmitted end to end.
Users interact with the computer at the Application layer and also that the upper layers are responsible for
applications communicating between hosts. None of the upper layers knows anything about networking or
network addresses because that’s the responsibility of the four bottom layers.
In Figure 1.2, which shows the four lower layers and their functions, you can see that it’s these four bottom
layers that define how data is transferred through physical media like wire, cable, fiber optics, switches, and
routers. These bottom layers also determine how to rebuild a data stream from a transmitting host to a
destination host’s application.
Transport
Provides reliable or unreliable delivery
Performs error correction before retransmit
Network
Provides logical addressing, which routers use for path determination
Data Link
Combines packets into bytes and bytes into frames
Provides access to media using MAC address
Performs error detection not correction
Physical
Moves bits between devices
Specifies voltage, wire speed, and pinout of cables
In the upcoming labs we will analyze real time packets transferred from one host to another. Also simulate
protocols of network and data link layers.
Internet Protocol (IP)
The Internet Protocol (IP) is one of the most important protocols in the Internet. The IP protocol
specifies the format of the packets that are sent and received among routers and end systems.
IP Address
In the Internet, every end system has an address called an IP address. When a source end system wants to send
a packet to a destination end system, the source includes the destination’s address in the packets.
Network Devices
Hubs
The hub is the active central element of the star layout. Each station is connected to the hub by two lines
(transmit and receive).The hub acts as a repeater: When a single station transmits, the hub repeats the signal
on the outgoing line to each station.
Figure 1.1
Router
Routers can be considered as layer 3 switches. Unlike layer 2 switches, which forward or filter frames, routers
use logical addressing and provide an important capacity called packet switching. Router performs following
functions in network:
Packet switching
Packet filtering
Internetwork communication
Transmission Media
Data transmission occurs between transmitter and receiver over some transmission medium.
Transmission media may be classified as guided or unguided. In both cases, communication is in the
form of electromagnetic waves. With guided media, the waves are guided along a physical path;
examples of guided media are twisted pair, coaxial cable, and optical fiber. Here we will discuss the
transmission medium we will use in for connection between the network devices in Lab.
Twisted Pair
The least expensive and most widely used guided transmission medium is twisted pair. Twisted pair cable has
four pairs of wires twisted inside it to eliminate electrical interference. Twisted pair cables are connected
using RJ-45 connectors that have eight connector pins to connect through Ethernet port. Twisted pair comes in
two varieties: unshielded and shielded. Twisted pair cable is shown in Figure 1.2
Twisted pair cables are used in following configurations and for different purposes, to form an internetwork.
Straight-through
Crossover
Rollover
Straight-through
A straight-through cable is the standard network cable connection and is used to connect the source and
destination hosts through an internetworking device. Specifically, you can use it to connect a host to a hub or
switch. Configuration of twisted pair cable as straight-through is shown in Figure 1.3.
Crossover
A crossover cable is the standard network cable connection and is used to connect same source and destination
hosts in a network. Specifically, you can use it to connect a computer to a computer or switch to switch or
router to a host (i.e. computer). Configuration of twisted pair cable as crossover is shown in Figure 1.3.
Figure 1.3
Rollover
These Cisco proprietary cables used to connect to a router or switch console port. In a rollover cable (8 pins)
RJ-45 connectors are usually present at one ends and DB-9 at other. It is used to configure cisco network
devices. A router or a switch connects through RJ-45 connector to a computer COM port through DB-9
connectors. Configuration of twisted pair as rollover is shown in Figure 1.4.
Explore different networking devices and make connections between them to make your first small network.
Your lab instructor will elaborate further how cables are represented in this simulator. Here you will take a
brief introduction. You will explore Cisco Packet Tracer in next lab.
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
To analyse and explain the syntax and semantics of Application Layer Service
and Protocols using Wireshark
Objectives
Upon completion of this lab, you will know:
To analyse and show the contents captured in Wireshark related to HTTP, SMTP, POP and DNS.
To showthe network transactions between clients and DNS server using Wireshark.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Hyper Text Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP) and
Domain Name Server (DNS) provided with this laboratory experiment and in chapter 2 of the reference
book.HaveWireshark Packet Sniffer software program installed on your PC and review how to
capture/analyse packets.You may record the terms and sections that require more elaboration for reference.
The instructor may provide the class some time to reflect upon these before proceeding with the lab.
operating
system Transport (TCP/UDP)
packet Network (IP)
capture copy of all Ethernet
frames sent/received
Link (Ethernet)
(pcap)
Physical
The second component of a packet sniffer is the packet analyser, which displays the contents of all fields
within a protocol message. In order to do so, the packet analyser must “understand” the structure of all
messages exchanged by protocols.
We will be using the Wireshark packet sniffer for these labs, allowing us to display the contents of messages
being sent/received from/by protocols at different levels of the protocol stack.
Running Wireshark
When you run the Wireshark program, you’ll get a startup screen
Take a look at the upper left hand side of the screen – you’ll see an “Interface list”. This is the list of network
interfaces on your computer. Once you choose an interface, Wireshark will capture all packets on that
interface. Start Wireshark on your computer system is there an Ethernet interface?
_________________________________________________________________________________
_________________________________________________________________________________
Click on Ethernet interface and then start. A screen like the one below will be displayed, showing information
about the packets being captured. Once you start packet capture, you can stop it by using the Capture pull
down menu and selecting Stop.
display filter
specification
listing of
captured
packets
details of
selected
packet
header
packet content
in hexadecimal
and ASCII
Figure 3: Wireshark Graphical User Interface, during packet capture and analysis
Figure 10.6: Wireshark GUI, during packet capture and analysis
Step 1: Check if your computer is connected to the Internet via a wired Ethernet
interface? Do the following
Start up your favourite web browser, which will display your selected homepage.
Start up the Wireshark software.
To begin packet capture, select the Capture pull down menu and select Interfaces. This will cause the
“Wireshark: Capture Interfaces” window to be displayed, as shown in Figure 3.
In-Lab Exercise
Task 1: Capture and Analyse HTTP trace
Step 1: Let’s begin our exploration of HTTP by accessing a website. Do the following:
Start up your web browser.
Enter “http” (just the letters, not the quotation marks) in the display-filter-specification window, so
that only captured HTTP messages will be displayed later in the packet-listing window.
Wait a bit more than one minute (we’ll see why shortly), and then begin Wireshark packet capture.
Enter the address to your browserhttps://www.google.com.pk
As web page appear on browser, go to Wireshark window and stop packet capture.
What do you observe in packet-listing window?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What languages (if any) does your browser indicate that it can accept to the server?
_________________________________________________________________________________
_________________________________________________________________________________
What is the IP address of your computer?
_________________________________________________________________________________
_________________________________________________________________________________
What is the IP address of google server?
_________________________________________________________________________________
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 11
_________________________________________________________________________________
How many bytes of content are being returned to your browser?
_________________________________________________________________________________
_________________________________________________________________________________
What is the source and destination port number?
_________________________________________________________________________________
_________________________________________________________________________________
How long did it take from when the HTTP GET message was sent until the HTTP OK reply was received?
_________________________________________________________________________________
_________________________________________________________________________________
What is date and time of server in HTTP received packets?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
The IP address and the port used by the SMTP server
_________________________________________________________________________________
_________________________________________________________________________________
Who is sending the Email?
_________________________________________________________________________________
_________________________________________________________________________________
Who is receiving the Email?
_________________________________________________________________________________
_________________________________________________________________________________
When was the Email sent?
_________________________________________________________________________________
_________________________________________________________________________________
What was the message, and what was the subject of the Email?
_________________________________________________________________________________
_________________________________________________________________________________
With SMTP, which character sequence is used to end the message?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
The IP address and the port used by the POP-3 server
_________________________________________________________________________________
_________________________________________________________________________________
Whose mail box is being accessed?
_________________________________________________________________________________
_________________________________________________________________________________
How many email messages are in the Inbox?
_________________________________________________________________________________
_________________________________________________________________________________
Which command does POP-3 use to get a specific message?
_________________________________________________________________________________
_________________________________________________________________________________
For Message 1, who sent the message and what is the subject and outline the content of the message?
_________________________________________________________________________________
_________________________________________________________________________________
Which command does POP-3 use to get a specific message?
_________________________________________________________________________________
_________________________________________________________________________________
DNS
The Domain Name System (DNS) translates hostnames to IP addresses, fulfilling a critical role in the Internet
infrastructure. In this lab, we’ll take a closer look at the client side of DNS. Client’s role in the DNS is
relatively simple – a client sends a query to its local DNS server, and receives a response back.
In this lab we will get DNS record and analyse it. Also trace the packets between your computer and DNS
server.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Run following command and write down your observations
nslookup –type=NS www.google.com
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Run following command and write down your observations
You can indicate that you want to the query sent to any DNS server rather than to the default DNS server.
Like in the following example we send query to google public DNS server. Thus, the query and reply
transaction takes place directly between our querying host and 8.8.8.8.
nslookupwww.hotmail.com8.8.8.8
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Run the following command in Command Prompt and write down your observations
ipconfig /displaydns
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Run the following command in Command Prompt and write down your observations
ipconfig /flushdns
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What is the destination port for the DNS query message? What is the source port of DNS response message?
_________________________________________________________________________________
_________________________________________________________________________________
To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local
DNS server. Are these two IP addresses the same?
_________________________________________________________________________________
_________________________________________________________________________________
Examine the DNS query message. What “Type” of DNS query is it? Does the query message contain any
“answers”?
_________________________________________________________________________________
_________________________________________________________________________________
Examine the DNS response message. How many “answers” are provided? What do each of these answers
contain?
_________________________________________________________________________________
_________________________________________________________________________________
Consider the subsequent TCP SYN packet sent by your host. Does the destination IP address of the SYN
packet correspond to any of the IP addresses provided in the DNS response message?
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Upon completion of this lab, you will know about:
To illustrate and explainhand shaking process in TCP setup and connection termination procedure.
To explain TCP flow and congestion control mechanism using traces in Wireshark.
To displayand explain thecontents in UDP segments captured by using Wireshark.
To explain ICMP messages generated using trace route program.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and Internet
Control Message Protocol (ICMP) provided with this laboratory experiment and in chapter 3 of the reference
book. You may record the terms and sections that require more elaboration for reference. The instructor may
provide the class some time to reflect upon these before proceeding with the lab.
In-Lab Exercise
Task1: Capturing a bulk TCP transfer from your computer to a remote server
Before beginning our exploration of TCP, we’ll need to use Wireshark to obtain a packet trace of the TCP
transfer of a file from your computer to a remote server. You’ll do so by accessing a Web page that will allow
you to enter the name of a file stored on your computer (which contains the ASCII text of Alice in
Wonderland), and then transfer the file to a Web server using the HTTP POST method. We’re using the POST
method rather than the GET method as we’d like to transfer a large amount of data from your computer to
another computer. Of course, we’ll be running Wireshark during this time to obtain the trace of the TCP
segments sent and received from your computer.
Step 1:Start up your web browser. Go the http://gaia.cs.umass.edu/wireshark-labs/alice.txt and retrieve an
ASCII copy of Alice in Wonderland. Store this file somewhere on your computer.
Step 2:Next go to http://gaia.cs.umass.edu/wireshark-labs/TCP-wireshark-file1.html. Use the Browse button in
this form to enter the name of the file (full path name) on your computer containing Alice in Wonderland (or
do so manually).Don’t yet press the “Upload alice.txt file” button.
Step 3:Now start up Wireshark and begin packet capture (Capture->Start) and then press OK on the
Wireshark Packet Capture Options screen (we’ll not need to select any options here).
Step 4:Returning to your browser, press the “Upload alice.txt file” button to upload the file to the
gaia.cs.umass.edu server. Once the file has been uploaded, a short congratulations message will be displayed
in your browser window.
Step 5:Stop Wireshark packet capture. Your Wireshark window should look similar to the window shown
below.
_________________________________________________________________________________
Task 2: Analyse the captured trace
Before analysing the behaviour of the TCP connection in detail, let’s take a high level view of the trace.
Step 1:First, filter the packets displayed in the Wireshark window by entering “tcp” into the display filter
specification window.
What changes have you observed in the captured trace?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Answer the following question by analysing the captured trace.
What is the IP address and TCP port number used by the client computer (source) that is transferring
the file to gaia.cs.umass.edu?
_________________________________________________________________________________
What is the IP address of gaia.cs.umass.edu? On what port number is it sending and receiving TCP
segments for this connection?
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: This lab is about TCP rather than HTTP, so change Wireshark’s “listing of captured packets” window
so that it shows information about the TCP segments containing the HTTP messages, rather than about the
HTTP messages. To have Wireshark do this, select Analyse->Enabled Protocols. Then uncheck the HTTP
box and select OK.
What changes have you observed in the captured trace now?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client computer in
reply to the SYN? What is the value of the Acknowledgement field in the SYNACK segment? How did
gaia.cs.umass.edu determine that value? What is it in the segment that identifies the segment as a SYNACK
segment?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What is the sequence number of the TCP segment containing the HTTP POST command?
_________________________________________________________________________________
_________________________________________________________________________________
Consider the TCP segment containing the HTTP POST as the first segment in the TCP connection and fill the
following table.
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 21
Sr.# Sequence Number Sent Time ACK Received time Calculated RTT value
_________________________________________________________________________________
What is the minimum and maximum amount of available buffer space advertised at the received for the entire
trace?
_________________________________________________________________________________
_________________________________________________________________________________
Are there any retransmitted segments in the trace file? What did you check for (in the trace) in order to answer
this question?
_________________________________________________________________________________
_________________________________________________________________________________
How much data does the receiver typically acknowledge in an ACK?
_________________________________________________________________________________
_________________________________________________________________________________
Step 2:Use Wireshark’s TCP graphing utilities to plot out data and examine the amount of data sent per unit
time from the client to the server. Select the menu: Statistics->TCP Stream Graph-> Time-Sequence-
Graph(Stevens). Your graph will look like.
_________________________________________________________________________________
Use the Time-Sequence-Graph(Stevens) plotting tool to view the sequence number versus time plot of
segments being sent from the client to the gaia.cs.umass.edu server. Can you identify where TCP’s slowstart
phase begins and ends, and where congestion avoidance takes over? Comment on ways in which the
measured data differs from the idealized behaviour of TCP that we’ve studied in the text.
_________________________________________________________________________________
_________________________________________________________________________________
What is the throughput (bytes transferred per unit time) for the TCP connection?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Select one UDP packet from your trace. From this packet, determine how many fields there are in the UDP
header. Name these fields.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
By consulting the displayed information in Wireshark’s packet content field for this packet, determine the
length (in bytes) of each of the UDP header fields.
_________________________________________________________________________________
_________________________________________________________________________________
What is the value in the Length field of segment? Verify your claim with your captured UDP packet by
reason.
_________________________________________________________________________________
_________________________________________________________________________________
What is the largest possible source port number?
_________________________________________________________________________________
_________________________________________________________________________________
What is the protocol number for UDP and TCP? Give your answer in both hexadecimal and decimal notation.
(Hint: You’ll need to look into the Protocol field of the IP datagram containing this UDP segment)
_________________________________________________________________________________
_________________________________________________________________________________
Examine a pair of UDP packets in which your host sends the first UDP packet and the second UDP packet is a
reply to this first UDP packet. Describe the relationship between the port numbers in the two packets. (Hint:
for a second packet to be sent in response to a first packet, the sender of the first packet should be the
destination of the second packet).
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Enter the ip address obtained in Scenario Task 1, after ping command and write your observations
ping_____________________________ (IP Address)
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What is the IP address of the destination host?
_________________________________________________________________________________
_________________________________________________________________________________
Examine one of the ping request packets sent by your host. What are the ICMP type and code numbers?
_________________________________________________________________________________
_________________________________________________________________________________
What other fields does this ICMP packet have?
_________________________________________________________________________________
_________________________________________________________________________________
How many bytes are the checksum, sequence number and identifier fields?
_________________________________________________________________________________
_________________________________________________________________________________
Examine the corresponding ping reply packet. What are the ICMP type and code numbers?
_________________________________________________________________________________
_________________________________________________________________________________
What other fields does this ICMP packet have?
_________________________________________________________________________________
_________________________________________________________________________________
How many bytes are the checksum, sequence number and identifier fields?
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objective
Upon completion of this lab, you will be able to learn:
To trace configuration procedures for basic layer 3 devices using command line interface in Packet
Tracer.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Have Cisco Packet
Tracer software program installed on your PC and review how to simulate/designs network
topologies within it.You may record the terms and sections that require more elaboration for
reference. The instructor may provide the class some time to reflect upon these before proceeding
with the lab.
In-Lab Exercise
In this lab activity, you will review previously learned skills including cabling devices, establishing a console
connection, and basic IOS command line interface operation and configuration commands. You will also learn
to save configuration file and capture your configurations to a text file. The skills presented in this lab are
essential to complete the rest of the labs in this course.
Topology Diagram
Figure 2.2
Addressing Table
Device Interface IP Address Subnet Mask Default Gateway
_________________________________________________________________________________
Step 3: Enter global configuration mode. Run the following command and write your observations.
Router#configure terminal
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Disable DNS lookup.
Following command is used to disable DNS lookup.
R1(config)#no ip domain-lookup
Why would you want to disable DNS lookup in a lab environment?
_________________________________________________________________________________
_________________________________________________________________________________
What would happen if you disabled DNS lookup in a production environment?
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Configure the EXEC mode password.
Configure the EXEC mode password using the following command. Use class for the password.
R1(config)#enable secret class
OR
R1(config)#enable password class
Write difference between setting password using enable secret and enable password?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Configure the console password on the router.
Run following commands to set console password on the router. Use cisco as the password. When you are
finished, exit from line configuration mode. Write down your observations.
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#
_________________________________________________________________________________
_________________________________________________________________________________
Step 6: Configure the FastEthernet0/0 interface.
Configure the FastEthernet0/0 interface with the IP address 192.168.1.1/24 by using following commands.
Write down your observations
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
_________________________________________________________________________________
_________________________________________________________________________________
Step 7: Configure the Serial0/0/0 interface.
Discuss the difference between DCE and DTE.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Why it is necessary to set one device as DCE and other as DTE on serial interface link?
_________________________________________________________________________________
_________________________________________________________________________________
Configure the Serial0/0/0 interface with the IP address 192.168.2.1/24. Set the clock rate to 64000.
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)#exit
What is the significance of setting clock rate?
_________________________________________________________________________________
Step 8: Use the following command to provide a description for this interface.
R1(config-if)#description Link to R2
What is the significance of description for the interface?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 9: Save the R1 configuration.
Save the R1 configuration using the following command and write your observations
R1#copy running-configstartup-config
_________________________________________________________________________________
_________________________________________________________________________________
What is a shorter version of this command?
_________________________________________________________________________________
_________________________________________________________________________________
Task 4: Perform Basic Configuration of Router R2.
Step 1: For R2, repeat Steps 1 through 6 from Task 3
Step 2: Configure the Serial 0/0/0 interface with the IP address 192.168.2.2/24.
Write commands for configuration.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Configure the FastEthernet0/0 interface with the IP address 192.168.3.1/24. Writecommands for
configuration.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Save the R2 configuration.
Save the R2 configuration as done in Task 3 step 9.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2:Verify interface configurations.
Another common problem is router interfaces that are not configured correctly or not activated. Use the
following command to quickly verify the configuration of each router’s interfaces. Write your observations
R1#show ip interface brief
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3:Test connectivity using ping.
The ping command is a useful tool for troubleshooting Layers 1 through 3 of the OSI model and diagnosing
basic network connectivity. This operation can be performed at either the user or privileged EXEC modes.
Using ping sends an Internet Control Message Protocol (ICMP) packet to the specified device and then waits
for a reply. Pings can be sent from a router or a host PC. Use the ping command to test connectivity between
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 36
the R1 router and PC1. Write your observation.
R1#ping 192.168.1.10
_________________________________________________________________________________
_________________________________________________________________________________
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? ______________________
Task 7:Reflection
Step 1: Attempt to ping from the host connected to R1 to the host connected to R2.
This ping should be unsuccessful.
Step 2:Attempt to ping from the host connected to R1 to router R2.
This ping should be unsuccessful.
Step 3:Attempt to ping from the host connected to R2 to router R1.
This ping should be unsuccessful.
What is missing from the network that is preventing communication between these devices?
_________________________________________________________________________________
_________________________________________________________________________________
Task 8:Create a startup configuration file
Router configurations can be captured to a text (.txt) file and saved for later use. The configuration can be
copied back to the router so that the commands do not have to be entered one at a time.
Step 1:View the running configuration of the router using following command.
R1#show running-config
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2:Copy the command output.
Select the command output. From the HyperTerminal Edit menu, choose the copy command.
Step 3:Paste output in Notepad.
Open Notepad. Notepad is typically found on the Start menu under Programs > Accessories. From the
Notepad Edit menu, click Paste.
Step 4:Edit commands.
Some commands will have to be edited or added before the startup script can be applied to a router. Some of
these changes are:
_________________________________________________________________________________
Step 4:Enter global configuration mode.
Router#configure terminal
Step 5:Write the commands to verify the running configuration.
_________________________________________________________________________________
_________________________________________________________________________________
Step 6:Write the commands to save running configurations
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Also review the portions of
chapter 4 of your reference book and try to understand the Routing algorithms. You may record the terms and
sections that require more elaboration for reference. The instructor may provide the class some time to reflect
upon these before proceeding with the lab.
Routing Basics
Once you create an internetwork by connecting your WANs and LANs to a router, you’ll need to configure
logical network addresses, like IP addresses, to all hosts on that internetwork for them to communicate
successfully throughout it.
The term routing refers to taking a packet from one device and sending it through the network to another
device on a different network. Routers don’t really care about hosts— they only care about networks and the
best path to each one of them. The logical network address of the destination host is key to get packets
through a routed network. It’s the hardware address of the host that’s used to deliver the packet from a router
and ensure it arrives at the correct destination host. List of the minimum factors a router must know to be able
to affectively route packets is:
Destination address
Neighbour routers from which it can learn about remote networks
Possible routes to all remote networks
The best route to each remote network
How to maintain and verify routing information
The router learns about remote networks from neighbouring routers or from an administrator. It builds a
routing table, which is basically a map of the internetwork, and it describes how to find remote networks. If a
network is directly connected, then the router already knows how to get to it. You have observed in previous
lab that directly connected networks are already in the routing table using show iproutecommand. The router
use one of the following two ways to learn how to get to the remote network.
Static Routing
Dynamic Routing
Static Routing
The static routing method requires someone to hand-type all network locations into the routing table, which
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 40
can be a pretty daunting task when used on all but the smallest of networks!
Dynamic Routing
In dynamic routing, a protocol on one router communicates with the same protocol running on neighbouring
routers. The routers then update each other about all the networks they know about and place this information
into the routing table. If a change occurs in the network, the dynamic routing protocols automatically inform
all routers about the event. If static routing is used, the administrator is responsible for updating all changes
by hand onto all routers.
We will discuss dynamic routing in detail in upcoming labs. In this lab we will implement static routing to
access remote networks.
There are some important things you should know about routing protocols before we get deeper into them.
Being familiar with administrative distances, the three different kinds of routing protocols, and routing loops
are three of the most important.
Administrative Distances
The administrative distance (AD) is used to rate the trustworthiness of routing information received on a
router from a neighbour router. An administrative distance is an integer from 0 to 255, where 0 is the most
trusted and 255 means no traffic will be passed via this route.
If a router receives two updates listing the same remote network, the first thing the router checks is the AD. If
one of the advertised routes has a lower AD than the other, then the route with the lowest AD will be chosen
and placed in the routing table. If both advertised routes to the same network have the same AD, then routing
protocol metrics like hop count and/or the bandwidth of the lines will be usedto find the best path to the
remote network. The advertised route with the lowest metric will be placed in the routing table, but if both
advertised routes have the same AD as well as the same metrics, then the routing protocol will load-balance to
the remote network, meaning the protocol will send data down each link.
Connected interface 0
Static route 1
EIGRP 90
OSPF 110
RIP 120
As you will progress to dynamic routing you will understand administrative distance and metrics effectively.
For static routing metrics value is 0 as router didn’t make any decision for route its administrator who
configured the routes manually.
In-Lab Exercise
In this lab activity, you will create a network that is similar to the one shown in the Topology Diagram. Begin
by cabling the network as shown in the Figure 3.1. Use any Class C Network IDand fill in the Addressing
Table to apply an addressing scheme to the network devices.You will then perform the initial router
configurations required for connectivity according to your IP assignment. After completing the basic
configuration, test connectivity between the devices on the network. First test the connections between
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 41
directly connected devices, and then test connectivity between devices that are not directly connected. Static
routes must be configured on the routers for end-to-end communication to take place between the network
hosts. You will configure the static routes that are needed to allow communication between the hosts. View
the routing table after each static route is added to observe how the routing table has changed.
Topology Diagram
Network 2
Network 1 Network 3
Figure 3.1
Addressing Table
R1
S0/0/0
Fa0/0
R2 S0/0/0
S0/0/1
FA0/0
R3
S0/0/1
PC1 NIC
PC3 NIC
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What networks are present in the Topology Diagram but not in the routing table for R2?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
What networks are present in the Topology Diagram but not in the routing table for R3?
_________________________________________________________________________________
_________________________________________________________________________________
Why are all the networks not in the routing tables for each of the routers?
_________________________________________________________________________________
_________________________________________________________________________________
What can be added to the network so that devices that are not directly connected can ping each other?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Use ping to check connectivity.
Ping to check connectivity between the host PC2 and PC1, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
Ping to check connectivity between the host PC3 and PC2, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
Ping to check connectivity between the host PC1 and PC3, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
Task 6: Configure a Default Static Route
In the previous steps, you configured the router for specific destination routes. But could you do this for every
route on the Internet? No. The router and you would be overwhelmed. To minimize the size of the routing
tables, add a default static route. A router uses the default static route when there is not a better, more specific
route to a destination.
Instead of filling the routing table of R1 with static routes, we could assume that R1 is a stub router. This
means that R2 is the default gateway for R1. If R1 has packets to route that do not belong to any of R1
directly connected networks, R1 should send the packet to R2. However, we must explicitly configure R1
with a default route before it will send packets with unknown destinations to R2. Otherwise, R1 discards
packets with unknown destinations.
To configure a default static route, use the following syntax:
Router(config)#ip route0.0.0.0 0.0.0.0 { ip-address | interface }
Step 1: Configure the R1 router with a default route.
Configure the R1 router with a default route using the Serial 0/0/0 interface of R1 as the next-hop interface.
Run the following command on R1
R1(config)#ip route ______________________________
View the routing table to verify the new static route entry.
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Remove static route on R1
As we have set the default route on R1 we don’t need any static route. Remove the static routes that is
currently configured on R1 in Task 4 Step 4 by using the no form of the command.
_________________________________________________________________________________
Ping to check connectivity between the host PC2 and PC1, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Use ping to check connectivity.
Ping to check connectivity between the host PC2 and PC1, is ping successful.
_________________________________________________________________________________
_________________________________________________________________________________
Ping to check connectivity between the host PC3 and PC2, is ping successful.
_________________________________________________________________________________
_________________________________________________________________________________
Ping to check connectivity between the host PC1 and PC3, is ping successful.
_________________________________________________________________________________
_________________________________________________________________________________
Task 7: Summary, Reflection, and Documentation
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 46
With the completion of this lab, you have:
Configured your first network with a combination of static and default routing to provide full
connectivity to all networks
Observed how a route is installed in the routing table when you correctly configure and activate and
interface
Learned how to statically configure routes to destinations that are not directly connected
Learned how to configure a default route that is used to forward packets to unknown destinations
Finally, you should document your network implementation. On each router, capture the following command
output to a text (.txt) file and save for future reference.
show running-config
show ip route
show ip interface brief
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Upon completion of this lab, you will be able to:
To construct a network for demonstration of the operation of RIP routing protocol using Cisco Packet
Tracer
To show the connectivity between nodes in a network using RIP on all routers.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the Dynamic Routing basics provided with this laboratory experiment and in the chapter 4 of the
reference book. You may record the terms and sections that require more elaboration for reference. The
instructor may provide the class some time to reflect upon these before proceeding with the lab.
Dynamic Routing
Dynamic routing is when protocols are used to find networks and update routing tables on routers. This is
whole lot easier than using static or default routing, but it will cost you in terms of router CPU processing and
bandwidth on network links. A routing protocol defines the set of rules used by a router when it
communicates routing information between neighbouring routers.
Dynamic routing is further divided into two types as:
Distance Vector
Link State
Distance vector
The distance-vector protocols in use today find the best path to a remote network by judging distance. A
distance-vector routing protocolperiodically sends out the entire routing table to directly connected
neighbours. Example of distance vector protocol is Routing Information Protocol (RIP).
Link state
In link-state protocols, the routers each create three separate tables. One of these tables keeps track of directly
attached neighbours, one determines the topology of the entire internetwork, and one is used as the routing
table. Link-state routers know more about the internetwork than any distance-vector routing protocol ever
could. Link state protocols send updates containing the state of their own links to all other directly connected
routers on the network. This is then propagated to their neighbours. Example of link state protocol is OSPF.
In this lab we will learn about distance vector protocol RIP. Link state protocol will be discussed in next lab.
In-Lab Exercise
In this lab activity, you will create a network that is similar to the one shown in the Topology Diagram. Begin
by cabling the network as shown in the Figure 4.1. Assign any Network_ID from Class A and fill in the
table.You will then perform the initial router configurations required for connectivity. Use the IP addresses
according to your IP assignment. First test the connections between directly connected devices, and then test
connectivity between devices that are not directly connected. You will configure the dynamic routing protocol
RIP to add remote networks, this will allow communication between the hosts of different networks. View the
routing table after each dynamic route is added to observe how the routing table has changed.
Addressing Table
R1
S0/0/0
Fa0/0
R2 S0/0/0
S0/0/1
FA0/0
R3
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 50
S0/0/1
PC1 NIC
PC2 NIC
PC3 NIC
_________________________________________________________________________________
Ping to check connectivity between the host PC3 and PC2, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
Ping to check connectivity between the host PC1 and PC3, is ping successful and why?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: What is the metrics value against each network in R1 routing table? Explain it.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Upon completion of this lab, you will be able to know:
To construct a network for demonstration of the operation of OSPF routing protocol using Cisco
Packet Tracer
To show the connectivity between nodes in a network using OSPF on all routers.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and
become familiar with the Link State Routing basics provided with this laboratory experiment and in
the chapter 4 of the reference book. You may record the terms and sections that require more
elaboration for reference. The instructor may provide the class some time to reflect upon these before
proceeding with the lab.
OSPF Terminology
Imagine being given a map and compass with no prior concept of east, west, north or south—not even what
rivers, mountains, lakes, or deserts are. I’m guessing that without any ability to orient yourself in a basic way,
your cool, new tools wouldn’t help you get anywhere but completely lost, right? This is exactly why we’re
going to begin exploring OSPF by getting you solidly acquainted with a fairly long list of terms before setting
out from base camp into the great unknown! Here are those vital terms to commit to memory now:
Link
A link is a network or router interface assigned to any given network. When an interface is added to the OSPF
process, it’s considered to be a link. This link, or interface, will have up or down state information associated
with it as well as one or more IP addresses.
Router ID
The router ID (RID) is an IP address used to identify the router. Cisco chooses the router ID by using the
highest IP address of all configured loopback interfaces. If no loopback interfaces are configured with
addresses, OSPF will choose the highest IP address out of all active physical interfaces. To OSPF, this is
basically the “name” of each router.
Neighbor
Neighborsare two or more routers that have an interface on a common network, such as two routers connected
on a point-to-point serial link. OSPF neighbors must have a number of common configuration options to be
able to successfully establish a neighbor relationship, and all of these options must be configured exactly the
same way:
Area ID
Stub area flag
Authentication password (if using one)
Hello and Dead intervals
Adjacency
An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates.
Unlike EIGRP, which directly shares routes with all of its neighbors, OSPF is really picky about sharing
routing information and will directly share routes only with neighbors that have also established adjacencies.
And not all neighbors will become adjacent—this depends upon both the type of network and the
configuration of the routers. In multi-access networks, routers form adjacencies with designated and backup
designated routers. In point-to-point and point-to-multipoint networks, routers form adjacencies with the
router on the opposite side of the connection.
Designated Router
A designated router (DR) is elected whenever OSPF routers are connected to the same broadcast network to
minimize the number of adjacencies formed and to publicize received routing information to and from the
remaining routers on the broadcast network or link. Elections are won based upon a router’s priority level,
with the one havingthe highest priority becoming the winner. If there’s a tie, the router ID will be used to
breakit. All routers on the shared network will establish adjacencies with the DR and the BDR which ensures
that all router’s topology tables are synchronized.
NeighborshipDatabase
The neighborship database is a list of all OSPF routers for which Hello packets have been seen. A variety of
details, including the router ID and state, are maintained on each router in the neighborship database.
Topological Database
The topological database contains information from all of the LinkState Advertisement packets that have
been received for an area. The router uses the information from the topology database as input into the
Dijkstra algorithm that computes the shortest path to every network.
OSPF Areas
An OSPF area is a grouping of contiguous networks and routers. All routers in the same area share a common
area ID. Because a router can be a member of more than one area at a time, the area ID is associated with
specific interfaces on the router. This would allow some interfaces to belong to area 1 while the remaining
interfaces can belong to area 0. All of the routers within the same area have the same topology table. When
configuring OSPF with multiple areas, you’ve got to remember that there must be an area 0 and that this is
typically considered the backbone area. Areas also play a role in establishing a hierarchical network
organization—something that really enhances the scalability of OSPF!
Broadcast (multi-access)
Broadcast (multi-access) networks such as Ethernet allow multiple devices to connect to or access the same
network, enabling a broadcast ability in which a single packet is delivered to all nodes on the network. In
OSPF, a DR and BDR must be elected for each broadcast multi-access network.
Non-Broadcast multi-access
Non-Broadcast multi-access (NBMA) networks are networks such as Frame Relay, X.25, and Asynchronous
Transfer Mode (ATM). These types of networks allow for multi-access without broadcast ability like
Ethernet. NBMA networks require special OSPF configuration to function properly.
Point-to-Point
Point-to-point refers to a type of network topology made up of a direct connection between two routers that
provides a single communication path. The point-to-point connection can be physical—for example, a serial
cable that directly connects two routers—or logical, where two routers thousands of miles apart are connected
by a circuit in a Frame Relay network. Either way, point-to-point configurations eliminate the need for DRs or
BDRs.
Point-to-multipoint
Point-to-multipoint refers to a type of network topology made up of a series of connections between a single
interface on one router and multiple destination routers. All interfaces on all routers share the point-to-
multipoint connection and belong to the same network. Point-to-multipoint networks can be further classified
according to whether they support broadcasts or not. This is important because it defines the kind ofOSPF
configurations you can deploy.
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 57
In-Lab Exercise
In this lab activity, you will create a network that is similar to the one shown in the Topology Diagram. Begin
by cabling the network as shown in the Figure 5.1. Assign Network_ID from Class B i.e. 172.17.0.0/24 and
fill in the table. The segments of the network have been subnetted using VLSM.OSPF is a classless routing
protocol that can be used to provide subnet mask information in the routing updates. This will allow VLSM
subnet information to be propagated throughout the network.You will then perform the initial router
configurations required for connectivity. Use the IP addresses according to your IP assignment. First test the
connections between directly connected devices, and then test connectivity between devices that are not
directly connected. You will configure the dynamic routing protocol OSPF to add remote networks, this will
allow communication between the hosts of different networks. View the routing table after each dynamic
route is added to observe how the routing table has changed.
Topology Diagram
Network 2
Network 1
172.16.1.0/28 Network 3
Figure 5.1
Addressing Table
Device Interface IP Address Subnet Mask Default Gateway
Fa0/0
R1 S0/0/0
S0/0/1
Fa0/0
R2 S0/0/0
S0/0/1
Fa0/0
R3 S0/0/0
S0/0/1
PC1 NIC
PC2 NIC
255.255.255.255
-------------------------
OSPF areas–An OSPF area is a grouping of contiguous networks and routers. All routers in the same area
share a common area ID. Because a router can be a member of more than one area at a time, the area ID is
associated with specific interfaces on the router. This would allow some interfaces to belong to area 1 while
the remaining interfaces can belong to area 0. All of the routers within the same area have the same topology
table. When configuring OSPF with multiple areas, you’ve got to remember that there must be an area 0 and
that this is typically considered the backbone area. Areas also play a role in establishing a hierarchical
network organization—something that really enhances the scalability of OSPF!
_________________________________________________________________________________
Step 2: Configure the router R2 to advertise the directly connected networks. Write down the
commands and run in Router OSPF configuration sub-mode.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Notice that Link State protocol sends a notification message to the console stating that a
neighbor relationship with another OSPF router has been established.
What is the IP address of the OSPF neighbor router?
_________________________________________________________________________________
_________________________________________________________________________________
Step 5: Configure the router R3 to advertise the directly connected networks. Write down the
commands and run in Router OSPF configuration sub-mode.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: On the R1 router, use the show ip protocols command and write your observations.
R1#show ip protocols
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Examine OSPF Routes in the Routing Tables
R1#show ip route
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Repeat Step 1 to Step 3 for Router R2 and R3
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 5: Use ping command to access PC1 to PC2 and PC1 to PC3 verify that OSPF is configured
correctly. Is ping successful?
_________________________________________________________________________________
_________________________________________________________________________________
Step 6: Use the show interfaces serial0/0/0 command on the R1 router to view the bandwidth of the
Serial 0/0/0 interface. What is the default bandwidth of link?
R1#show interfaces serial0/0/0
_________________________________________________________________________________
_________________________________________________________________________________
Step 7: Calculate the cost of link to find metrics value using the formula 108/bandwidth. Is calculate and
router measured value same?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Configure the OSPF Hello and Dead intervals.
The OSPF Hello and Dead intervals can be modified manually using theipospf hello-intervalandipospf dead-
intervalinterface commands. Use these commands to changethe hello interval to 5 seconds and the dead
interval to 20 seconds on the Serial 0/0/0 interface of the R1 router.
R1(config)#interface serial0/0/0
R1(config-if)#ipospf hello-interval 5
R1(config-if)#ipospf dead-interval 20
Step 5: Modify the Dead Timer and Hello Timer intervals on the Serial 0/0/0 interface in the R2 router
to match the intervals configured on the Serial 0/0/0 interface of the R1 router.
R2(config)#interface serial0/0/0
R2(config-if)#ipospf hello-interval 5
R2(config-if)#ipospf dead-interval 20
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objective
Upon completion of this lab, you will know about:
To recognize the configurations of standard and extended ACL using Packet Tracer.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Dynamic Host Configuration Protocol and Access Control Lists (ACLs) provided
with this laboratory experiment. You may record the terms and sections that require more elaboration for
reference. The instructor may provide the class some time to reflect upon these before proceeding with the lab.
Numbered ACL
You assign a number based on which protocol you want to filtered:
(1 to 99) and (1300 to 1999): Standard IP ACL
(100 to 199) and (2000 to 2699): Extended IP ACL
In case you are wondering why numbers 200 to 1299 are skipped, it is because those numbers are used by
other protocols.
Named ACL
You assign a name by providing the name of the ACL:
Names can contain alphanumeric characters.
It is suggested that the name be written in CAPITAL LETTERS.
Names cannot contain spaces or punctuation and must begin with a letter.
You can add or delete entries within the ACL.
Topology Diagram
Figure 6.1
Addressing Table
Device Interface IP Address Subnet Mask Gateway
Se0/1/0
R1
Fa0/0
Se0/1/0
Se0/2/0
R2 Fa0/0
Fa0/1
Fa1/0
Se0/2/0
R3
Fa0/0
HTTP
N/A
Server
DNS Server N/A
Standard ACLs
Step 1: Your task is to block 192.16.3.3 from gaining access on 192.16.5.0. While 192.16.3.3 must be able
to communicate with networks. Other computer from the network of 192.16.3.0 must be able to connect
with the network of 192.16.5.0.
Run following commands on router R2.
R2#config terminal
R2(config)#access-list 1 deny host 192.16.3.3
R2(config)#access-list 1 permit any
R2(config)#interface fastEthernet 0/1
R2(config-if)#ip access-group 1 out
Step 2: Verify if the access list is created successfully.
_________________________________________________________________________________
Step 3: Block the network of 192.16.3.0 from gaining access on 192.16.4.0. While 192.16.3.0 must be able
to communicate with networks.
Run following commands on router R2.
R2(config)#access-list 2 deny 192.16.3.0 0.0.0.255
R2(config)#access-list 2 permit any
R2(config)#interface fastethernet 0/0
R2(config-if)#ip access-group 2 out
Task 6: Configuring Extended IP Access Lists
The steps for configuring an extended IP ACL do not actually differ from those of a standard ACL. More
options are available in this case.
The commands to use for creating and applying this type of AL on an interface are the following:
To create extended ACL following command is used:
Router(config)#access-list access-list-number {deny | permit} protocol source source-wildcard
[source port] destination destination-wildcard [destination port] [log]
Keep in mind that the available numbers to use are between 100 and 199 and 2000 to 2699. You can
deny or permit a specific protocol (e.g. IP, TCP), traffic coming from a specific host or network
destined for a specific host or network and using specific services (identified by application ports for
example 23 for telnet, 53 for DNS, etc.).
To apply the access list on an interface use the following command:
Router (config-if)#ip access-group access-list-number {in | out}
Step 1: Createextended ACL such that block the access of 192.16.6.3 from 192.16.3.2. While 192.16.3.2
must be able to connect with other computers of network to perform task.
Run following commands on router R1.
R1(config)#access-list 101 deny ip host 192.16.3.2 192.16.6.3 0.0.0.0
R1(config)#access-list 101 permit ip any any
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip access-group 101 in
R1(config-if)#exit
Step 2: Create extended ACL such that block the access of 192.16.3.0 from 192.16.7.0. While 192.16.3.0
must be able connect with other computers of network to perform task.
Run following commands on router R1.
R1(config)#access-list 102 deny ip 192.16.3.0 0.0.0.255 192.16.7.00.0.0.255
R1(config)#access-list 102 permit ip any any
R1(config)#interface fastethernet 0/0
Web Server
30.0.0.2/8
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
R2# show access-list
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Upon completion of this lab, you will be able to learn:
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Switching and Spanning Tree Protocol (STP) provided with this laboratory
experiment and in the portion of chapter 5 of the reference book. You may record the terms and sections that
require more elaboration for reference. The instructor may provide the class some time to reflect upon these
before proceeding with the lab.
Switch
Unlike old bridges, which used software to create and manage a Content Addressable Memory (CAM) filter
table, our new, fast switches use application-specific integrated circuits (ASICs) to build and maintain their
MAC filter tables.
Layer 2 switches are faster than routers because they don’t take up time looking at the Network layer header
information. Instead, they look at the frame’s hardware addresses before deciding to either forward, flood, or
drop the frame.
Functions of Switch
There are three distinct functions of layer 2 switching that are vital for you to remember: address learning,
forward/filter decisions, and loop avoidance.
Address learning - Layer 2 switches remember the source hardware address of each frame received
on an interface and enter this information into a MAC database called a forward/filter table.
Forward/filter decisions - When a frame is received on an interface, the switch looks at the
destination hardware address, and then chooses the appropriate exit interface for it in the MAC
database. This way, the frame is only forwarded out of the correct destination port.
Loop avoidance - If multiple connections between switches are created for redundancy purposes,
network loops can occur. Editing and Help Features
The Cisco advanced editing features can also help you configure your router. If you type in a question mark
(?) at any prompt, you’ll be given a list of all the commands available from that prompt:
Run the following command and write down your observation.
Switch#?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
In-Lab Exercise
Task 1: Perform basic IOS command line interface operations
Step 1: Set Clock on Switch using Help Features
So with that, let’s find the next command in a string by typing the first command and then a question mark
and set clock on switch.
Write down your observation.
_________________________________________________________________________________
_________________________________________________________________________________
Task 2: Address Learning
When a switch is first powered on, the MAC forward/filter table (CAM) is empty, as shown in Figure 7.1.
When a device transmits and an interface receives a frame, the switch places the frame’s source address in the
MAC forward/filter table, allowing it to refer to the precise interface the sending device is located on. The
switch then has no choice but to flood the network with this frame out of every port except the source port
because it has no idea where the destination device is actually located.
If a device answers this flooded frame and sends a frame back, then the switch will take the source address
from that frame and place that MAC address in its database as well, associating this address with the interface
that received the frame. Because the switch now has both of the relevant MAC addresses in its filtering table,
the two devices can now make a point-to-point connection.
Configure the following topology on Cisco Packet Tracer
_________________________________________________________________________________
Forward/Filter Decisions
When a frame arrives at a switch interface, the destination hardware address is compared to the forward/filter
MAC database. If the destination hardware address is known and listed in the database, the frame is only sent
out of the appropriate exit interface. The switch won’t transmit the frame out any interface except for the
destination interface, which preserves bandwidth on the other network segments. This process is called frame
filtering.
Task 3: Port Security
It’s usually not a good thing to have your switches available for anyone to just plug into and play around with.
But just how do we actually prevent someone from simply plugging a host into one of our switch ports. You
can limit the number of MAC addresses that can be assigned dynamically to a port, set static MAC addresses
so you can set penalties for users who abuse your policy!
Step 1: Find MAC Address of any PC
Run following command on Command Prompt of PC at port Fa0/1 and write down results.
PC>ipconfig /all
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 5: Introduce a rogue host.
Attach different PC at that port, ping other hosts in that network through it. Write down your observation.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 7: Repeat step 5 and write down your observations.
_________________________________________________________________________________
_________________________________________________________________________________
Step 8: 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, any traffic from the host disables the port. Reconnect PC3, and
enter the following commands on the switch:
S1(config)#interface fastethernet 0/3
S1(config-if)# no shutdown
S1(config-if)#exit
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Task 4: Set Password
Step 1: Set Password on Console Line.
Following are the commands to set password on Console Line limit unauthorized access to Switch. Run the
following commands and write what you have observed?
Switch(config)#_____________________ % Set Password on Console Line
Switch (config-line)#__________________________ % Here CIIT is password
Switch (config-line)#_____________________ % Ask for Password every time you access
through console line
Switch (config)#exit
Switch#exit
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 1: Write the command to check running configurations on switch or router?
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Examine flash memory.
Issue one of the following commands to examine the contents of the flash directory.
Switch#dir flash:
or
Switch#show flash
_________________________________________________________________________________
_________________________________________________________________________________
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 system image filename? ___________________________________________________
What is the base MAC address of this switch?___________________________________________
Loop Avoidance
Redundant links between switches are important to have in place because they help prevent nasty network
failures in the event that one link stops working.
But while it’s true that redundant links can be extremely helpful, they can also cause more problems than they
solve! This is because frames can be flooded down all redundant links simultaneously, creating network loops
as well as other evils.
If no loop avoidance schemes are put in place, the switches will flood broadcasts endlessly throughout
the internetwork. This is sometimes referred to as a broadcast storm.
A device can receive multiple copies of the same frame because that frame can arrive from different
segments at the same time. Figure 7.2 demonstrates how a whole bunch of frames can arrive from
multiple segments simultaneously.
Figure 7.3
Spanning Tree Protocol (STP) is used to prevent network loops while still permitting redundancy.
Rules of Operation
STP Rule 1— All ports of the root switch must be in forwarding mode.
STP Rule 2 — The root port must be set to forwarding mode.
STP Rule 3 — In a single LAN segment, the port of the designated switch that connects to that LAN
segment must be placed in forwarding mode.
STP Rule 4— All the other ports in all the switches (VLAN-specific) must be placed in blocking
mode. The rule only applies to ports that connect to other bridges or switches. STP does not affect
ports that connect to workstations or PCs. These ports remain forwarded.
Above rules can be understand by looking at the following example.
Figure 7.4
10Gbps 2
1Gbps 4
100Mbps 19
10Mbps 100
Topology Diagram
Figure 7.5
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
S2#show spanning-tree
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
S3#show spanning-tree
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 2: Examine the output
The bridge identifier (bridge ID), stored in the spanning tree BPDU consists of the bridge priority, the system
ID extension, and the MAC address. The combination or addition of the bridge priority and the system ID
extension are known as the bridge ID priority. The system ID extension is always the number of the VLAN.
For example, the system ID extension for VLAN 100 is 100. Using the default bridge priority value of 32768,
the bridge ID priority for VLAN 100 would be 32868 (32768 + 100).
_________________________________________________________________________________
On S3, which spanning tree port is in the blocking state?___________________________________
How does STP elect the root switch? __________________________________________________
Since the bridge priorities are all the same, what else does the switch use to determine the root?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
To recognize and alter the operation of VLANS and inter VLAN routing and
manipulate switch configuration Using Cisco Packet Tracer
Objectives
Upon completion of this lab, you will be able to:
Alter basic VLAN configuration to create VLANS.
Alter router’s configuration to support 802.1q trunking on a fast Ethernet interface.
To demonstrate inter VLAN routing and configure VTP on all switches.
Reproduce the network simulation for VLANs and verify device connectivity using Packet Tracer
Alter switch configuration for Virtual Tunnelling Protocol as pre network requirements using
Command Line Interface (CLI) in Packet Tracer
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Virtual Local Area Networks (VLANs) and VLAN Trunking Protocol (VTP)
provided with this laboratory experiment and in the portion of chapter 5 of the reference book. You may
record the terms and sections that require more elaboration for reference. The instructor may provide the class
some time to reflect upon these before proceeding with the lab.
IEEE 802.1q
Created by the IEEE as a standard method of frame tagging, IEEE 802.1q actually inserts a field into the
frame to identify the VLAN. If you’re trunking between a Cisco switched link and a different brand of switch,
you’ve got to use 802.1q for the trunk to work. Unlike ISL, which encapsulates the frame with control
information, 802.1q inserts an 802.1q field along with tag control information, as shown in Figure 8.1 below.
Figure 8.1
Trunk Ports
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.
A native VLAN is assigned to an 802.1Q trunk port. 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.
Figure 8.2
Addressing Table
Device
Interface IP Address Subnet Mask Default Gateway
(Hostname)
In-Lab Exercise
Scenario A: Basic VLAN Configuration
Task 1: Prepare the Network
Step 1: Cable a network that is similar to the one in the topology diagram.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 3: Configure and name VLANs on switches S2 and S3.
Create and name VLANs 10, 20 and 30 on S2 and S3 using the commands from step 1.
Step 4: Verify the correct configuration with the show vlan brief command.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 5: Assign IPs to the VLANs on switch S1.
Use interface vlan-idandipaddresscommandsto configure VLANs.The commands are as follows;
S1(config)#________________________________
S1(config)#________________________________
S1(config)#________________________________
S1(config)#________________________________
S1(config)#________________________________
S1(config)#________________________________
Step 6: Assign IPs to the VLANs on switches S2 and S3.
Repeat step 5 on Switches S2 and S3.
Step 7: Assign switch ports to VLANs on S1.
Refer to the port assignment on Table 2. Ports are assigned to VLANs in interface configuration mode, using
the switchport access vlanvlan-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.
S1(config)#___________________________________
S1(config-if-range)#__________________________________
S1(config-if-range)#__________________________________
S1(config-if-range)#__________________________________
S1(config-if-range)#__________________________________
_________________________________________________________________________________
Show vlan id vlan-namecommanddisplays the same output. Which ports are assigned to VLAN
faculty/staff?
_________________________________________________________________________________
_________________________________________________________________________________
Task 5: Configure trunking ports on all switches
Step 1: 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)#no shutdown
S1(config-if-range)#end
Similarly on Switch S2 and S3;
S2(config)# ____________________________________
S2(config-if-range)#_____________________________________
S2(config-if-range)#_____________________________________
S2(config-if-range)#_____________________________________
S3(config)#____________________________________________
S3(config-if-range)#_____________________________________
S3(config-if-range)#_____________________________________
S3(config-if-range)#_____________________________________
Step 3: Verify that the trunks have been configured with the show interface trunk command.
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Verify that the switches can communicate.
Step 5: Ping several hosts from PC2.
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 94
Ping from host PC2 to host PC1. Is the ping attempt successful explain your answer?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Ping from host PC2 to host PC5. Is the ping attempt successful explain your answer?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 6: 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
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 explain your answer?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Scenario B: VLAN Trunking Protocol (VTP)
Task 1: Clear any existing VLAN configurations on the switches
Step 1: Use the show vlan command to confirm that only default VLANs exist and that all ports are
assigned to VLAN 1.
Step 2: Verify that PC1 can ping PC4, PC2 can ping PC5, and that PC3 can ping PC6.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Switch 1
Switch 2
Switch 3
Table 3
Step 2: Configure the operating mode, domain name, and VTP password on all three switches.
Set the VTP domain name to COMSATS and the VTP password to cisco on all three switches. Configure S1
in server mode, S2 in client mode, and S3 in transparent mode.
S1(config)#vtp mode server
S1(config)#vtp domain COMSATS
S1(config)#vtp password cisco
S1(config)#end
S2(config)#vtp mode client
S2(config)#vtp domain COMSATS
S2(config)#vtp password cisco
S2(config)#end
S3(config)#vtp mode transparent
S3(config)#vtp domain COMSATS
S3(config)#vtp password cisco
S3(config)#end
Why it is necessary that all the switches must be in same VTP domain?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Step 7: Check if the VLANs created on S1 have been distributed to S2 and S3.
S2#show vlan brief
_________________________________________________________________________________
_________________________________________________________________________________
S3#show vlan brief
_________________________________________________________________________________
_________________________________________________________________________________
Are the same VLANs configured on all switches? Explain why?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
S3(config)#vlan 88
S3(config-vlan)#name test
S3(config-vlan)#
Why are you prevented from creating a new VLAN on S2 but not S3?
_________________________________________________________________________________
_________________________________________________________________________________
Step 9: Change Switch S3 mode from transparent to client.
S3(config)#vtp mode client
_________________________________________________________________________________
_________________________________________________________________________________
Step 10: Assign ports to specific VLAN as shown in topology diagram.
_________________________________________________________________________________
_________________________________________________________________________________
Step 11: Verify that host in same VLAN can access each other?
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Inter-VLAN routing provided with this laboratory experiment. You may record the
terms and sections that require more elaboration for reference. The instructor may provide the class some time
to reflect upon these before proceeding with the lab.
Figure 9.1
Step 3: There are now four networks configured. Verify that you can route packets to all four by
checking the routing table on R1.
R1#show ip route
_________________________________________________________________________________
_________________________________________________________________________________
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 102
_________________________________________________________________________________
_________________________________________________________________________________
Step 4: Verify Inter-VLAN routing.
Step 5: From PC1, verify that you can ping the other two hosts (172.17.20.22 and 172.17.30.23). It may
take a couple of pings before the end-to-end path is established. Are the pings successful?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
If not, troubleshoot your configuration. Check to make sure that the default gateways have been set on all PCs
and all switches. If any of the hosts have gone into hibernation, the connected interface may go down.
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
At the end of this lab students will be able to
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Have OPNET software
program installed on your PC and review how to simulate/designs network topologies within it.You may
record the terms and sections that require more elaboration for reference. The instructor may provide the class
some time to reflect upon these before proceeding with the lab.
Introduction to OPNET
What’s OPNET?
OPNET is the industry’s leading simulator specialized for network research and development. It allows you to
design and study communication networks, devices, protocols, and applications with great flexibility. It
provides a graphical editor interface to build models for various network entities from physical layer
modulator to application processes. All the components are modelled in an object-oriented approach which
gives intuitive easy mapping to your real systems. It gives you a flexible platform to test your new ideas and
solutions with low cost.
Overview
OPNET’s IT Guru provides a Virtual Network Environment that models the behaviour of your entire network,
including its routers, switches, protocols, servers, and individual applications. By working in the Virtual
Network Environment, IT managers, network and system planners, and operations staff are empowered to
diagnose difficult problems more effectively, validate changes before they are implemented, and plan for
future scenarios including growth and failure.
OPNET's Application Characterization Environment (ACE) module for IT Guru enables enterprises to
identify the root cause of end-to-end application performance problems and to solve them cost-effectively by
understanding the impact of changes.
In this lab, you will learn the basics of the OPNET IT Guru Academic Edition software. You will learn how to
setup and run OPNET IT Guru Academic Edition. You will become familiar with some of its preferences and
will practice using the software by running some tutorials.
The labs in this manual are implemented with OPNET IT Guru Academic Edition release 9.1.
What can you learn?
As we stated above, OPNET is the leading simulator used in industry for network R&D. Also it provides a
very detailed modelling tool for you to build a “real” system. By building up simulations in OPNET, you will
gain experience of building a communication network in real world. It will also help you to understand all the
layering techniques and protocol automatons you learned in the text. Imagine building up your own routers in
OPNET and seeing how good they perform! You will become a very experienced network designer through
In-Lab Exercise
BASIC Configurations
There is a limit to how many hosts can be attached to a single network and to the size of a geographic area that
a single network can serve. Computer networks use switches to enable the communication between one host
and another, even when no direct connection exists between those hosts. A switch is a device with several
inputs and outputs leading to and from the hosts that the switch interconnects. The core job of a switch is to
take packets that arrive on an input and forward (or switch) them to the right output so that they will reach
their appropriate destination.
A key problem that a switch must deal with is the finite bandwidth of its outputs. If packets destined for a
certain output arrive at a switch and their arrival rate exceeds the capacity of that output, then we have a
problem of contention. In this case, the switch will queue, or buffer, packets until the contention subsides. If it
lasts too long, however, the switch will run out of buffer space and be forced to discard packets. When packets
are discarded too frequently, the switch is said to be congested. In this lab you will set up switched LANs
using two different switching devices: hubs and switches. A hub forwards the packet that arrives on any of its
inputs on all the outputs regardless of the destination of the packet. On the other hand, a switch forwards
incoming packets to one or more outputs depending on the destination(s) of the packets. You will study how
the throughput and collision of packets in a switched network are affected by the configuration of the network
and the types of switching devices that are used.
Procedure
Task 1: Start OPNET IT GURU
Start the OPNET IT Guru Academic Edition=> Choose New from the Filemenu.
Select Project and click OK => Name the project SwitchedLAN, and the scenario OnlyHub=>Click
OK.
In the Startup Wizard: Initial Topologydialog box, make sure that Create Empty Scenariois selected
=>Click Next => Choose Officefrom the Network Scalelist=> Click Next three times => Click OK.
Close the Object Palette dialog box.
Figure 12.1
Figure 12.2
Figure 12.4
Click OK to run the two simulations. Depending on the speed of your processor, this may take several
minutes to complete.
After the two simulation runs complete, one for each scenario, click Close.
Save your project.
Task 8: Analyse the Results
Select the Delay (sec) statistic and click Show. Plot the resulting graph.
Select the Collision Count statistic for Hub1 and click Show.
On the resulting graph right-click anywhere on the graph area => Choose Add Statistic => Expand
the hierarchies as shown below =>select the Collision Count statistic for Hub2 => Change
asIstotime_average=> Click Add. Plot the resulting graph
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
We analysed the collision counts of the hubs. Can you analyse the collision count of the “Switch”? Explain
your answer.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Further Reading
Create two new scenarios. The first one is the same as the OnlyHub scenario but replace the hub with a
switch. The second new scenario is the same as the HubAndSwitch scenario but replaces both hubs with two
switches, remove the old switch, and connect the two switches you just added together with a 10BaseT link.
Compare the performance of the four scenarios in terms of delay, throughput, and collision count. Analyse the
results.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Carrier Sense Multiple Access with Collision Detection (CSMA/CD) MAC
protocol IEEE 802.3 provided with this laboratory experiment and in chapter 5 of the reference book.You may
record the terms and sections that require more elaboration for reference. The instructor may provide the class
some time to reflect upon these before proceeding with the lab.
In-Lab Exercise
In a shared Ethernet network, end systems are typically connected together using a hub. The hub retransmits
any incoming frames on all outgoing lines creating a single broadcast domain for all the devices. Within this
domain, the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) MAC protocol IEEE 802.3
is used to determine which node may transmit at any given time and to resolve collisions if two or more nodes
transmit at the same time.
Task 1: Start OPNET IT GURU
Start OPNET IT GURU and Create an Empty Scenario as done in previous lab.
Task 2: Create the Network
Select Topology =>Rapid Configuration. From the drop-down menu choose Star and click OK.
Click the Select Models button in the Rapid Configuration dialog box. From the Model List
dropdown menu choose ethernetand click OK.
In the Rapid Configuration dialog box, set the following five values: Center Node Model =
ethernet16_hub, Periphery Node Model = ethernet_station, Link Model = 10BaseT,Number=16,
Y=50, and Radius = 42 => Click OK.
Right-click on node_16, which is the hub =>Edit Attributes =>Change the name attribute to Hub1
and click OK.
Now that you have created the network.
Make sure to save your project.
Task 3: Configure the Network Nodes
Here you will configure the traffic generated by the stations.
Right-click on any of the 16 stations (node_0 to node_15) =>Select Similar Nodes. Now all stations
in the network are selected.
Right-click on any of the 16 stations =>Edit Attributes.
Check the Apply Changes to Selected Objects check box. This is important to avoid reconfiguring
each node individually.
Expand the Traffic Generation and set On State Time = constant and 1000 sec, Off State Time =
constant and 0 sec.
_________________________________________________________________________________
Check the collision box and see how many collisions are taking place in this scenario?
_________________________________________________________________________________
_________________________________________________________________________________
Click show at the bottom and another window with the graphs pops up then go to the main window
_________________________________________________________________________________
Check the Collision box and see how many collisions are taking place in this scenario?
_________________________________________________________________________________
_________________________________________________________________________________
Task 8: Duplicate the Scenario
Next, we will duplicate our scenario and make some changes.
Select Duplicate Scenario from Scenariomenu.Give the new scenario a name.
Right click on one of the Ethernet stations and Select Similar nodes.
Right click again and View Statistics. Check Apply changes to all selected objects then expand
Traffic Generation and Packet Generation. ChangeModel = 100baseT
Now re-simulate and View Statistics.
Again we will look at Utilization and Collisions. Print or note values.
Compare the results of above three scenarios and write down your observations.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Task 9: Create several duplicate scenarios and modify the interarrival times for all the Ethernet stations to
0.0008 and 0.005, respectively. Rerun the simulation, and record the utilization and the Traffic Received
(bit/sec) statistic for each scenario. Find the interarrival time for which the maximum throughput is achieved.
How are the two statistics related?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) MAC
protocol IEEE 802.3 provided in chapter 5 of the reference book.You may record the terms and sections that
require more elaboration for reference. The instructor may provide the class some time to reflect upon these
before proceeding with the lab.
In-Lab Exercise
Task 1: Start OPNET IT GURU
Start OPNET IT GURU and Create an Empty Scenario as done in previous lab.
Task 2: Create the Network
Select New from File menu.
Select Project from the pull-down menu and click OK.
Give an appropriate name for the project and the scenario and click OK. The Startup Wizard opens.
Select the default value: Create Empty Scenario in the Initial Topology dialog box and thenClick
Next.
Select Office in the Choose Office Scale dialog box. Check or uncheck the Metric Units box as you
like and then Click Next.
Specify the size: 100 × 100 m in the Specify Size dialog box. (This will create a LAN that is 100m
on each side. These dimensions have no relevance to the performance of the simulation, they only
create visual appeal). Click Next.
Include wireless_lan and wireless_lan_adv in the Select Technologies Box and click Next.
Click OK in the Review dialog box.
A workspace of the size you specified is created. The default object palette WLAN Base is opened in
a separate window. This palette contains models for all the devices that will be required for the
simulation.
Select wlan_station_adv (fix) from the object palette and place it anywhere in the office space.
Repeat the same procedure for adding a similar node in the office space.
At this point we have a very simple network of two wireless nodes.
Figure 14.1
Figure 14.2
click OK
Task 4: Choose Statistics
Now this is a basic scenario which does not uses any RTS/CTS. To choose the statistics to be collected during
the simulation, allow us to analyse the performance on WLAN. Select the following statistics from the
Simulation => choose individual statistics.
Media Access Delay
Control traffic received
Control traffic sent
Throughput
Retransmission attempts
Task 5: Configure the Simulation
Here we need to configure the duration of the simulation:
Average Average
Channel Average
No. of Media Control Average
Rate Throughput
Nodes Access Traffic Retransmission
(Mbps) (bits/sec)
Delay Received
2 1
4 1
8 1
16 1
Table 14.1
_________________________________________________________________________________
_________________________________________________________________________________
Average Average
Channel Average
No. of Media Control Average
Rate Throughput
Nodes Access Traffic Retransmission
(Mbps) (bits/sec)
Delay Received
2 11
4 11
8 11
16 11
Table 14.2
Task 7: Change the Scenario
Next, we will duplicate our scenario and make some changes.
Select Duplicate Scenario from Scenariomenu.Give the new scenario a name WLAN_RTSCTS.
For each of the above scenarios enable RTS/CTS functionality by changing the attributes of all
wireless stations by specifying a RTS/CTS threshold limit of 256 bytes. As shown in below Figure
14.3
Figure 14.3
Run the simulation and note the results in following table.
2 1
4 1
8 1
16 1
2 11
4 11
8 11
16 11
Table 14.3
Questions:
Is there any difference between the number of retransmission in both scenarios (without and with RTS/CTS
exchange)? Plot number of nodes vs average number of retransmissions in both cases. Comment on the plot.
In Table 1 and Table 2, do you see any effect of channel rate?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Explain the results obtained for average media access delay in both cases (with and without RTS/CTS).
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Briefly comment on effect on the average throughput of both scenarios.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2
Objectives
Upon completion of this lab, you will know about:
To recognize the use of firewalls.
To measure application response time by examining the fact of firewall filtering.
Pre-Lab Exercise
Read this experiment in its entirety to become familiar with objectives of this lab. Study in detail and become
familiar with the basics of firewall provided in chapter 8 of the reference book.You may record the terms and
sections that require more elaboration for reference. The instructor may provide the class some time to reflect
upon these before proceeding with the lab.
Overview
A firewall is a router which provides additional security functionality. Firewalls are commonly deployed at
the border of a corporate network and the Internet, and are used to monitor and regulate the traffic that passes
through this border. Firewalls inspect various header fields in packets as they arrive and, based on a security
policy, choose to discard (filter) the packets, or forward them on to the destination. Packets may be filtered
based on the source or destination IP address, the source or destination port number, or other header fields.
For instance, a corporate site’s firewall could be configured to accept only packets originating at the
corporation’s other locations, or only packets destined for the FTP port. All other packets would be discarded
to protect the corporation’s devices from unwanted access. While firewalls provide a valuable service, the
additional filtering functionality can require extra processing time, possibly lowering throughput.
In-Lab Exercise
In this lab, we will build and analyse the performance of a corporate network consisting of two segments:
thehome-office (i.e. client system) in the West and the server system in the East. The two segments
areconnected through the Internet, which makes them (potentially) vulnerable to malicious/unwanted traffic.
The lab requires you to create 3 different scenarios in order to compare the performance of the
same(topological) network in the following three cases: 1) there is no firewall in the network, 2) there is a
firewall inthe network and it allows all traffic through, 3) there is a firewall in the network and it discards web
traffic.
Start IT Guru.
Select File → new … choose Project and click OK.
Modassir Ishfaq |EEE314|Data Communication and Computer Networks 126
Set the Project Name to xx_Firewall(where xx is your name). Set the Scenario Name to
No_Firewall.ClickOK.
In the Initial Topology window, select Create Empty Scenario and click on Next.
In the Choose Network Scale window, select World and click on Next.
In the Choose Map window, choose USAand click on Next.
In the Select Technologies window, click on Next.
In the Review window, click OK.
Next, we will configure the traffic profiles for our users. We need one profile for the motivated workers, who
willperform database transactions, and one profile for the idle workers, who will do web browsing.
Select an Application Configobject from the Object Palette and place it in the project workspace.
Right click on the object and choose Edit Attributes. Set Applications Attributes as follows:
o Set the name to Applications.
o Set the Application Definitions attribute to Default. We can now use or modify the
defaultapplications defined by OPNET, including web browsing, FTP, and others.
o Expand the Application Definitions attribute and the row 0 attribute (which describes
theDatabase Access (Heavy) application).
o Expand the Description attribute and modify the Database attribute to High Load.
o Click on OK to close the window.
Select a Profile Configobject from the Object Palette and place it in the project workspace.
Right click on the object and choose Edit Attributes. Set Profile Attributes as follows:
o Set the name to Profiles.
o Expand the Profile Configuration attribute and set the rows attribute to 2.
o Expand the row 0 attribute, and set the Profile Name to Database_User.
o Expand the Applications attribute, and set the rows attribute to 1.
o Expand the row 0 attribute, and set the Name to Database Access (Heavy).
o Set the Start Time Offset (seconds) to exponential(12).
o Set the Start Time (seconds) for the profile (which is the second Start Time attribute)
toexponential(20).
o Expand the row 1 attribute, and set the Profile Name to Web_User.
o Expand the Applications attribute, and set the rows attribute to 1.
o Expand the row 0 attribute, and set the Name to Web Browsing (Heavy HTTP1.1).
o Set the Start Time Offset (seconds) to exponential (60).
Select an ip32_cloud object from the Object Palette and place it in the project workspace.
Right click on the cloud and choose View Node Description. The cloud represents a WAN consisting
of IP-capablerouters that supports up to 32 serial links.
Right click on the cloud and select Edit Attributes.
o Set the name to ip32_cloud.
o Set the Packet Latency (secs) to constant (0.05). You will need to change the Special Value
to Not Used in order to modify the Packet Latency value. This implies that any packet
whichpasses through the cloud will now experience a delay of 50 milliseconds.
o Click on OK to close the window.
Select an ethernet4_slip8_gtwy device from the Object Palette and place it in the projectworkspace.
Right click on the station and choose View Node Description. Note that the station supports both
theEthernet and SLIP protocols.
Right click on the station and choose Set Name. Set the Name to Router_West. Click on OK to
close thewindow.
Select a 10BaseT_LAN object from the Object Palette and place it in the project workspace.
Right click on the LAN and choose View Node Description. Note that the LAN object represents
multipleworkstations and supports various applications. Click on the close window icon to close the
window.
Right click on the LAN and choose Edit Attributes.
o Modify the name attribute of the LAN to Home Office.
o Set the Number of Workstations to 150.
o Expand the Application: Supported Profiles attribute, and set the rows attribute to 2.
o Expand the row 0 attribute, and set the Profile Name to Database_User. Set the Number
ofClientsto 50.
o Expand the row 1 attribute, and set the Profile Name to Web_User. Set the Number
ofClientsto 100.
o Click on OK to close the window.
Select a 10BaseT link from the Object Palette and use it to connect the Home Office toRouter_West.
Select a PPP_DS1 link from the Object Palette and use it to connect the Router_Westto
theip32_cloud. Note that DS1 speed is 1.5 Mbps.
Select an ethernet4_slip8_gtwy device from the Object Palette and place it in the projectworkspace.
Right click on the station and choose Set Name. Set the Name to Router_East. Click on OK to close
thewindow.
Select a ppp_serverdevice from the Object Palette and place two copies in the project workspace.
Right click on the first server and choose Edit Attributes.
o Set the name to Database Server.
o Edit the Application: Supported Services attribute, and set the number of rows to 1.
o Edit the Name field of the first row and set to Database Access (Heavy).
o Click on OK twice to close the windows.
Right click on the second server and choose Edit Attributes.
o Set the name to Web Server.
o Edit the Application: Supported Services attribute, and set the number of rows to 1.
o Edit the Name field of the first row and set to Web Browsing (Heavy HTTP1.1).
o Click on OK twice to close the windows.
Select two PPP_DS3 links from the Object Palette and use them to connect the Database Server to
Router_East, and the Web Server to Router_East.
Select a PPP_DS1 link and use it to connect Router_Eastto the ip32_cloud.
We are now going to duplicate the scenario to model a network with a firewall replacing Router_West. We
willcreate one scenario in which the firewall allows traffic through, but adds processing delay due to the
packetfiltering required. We will create another scenario in which the firewall discards web traffic. This will
allow us tocompare the database performance application in these different instances.
Choose Scenarios =>Duplicate Scenario, and name the new scenario Firewall.
Right click on Router_West, and choose Edit Attributes.
o Edit the model and choose ethernet2_slip8_firewall from the pull-down menu.
o Expand the Proxy Server Information attribute and the row 1 attribute (which describes
theDatabase Proxy behaviour). Set the Latency to constant(0.005).
o Expand the row 4 attribute (which describes the HTTP Proxy behavior) and set the Latency
to constant (0.005). Note that both applications show Proxy Server Deployed set to yes. This
means that thefirewall will allow traffic generated by these two applications to pass through.
o Click on OK to close the window and replace the gateway with the firewall.
Choose Scenarios =>Duplicate Scenario again, and name the new scenario Firewall_Blocking.
Right click on Router_West, and choose Edit Attributes.
o Expand the Proxy Server Information attribute, and the row 4 attribute (which describes the
HTTP Proxy behaviour).
o Set the Proxy Server Deployed attribute to no. This means that the firewall will discard all
webtraffic.
o Click on OK to close the window.
Edit the Results field for all three rows and set the value to <collect>or <recollect>.
When the simulation has completed, click on Close to close the window.
Expand the Global Statistics item and the DB Query item, and select the Response Time Statistic. Plot the
Graphs of response time for all scenarios and comment on the obtained results,i.e. explain the cause ofthe
difference among the three plots and their respective values?
Expand the HTTP item and select the Page Response Time (seconds) statistic.Plot the Graphs of response
time and comment on the obtained results?
(requests/sec) statistic. Plot the Graphs and comment on the obtained results?
Expand the Router_West<-> ip32_clouditem, and the point-to-point item, and select the utilization -
>statistic. Plot the Graphs and comment on the obtained results?
Pre-Lab /1
Performance /3
/10
Results /2
Viva /2
Lab Report /2