Question: Activity 1 Within the playground environment, run the provided server in example.com, run the provided client on h 1 , and capture information with netstat

Activity 1
Within the playground environment, run the provided server in example.com, run the provided client on h1, and capture information with netstat on both the client and server.
Diagram showing activity one tasks on playground topology.
While the client_ps1.py on host h1 is communicating with server_ps1.py on host example.com, execute netstat with appropriate options on both the client and server, and copy and paste the terminal output in the designated fields below. This will require at least two runs of the client, and enough requests to provide time to issue the netstat command in another terminal window.
The client-server application is present within the course VM, in the /opt/csc2330/ps1 directory, and should be copied to the h1 and example.com hosts within the playground and run there. It is derived from the example in Chapter 7, A Simple Protocol. Its behavior is not the same as the textbook example.
The client still submits part of an aphorism from the Zen of Python, and the server responds with the remainder of it. The client randomly selects aphorisms to request from a pool of four. We will run the experiment to capture the conversation between the client and server and examine its contents.
Running the experiment
The server is located within the course VM, at the path /opt/csc2330/ps1/server_ps1.py, and should be copied to the example.com host to be run.
The example.com host must be accessed via SSH to execute commands and run programs on it.
The server is started with the following options (this listing reproducible with the -h option):
usage: server_ps1.py [-h][-p port] host
simple single-threaded server
positional arguments:
host IP or hostname
optional arguments:
-h,--help show this help message and exit
-p port TCP port
When starting server_ps1.py on host example.com, use the last 5 digits of your student ID as the port number on the server. e.g., The last 5 digits of u0000234 are 00234.
If the first one or more digits (from the last 5 digits of your student ID) are zeros,
replace them with 1s. e.g.,00234 becomes 11234.
If the server doesn't run because the port number is occupied,
increment the number by 1. e.g., If 11234 is occupied then use 11235.
So, if our student ID dictated that we use port 11234, then we will start the server by:
python3./server_ps1.py example.com -p 11234
The server will output messages to the terminal when a client connects and disconnects, and continue to run until stopped with Ctrl+C.
The client is located within the course VM, at the path /opt/csc2330/ps1/client_ps1.py and should be copied to the h1 host to be run.
The h1 host must be accessed via SSH to execute commands and run programs on it.
The client is run with the following options (this listing is reproducible with the -h option):
usage: client_ps1.py [-h][-e][-p port]-s student_id -c count host
positional arguments:
host IP or hostname
optional arguments:
-h,--help show this help message and exit
-e cause an error
-p port TCP port (default 1060)
-s student_id Your student ID e.g. u1234567
-c count How many times to request an aphorism
The conversation between client and server must take enough time for you to run netstat in another terminal window.
To make the conversation last longer, specify more aphorism requests with the -c option.
Specify that netstat should show active TCP connections, UDP connections, numerical addresses and programs.
1.1: Provide your terminal output from the netstat command on example.com.
1.2: Provide your terminal output from the netstat command on h1.
1.3.1: What was the process ID of server_ps1.py when running on example.com?
1.3.2: What was the process ID of the client_ps1.py when it ran on h1?
1.3.3: Which port number was server_ps1.py using to send packets to h1?
1.3.4: Which port number, on h1, did server_ps1.py last send a packet to?
1.3.5: Which port number did client_ps1.py last use to send packets to example.com?
1.3.6: What was the public IP address that was used by server_ps1.py?
1.3.7: What was the public IP address that server_ps1.py used to communicate with client_ps1.py?
1.3.8: What is the private IP address of h1?

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 Databases Questions!