Laborator Nr.2 Namolovan Alexandru RST-201

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Ministerul Educației și Cercetării al Republicii Moldova

Universitatea Tehnică a Republicii Moldova


Facultatea Electronică și Telecomunicații

RAPORT
Lucrare de laborator nr.2 la disciplina
REȚELE DE CALCULATOARE

“Investigarea traficului de rețea ”

A elaborat st. grupei IMTC-201 Rotaru Victor.


A verificat profesorul Chihai A.

Chișinău 2022
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

Background
This simulation activity is intended to provide a foundation for understanding the TCP/IP protocol suite and the
relationship to the OSI model. Simulation mode allows you to view the data contents being sent across the
network at each layer.
As data moves through the network, it is broken down into smaller pieces and identified so that the pieces can
be put back together when they arrive at the destination. Each piece is assigned a specific name (protocol
data unit [PDU]) and associated with a specific layer of the TCP/IP and OSI models. Packet Tracer simulation
mode enables you to view each of the layers and the associated PDU. The following steps lead the user
through the process of requesting a web page from a web server by using the web browser application
available on a client PC.
Even though much of the information displayed will be discussed in more detail later, this is an opportunity to
explore the functionality of Packet Tracer and be able to visualize the encapsulation process.

Instructions Part 1: Examine HTTP Web Traffic


In Part 1 of this activity, you will use Packet Tracer (PT) Simulation mode to generate web traffic and examine
HTTP.

Step 1: Switch from Realtime to Simulation mode.


In the lower right corner of the Packet Tracer interface are buttons that toggle between Realtime and
Simulation mode. PT always starts in Realtime mode, in which networking protocols operate with realistic
timings. However, a powerful feature of Packet Tracer allows the user to “stop time” by switching to
Simulation mode. In Simulation mode, packets are displayed as animated envelopes, time is event driven,
and the user can step through networking events.
a. Click the Simulation mode icon to switch from Realtime mode to Simulation mode.
b. Select HTTP from the Event List Filters.
1) HTTP may already be the only visible event. If necessary, click the Edit Filters button at the bottom
of the simulation panel to display the available visible events. Toggle the Show All/None check box
and notice how the check boxes switch from unchecked to checked or checked to unchecked,
depending on the current state.
2) Click the Show All/None check box until all boxes are cleared and then select HTTP from the Misc
tab of the Edit Filters window. Click the X in the upper right hand corner of the window to close the
Edit Filters window. The Visible Events should now only display HTTP.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

Step 2: Generate web (HTTP) traffic.


Currently the Simulation Panel is empty. There are five columns listed across the top of the Event List within
the Simulation Panel. As traffic is generated and stepped through, events appear in the list.
Note: The Web Server and Web Client are displayed in the left pane. The panels can be adjusted in size by
hovering next to the scroll bar and dragging left or right when the double-headed arrow appears. a. Click
Web Client in the far left pane.
b. Click the Desktop tab and click the Web Browser
icon to open it.
c. In the URL field, enter www.osi.local and click Go.
Because time in Simulation mode is event-driven, you
must use the Capture/Forward button to display
network events. The capture forward button is located
at the left hand side of the blue band that is below the
topology window. Of the three buttons there, it is the
one on the right.
d. Click Capture/Forward four times. There should be
four events in the Event List.
Question:

Look at the Web Client web browser page. Did


anything change?

Step 3: Explore the contents of the HTTP packet.


a. Click the first colored square box under the Event List > Type column. It may be necessary to expand
the Simulation Panel or use the scrollbar directly below the Event List.
The PDU Information at Device: Web Client window displays. In this window, there are only two tabs
(OSI Model and Outbound PDU Details) because this is the start of the transmission. As more events
are examined, there will be three tabs displayed, adding a tab for Inbound PDU Details. When an event
is the last event in the stream of traffic, only the OSI Model and Inbound PDU Details tabs are
displayed.
b. Ensure that the OSI Model tab is selected.
Under the Out Layers column, click Layer 7.
Questions:

What information is listed in the numbered steps directly below the In Layers and Out Layers boxes for
Layer 7? HTTP request
Type your answers here.
What is the Dst Port value for Layer 4 under the Out Layers column? 80
Type your answers here.
What is the Dest. IP value for Layer 3 under the Out Layers column? 192.168.1.254
Type your answers here.
What information is displayed at Layer 2 under the Out Layers column? Ethernet Header, MAC adresa

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

Type your answers here.


c. Click the Outbound PDU Details tab.
Information listed under the PDU Formats is reflective of the layers within the TCP/IP model.
Note: The information listed under the Ethernet II section of the Outbound PDU Details tab provides
even more detailed information than is listed under Layer 2 on the OSI Model tab. The Outbound PDU
Details provides more descriptive and detailed information. The values under DEST MAC and SRC MAC
within the Ethernet II section of the PDU Details appear on the OSI Model tab under Layer 2, but are not
identified as such.Questions:
What is the common information listed under the IP section of PDU
Details as compared to the information listed under the OSI Model
tab? With which layer is it associated? Source IP and Destination IP =
Layer 3
Type your answers here.
What is the common information listed under the TCP section of PDU
Details, as compared to the information listed under the OSI Model
tab, and with which layer is it associated? Source Port and Destination
Port = Layer 4
Type your answers here.
What is the Host listed under the HTTP section of the PDU Details?
What layer would this information be associated with under the OSI Model tab? www.osi.local = Layer 7

Type your answers here.


d. Click the next colored square box under the Event List > Type column. Only Layer 1 is active (not grayed
out). The device is moving the frame from the buffer and placing it on to the network.

e. Advance to the next HTTP Type box within the Event List and click the colored square box. This window
contains both In Layers and Out Layers. Notice the direction of the arrow directly under the In Layers
column; it is pointing upward, indicating the direction the data is travelling. Scroll through these layers
making note of the items previously viewed. At the top of the column the arrow points to the right. This
denotes that the server is now sending the information back to the client.
Question:

Comparing the information displayed in the In Layers column with that of the Out Layers column, what
are the major differences? Interschimbarea datelor în cadrul stratului 4

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

f. Click the Inbound and Outbound PDU Details tab. Review the PDU details.

g. Click the last colored square box under the Info column.
Question:

How many tabs are displayed with this event? Explain. Sunt reprezentate doar 2 secțiuni: OSI model și
Inbound PDU Details din motiv că acestea caracterizează dispozitivul de primire a cerinților de la client.

Part 2: Display Elements of the TCP/IP Protocol


Suite
In Part 2 of this activity, you will use the Packet Tracer Simulation
mode to view and examine some of the other protocols comprising
of TCP/IP suite.

Step 1: View Additional Events


a. Close any open PDU information windows.
b. In the Event List Filters > Visible Events section, click Show
All/None.
Question:

What additional Event Types are displayed? DNS, ARP, TCP.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
These extra entries play various roles within the TCP/IP suite. Address Resolution Protocol (ARP)
requests MAC addresses for destination hosts. DNS is responsible for converting a name (for example,
www.osi.local) to an IP address. The additional TCP events are responsible for connecting, agreeing on
communication parameters, and disconnecting the communications sessions between the devices.
These protocols have been mentioned previously and will be further discussed as the course progresses.
Currently there are over 35 possible protocols (event types) available for capture within Packet Tracer.

c. Click the first DNS event in the Type column. Explore the OSI Model and PDU Detail tabs and note the
encapsulation process. As you look at the OSI Model tab with Layer 7 highlighted, a description of what
is occurring is listed directly below the In Layers and Out Layers (“1. The DNS client sends a DNS query
to the DNS server.”). This is very useful information to help understand what is occurring during the
communication process.

d. Click the Outbound PDU Details tab.


What information is listed in the NAME field: in the DNS QUERY section? www.osi.localanswers here.
e. Click the last DNS Info colored square box in the event list.
Questions:

At which device was the PDU captured? Web Clientyour answers here.
What is the value listed next to ADDRESS: in the DNS ANSWER section of the Inbound PDU Details?
IP: 192.168.1.254

Type your answers here.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

f. Find the first HTTP event in the list and click the colored
square box of the TCP event immediately following this
event. Highlight Layer 4 in the OSI Model tab.
Question:

In the numbered list directly below the In Layers and Out


Layers, what is the information displayed under items 4 and
5? 4. Conexiunea TCP este reușită. 5. Dispozitvul setează
conexiunea ca STABILITĂ. e your answers here.
TCP manages the connecting and disconnecting of the
communications channel along with other responsibilities.
This particular event shows that the communication channel
has been ESTABLISHED.

g. Click the last TCP event. Highlight Layer 4 in the OSI Model tab. Examine the steps listed directly below
In Layers and Out Layers.

Question:

What is the purpose of this event, based on the information provided in the last item in the list (should be
item 4)? Finisarea conexiunii.ype your answers here.

Challenge Questions
This simulation provided an example of a web session between a client and a server on a local area network
(LAN). The client makes requests to specific services running on the server. The server must be set up to
listen on specific ports for a client request. (Hint: Look at Layer 4 in the OSI Model tab for port information.)
Based on the information that was inspected during the Packet Tracer capture, what port number is the Web
Server listening on for the web request?
În conformitate cu informația analizată, Port Number pentru cererii web este 80, port rezervat pentru
cereri de ordin HTTP, informația data fiind prezentată în cerința Web Client la stratul 4 în
compartimentul: port de destinare( Dst Port).
Type your answers here.
What port is the Web Server listening on for a DNS request? Dst Port 53

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

Lab - Use Wireshark to View Network Traffic


Background / Scenario
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network troubleshooting,
analysis, software and protocol development, and education. As data streams travel back and forth over the
network, the sniffer "captures" each protocol data unit (PDU) and can decode and analyze its content
according to the appropriate RFC or other specifications.
Wireshark is a useful tool for anyone working with networks and can be used with most labs in the CCNA
courses for data analysis and troubleshooting. In this lab, you will use Wireshark to capture ICMP data packet
IP addresses and Ethernet frame MAC addresses.

Required Resources
• 1 PC (Windows with internet access)
• Additional PCs on a local-area network (LAN) will be used to reply to ping requests.
Using a packet sniffer such as Wireshark may be considered a breach of the security policy of the school. It is
recommended that permission be obtained before running Wireshark for this lab. If using a packet sniffer such
as Wireshark is an issue, the instructor may wish to assign the lab as homework or perform a walk-through
demonstration.

Instructions Part 1: Capture and Analyze Local ICMP Data in Wireshark


In Part 1 of this lab, you will ping another PC on the LAN and capture ICMP requests and replies in
Wireshark. You will also look inside the frames captured for specific information. This analysis should help to
clarify how packet headers are used to transport data to their destination.

Step 1: Retrieve your PC interface addresses.


For this lab, you will need to retrieve your PC IP address and its network interface card (NIC) physical
address, also called the MAC address.
Open a Windows command prompt.

a. In a command prompt window, enter ipconfig /all, to the IP address of your PC interface, its description,
and its MAC (physical) address.
C:\Users\Student> ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : DESKTOP-NB48BTC


Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :


Description . . . . . . . . . . . : Intel(R) 82577LM Gigabit Network Connection
Physical Address. . . . . . . . . :00-26-B9-DD-00-91
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::d809:d939:110f:1b7f%20(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.147(Preferred)

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
<output omitted>

b. Ask a team member or team members for their PC IP address and provide your PC IP address to them.
Do not provide them with your MAC address at this time.

Close a Windows Command Prompt.

Step 2: Start Wireshark and begin capturing data.


a. Navigate to Wireshark. Double-click the desired interface to start the packet capture. Make sure the
desired interface has traffic.
b. Information will start scrolling down the top section in Wireshark. The data lines will appear in different
colors based on protocol.
This information can scroll by very quickly depending on what communication is taking place between
your PC and the LAN. We can apply a filter to make it easier to view and work with the data that is being
captured by Wireshark.
For this lab, we are only interested in displaying ICMP (ping) PDUs. Type icmp in the Filter box at the top
of Wireshark and press Enter, or click the Apply button (arrow sign) to view only ICMP (ping) PDUs.
c. This filter causes all data in the top window to disappear, but you are still capturing the traffic on the
interface. Navigate to a command prompt window and ping the IP address that you received from your
team member.
C:\> ping 192.168.1.114

Pinging 192.168.1.114 with 32 bytes of data:


Reply from 192.168.1.114: bytes=32 time<1ms TTL=128
Reply from 192.168.1.114: bytes=32 time<1ms TTL=128
Reply from 192.168.1.114: bytes=32 time<1ms TTL=128

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
Reply from 192.168.1.114: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.1.114:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate
round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Notice that you start seeing data appear in the top window of Wireshark again.

Note: If the PC of your team member does not reply to your pings, this may be because the PC firewall of
the team member is blocking these requests. Please see Appendix A: Allowing ICMP Traffic Through a
Firewall for information on how to allow ICMP traffic through the firewall using Windows.
d. Stop capturing data by clicking the Stop Capture icon.

Step 3: Examine the captured data.


In Step 3, examine the data that was generated by the ping requests of your team member PC. Wireshark
data is displayed in three sections: 1) The top section displays the list of PDU frames captured with a
summary of the IP packet information listed; 2) the middle section lists PDU information for the frame selected
in the top part of the screen and separates a captured PDU frame by its protocol layers; and 3) the bottom
section displays the raw data of each layer. The raw data is displayed in both hexadecimal and decimal form.
a. Click the first ICMP request PDU frames in the top section of Wireshark. Notice that the Source column
has your PC IP address, and the Destination column contains the IP address of the teammate PC that you
pinged.

b. With this PDU frame still selected in the top section, navigate to the middle section. Click the plus sign to
the left of the Ethernet II row to view the destination and source MAC addresses.
Questions:

Does the source MAC address match your PC interface?


© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
DA ( b0:68:e6:ab:24:69 )Type your answers
Does the destination MAC address in Wireshark match your team member MAC address?
DA ( 00:25:22:f0:c2:4c )
How is the MAC address of the pinged PC obtained by your PC?
Adresa MAC este cunoscută prin procesul ARP
Note: In the preceding example of a captured ICMP request, ICMP data is encapsulated inside an IPv4
packet PDU (IPv4 header) which is then encapsulated in an Ethernet II frame PDU (Ethernet II header)
for transmission on the LAN.

Part 2: Capture and Analyze Remote ICMP Data in Wireshark


In Part 2, you will ping remote hosts (hosts not on the LAN) and examine the generated data from those
pings. You will then determine what is different about this data from the data examined in Part 1.

Step 1: Start capturing data on the interface.


a. Start the data capture again.
b. A window prompts you to save the previously captured data before starting another capture. It is not
necessary to save this data. Click Continue without Saving.
c. With the capture active, ping the following three website URLs from a Windows command prompt:
Open a Windows command prompt

1) www.yahoo.com

2) www.cisco.com

3) www.google.com

Note: When you ping the URLs listed, notice that the Domain Name Server (DNS) translates the URL to
an IP address. Note the IP address received for each URL.
d. You can stop capturing data by clicking the Stop Capture icon.
Step 2: Examining and analyzing the data from the remote hosts.
Review the captured data in Wireshark and examine the IP and MAC addresses of the three locations that
you pinged. List the destination IP and MAC addresses for all three locations in the space provided.
Questions:

IP address for www.yahoo.com: 87.248.100.215r answers here.


MAC address for www.yahoo.com: 7c:c3:85:d4:29:2f
Type your answers here.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
IP address for www.cisco.com: 104.81.209.77nswers here.
MAC address for www.cisco.com: r7c:c3:85:d4:29:2f here.
IP address for www.google.com: 142.250.185.196e.
MAC address for www.google.com:r7c:c3:85:d4:29:2f answers here.

What is significant about this information?


Adresa MAC pentru toate cazurile este identică, deoarece coincide cu adresa fizică a interfeței LAN
default – gateway a routerului.
How does this information differ from the local ping information you received in Part 1?
Informația prezentată de ping-ul local prezintă datele adresei MAC a dispozitului local cu care a fost
efectuată verificarea conexiuni, va oferi datele a NIC a dispozitivului selectat.

Reflection Question
Why does Wireshark show the actual MAC address of the local hosts, but not the actual MAC address for the
remote hosts? .
Adresele MAC pentru gazdele de la distanță nu sunt cunoscute în rețeaua locală, așa că este utilizată
adresa MAC a default-gateway. După ce pachetul ajunge la routerul default – gateway, informațiile de nivel 2
sunt extrase din pachet și un nou antet de nivel 2 este atașat cu adresa MAC de destinație a următorului
router(next hop router).

Appendix A: Allowing ICMP Traffic Through a Firewall


If the members of your team are unable to ping your PC, the firewall may be blocking those requests. This
appendix describes how to create a rule in the firewall to allow ping requests. It also describes how to disable
the new ICMP rule after you have completed the lab.

Part 1: Create a new inbound rule allowing ICMP traffic through the firewall.
a. Navigate to the Control Panel and click the System and Security option in the Category view.
b. In the System and Security window, click Windows Defender Firewall or Windows Firewall.
c. In the left pane of the Windows Defender Firewall or Windows Firewall window, click Advanced
settings.
d. On the Advanced Security window, click the Inbound Rules option on the left sidebar and then click
New Rule… on the right sidebar.
e. This launches the New Inbound Rule wizard. On the Rule Type screen, click the Custom radio button
and click Next.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action
f. In the left pane, click the Protocol and Ports option and using the Protocol Type drop-down menu,
select ICMPv4, and then click Next.
g. Verify that Any IP address for both the local and remote IP addresses are selected. Click Next to
continue.
h. Select Allow the connection. Click Next to continue.
i. By default, this rule applies to all the profiles. Click Next to continue.
j. Name the rule with Allow ICMP Requests. Click Finish to continue. This new rule should allow your
team members to receive ping replies from your PC.

Part 2: Disabling or deleting the new ICMP rule.


After the lab is complete, you may want to disable or even delete the new rule you created in Step 1. Using
the Disable Rule option allows you to enable the rule again at a later date. Deleting the rule permanently
deletes it from the list of inbound rules.
a. On the Advanced Security window, click Inbound Rules in the left pane and then locate the rule you
created previously.

b. Right-click the ICMP rule and select Disable Rule if so desired. You may also select Delete if you want to
permanently delete it. If you choose this option, you must re-create the rule again to allow ICMP replies

Concluzie: În cadrul lucrării de laborator a fost analizat traficul din rețea și cercetate modele OSI și
TCP/IP. Pe parcursul efectuării lucrării au fost observate procesele ARP, destinat pentru depistarea și
cunoașterea adresei MAC necunoscute, fiind cunoscută doar adresa IP, procesele DNS, pentru
translatarea din nume de domeniu în adresă IP și procesele TCP, folosite de protocolul HTTP cu port
80. Atât procesul ARP, cât și ICMP (ping), au constat din 2 componente: cererea (request) , pentru
solicitarea informației și răspunsul (reply), oferirea informației cerute. În ceea ce privește modelele
OSI și TCP/IP, acestea au fost cercetate în cadrul proceselor de încapsulare și decapsulare a
informației transmise, așadar pentru modelul OSI informația încapsulată a fost analizată pentru toate
cele 7 nivele, data fiind încapsulată la nivelele 5 – 7, ulterior fiind adăugat un header Layer 4: TCP
sau UDP, astfel datele fiind divizate în segmente, ulterior fiind adăugat un Layer 3 header, care
conținea informație despre adresa IP sursă și de destinație, drept urmare informația fiind sub formă
© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 14 www.netacad.com
Packet Tracer - Investigate the TCP/IP and OSI Models in Action

de packet. Drept efect ulterior se adaugă un header și trailer Layer 2, unde sunt introduse informațiile
prvind adresele MAC sursă și de destinație, formându-se astfel cadrele, care în final devin biți, care
se transformă în semnale în dependență de mediul de transmitere.

© 2013 - 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 14 www.netacad.com

You might also like