CS352 – Assignment: Project 3-Network Programming in Python (Solution)

$ 20.99
Category:

Description

Objective
The objective of this project is to become familiar with Network programming. This will be done using the following assessments:
1) Explore Python programming for networking
2) Learn to write a simple server-client program
Software Installation
Make sure to clear your web browser’s cache. We recommend running everything from the virtual machine. However, you are free to use your personal computer if it is easier for this project.
Please work through each of the tasks discussed below. Each task will specify the material you are required to hand in. You will need to cut several snapshots and put them into a document and convert that document (if possible) to a PDF file. For submission please submit the PDF file (with your NetID as its name) via Sakai.
For presenting your answers
1) You will submit TWO items in this project
a) Submit one PDF document with a summary of all your answers including the images that you have captured.
i) This should be at the top level of your submission
ii) Exclusion of this PDF Summary will result in a reduction in your grade.
iii) Convert word or google docs to a PDF file
AND
b) Submit a zipped file with your code and any additional files.
2) Be sure to include your name and NetID in your submission
3) Label or number the answer for each question. For example, the answer for 3a should be labeled 3a or Question 3 Part a.
4) Be sure to answer all questions
5) Provide citations for any references used
Assignment Details
Note: Please refer to the slides entitled “network programming” for Python and Server-Client Basics.
UDP Programming
Please download and view the UDP server and Client, hence the zipped file entitled “server_client”. These files were included in Sakai with the project description. However, the files can also be downloaded here:
https://drive.google.com/file/d/1R_-XJ0v8Y6DPXWXn5Lebdw7_AgV59DwZ/view?usp=sharing 1) Run the UDP server-client code and screenshot your results.
Note: The server must be started before the client. For more details please refer to the recitation.
TCP Programming
In this section, you will write a TCP service program that provides connection-oriented services which are essential for reliable transport.
2) The Binary Encoding Server: Write a server program for TCP using Python to write client code. The server should return the binary value of the text sent by the client. Print this binary value to the screen.
Note: The server should be running at the localhost interface. You are free to choose any port. Include a screenshot of the results.
b. Run the server and client program from the following text string: “mynetwork”. Screenshot the results. Note: The binary value should be displayed or printed to the screen.
c. Write down the port and host address that you used.
d. Save your server python code as netid_bin_encoder_server.py. Include this file in the zip file of your assignment submission on Sakai.
e. Save your client python code as netid_bin_encoder_client.py. Include this file in the zip file of your assignment submission on Sakai.
3) The Binary Decoding Server: Write another server running on an ethernet interface to do the following:
Example: the binary string “01000011 01010011 00110011 00110101 00110010 00101101
a. Run the server program from the following binary value: 01010000 01111001 01110100 01101000 01101111 01101110 00100000 01110011 01100101 01110010 01110110 01100101 01110010. Screenshot the results.
Note: The string value should be displayed or printed to the screen. Include a screenshot of your results.
b. Run the program from the following binary string: “01101000 01101100 01101111”. Screenshot the results. Note: The string value should be displayed or printed to the screen. Include a screenshot of your results.
c. Write down the port and host address that you used.
d. Save your server python code as netid_bin_decoder_server.py. Include this file in the zip file of your assignment submission on Sakai.
e. Save your client python code as netid_bin_decoder_client.py. Include this file in the zip file of your assignment submission on Sakai.
Sources
This assignment was created and modified with permission from the sources below:
1) Network Programming in Python http://www.winlab.rutgers.edu/comnet2/Projects/documents/network_programming.p df

Reviews

There are no reviews yet.

Be the first to review “CS352 – Assignment: Project 3-Network Programming in Python (Solution)”

Your email address will not be published. Required fields are marked *