You are on page 1of 8

1

Objectives:
The main objectives of this experiment are given below:
1. To learn about HTTP request (GET, HEAD, or POST) and to record different HTTP
response.
2. To display TCP/IP network connection and protocol (IP, ICMP, TCP and UDP) statistics
using netstat.
3. To learn about Wireshark to investigate HTTP protocol.

Part 1: Telnet experiments (20 points)


Try HTTP requests (GET, HEAD, or POST) without using a web browser. You can do this on
the command line using ‘> telnet webserver 80’. (You are free to choose any webserver) Record
the HTTP responses from the server – retrieve at least two different response statuses (for
example 200, 301, or any other valid response you prefer) from the server.

Answer: Telnet is connected normally but only for a short period and we get ‘400-Bad Request.

We can do this alternatively by using cURL command.


2

Part 2: using netstat (25 Points)

1. Use netstat on your local host to find current UDP sessions and TCP connections. How

many of them do you find and what port numbers are used?

Answer:

Command: netstat –a Response:

Here we can see 21 TCP connections and 19 UDP sessions. And these are using various ports
such as: 7680, 49679, 500, 1900 etc. The number written after the ‘:’ (colon) in an IPv4 or IPv6
address, indicates the port that the protocol is using. And we can also see that all UDP foreign
addresses are *:*. That means these connections are not established.

2. Find out per-protocol (IP, ICMP, TCP and UDP) statistics (using –s option). Then try
ping or tracesroute to a well-known server (eg. www.google.com). Now check per-protocol
(IP, ICMP, TCP and UDP) statistics again. Summarize your findings.

Answer:

Command: netstat –s Response:


3
4

After make ping request to www.google.com, the statistics per protocol was rechecked.
5

Here we can see that after making ping request more packets are received, more messages are
sent, more TCP connections are opened and more UDP datagram are received.

Part 3: Wireshark experiments (55 Points)


Part3-1: The Basic HTTP GET/response interaction HTTP

GET requests and response:

1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server
running?

Answer: Browser and server both are running http version 1.1.

2. What languages (if any) does your browser indicate that it can accept to the server?

Answer: English US and English.


6

3. What is the IP address of your computer? Of the gaia.cs.umass.edu server?

Answer: Computer IP - 192.168.0.102 Server IP – 128.119.245.12

4. What is the status code returned from the server to your browser?

Answer: Status code: 200.


7

5. When was the HTML file that you are retrieving last modified at the server?

Answer: Last-Modified: Tue, 05 Jul 2022 05:59:02 GMT\r\n.

6. How many bytes of content are being returned to your browser?

Answer: 128 Bytes.

7. By inspecting the raw data in the packet content window, do you see any headers within the

data that are not displayed in the packet-listing window? If so, name one.

Answer: No, I don’t.

Part 3-2: Retrieving Long Documents


1. How many HTTP GET request messages were sent by your browser?
Answer: 1 request.
8

2. How many data-containing TCP segments were needed to carry the single HTTP
response?

Answer: 4 TCP segments were needed.

3. What is the status code and phrase associated with the response to the HTTP GET
request?

Answer: Status Code: 200 and Response Phrase: OK.

4. Are there any HTTP status lines in the transmitted data associated with a TCP

induced “Continuation”?

Answer: No, there are no status lines with above criteria.

Conclusion:

1. We have learned about HTTP GET request and recorded different response.
2. We observed TCP/IP network connection and protocol statistics(IP,ICMP, TCP, UDP)
3. We learned about Wireshark to investigate HTTP protocol.

You might also like