For 112 semester
Networks & Applications
INFT12/72-230
Assignment 3
Due: 4 pm Monday of Week 13 (8th August 2011)
Credit: 15 marks
In this assignment you are requested to answer the four questions:
Question 1: (4 marks)
A router has the following (CIDR) entries in its routing table:
Address/mask Next hop
135.46.56.0/22 Interface 0
135.46.60.0/22 Interface 1
192.53.40.0/23 router 1
default router 2
For each of the following IP addresses, what does the router do if a packet with that address arrives?
(a) 135.46.63.10
(b) 135.46.57.14
(c) 135.46.52.2
(d) 192.53.40.7
(e) 192.53.56.7
Question 2: (3 marks)
Write HTML codes which output the following table or layout. You need to display text and colour fields, but borders need not be shown.
Question 3: (3 marks)
Review all the Java classes given in the folder called TCPThreaded from lab7.zip for workshop 7. It’s a complete example for TCP simple application, called “Score Service”, which can be used for developing networked computer games. It consists of client and server programs. The server maintains a high scores list, and the client reads and adds scores to the list. In this implementation, the server is threated, enabling it to process multiple clients at the same time. Have a practice with this TCP application. You may create two “commands” windows, one for server and another for client.
List all the Java classes, provided by Java 1.6 API from the following link,
, which are related the concept of socket for communication between client and server. Briefly describe the functions of each such class.
Question 4: (4 marks)
A client computer is linked via Ethernet LAN to a default router, through which the client may communicate with its server on the Internet. The ARP cache of this client is
shown below:
client# arp -a
Net to Media Table
Device IP Address Mask Flags Phys Addr
—— ——————– ————— —– —————
hme0 default router 255.255.255.255 00:e0:f7:26:3f:e9
hme0 client 255.255.255.255 SP 08:00:20:86:35:4b
hme0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
This shows the physical (MAC) address of the router and the physical (MAC) address of the client itself. A single Ethernet packet was sent from the client to the server using the UDP transport service. The hexadecimal dump of the packet in the client is shown as below:
0: 00e0 f726 3fe9 0800 2086 354b 0800 4500 ..÷&?… .5K..E.
16: 0026 ab49 4000 ff11 f700 8b85 d96e 8b85 .&.I@…÷….n..
32: e902 99d0 043f 0012 7228 6865 6c6c 6f68 …..?..r(helloh
48: 656c 6c6f ello
Decode this Ethernet packet and fill out the following list:
ETHER: —– Ether Header —–
ETHER:
ETHER: Packet 16 arrived at 17:40:4.69
ETHER: Packet size = 52 bytes
ETHER: Destination =
ETHER: Source =
ETHER: Ethertype =
ETHER:
IP: —– IP Header —–
IP:
IP: Version =
IP: Header length =
IP: Type of service =
IP: Total length =
IP: Identification =
IP: Flags = 0x4
IP: .1.. …. = do not fragment
IP: ..0. …. = last fragment
IP: Fragment offset =
IP: Time to live =
IP: Protocol =
IP: Header checksum =
IP: Source address =
IP: Destination address =
IP: No options
IP:
UDP: —– UDP Header —–
UDP:
UDP: Source port =
UDP: Destination port =
UDP: Length =
UDP: Checksum =
UDP:
UDP: Data
NOTES:
Submission procedure: your work for this assignment must be submitted into the Faculty Assignment Box located in Building 2 (School of Business), at Level 2 Reception. (Currently, the reception is temporarily moved to Doctor’s Office, beneath Gymnasium).
The due date for the assignment is a hard date. You will need to supply a good reason if an extension is required. Unless you have given me your written request for extension, and I have approved an extension (along with my signature), late submissions will not be accepted. This assignment is worth 15% of your final mark in this course.
The course rules on own work and plagiarism apply to this assignment. See the subject outline page for details from the iLearn web site. Your submission will be cross-compared to other student submissions to ensure that answers have not been shared.
from Dr. Zheng da Wu
Last Completed Projects
topic title | academic level | Writer | delivered |
---|
jQuery(document).ready(function($) { var currentPage = 1; // Initialize current page
function reloadLatestPosts() { // Perform AJAX request $.ajax({ url: lpr_ajax.ajax_url, type: 'post', data: { action: 'lpr_get_latest_posts', paged: currentPage // Send current page number to server }, success: function(response) { // Clear existing content of the container $('#lpr-posts-container').empty();
// Append new posts and fade in $('#lpr-posts-container').append(response).hide().fadeIn('slow');
// Increment current page for next pagination currentPage++; }, error: function(xhr, status, error) { console.error('AJAX request error:', error); } }); }
// Initially load latest posts reloadLatestPosts();
// Example of subsequent reloads setInterval(function() { reloadLatestPosts(); }, 7000); // Reload every 7 seconds });