1 Getting Started
1.1 Acquiring Libtrace
If you are working in the labs, libtrace
will be already installed on the lab machines and ready to go.
If you would prefer to work on your own
equipments, you’ll need to install libtrace. There are binary libtrace packages
available for Ubuntu, Debian, CentOS and Fedora distributions of Linux, which
is the recommended method of installation. Otherwise, you can install libtrace
from source by either downloading the latest release from
http://research.wand.net.nz/software/libtrace.php
Or cloning libtrace from our GitHub:
https://github.com/wanduow/libtrace
Instructions for installing libtrace both
via packages and via source can be found at:
https://github.com/LibtraceTeam/libtrace/wiki/Installing-Libtrace
Libtrace does not support Windows, so if
you’re a Windows user you’ll need to use the labs or a VM to do this
assignment.
Documentation for libtrace can be found in
the libtrace wiki:
https://github.com/wanduow/libtrace/wiki
1.2 Acquiring Trace Files
The trace files you should use for this
assignment can be downloaded from:
http://www.wand.net.nz/~salcock/libtrace/514assign/
The trace files have already been downloaded onto the lab machines, so you can
also access them there.
There are three traces that you should use
for this assignment: 1000packets.erf.gz and 514assign_2019.erf.gz.
The 514assign 2019 trace uses the ERF
format and is a 15 minute fragment from the ISPDSL-II trace set. It contains
packet headers + 4 bytes of application payload for all of the traffic observed
to and from the DSL customers for a New Zealand ISP. In this trace, packets
tagged with a direction of “outgoing” are transmitted by
1
DSL customers and packets tagged with a
direction of “incoming” are destined for DSL customers. The trace file is quite
large (554 MB) so bear that in mind when deciding where and when to download
it.
More details about the ISPDSL-II trace set
can be found at:
http://wand.net.nz/wits/ispdsl/2/
The 1000 packet trace is the first 1000
packets from the 514assign 2019 trace, so it is much smaller (36 KB) and
therefore more suitable for quickly testing your programs. Both traces will be
used to grade your assignment, so you should make sure your programs work with
both.
All IP addresses in the captured packets
have been encrypted to protect the privacy of the network users.
2 Task
Write a libtrace program using C to analyse
a trace file and count the number of packets and bytes observed each minute for
the following protocols:
• TCP
• UDP
• ICMP
• IPv4
• IPv6
• GRE
Ensure that your output is clearly labeled
and formatted sensibly. There should be one line of output for each minute
covered by the trace file.
Get Free Quote!
354 Experts Online