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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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