You are on page 1of 9

1

KHULNA UNIVERSITY OF
ENGINEERING & TECHNOLOGY,
KHULNA

Department of Electronics and Communication


Engineering
Course No: ECE 4110
Course Title: Computer Networks Laboratory

4th Year 1st Term

Topic: Study on http requests and packet sniffing

Submitted By:
Fardin Shahriar
Roll: 1709026
Department of Electronics and Communication Engineering
Khulna University of Engineering & Technology, Khulna
Date of submission: 21-07-2022

Submitted To:
Dr. Mirza Mohammod Shahriar Maswood
Associate Professor
Md. Foysal
Assistant Professor
Department of Electronics and Communication Engineering
Khulna University of Engineering &
Technology, Khulna
2

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.


3

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:

There are 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:


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

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.
6

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.


7

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.

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.


8

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.

2. How many data-containing TCP segments were needed to carry the single HTTP
response?
9
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 in the transmitted data associated with a TCP induced
“Continuation”.

Conclusion:

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

You might also like