COSC2174 - Lab Report 2 - 1
COSC2174 - Lab Report 2 - 1
Lab Report 2
COSC2174 – Data Communication and
Net-Centric Computing
Learning Outcomes:
1. The art of experimentation
2. Experimental and analytical skills
3. Conceptual learning
4. Understanding the basis of Networking Engineering
5. Developing collaborative learning skills
Table of Contents
Part 1: Introduce the Cisco Packet Tracer Simulator ............................................................... 3
1 Objectives....................................................................................................................... 3
2 Theory: Simulation Basic Concepts .................................................................................. 3
3 Methodology: Opening and exploring Cisco Packet Tracer............................................... 5
4 Exercises ......................................................................................................................... 8
4.1 Section 1: Create a simple topology .....................................................................................9
4.2 Section 2: Create simple topology with switch ................................................................... 12
4.3 Section 3: Create multilevel topologies .............................................................................. 13
5 Questions ..................................................................................................................... 13
6 References .................................................................................................................... 13
Lab 2 Part 2: Layer 2 Protocols and Devices .......................................................................... 14
1 Objectives..................................................................................................................... 14
2 Theory: Layer 2, Ethernet and ARP basic concepts ......................................................... 14
3 Methodology ................................................................................................................ 15
4 Exercise ........................................................................................................................ 15
4.1 Section1: Capturing and analysing Ethernet frames. ........................................................... 15
4.2 Section 2: Capturing and analysing Address Resolution Protocol ......................................... 18
4.3 Section 3: Basic configuration of a switch ........................................................................... 19
5 Questions ..................................................................................................................... 22
6 References .................................................................................................................... 22
Lab 2 Part 3: Layer 3 Protocol and Devices ........................................................................... 23
1 Objectives..................................................................................................................... 23
2 Theory: Layer 3 basic concepts ...................................................................................... 23
3 Methodology ................................................................................................................ 27
4 Exercise ........................................................................................................................ 27
4.1 Section 1: Capturing and analysing IP packets and datagrams. ............................................ 28
4.2 Section 2: A look at the capture trace ................................................................................ 28
4.3 Section 3: Basic analysis of routers (static route) ................................................................ 31
5 Questions ..................................................................................................................... 32
6 References .................................................................................................................... 32
RMIT Classification: Trusted
1 Objectives
The objectives of part 1 is to:
• Understand the main principles of simulations
• Explore the Logical Workspace of the simulator
• Explore Cisco Packet Tracer operations
• Connect devices and create topologies
• Network simulator: A network simulator is software that predicts the behavior of a computer network.
Since communication Networks have become too complex for traditional analytical methods to provide
an accurate understanding of system behavior, network simulators are used. In simulators, the computer
network is modeled with devices, links, applications, etc. and the performance is analyzed. Simulators
come with support for the most popular technologies and networks in use today such as Wireless LANs,
Mobile Ad hoc Networks, Wireless Sensor Networks, Vehicular Ad hoc Networks, Cognitive Radio
networks, LTE / LTE- Advanced Networks, Internet of things (IoT), etc.
• Simulations: Most of the commercial simulators are GUI driven, while some network simulators are
CLI driven. The network model/configuration describes the network (nodes, routers, switches, and
links) and the events (data transmissions, packet error, etc.). Output results would include network-
level metrics, link metrics, device metrics, etc. Further, drill down in terms of simulations trace files
would also be available. Trace files log every packet, and every event that occurred in the simulation
and are used for analysis. Most network simulators use discrete event simulation, in which a list of
pending "events" is stored, and those events are processed in order, with some events triggering future
events—such as the event of the arrival of a packet at one node triggering the event of the arrival of
that packet at a downstream node.
• Packet Tracer Workspaces: Cisco Packet Tracer has two workspaces—logical and
physical. The logical workspace allows users to build logical network topologies by
placing, connecting, and clustering virtual network devices. The physical workspace
provides a graphical physical dimension of the logical network, giving a sense of scale and
3
RMIT Classification: Trusted
placement in how network devices such as routers, switches, and hosts would look in a real
environment. The physical view also provides geographic representations of networks,
including multiple cities, buildings, and wiring closets.
• Packet Tracer Modes: Cisco Packet Tracer provides two operating modes to visualize the
behavior of a network—real-time mode and simulation mode. In real-time mode, the
network behaves as real devices do, with the immediate real-time response for all network
activities. The real-time mode gives students a viable alternative to real equipment and
allows them to gain configuration practice before working with real equipment. In
simulation mode, the user can see and control time intervals, the inner workings of data
transfer, and the propagation of data across a network. This helps students understand the
fundamental concepts behind network operations. A solid understanding of network
fundamentals can help accelerate learning about related concepts.
• Protocols: Cisco Packet Tracer supports the following protocols:
• Modular Devices: Graphical representations visually simulate hardware and offer the
ability to insert interface cards into modular routers and switches, which then become part
of the simulation.
• Multiuser Functionality: Cisco Packet Tracer is a network-capable application, with a
multiuser peer-to-peer mode that allows collaborative construction of virtual networks over
a real network. The multiuser feature enables exciting collaborative and competitive
interactions, providing the option to progress from individual to social learning and features
opportunities for collaboration, competition, remote instructor-student interactions, social
networking, and gaming.
• Tutorials: Packet Tracer includes several basic step-by-step tutorials that familiarize users
with the product features and explain how to engage in simulations. Additional advanced
tutorials are available for download from Academy Connection.
• Help: A help feature is available to familiarize users with the Cisco Packet Tracer interface,
functions, and features. The help area includes important notes and tips and provides
annotated screenshots to aid understanding.
4
RMIT Classification: Trusted
You are also encouraged to examine the tutorials and Help files built into Packet Tracer, which include an
extensive "My First PT Lab", tutorials, and information on the strengths and limitations of using Packet
Tracer to model networks.
• STEP 6: Click on the Guest Login or User Login and you will visualize the GUI of Cisco
Packet Tracer Simulator as shown below:
RMIT Classification: Trusted
Take some time for getting familiar with the GUI and exploring the different options of the simulator as
indicated in the following figures:
6
RMIT Classification: Trusted
Now let us take 5 minutes break for watching and listening to a tutorial, for doing that click on help-
>tutorial. It will open a browser and a tutorial will be displayed.
http://tutorials.ptnetacad.net/tutorials80.htm
At this point, you are getting familiar with all the theory and practice of Cisco Packet Tracer and are
ready for performing some exercises detailed in the next section.
4 Exercises
The best way to learn about any new simulator is to try it out. So, let’s create a small and simple
topology.
RMIT Classification: Trusted
Step 1: Choosing Devices and Connections: We will begin building our network topology by selecting
devices and the media in which to connect them. Several types of devices and network connections can
be used. For this lab we will keep it simple by using:
• End Devices: for example, simple PC. (See Figure 7. End devices selection)
• Hubs: It is a very simple layer 2 devices (See Figure 3. Hub devices selection
• Connections: (See Figure 9. Connections selection)
Step 2: Building the network topology by adding hosts using single click on the End Devices.
• Move the cursor into topology area. You will notice it turns into a plus “+” sign
9
RMIT Classification: Trusted
• At this you can familiarize with the device by clicking on the device a new GUI will be opened
(see below). Explore the GUI by opening Physical, Config, Desktop Attributes and
Software/Services.
10
RMIT Classification: Trusted
• Add the hub by moving the plus sign “+” below PC0 and PC1 and click once
• At this you can familiarize with the device by clicking on the device a new GUI will be opened
(see below). Explore the GUI by opening Physical, Config and Attributes.
• Connect PC0 to Hub0 by first choosing Connections and click once the Copper Straight-through
cable.
11
RMIT Classification: Trusted
• Repeat the steps above for PC1 connecting it to Port 1 on Hub0. (The actual hub port you choose
does not matter)
• Congratulation your first topology is now ready for configurations. Please note that
configurations will be learning in lab number 3.
12
RMIT Classification: Trusted
• Note that for interconnecting Hubs and Switch a different connection need to be used.
• Packet Tracer has two file formats that can create and save: .pkt files (network simulations model
files) and .pka files (activity files for practice). When you create your own networks in Packet
Tracers or modify existing files you will often use the .pkt file format.
• Please take some time for PLAYING with the simulator explore different devices and topologies.
• Learn how to customize the Cisco Packet Tracer options, for doing that click on help->tutorial. It
will open a browser and a tutorial will be displayed. Click on getting started and click the three
tutorials about options.
• Learn how to create a topology, for doing that click on help->tutorial. It will open a browser and
a tutorial will be displayed. Click on getting started a click the second tutorial about options.
• Provide and explain two options of Common Tools Bar.
• Provide and explain four Device-Type that can be used on the simulator.
• Provide your personal feedback about the simulator, it is friendly? It is useful?
6 References
[1] Cisco, Cisco Packet Tracer Data Sheet. Available at: http://www.cisco.com/c/dam/en_us/training-
events/netacad/course_catalog/docs/Cisco_PacketTracer_DS.pdf
[2] William Stallings. 1996. Data and Computer Communications (5th Ed.). Prentice-Hall, Inc., Upper
Saddle River, NJ, USA.
[3] Andrew Tanenbaum. 2002. Computer Networks (4th ed.). Prentice Hall Professional
Technical Reference.
13
RMIT Classification: Trusted
1 Objectives
The objectives of the part 2 is to:
• Understand the main principles of layer 2 protocols and devices
• Explore the fields of Ethernet frames (Layer 2 data unit)
• Explore and understand the goal of ARP protocol
• Understand better the relationship of MAC and IP address
Ethernet is currently used for approximately 85% of the world's LAN-connected PCs and workstations.
Ethernet is the major LAN technology because of the following characteristics:
• Is easy to understand, implement, manage, and maintain
• Allows low-cost network implementations
• Provides extensive topological flexibility for network installation
• Guarantees successful interconnection and operation of standards-compliant products,
regardless of manufacturer
The most relevant Ethernet Layer 2 devices are:
• Ethernet hub is a device that connects Ethernet devices so that they can communicate with each
other. Any Ethernet frame that arrives on any port is automatically forwarded to every other port.
Any device on a hub can talk to any other device on a hub and, indeed, there is no way to prevent
this from happening. A hub provides no intelligent filtering or forwarding capabilities at all. An
Ethernet hub simply mimics the functions of an Ethernet wire. It is half-duplex only, so collisions
can occur.
• Ethernet switch is also a device that connects Ethernet devices so that they can communicate with
each other. An Ethernet switch can forward an Ethernet frame only to a certain port or ports that
need it. A switch can also provide full-duplex capabilities and therefore avoid collision. A switch
processes the Ethernet header information in the frame and determines what the destination MAC
address is. It will then make an intelligent forwarding decision and send the frame only to the port
that needs to receive that destination MAC address. Also, switches provide more intelligence to
buffer frames and prevent collisions on the backplane, enabling full-duplex conversations.
An Ethernet network uses two hardware addresses which identify the source and destination of
each frame sent by the Ethernet. The destination address (all 1's) may also identify a broadcast
packet (to be sent to all connected computers). The hardware address is also known as the Medium
Access Control (MAC) address, in reference to the standards which define Ethernet. Each computer
network interface card is allocated a globally unique 6-byte link address when the factory
manufactures the card (stored in a PROM). This is the normal link source address used by an
14
RMIT Classification: Trusted
interface. A computer sends all packets which it creates with its own hardware source link address
and receives all packets which match the same hardware address in the destination field or one (or
more) pre-selected broadcast/multicast addresses.
Address Resolution Protocol (ARP): ARP is a protocol used by the Internet Protocol (IP) [RFC826],
specifically IPv4, to map IP network addresses to the hardware addresses used by a data link protocol. The
protocol operates below the network layer as a part of the interface between the OSI network and OSI link
layer. It is used when IPv4 is used over Ethernet.
The term address resolution refers to the process of finding an address of a computer in a network. The
address is "resolved" using a protocol in which a piece of information is sent by a client process executing
on the local computer to a server process executing on a remote computer. The information received by the
server allows the server to uniquely identify the network system for which the address was required and
therefore to provide the required address. The address resolution procedure is completed when the client
receives a response from the server containing the required address.
The Ethernet address is a link layer address and is dependent on the interface card which is used. IP operates
at the network layer and is not concerned with the link addresses of individual nodes which are to be used.
The address resolution protocol (ARP) is therefore used to translate between the two types of address. The
ARP client and server processes operate on all computers using IP over Ethernet. The processes are
normally implemented as part of the software driver that drives the network interface card.
There are four types of ARP messages that may be sent by the ARP protocol. These are identified by four
values in the "operation" field of an ARP message. The types of messages are:
• ARP request (target of this lab report)
• ARP reply (target of this lab report)
• RARP request
• RARP reply
3 Methodology
This lab is building based on the methodology of lab 1 and lab 2. The exercises will use:
• Wireshark for capturing packets and analyse layer 2
• Cisco Packet Tracer for simulating Layer 2 end-to-end communication.
4 Exercise
4.1 Section1: Capturing and analysing Ethernet frames.
Let us begin by capturing a set of Ethernet frames to study in order to do it, follow the following
steps:
15
RMIT Classification: Trusted
• STEP 1: First, make sure your browser’s cache is empty. To do this under:
•
Mozilla Firefox V3, select Tools->Clear Recent History and check the box for Cache.
•
For Internet Explorer, select Tools->Internet Options->Delete Files.
•
For Chrome Menu and then down to Settings. Scroll down and click on “Show advanced
settings. Look under “Privacy” Click Clear Browsing Data and clear all data.
• STEP 2: Start up the Wireshark packet sniffer and start capturing packet from your LAN
interface.
• STEP 3: Enter the following URL into your browser http://gaia.cs.umass.edu/wireshark-
labs/HTTP-ethereal-lab-file3.html your browser should display the rather lengthy US Bill of
Rights.
• STEP 4: Stop Wireshark packet capture. First, find the packet numbers (the leftmost column in
the upper Wireshark window) of the HTTP GET message that was sent from your computer to
gaia.cs.umass.edu, as well as the beginning of the HTTP response message sent to your
computer by gaia.cs.umass.edu. You should see a screen that looks something like this (where
packets 4 in the screen shot below contains the HTTP GET message)
• STEP 5: Since this lab is about Ethernet and ARP, we’re not interested in IP or higher-layer
protocols. So, let’s change Wireshark’s “listing of captured packets” window so that it shows
information only about protocols below IP. To have Wireshark do this, select Analyse->Enabled
Protocols. Then uncheck the IP box and select OK. You should now see a Wireshark window that
looks like:
RMIT Classification: Trusted
• STEP 6: In order to answer the following questions, you will need to look into the packet details and
packet contents windows (the middle and lower display windows in Wireshark), refer to lab number 1
material for more information. Select the Ethernet frame containing the HTTP GET message. (HTTP
GET message is carried inside of a TCP segment, which is carried inside of an IP datagram, which is
carried inside of an Ethernet frame, which is our focus). Expand the Ethernet II information in the
packet details window. Note that the contents of the Ethernet frame (header as well as payload) are
displayed in the packet contents window. Take some time for getting familiar with the Ethernet Frame
that you are analysing.
• STEP 7: Answer the following questions, based on the contents of the Ethernet frame containing
the HTTP GET message. Whenever possible, when answering a question, you should hand in a
printout or screenshot of the packet(s) within the trace that you used to answer the question asked.
Remark the printout or screenshot to explain your answer. To print a packet, use File->Print,
choose Selected packet only, choose Packet summary line, and select the minimum amount of
packet detail that you need to answer the question or simply remark the screenshot.
17
RMIT Classification: Trusted
• STEP 8: Next, answer the following questions, based on the contents of the Ethernet frame
containing the first byte of the HTTP response message.
• The ARP command is used to view and manipulate the ARP cache contents.
• The ARP protocol defines the format and meaning of the messages sent and received, and defines
the actions taken on message transmission and receipt.
• STEP 1: Let us take a look at the contents of the ARP cache on your computer:
• STEP 2: In order to observe your computer sending and receiving ARP messages, we will need
to clear the ARP cache, since otherwise your computer is likely to find a needed IP-Ethernet
address translation pair in its cache and consequently not need to send out an ARP message.
o What is the command line?
18
RMIT Classification: Trusted
• Step 4: In the example above, the first two frames in the trace contain ARP messages. Answer the
following questions.
What are the hexadecimal values for the source and destination addresses in the Ethernet
frame containing the ARP request message?
Give the hexadecimal value for the two-byte Ethernet Frame type field. What upper layer
protocol does this correspond to?
a. What is the question of the ARP?
b. Does the ARP message contain the IP and MAC address of the sender?
c. Does the ARP message contain the IP and MAC address of the target?
d. What is the target IP address? TIP, ipconfig command will help you to find out.
e. What is the value of the opcode field within the ARP-payload part of the
Ethernet frame?
Now find the ARP reply that was sent in response to the ARP request.
a. What is the answer of the ARP?
b. Does the ARP message contain the IP and MAC address of the sender?
c. Does the ARP message contain the IP and MAC address of the target?
d. What is the target IP address? TIP, ipconfig command will help you to find out.
e. What is the value of the opcode field within the ARP-payload part of the
Ethernet frame?
Check again the ARP table and provide the output.
• STEP 3: Click the link provided Using the Command-Line Interface of Cisco, take some time for
getting familiar with the command mode.
• STEP 4: Let us explore the command line interface of the switch, by clicking on switch and
going to CLI as show below:
20
RMIT Classification: Trusted
• STEP 5: Let us configure a simple network, go to PC1, and configure the Ethernet IP address as
follow (see the figure):
• STEP 7: Let us explore the command line interface of the switch again:
21
RMIT Classification: Trusted
6 References
[1] Cisco, Cisco Packet Tracer Data Sheet. Available at: http://www.cisco.com/c/dam/en_us/training-
events/netacad/course_catalog/docs/Cisco_PacketTracer_DS.pdf
[2] Supplement to Computer Networking: A Top-Down Approach, 7th ed., J.F. Kurose and K.W.
Ross, 2005-2016, All Rights Reserved
[3] William Stallings. 1996. Data and Computer Communications (5th Ed.). Prentice-Hall, Inc., Upper
Saddle River, NJ, USA.
[4] Andrew Tanenbaum. 2002. Computer Networks (4th ed.). Prentice Hall Professional
Technical Reference.
22
RMIT Classification: Trusted
1 Objectives
The objective of the lab 2 part 3 is to:
• Understand the main principles of layer 3 protocols and devices
• Explore the fields of IP packets or datagrams (Layer 3 data unit)
• Explore and understand the goal of ICMP protocol.
• Understand better fragmentation.
Network Layer Functions: Some of the specific jobs normally performed by the network layer include:
23
RMIT Classification: Trusted
• Logical Addressing: Every device that communicates over a network has associated with it a
logical address, sometimes called a layer three address. For example, on the Internet, the Internet
Protocol (IP) is the network layer protocol, and every machine has an IP address. Note that
addressing is done at the data link layer as well, but those addresses refer to local physical
devices. In contrast, logical addresses are independent of particular hardware and must be unique
across an entire internetwork.
24
RMIT Classification: Trusted
• Routing: Moving data across a series of interconnected networks is probably the defining function
of the network layer. It is the job of the devices and software routines that function at the network
layer to handle incoming packets from various sources, determine their final destination, and then
figure out where they need to be sent to get them where they are supposed to go.
• Datagram Encapsulation: The network layer normally encapsulates messages received from higher
layers by placing them into datagrams (also called packets) with a network layer header.
• Fragmentation and Reassembly: The network layer must send messages down to the data link layer
for transmission. Some data link layer technologies have limits on the length of any message that can
be sent. If the packet that the network layer wants to send is too large, the network layer must split the
packet up, send each piece to the data link layer, and then have pieces reassembled once they arrive at
the network layer on the destination machine. A good example is how this is done by the Internet
Protocol.
25
RMIT Classification: Trusted
• Error Handling and Diagnostics: Special protocols are used at the network layer to allow devices
that are logically connected, or that are trying to route traffic, to exchange information about the
status of hosts on the network or the devices themselves.
Router (Layer 3): The most relevant Layer 3 device is Router; it is a device that forwards data packets
along networks. A router is connected to at least two networks, commonly two LANs or WANs or a LAN
and its ISP's network. Routers are located at gateways, the places where two or more networks connect.
Routers use headers and forwarding tables to determine the best path for forwarding the packets, and they
use protocols such as ICMP to communicate with each other and configure the best route between any two
hosts.
26
RMIT Classification: Trusted
The Internet Control Message Protocol (ICMP): It is a supporting protocol in the Internet protocol suite.
It is used by network devices, including routers, to send error messages and operational information
indicating, for example, that a requested service is not available or that a host or router could not be reached.
The related ping utility is implemented using the ICMP "Echo request" and "Echo reply" messages.
• The ping command is a Command Prompt command used to test the ability of the source
computer to reach a specified destination computer. The ping command is usually used as
a simple way verify that a computer can communicate over the network with another
computer or network device.
• The ping command operates by sending Internet Control Message Protocol (ICMP) Echo Request
messages to the destination computer and waiting for a response. How many of those responses are
returned, and how long it takes for them to return, are the two major pieces of information that the ping
command provides.
3 Methodology
This lab is building based on the methodology of lab 1 and 2. The exercises will use:
• Wireshark for capturing packets and analyse layer 3
• Cisco Packet Tracer for simulating Layer 3 end-to-end communication.
4 Exercise
In this lab, we will investigate the IP protocol, focusing on the IP datagram or packet. We will do so by
analysing a trace of IP datagrams sent and received by an execution of the ping command. We will
investigate the various field in the IP datagram, and study IP fragmentation.
27
RMIT Classification: Trusted
28
RMIT Classification: Trusted
Take some time to map the field with IP datagram and answer the following questions:
29
RMIT Classification: Trusted
1. What is the IP address of your computer? What is the source and destination address?
2. Within the IP packet header, what is the value in the upper layer protocol field?
3. How many bytes are in the IP header? How many bytes are in the payload of the IP
datagram? Explain how you determined the number of payload bytes.
4. Has this IP datagram been fragmented? Explain how you determined whether or not the
datagram has been fragmented.
5. What is the value in the Identification field and the TTL field?
• STEP 2: Next (with the packets still sorted by source address) find the series of ICMP Echo
Reply sent to your computer and answer the following questions:
1. What is the IP address of your computer? What is the source and destination address?
2. Within the IP packet header, what is the value in the upper layer protocol field?
3. How many bytes are in the IP header? How many bytes are in the payload of the IP
datagram?
4. Has this IP datagram been fragmented?
5. What is the value in the Identification field and the TTL field?
6. Do these values remain unchanged for all of the ICMP Echo Reply sent to your computer by
the nearest (first hop) router? Why?
30
RMIT Classification: Trusted
1. What is the IP address of the PC0 and PC1? You can check it open a command prompt
and typing ipconfig.
2. From PC0 ping PC1, the ping is working?
3. In PC0 using the command line tracert x.x.x.x [PC1 IP address], check what is the path for
reaching PC1.
31
RMIT Classification: Trusted
•
What the arp display?
•
What the running-config display?
5 Questions
The goal of lab 4 was primarily to introduce the Layer 3 protocols and devices. The following questions
will demonstrate that you have been able to do that. Answer the following questions:
• What is the role of TTL field? Why it is important?
• Explain the 3 main characteristics of layer 3 that you learn on this lab?
• Explain the main role of routers in the network.
6 References
[1] Cisco, Cisco Packet Tracer Data Sheet. Available at: http://www.cisco.com/c/dam/en_us/training-
events/netacad/course_catalog/docs/Cisco_PacketTracer_DS.pdf
[2] Supplement to Computer Networking: A Top-Down Approach, 7th ed., J.F. Kurose and K.W.
Ross, 2005-2016, All Rights Reserved
[3] William Stallings. 1996. Data and Computer Communications (5th Ed.). Prentice-Hall, Inc., Upper
Saddle River, NJ, USA.
32