COMP2881 Operating Systems Assignment

Assignment Help Computer Engineering
Reference no: EM132528318

COMP2881 Operating Systems - Flinders University

Working with packets and network interfaces

Task 1
Write a shell program that uses the following snippets to collect usage information on the ethernet interface, print out the results as per the example below. This small script is the basis for thinking about monitoring networks services on the network. Consider the material from the lecture about network monitoring about where this fits into managing your

Experiment with each of these on the command line to get an understanding how they work;
• Use the output of the ifconfig command to determine the network interfaces available;
$ /sbin/ifconfig -a
• Use the output of date in the time zone UTC
$ date --utc
Sunday 21 October 23:32:28 UTC 2018
• Use the format specifier of date command to print year, month, day, hour, minute and seconds, eg;
$ date +%D 10/22/18
• Use the output of the following command to collect bytes sent and received, select appropriate network interface;
$ cat /sys/class/net/eth1/statistics/tx_bytes 6537940985992
$ cat /sys/class/net/eth1/statistics/rx_bytes 297914460567432
• Use the return value from ping to determine if the default gateway is available;
$ ip route show # find IP address of default gateway
$ ping -c 1 192.168.1.1 # change to the default gateway on your system
$ echo $? # print out the return value

$ ping -c 1 192.168.1.1
$ if [ $? -ne 0 ] ; then echo "Gateway: Fail" ; else echo "Gateway: OK" ; fi

• Use shell variables to store information to be printed, for example use this quote with back ticks "`" to run commands and copy their text output in to the string variable. No spaces around the assignment; "=". Multiple variables can be printed out on the one line with echo.
$ export tbytes=`/sbin/ifconfig eth1 | grep "TX bytes" | sed -e "s/.*TX bytes://" | sed -e "s/(.*//"`
$ echo $tbytes 6537553143

• Use a while loop in your shell program, exit the program if the ping fails.
$ cat task.sh #!/bin/sh a=1
while [ $a -gt 0 ] # if a is greater than zero do
echo $a a=`expr $a + 1`
sleep 10 # sleep for ten seconds ## BODY OF TEST GOES HERE
## if ping fails set loop counter to zero done

Task 2

Use the tcpdump command in a terminal to display the summary of packets sent and received by applications running on your BYOD machine;

• Start firefox, similar web browser on the VM
• In a terminal, use tcpdump with the appropriate command line options to view all http traffic on the first network interface, for example as the root user;
tcpdump -i eth0 ...

• Use other tools like ping, to generate traffic on the interfaces
• Use tcpdump with the appropriate command line options to capture traffic from eth0 or the first network interface and write to a file; network-traffic.cap
• We will use this file later with Wireshark to display the contents, so you can let this run for some time.

Demonstrate the following questions with the above activities;
Q) Can you capture packets with tcpdump and display in the terminal?
Q) Can you capture packets to a file with tcpdump?

Task 3
Use the tcpdump command in a terminal inspect the contents of packets sent and received by applications running on your BYOD machine;

• In a terminal, use tcpdump to inspect more about packets with these options
tcpdump -vvv -s 1500 ...

• Use tcpdump to capture traffic on specific ports

Demonstrate the following questions with the above activities;
Q) What does the -vvv and -s 1500 flags do?
Q) Can you identify packets on UDP or TCP port 53, source and destination hosts when using the web browser?
Q) Can you identify packets with a protocols other than TCP/IP or UDP/IP ?

Task 4
Use the tcpdump command in a terminal to capture the packets sent and received by applications running on the VM. Take a screen shot of the window where you have run the following;

• Use wireshark to capture all traffic from eth0 or the first network device to a file [FILE 1]
• Use wireshark to view only ICMP traffic

Q) Can you identify ICMP traffic on the network interface?
Or if running a VM, can you install and run wireshark on the host machine running the VM to capture the VMs traffic?

Task 5
Identify the latency of a host over the local network, it should typically be in milliseconds;
• Use the tools tracepath, traceroute and ping to determine the route trip times of packets to a host
• Install the above tools if not on your system already

Q) Can you run the following commands and compare the resulting times to the host;
$ tracepath
$ traceroute
$ ping -c 10

Q) Identify which hosts/routers create the largest latency
Q) Do you see asymmetric routes, if so why might that be?
Q) Using tcpdump or wireshark, what type of traffic do these programs generate?

Attachment:- Working with packets and network interfaces.rar

Reference no: EM132528318

Questions Cloud

Directly complete the granular definition : Identify and complete the missing phrase to directly complete the granular definition?
How forward contracts work in markets : Make your own assumption for prices, apply the forward contract equation and do not forget to comment.
How would you proceed with proposed business deal : From what you have learn about ERM and Risk in general, how would you proceed with the proposed business deal?
How put option contracts work in markets : Give a full example to show how Put option contracts work in markets.
COMP2881 Operating Systems Assignment : COMP2881 Operating Systems Assignment Help and Solution, Flinders University - Assessment Writing Service - Working with packets and network interfaces
Physical security of it infrastructure : When it comes to the physical security of an IT infrastructure, there are an almost unlimited number of possible physical threats,
Health of the company compared to the historical ratios : Provide the URL with the information. Discuss the health of the company compared to the historical ratios you have found.
What was the holding period return for the stock : A stock has had returns of 17.32 percent, 12.32 percent, 6.25 percent, 27.58 percent, and -13.79 percent over the past five years, respectively.
Job description for position : Suppose a job posting states, Applicants must have three to four years coding experience and a bachelor's degree or a graduate degree.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write out a program that acts as a simplified eliza

write out a program that acts as a simplified Eliza using prolog but I can't even figure out where to start. Here are the steps I have to follow. 1. accept a sentence that is typed in by the user as a list.

  Tere was a study released in june 2008 by transportation

our response must be 200 words in length for each questions. you are required to use at least your textbook as source

  Creating a simulator that maintains coherent caches

CS 4290/6290, ECE 4100/6100 - Spring 2017 Project - Cache Coherence. In this project, you will be creating a simulator that maintains coherent caches

  What are the advantages of thunderbolt

What are the advantages of Thunderbolt? When might one use SCSI to interconnect a peripheral? What is the difference between SCSI and iSCSI?

  What are techniques for addressing security requirements

What are techniques for addressing security requirements? Which have a business relationship with the company?

  Are you protected from packet sniffing

If you use a mobile device, but connect with the cell tower wireless instead of the classroom LAN, are you protected from packet sniffing? Why or why not?

  Event on ethical issues related to information technology

Locate a news article based on a recent event on ethical issues related to information technology.

  Which types of variables are composite variables

Systematically analyze the composite variables of your favorite programming language. Which types of variables are composite variables?

  Evaluate the security controls that mitigate the risks

Analyze and evaluate the security controls that mitigate each of the risks/threats identified. Provide a rationale for how each of the controls identified.

  How the given policy solutions should be incorporated

Create a brief description of how these policy solutions should be incorporated into the given framework. The description should thoroughly analyze.

  Question1 write code for selection sort insertion sort and

question1. write code for selection sort insertion sort and bubble sort. make sure that you are able to read input from

  Create python program to solve a simple payroll calculation

Create a Python program to solve a simple payroll calculation. Calculate the amount of pay, given hours worked, and hourly rate.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd