You are on page 1of 8

CS 349 Networks Lab 2015

Assignment 2
Group 29
Ritvik Saraf - Devendra Ratnam
120123048 120123013

1. List out all the protocols used by the application at different layers
(only those which you can figure out from traces) and study their
packet formats.

Q1).

USED Protocol:::: eth:ethertype:ip:udp:data

eth: The Ethernet protocol is made up of a number of components, such

as the structure of Ethernet frames, the Physical Layer and its MAC
operation. This page will detail the fundamental structure of the Ethernet
Protocol.
Ethertype: EtherType is a two-octet field in an Ethernet frame. It is used

to indicate which protocol is encapsulated in the payload of an Ethernet


Frame. This field was first defined by the Ethernet II Framing networking
standard, and later adapted for the IEEE 802.3 Ethernet networking
standard.
ip: The Internet Protocol (IP) is the principal communications protocol in
the Internet protocol suite for relaying datagrams across network
boundaries. Its routing function enables internetworking, and essentially
establishes the Internet.
udp: UDP (User Datagram Protocol) is a communications protocol that
offers a limited amount of service when messages are exchanged
between computers in a network that uses the Internet Protocol (IP). UDP
is an alternative to the Transmission Control Protocol (TCP) and, together
with IP, is sometimes referred to as UDP/IP.
Data: 128 bytes

2. Highlight and explain the values of various fields of the protocols


which you can see in the traces. Example, Source or destination IP
address and port no., Ethernet address, protocol number, etc.
Offset 0-5: The Destination Address

The first six bytes of an Ethernet frame make up the Destination


Address. The Destination Address specifies to which adapter the data
frame is being sent. A Destination Address of all ones specifies a
Broadcast Message that is read in by all receiving Ethernet adapters.

The first three bytes of the Destination Address are assigned by the IEEE
to the vendor of the adapter and are specific to the vendor. See the MAC
Address page for more information.

The Destination Address format is identical in all implementations of


Ethernet.

Offset 6-11: The Source Address

The next six bytes of an Ethernet frame make up the Source Address. The
Source Address specifies from which adapter the message originated. Like
the Destination Address, the first three bytes specify the vendor of the
card.

The Source Address format is identical in all implementations of Ethernet.

Offset 12-13: The Ethertype

Following the Source Address is a 2 byte field called the Ethertype. The
Ethertype is analogous to the SAPs in the 802.3 frame in that it specifies
the memory buffer in which to place this frame.

Version (4 bits) shows the IP version number which is 4.


TrafficClass (8 bits) is discussed later.
Flow Label (20 bits) is discussed later.

Payload Length (16 bits) is used to assign length. This is discussed later.
Next Header (8 bits) identifies the type of header that follows the IPv6 header.
Hop Limit (8 bits) is used to limit life of a packet on the network. This is discussed
later.
Source and Destination Addresses (each 128 bits) assigns the source and
destination addresses.

Service Model
Unreliable unordered datagram service
Addresses multiplexing of multiple connections
Multiplexing
16-bit port numbers (some are well-known)
Checksum
Validate header
Optional in IPv4
Mandatory in IPv6

Data (variable): The higher-layer data payload. The length of this field MUST be
inferred from the remaining size of the packet reported by the lower-level transport.
The size is the total number of bytes in the packet minus the 48 bytes of previous
Data frame fields.

3. Explain the sequence of messages exchanged by the application for


using several functionalities available in the application. For example,
upload, download, play, pause, stop and so on. Check and explain if any
handshaking sequence occurs or not.

Yes, handshaking sequence occurs.


Handshaking: In information technology, telecommunications, and related fields,
handshaking is an automated process of negotiation that dynamically sets
parameters of a communications channel established between two entities before
normal communication over the channel begins. It follows the physical
establishment of the channel and precedes normal information transfer.

It is usually a process that takes place when a computer is about to communicate


with a foreign device to establish rules for communication. When a computer
communicates with another device like a modem, printer, or network server, it
needs to handshake with it to establish a connection.

4. Explain how a particular protocol is relevant for functioning of the


application.

UDP is better for online games.


UDP is faster than TCP, and the simple reason is because its nonexistent
acknowledge packet (ACK) that permits a continuous packet stream, instead of TCP
that acknowledges a set of packets, calculated by using the TCP window size and
round-trip time (RTT).
For massively multiplayer online (MMO) games, developers often have to make an
architectural choice between using UDP or TCP persistent connections. The
advantages of TCP are persistent connections, reliability, and being able to use
packets of arbitrary sizes. The biggest problem with TCP in this scenario is its
congestion control algorithm, which treats packet loss as a sign of bandwidth
limitations and automatically throttles the sending of packets. On 3G or Wi-Fi
networks, this can cause a significant latency.

5. Calculate the following statistics from your traces when you perform
experiment at different
times of the day: Throughput, RTT, Packet size, No. of packets lost,
number of UDP & TCP
packets, number of responses received with respect to one request sent.

Throughput:

Round Trip Time

Packets Lost

Packet Size: Given in question 1 in Frame.

6. Check if the whole content is being sent from same location/source. List
out the IP
addresses of content providers if there exist multiple sources and explain
the reason behind
it.
Once the connection between the source and destination is established and the
content is being directly sent from point-to-point P2P.

You might also like