Problem D . Below is the information displayed by a command “traceroute www.goog
ID: 3856143 • Letter: P
Question
Problem D. Below is the information displayed by a command “traceroute www.google.com” on my computer.
a, Is the IP address of my computer included in the information given above? If yes, what is it and is it a private or public IP address?
b,What is the IP address of www.google.com when this traceroute command was executed? Is it a private or public IP address?
c, What’s the relationship between the two DNS names: www.google.com and den03s09-in-f4.1e100.net? (Hint: which is the alias name and which is the canonical name?)
d, How many routers are involved in the communication between my computer and the web server at www.google.com?
e., What are the initial TTL and the destination IP enclosed by my computer in the set of IP datagrams that are dropped by the router
72.14.194.239?
f, When the router xe-0-0-1.core-910.frgp.net drops the ip datagram enclosing a UDP segment from my computer, does it send a UDP segment or an ICMP message to the host? What are the type, code, name of router, and IP address of router enclosed in such UDP segment or ICMP message? What’s the source IP in the IP datagram carrying this UDP/ICMP packet? Whose IP is used as the destination IP for this UDP/ICMP packet? (hint: websever’s, my computer’s, router 147.153.69.30’s, or …?)
g, What are the final TTL and the destination IP enclosed in the set of IP datagrams when they arrive at the webserver www.google.com? Does this webserver send a UDP segment or an ICMP message back to the host? What are the type and code enclosed in such UDP segment or ICMP message? What’s the source IP in the IP datagram carrying this UDP/ICMP packet? Whose IP is used as the destination IP for this UDP/ICMP packet? (hint: websever’s, my computer’s, router 147.153.69.30’s, or …?)
Explanation / Answer
A boilerplate array sort program has been written for you to build upon. An example bubble sort function has already been implemented. You need to extend the existing code to add the heap sort and merge sort algorithms into the empty functions that already exist in the source code.
To begin this lab, start by obtaining the necessary boilerplate code. Enter the class repository:
Pull the latest version of the repository, and update your local copy of it:
Copy the files you want from the class repository to your private repository:
(In this case, it is one folder you want)
Enter your private repository now, specifically the lab05 folder:
Add the new files to version control in your private repository:
(Technically, part1 is a directory, but Mercurial is smart enough to just add all the files in these directories with this command)
Commit the new files in your personal repository, so you can easily go back to the original starter code if necessary
Push the new commit to the bitbucket.org website
Enter the part1 folder
You should see the following code:
Lab Part 1 - Sorting Algorithms
Assignment:
(1) Implement the remaining two sort algorithms (heap sort and and merge sort) in the file your_functions.c.
(2) Run all three algorithms: bubble sort, heap sort, and merge sort and ensure that the verification function reports success for each algorithm
(3) Check your code (including Makefile) into version control, and push to BitBucket.
Warning: ***Zero*** points will be awarded for missing source code files that were never added to version control, broken Makefiles, or other any errors that prevent your program from compiling/running! (You might want to do a test checkout to a different directory and verify that you can still compile your program)
Program usage instructions:
Compile the program:
Run the bubble sort routine.
Note the program output, particularly the self-test at the end that verifies the sorting function worked correctly.
A note for students with old computers: **30 seconds** is plenty of execution time for the bubble sort. On my laptop, that is about 50,000 array elements. If that array size takes too long on your computer, feel free to experiment with a smaller array size (25,000? 12,500?) and change it in the file sorting.c. I'm interested in the relative performance difference, not the absolute numbers.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.