0% found this document useful (0 votes)
21 views

Lab 1 Implementing A HTTP Protocol

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Lab 1 Implementing A HTTP Protocol

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Lab 1: Implementing a HTTP Protocol

Part 1: One an HTTP client communicate with a Server

Topology

Objectives

� Generate Network Traffic in Simulation Mode.


� Examine HTTP traffic.

Background

Hypertext Transfer Protocol (HTTP)

HTTP is an asymmetric request-response client-server protocol as illustrated. An HTTP


client sends a request message to an HTTP server. The server, in turn, returns a response
message. In other words, HTTP is a pull protocol, the client pulls information from the
server (instead of server pushes information down to the client).

1
A user on host: orcale.tcpip-lab.edu Oracle makes a web access to URL:

http://neon.tcpip.edu/index.html

HTTP Request and HTTP response

• Web browser runs an HTTP client program.


• Web server runs an HTTP server program.
• HTTP client sends an HTTP request to HTTP server.
• HTTP server responds with HTTP response.

HTTP Request HTTP Response

GET /example.html HTTP/1.1 HTTP/1.1 200 OK


Accept: image/gif, */* Date: Sat, 25 May 2002 21:10:32 GMT
Accept-Language: en-us Server: Apache/1.3.19 (Unix)
Accept-Encoding: gzip, deflate Last-Modified: Sat, 25 May 2002 20:51:33 GMT
ETag: "56497-51-3ceff955"
User-Agent: Mozilla/4.0 Accept-Ranges: bytes
Host: 192.168.123.144 Content-Length: 81
Connection: Keep-Alive Keep-Alive: timeout=15, max=100
Connection: Keep-Alive

2
Content-Type: text/html
<HTML>
<BODY>
<H1>Internet Lab</H1>
Click <a href="http://www.tcpiplab.
net/index.html">here</a> for the Internet Lab webpage.
</BODY>
</HTML

Step 1: Generate traffic to populate Address Resolution Protocol (ARP) tables.

Perform the following tasks to reduce the amount of network traffic viewed in the simulation.

● Click Server and click the Desktop tab > IP configuration, choose Static
configuration.

� Enter 192.168.1.1 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

● Click Server and click the Desktop tab > Command Prompt.

● Enter the ping 192.168.1.1 command. This will take a few seconds as every device
on the network responds to Server.

● Close the Server window.

Step 2: Generate web (HTTP) traffic.

● Click HTTP client and click the Desktop tab > IP configuration, choose Static
configuration.

� Enter 192.168.1.2 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

● Switch to Simulation mode.

● For HHTP client do the following:

� Click HTTP Client and click the Desktop tab > Web Browser.

� In the URL field, enter 192.168.1.1 and click Go. Envelopes (PDUs)
will appear in the simulation window.

3
� Minimize, but do not close, the HTTP Client configuration window.

Step 3: Verify that the traffic is generated and ready for simulation.

Client computer should have PDUs listed in the Simulation Panel.

o Examine Functionality of the TCP and UDP Protocols

o Examine multiplexing as all of the traffic crosses the network.

Use the Capture/Forward button and the Back button in the Simulation Panel.

● Click Capture/Forward once. All of the PDUs are transferred to the switch.

● Click Capture/Forward again. Some of the PDUs disappear.

What do you think happened to them? They are stored in the switch.

● Click Capture/Forward six times. The client should have received a reply.

Note: That only one PDU can cross a wire in each direction at any given time.
What is this called? Multiplexing.

● A variety of PDUs appears in the event list in the upper right pane of the simulation
window.

● Click Back eight times. This should reset the simulation.

Note: Do not click Reset Simulation any time during this activity; if you do, you will need
to repeat all the steps in part 1.

Step 4: Examine HTTP traffic as the clients communicate with the server.

● Filter the traffic that is currently displayed to display only HTTP and TCP PDUs
filter the traffic that is currently displayed:

� Click Edit Filters and toggle the Show All/None check box.

� Select HTTP and TCP. Click anywhere outside of the Edit Filters box
to hide it.

4
The Visible Events should now display only HTTP and TCP PDUs.

● Click Capture/Forward. Hold your mouse above each PDU until you find one
that originates from HTTP Client. Click the PDU envelope to open it.

● Click the Inbound PDU Details tab and scroll down to the last section.
What is the section labelled? TCP

Are these communications considered to be reliable? Yes

● Record the SRC PORT, DEST PORT, SEQUENCE NUM, and ACK NUM values.
What is written in the field to the left of the WINDOW field?
1025 (could be different), 80, 0, 0 SYN

● Close the PDU and click Capture/Forward until a PDU returns to the HTTP Client
with a checkmark.

● Click the PDU envelope and select Inbound PDU Details. How are the port and
sequence numbers different than before?

80, 1025, 0, 1. SYN+ACK. The source and destination ports are reversed, and the
acknowledgement number is 1. The SYN has changed to SYN+ACK.

● There is a second PDU of a different colour, which HTTP Client has prepared to
send to Server. This is the beginning of the HTTP communication. Click this
second PDU envelope and select Outbound PDU Details.

● What information is now listed in the TCP section?


How are the port and sequence numbers different from the previous two
PDUs?

1025, 80, 1, 1. PSH+ACK The source and destination ports are reversed, and both sequence
and acknowledgement numbers are 1.

● Click Back until the simulation is reset.

5
Part 2: Four HTTP clients communicate with the Server

Step 1: Generate web (HTTP) traffic.

● Click HTTP client_1 and click the Desktop tab > IP configuration, choose Static
configuration.
� Enter 192.168.1.2 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

● Click HTTP client_2 and click the Desktop tab > IP configuration, choose Static
configuration.
� Enter 192.168.1.2 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

● Click HTTP client_3 and click the Desktop tab > IP configuration, choose Static
configuration.
� Enter 192.168.1.3 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

6
● Click HTTP client_4 and click the Desktop tab > IP configuration, choose Static
configuration.
� Enter 192.168.1.4 as in the IP address field.

� Enter 255.255.255.0 in the Subnet Mask field.

● Switch to Simulation mode.

● For each HHTP client do the following:

� Click each HTTP Client and click the Desktop tab > Web Browser.

� In the URL field, enter 192.168.1.1 and click Go. Envelopes (PDUs)
will appear in the simulation window.

� Minimize, but do not close, the HTTP Client configuration window.

Step 3: Verify that the traffic is generated and ready for simulation.

Every client computer should have PDUs listed in the Simulation Panel.

o Examine Functionality of the TCP and UDP Protocols


o Examine multiplexing as all of the traffic crosses the network.

Use the Capture/Forward button and the Back button in the Simulation Panel.

● Click Capture/Forward once. All of the PDUs are transferred to the switch.

● Click Capture/Forward again. Some of the PDUs disappear.

● Click Capture/Forward six times. All clients should have received a reply.

Note: That only one PDU can cross a wire in each direction at any given time.
What is this called? Multiplexing

● A variety of PDUs appears in the event list in the upper right pane of the simulation
window.

● Click Back eight times. This should reset the simulation.

Note: Do not click Reset Simulation any time during this activity; if you do, you will need
to repeat the steps in Part 1.

7
Step 4: Examine HTTP traffic as the clients communicate with the server.

● Filter the traffic that is currently displayed to display only HTTP and TCP PDUs
filter the traffic that is currently displayed:

� Click Edit Filters and toggle the Show All/None check box.

� Select HTTP and TCP. Click anywhere outside of the Edit Filters box
to hide it.

The Visible Events should now display only HTTP and TCP PDUs.

● Click Capture/Forward. Hold your mouse above each PDU until you find one
that originates from HTTP Client. Click the PDU envelope to open it.

● Record the SRC PORT, DEST PORT, SEQUENCE NUM, and ACK NUM values.
What is written in the field to the left of the WINDOW field?

1025 (could be different), 80, 0, 0 SYN

● Close the PDU and click Capture/Forward until a PDU returns to the HTTP Client
with a checkmark.

● Click the PDU envelope and select Inbound PDU Details.


How are the port and sequence numbers different than before?

80, 1025, 0, 1. SYN+ACK. The source and destination ports are reversed, and the
acknowledgement number is 1. The SYN has changed to SYN+ACK.

● There is a second PDU of a different colour, which HTTP Client has prepared to
send to Server. This is the beginning of the HTTP communication. Click this
second PDU envelope and select Outbound PDU Details.
● What information is now listed in the TCP section?
How are the port and sequence numbers different from the previous two
PDUs?
1025, 80, 1, 1. PSH+ACK The source and destination ports are reversed, and both sequence
and acknowledgement numbers are 1.
● Click Back until the simulation is reset.

8
���������������������������������������������������������������������������
���������������������������������������������������������������������������������
�����������������������������������������������������

You might also like