Starting from:

$25

CS352 -project3_Network Programming in Python - Solved

Network Programming in Python

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.


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.

Example: for a text string “CS352-2021”, the client should receive “01000011 01010011 00110011 00110101 00110010 00101101 00110010 00110000 00110010 00110001”

Note: The server should be running at the localhost interface. You are free to choose any port. Include a screenshot of the results.

a.      Run the server and client program from the following text string: “CS352-2021”. Screenshot the results. Note: The binary value should be displayed or printed to the screen.

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

00110010 00110000 00110010 00110001” sent from the client should return “CS352-2021”.

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

2)      Communication Networks II: Assignment 2: Network Programming in Python http://www.winlab.rutgers.edu/comnet2/Projects/documents/assignment2_comnets2_ 2020.pdf

More products