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
Within the playground environment, run the provided server in example.com, run the provided client on h and capture information with netstat on both the client and server.
Diagram showing activity one tasks on playground topology.
While the clientpspy on host h is communicating with serverpspy 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 clientserver application is present within the course VM in the optcscps directory, and should be copied to the h and example.com hosts within the playground and run there. It is derived from the example in Chapter 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 optcscpsserverpspy 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: serverpspy hp port host
simple singlethreaded server
positional arguments:
host IP or hostname
optional arguments:
hhelp show this help message and exit
p port TCP port
When starting serverpspy on host example.com, use the last digits of your student ID as the port number on the server. eg The last digits of u are
If the first one or more digits from the last digits of your student ID are zeros,
replace them with s eg becomes
If the server doesn't run because the port number is occupied,
increment the number by eg If is occupied then use
So if our student ID dictated that we use port then we will start the server by:
pythonserverpspy example.com p
The server will output messages to the terminal when a client connects and disconnects, and continue to run until stopped with CtrlC
The client is located within the course VM at the path optcscpsclientpspy and should be copied to the h host to be run.
The h 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: clientpspy hep ports studentid c count host
positional arguments:
host IP or hostname
optional arguments:
hhelp show this help message and exit
e cause an error
p port TCP port default
s studentid Your student ID eg u
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.
: Provide your terminal output from the netstat command on example.com.
: Provide your terminal output from the netstat command on h
: What was the process ID of serverpspy when running on example.com?
: What was the process ID of the clientpspy when it ran on h
: Which port number was serverpspy using to send packets to h
: Which port number, on h did serverpspy last send a packet to
: Which port number did clientpspy last use to send packets to example.com?
: What was the public IP address that was used by serverpspy
: What was the public IP address that serverpspy used to communicate with clientpspy
: What is the private IP address of h
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
