Question: 1 . Start Wireshark and capture packets. Use NTPClient.java and NTPMessage.java to connect to pool.ntp . org. Stop Wireshark and save the capture in a

1. Start Wireshark and capture packets. Use NTPClient.java and NTPMessage.java to connect to pool.ntp.org. Stop Wireshark and save the capture in a pcap file. Save the answers to the questions below in a file. Use the NTP reply in your Wireshark capture to answer questions below.
1.1 Is this reply from a primary NTP server? Explain your answer by using relevant fields in the reply.
1.2 At what time was the NTP response received by the client? Is this the destination timestamp or the receive timestamp? Explain your answer.
2. Write a Java UDP socket program with a client NTPClient.java and a local NTP server NTPServer.java that communicate via localhost and do the following.
NTP server:
2.1 The main server thread listens in a loop on port 1000 for requests from NTP clients
2.2 When a NTP request arrives, it prints starting client thread, starts a new thread, generates a random integer d between 1 and 10000, prints d= followed by the value of d, delays for d milliseconds, and sends the NTP reply to the client
2.3 Prints the message stopping client thread and stops the client thread
NTP client:
2.4 Prints the message sending request and sends an NTP request to the local NTP server
2.5 Prints the NTP reply received from the local NTP server.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!