Vous êtes sur la page 1sur 12

1 NYC COLLEGE

Enterprise Systems
TCP LAB / CLIENT-SERVER
TRUNGU XHANI 1/29/2012

Network

Question 1: What is the IP address of the PC you are currently working on? You can discover this by typing ipconfig/all at the command prompt. ANSWER:

Question 2: What is the IP address of the PC that your partner is currently working on? ANSWER:

Or

It is a Virtual Machine Host Operating System on the Computer with IP 192.168.1.2.

Question 3: Use the netstat DOS utility to check which ports are currently in use on your PC. Type netstat -? to give you the options for netstat.

Which option do you need to use to display just the TCP connections numerically? ANSWER: Netstat a

Question 4: Type the command you discovered in part 3 of this question to discover the ports in use by TCP on your machine. Write the used port numbers down. ANSWER: TCP : [::] : 135 TCP : [::] : 443 TCP : [::] : 445 TCP : [::] : 554 TCP : [::] : 2869 TCP : [::] : 3587 TCP : [::] : 5357 TCP : [::] : 10243 TCP : [::] : 49152 TCP : [::] : 49153 TCP : [::] : 49155 TCP : [::] : 49156 TCP : [::] : 49161 TCP : [::] : 8307 TCP : [::] : 12001 Question 6: You may need to use a search engine to answer this question. Discover what "Well known ports" are. ANSWER: Well known ports are:

Port numbers can take on a value between 1 and 65535, with server applications generally being assigned a value below 1024. There are a large number of so-called well-known ports, including:

TCP 20 and 21 (File Transfer Protocol, FTP) TCP 22 (Secure Shell, SSH) TCP 23 (Telnet) TCP 25 (Simple Mail Transfer Protocol, SMTP) TCP and UDP 53 (Domain Name System, DNS) UDP 69 (Trivial File Transfer Protocol, tftp) TCP 79 (finger) TCP 80 (Hypertext Transfer Protocol, HTTP) TCP 110 (Post Office Protocol v3, POP3) TCP 119 (Network News Protocol, NNTP) UDP 161 and 162 (Simple Network Management Protocol, SNMP) UDP 443 (Secure Sockets Layer over HTTP, https)

Question 7: Decide between yourself and your partner who will take the role of the client and who will become the server. Which will you become, client or server? Write this down. ANSWER: Client : 192.168.1.230 Server: 192.168.1.2 Question 8: Use notepad to create Type your name and Save this file What size is this file? a a in file called greeting into the wsttcp yourname.txt. this file. directory.

ANSWER: The size of the yourname.txt file is 184 byte. Question 9: What is the data rate of the network between your PC and your partner's PC? ANSWER: Client VirtualPC (192.168.1.230) : 37773.33 bps

Server PC (192.168.1.2): 70750.00 bps

Question 10: Use the help notes to create the client (or server) command on your PC to send (or receive) on the port you specified in part 5. Use port 80 to receive as the server. Only the client needs to specify the IP address of the server. You and your partner will need to create separate commands to create both client and server. Note that you will need to execute the server command before the client command. Write this command down. The server command is: wsttcp r s -80

Question 11: What output was displayed on your screen? Take a screendump. ANSWER: Server:

Client:

Question 12: What is the data rate between client and server? Question 13: Give a reason if there is any difference between the answers to questions 9 and 12. Question 14: Now change role between yourself and your partner so that if you were the client, you now become the server (or vice-versa). Send the other text.txt to the server. What is the data rate in the opposite direction? ANSWER: The client now is and the Server is the Virtual PC 192.168.1.230 The result is this : Client: the PC 192.168.1.2

Server:

The data rate on this opposite direction is the one below : Client = 1.432.000. bps Server = 143.200 bps

Question 15: Use netstat to find Write this port number down. ANSWER: A free port is 7555. a free port above 1024.

Question 16: Repeat steps 10 to 14 but this time use the port in part 15 above. Write down the data rates reported by wsttcp. Are they similar to your first experiment? Explain any significant discrepancy.

ANSWER: The client is: 192.168.1.230 and the data rate is : 226400.00 bps

The server is: 192.168.1.2 and the data rate is: 205818.18 bps

And now the opposite while server now is 192.168.1.230 and the data rate is : 71600.00 bps

And the data rate for the client is : 1432000.00 bps

Question 17: Now choose a much larger file (several MB) to send between client and server. (You may need to create or copy a file into the wsttcp directory to achieve this) What is the name and size of this file? ANSWER: The name of the file is: largerfile.txt And the size of it is: 11.4 kb.

Question 18: Repeat the experiment above using an Write down the data rates reported by wsttcp for Are the results similar to the answer to Explain any significant discrepancy. ANSWER: The server is 192.168.1.230 open port . each direction. question 12?

10

And the data rate is : 129860.00 bps

Client is 192.168.1.2

And the data rate is 91032000.00 bps The significance is that the server has a lower data rate than the client.

Question 19: Now change the options for wsttcp so that you measure the transfer rate using UDP instead of TCP Try sending one of the files that you sent before and compare the data rate achieved using UDP instead of TCP. What is the thoroughput achieved using UDP? ANSWER: The client:

The server:

The thoroughput achieved using UDP is that tha server has never accepted from 192.168.1.2 the package with the file largefile.txt. So we had never results as we would expect using TCP, and we never saw any output.

11

Question 20: Now explore the -l option with TCP to see whether changing buffer length has any effect on the throughput between client and server. Write down your commands and the throughput achieved when you a) double the size of the buffer b) halve the size of the buffer/ ANSWER: a)When we double the size of the buffer with the command wsttcp r l16384 The server: with data rate 330993164.00 bps

The client: with data rate 332633774.47 bps

b) when we halve the size of the buffer The server

The client

12