CN 10
CN 10
CN 10
Practical: 10
Practical : 10
➢ Features
The following are some of the many features Wireshark provides:
● Available for UNIX and Windows.
● Capture live packet data from a network interface.
● Open files containing packet data captured with tcpdump/WinDump,
Wireshark, and a number of other packet capture programs.
● Import packets from text files containing hex dumps of packet data.
● Display packets with very detailed protocol information.
● Save packet data captured.
● Export some or all packets in a number of capture file formats.
● Filter packets on many criteria.
● Search for packets on many criteria. ● Colorize packet display based on
filters. Create various statistics.
Name: Ms Indu Jeph
Enrolment No: 22012011024 Page|2
2CEIT503: Computer Networks Practical 10
However, to really appreciate its power you have to start using it.Figure
1.1, “Wireshark captures packets and lets you examine their contents.”
showsWireshark having captured packets and waiting for you to examine
them.
➢ Capture a Trace
You should see a screen similar to the following
Select any packet in the trace (in the top panel) to see details of its
structure (in the middle panel) and the bytes that make up the packet (in
the bottom panel). Now we can inspect the details of the packets. In the
figure, we have selected the first packet in the trace. Note that we are
using the term “packet” in a loose way. Each record captured by Wireshark
more correctly corresponds to a single frame in Ether-net format that
carries a packet as its payload; Wireshark interprets as much structure as
it can.
In the middle panel, expand the Ethernet header fields (using the “+”
expander or icon) to see their details. Our interest is the Ethernet header, and
you may ignore the higher layer protocols (which are IP and ICMP in this
case). Note the following:
● The frames in this trace are DIX Ethernet, called “Ethernet II” in
Wireshark.
● There is no preamble in the fields shown in Wireshark. The preamble is a
physical layer mecha-nism to help the NIC identify the start of a frame. It
carries no useful data and is not received like other fields.
● There is a destination address and a source address. Wireshark is
decoding some of these bits in the OUI (Organizationally Unique Identifier)
portion of the address to tell us the vendor of the NIC, e.g., Dell for the
source address.
● There is a Type field. For the ping messages, the Ethernet type is IP,
meaning the Ethernet pay-load carries an IP packet. (There is no Length
field as in the IEEE 802.3 format. Instead, the length of a DIX Ethernet
frame is determined by the hardware of a receiving computer, which looks
for valid frames that start with a preamble and end with a correct
checksum, and passed up to higher layers along with the packet.)
● There is no Data field per se – the data starts with the IP header right after
the Ethernet header.
● There is no pad. A pad will be present at the end if the frame would
otherwise be less than 64 bytes, the minimum Ethernet frame size.
● To work out sizes, observe that when you click on a protocol block in the
middle panel (the block itself, not the “+” expander) then Wireshark will
highlight the bytes it corresponds to in the packet in the low-er panel and
display the length at the bottom of the window.
● You may also use the overall packet size shown in the Length column or
Frame detail block.
are sent, and the destination for frames that are received. But what is the other
address?
● Assuming you pinged a remote Internet server, it cannot be the Ethernet
ad-dress of the remote server because an Ethernet frame is only
addressed to go within one LAN.
Instead, it will be the Ethernet address of the router or default gateway,
such as your AP in the case of 802.11. This is the device that connects
your LAN to the rest of the Internet.
➢ Broadcast Frames
● The trace that you gathered above captured unicast Ethernet traffic sent
between a specific source and destination, e.g., your computer to the
router.
● It is also possible to send multicast or broadcast Ethernet traffic, destined
for a group of computers or all computers on the Ethernet, respectively.
We can tell from the address whether it is unicast, multicast, or broadcast.
Broadcast traffic is sent to a reserved Ethernet address that has all bits set
to “1”. Multicast traffic is sent to addresses that have a “1” in the first bit
sent on the wire; broadcast is a special case of multicast. Broadcast and
multicast traffic is widely used for discovery protocols, e.g., a packet sent
to everyone in an effort to find the local printer. 1.
● Start a capture for broadcast and multicast Ethernet frames with a filter of
“ether multicast”. You do this by selecting Capture in the main menu and
then selecting Options. This is not to be confused with the filter box on the
live capture page which will not accept the filter expression above.
➢ Address Resolution Protocol
● The Address Resolution Protocol (ARP) is a telecommunication protocol
used for resolution of network layer addresses into link layer addresses, a
critical function in multiple-access networks. ARP was defined by RFC 826
in 1982 It is Internet Standard STD 37.
● It is also the name of the program for manipulating these addresses in
most operating systems.
● The Address Resolution Protocol is a request and reply protocol that runs
encapsulated by the line protocol. It is communicated within the
boundaries of a single network, never routed across internetwork nodes.
This property places ARP into the Link Layer of the Internet Protocol Suite,
while in the Open Systems Interconnection (OSI) model, it is often
described as residing between Layers 2 and 3, being encapsulated by
Layer 2 protocols. However, ARP was not developed in the OSI framework.
➢ IPv4
● Internet Protocol version 4 (IPv4) is the fourth version in the development
of the Internet Protocol (IP) Internet, and routes most traffic on the Internet
However, a successor protocol, IPv6, has been defined and is in various
stages of production deployment. IPv4 is described in the IETF publication
replacing an earlier definition.
● IPv4 is a connectionless protocol for use on packet-switched networks. It
operates on a best effort delivery model, in that it does not guarantee
delivery, nor does it assure proper sequencing or avoidance of duplicate
delivery. These aspects, including data integrity, are addressed by an
upper layer transport protocol, such as the Transmission Control Protocol
(TCP).
● IPv4 uses 32-bit (four-byte) addresses, which limits the address space to
4294967296 (232) addresses. As addresses were assigned to users, the
EXERCISE
Give answers to the following questions.
3) Select any frame, and find which field in the frame identifies the type of packet that
this protocol message is encapsulated in?
a. Give the EtherType value (in Hex) that identifies this protocol?
b. Give the decimal value for the two-byte Frame type field. 34525
4) What is the broadcast Ethernet address, written in standard form as Wireshark
displays it? ff:ff:ff:ff:ff:ff
5) Which bit of the Ethernet address is used to determine whether it is unicast or
multicast/broadcast?
The first bit of the first byte of an Ethernet address is used to determine whether it is unicast
or multicast/broadcast.
Unicast Address _ _ _ _ _ _ _ 0
6) How long are the combined IEEE 802.3 and LLC headers compared to the DIX Ethernet
headers?
The combined IEEE 802.3 and LLC headers are 3 bytes longer than the DIX Ethernet headers.
7) How does the receiving computer know whether the frame is DIX Ethernet or IEEE
802.3?
The receiving computer can determine whether the incoming frame is DIX Ethernet or
IEEE 802.3 by examining the EtherType field (or Length field in the case of IEEE 802.3)
within the Ethernet frame.
● DIX Ethernet Frame: In a DIX Ethernet frame, the EtherType field is used to
identify the higher-layer protocol encapsulated within the Ethernet frame. If the
value in the EtherType field is greater than or equal to 1536 (0x600 in
hexadecimal), it indicates the type of protocol data contained in the frame. For
example, if the EtherType field contains the value 0x0800, it signifies that the
frame carries an IPv4 packet.
● IEEE 802.3 Ethernet Frame: In an IEEE 802.3 Ethernet frame, the Length field
is used instead of the EtherType field. The Length field specifies the length of
the frame's data payload in bytes. If the value in the Length field is less than
1536, it is an IEEE 802.3 frame. Otherwise, if the value is greater than or equal
to 1536, it indicates that the frame follows the IEEE 802.3 standard.
8) If IEEE 802.3 has no Type field, then how is the next higher layer determined? Use
Wireshark to look for the demultiplexing key.
If IEEE 802.3 has no Type field (like in Ethernet II), the next higher-layer protocol is
determined using the LLC (Logical Link Control) header, specifically the Service Access
Point (SAP) fields.
9) From the command line of the computer, ping the IP address of another network
connected. You can, for example, ping the default gateway of your PC 10.10.0.101, or
another PC connected to the network. After receiving the successful replies to the
ping in the command line window, stop the packet capture.
For example: ping 10.0.0.5 -t A.
What protocol is used by ping?
Protocol: ICMP
B. What is the full name of it?
Internet Control Message Protocol
11) What is the average data rate (in Mbps) of your captured trace? Bytes captured:
13) Give a graph for IPv4 vs. TCP packets per second for your captured trace?
Number of Subnets 4