Docsity

HTTP Protocol: A Comprehensive Guide for Network Communication, Lecture notes of Network Analysis

Partial preview of the text

Download HTTP Protocol: A Comprehensive Guide for Network Communication and more Lecture notes Network Analysis in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 2: Networking Infrastructure Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Ly Nguyen Student ID GCS Class GCS1003A Assessor name Nguyen Xuan Sam Student declaration I certify that the assignment submission is entirely my work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid

P1 P2 P3 P4 M1 M2 D

Assignment 1

Higher National Certificate/Diploma in Computing Student Name/ID Number: Lý Nguyên Unit Number and Title: Academic Year: 2022 Unit Assessor: Sam X. Nguyen Assignment Title: Issue Date: Submission Date: Internal Verifier Name: Date: Submission Format: Format: ● The submission is in the form of an individual written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs, and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. Submission ● Students are compulsory to submit the assignment on the due date and in a way requested by the Tutor. ● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/. ● Remember to convert the word file into a PDF file before the submission on CMS. Note: ● The individual Assignment must be your work, and not copied by or from another student. ● If you use ideas, quotes, or data (such as diagrams) from books, journals, or other sources, you must reference your sources, using the Harvard style.

● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply with this requirement will result in a failed assignment. Unit Learning Outcomes: Assignment question

LO1: Short discuss one of the protocols ( STMP , FTP , HTTP, etc. ) and explain how it

works by using cisco packet tracer?

LO2: Investigate and analyze the selected protocol using Wireshark?

    1. INTRODUCTION
      • 1.1 Purpose
      • 1.2 Basic Theoretical of Network
    1. Basic Background of the HTTP protocol
      • 2.1 Definition
      • 2.2 HTTP Operation
      • 2.3 The main Components of HTTP
    1. Practice demo HTTP in Cisco packet tracer and Wireshark
    • 3.1 HTTP / Web server configuration in cisco packet tracer
    • 3.2 Hypertext transfer protocol with Wireshark
    1. References
  • Figure 1: Human and Network Protocol (James Kurose, 2001)
  • Figure 2: TCP/IP Model (Shacklett, July 2021)
  • Figure 3: HTTP protocol (mdn wed docs, 2021)
  • Figure 4: DNS (Cloudflare, n.d.)
  • Figure 5: DHCP (TOTOLINK, July 2019)
  • Figure 6: FTP (Subham Datta, January 15, 2021)
  • Figure 7: HTTP Operation (dodat, 2017)
  • Figure 8: Protocols and services (dodat, 2017)
  • Figure 9: HTTP request and response works (Anon., 2022)
  • Figure 10: Status Code (tutorlalspoint, 2021)
  • Figure 11: Add PCO, Switch, and Server.......................................................................................
  • Figure 12: Inserting IP address and DNS Server into PCO
  • Figure 13: Inserting IP address and DNS Server into Web Server
  • Figure 14: Inserting IP address and DNS Server into DNS Server
  • Figure 15: Set the Name and IP address in DNS Server
  • Figure 16: Add the code for the website.....................................................................................
  • Figure 17: Run Web Browser by URL
  • Figure 18: To begin capturing data in Wireshark
  • Figure 19: Filter and catch a packet HTTP in Wireshark
  • Figure 20: Responses to data
  • Figure 21: Follow HTTP Stream and result

1. INTRODUCTION

1.1 Purpose

HTTP is an application-level protocol for collaborative, distributed hypermedia information systems. Since 1990, the World Wide Web global information initiative has used HTTP. HTTP/0.9, the first version of HTTP, was a simple protocol for transferring raw data over the Internet. RFC 1945 defined HTTP/1.0, which improved the protocol by allowing messages to be in a MIME-like format, containing metadata information about the transmitted data, and modifying request semantics. HTTP/1.0, on the other hand, does not fully account for the effects of decentralized proxies, caching, persistent connection requirements, or virtual servers. Furthermore, the proliferation of incompletely deployed applications labeled "HTTP/1.0" has necessitated protocol version changes for two applications to communicate to determine each other's true identities. (R. Fielding, 1999) This specification specifies the "HTTP/1.1" protocol. To ensure reliable implementation of its features, this protocol includes more stringent requirements than HTTP/1.0. The actual information system necessitates more than just retrieval, such as search, UI updates, and annotations. HTTP supports several methods and open-ended headers to indicate the intent of a request. It extends the reference principle provided by a Uniform Resource Identifier (URI), such as location or name (URN), to indicate the resource to which a method should be applied. Messages are sent in a format similar to that used on the Internet, as defined by the Multipurpose Internet Mail Extensions (MIME). (R. Fielding, 1999) HTTP is also used as a common protocol for communicating with other Internet systems, such as those supported by the SMTP, NNTP, FTP, Gopher, and WAIS protocols, between the user agent and the proxy/gateway. HTTP, in this way, enables basic hypermedia access to resources available from a variety of applications. (R. Fielding, 1999)

1.2 Basic Theoretical of Network

1.2.1 Define the Network In information technology, a network is defined as the connection of at least two computer systems via a cable or a wireless connection. The most basic network is made up of two computers linked by a cable. This is known as a peer-to-peer network. There is no hierarchy in this network; both participants have equal

Figure 2 : TCP/IP Model (Shacklett, July 2021)

  • HTTP is a protocol used to retrieve resources such as HTML documents. It is the foundation of any data exchange on the Web and is a client-server protocol, meaning that requests are initiated by the recipient, which is usually the Web browser. A complete document is reconstructed from the various subdocuments retrieved, such as text, layout descriptions, images, videos, scripts, and others. (mdn wed docs, 2021) Figure 3 : HTTP protocol (mdn wed docs, 2021)
  • The Domain Name System (DNS) is the Internet's phonebook. Domain names, such as nytimes.com or espn.com, are used by humans to access information online. Web browsers communicate using Internet Protocol (IP) addresses. DNS converts domain names to IP addresses so that browsers can access Internet resources. (Cloudflare, n.d.) Each Internet-connected device has a unique IP address that other machines can use to locate the device. DNS servers eliminate the need for humans to remember IP addresses like 192.168.1.1 (in IPv4) or more complex newer alphanumeric IP addresses like 2400:cb00:2048:1::c629:d7a2 (in IPv6). (Cloudflare, n.d.) Figure 4 : DNS (Cloudflare, n.d.)
  • ARP is a protocol used in the TCP/IP stack to support the mapping of Layer 2 MAC addresses to IP addresses. Because ARP lookups are cached, this protocol is critical to understand. That cache could be tainted. Or they can simply become stale and produce incorrect results. Often, this can be resolved simply by clearing the cache on the relevant devices. (Mariusz Zydyk, n.d.) ARP is one of the most important pillars in networking and it is often used with the IP protocol suite.

Figure 6 : FTP (Subham Datta, January 15, 2021)

  • The benefit of FTP is its speed and efficiency. It also serves as a form of security. To access data from the FTP server, the user must enter a username and password. FTP allows data to be transferred back and forth. As a result, both the sender and the receiver can send data to one another.
  • FTP has some drawbacks as well. The maximum amount of data that can be sent via FTP is 2GB. As a result, no file larger than 2GB can be transferred via FTP. It's also not compatible with every system. 2. Basic Background of the HTTP protocol

2.1 Definition

  • HTTP (HyperText Transfer Protocol) is one of the standard protocols on the Internet, used to communicate information between the service provider (Web server) and the service user (Web server). client), is the

Client/Server protocol used for the World Wide Web – WWW. (dodat,

  • HTTP is an application protocol of the TCP/IP protocol suite (the foundational protocols for the Internet).

2.2 HTTP Operation

Figure 7 : HTTP Operation (dodat, 2017)

  • HTTP operates on a client-server model. The computers of the users will serve as clients in this model. Following a specific user action, the clients will send a request to the server (Server) and await a response from these servers.
  • HTTP is a protocol that has no state. In other words, the current request has no idea what the previous request completed.
  • HTTP allows you to send and receive data types, allowing you to build a system independent of the data being transferred.

2.2.1 Some related concept

  • As mentioned, HTTP is an application protocol of the TCP/IP protocol suite (the foundational protocols for the Internet).
  • The TCP/IP protocol suite is a set of communication protocols that implement the protocol stack on which the internet and most commercial computer networks run. This protocol suite is named after its two main protocols, TCP (Transmission Control Protocol) and IP (Internet Protocol).

c) Transport Layer The Transport Layer's purpose is to allow devices on the source and destination servers to exchange data. When transporting data, the Transport Layer determines the service level and state of the connection. (dodat, 2017) TCP is the primary protocol in the Transport layer (Transmission Control Protocol). TCP allows applications on networked servers to establish "connections" with one another and exchange data or packets. This protocol ensures that data is delivered to the destination in a reliable and orderly manner. d) Application Layer Entities of the Application class provide applications that allow users to exchange application data over the network Some common applications of TCP/IP protocol stack: FTP (File Transfer Protocol), DNS

2.3 The main Components of HTTP

2.3.1 HTTP – Requests The Internet boasts a wide range of resources hosted on different servers. For you to be able to access these resources, your browser needs to be able to make requests to the server and display the resources to you. HTTP (Hypertext Transfer Protocol), is the basic format used to structure requests and responses for efficient communication between client and server. The message sent by a client to a server is called an HTTP request. Once these requests are submitted, the client can use a variety of methods. (rapidapi,

Thus, HTTP request methods are content that indicates the specific desired action to be performed on a given resource. Each method implements distinct semantics but has some standard features shared by the different HTTP request methods.

3. Structure of an HTTP Request:

  • A Request-line = Method + URI – Request + HTTP Version. The HTTP protocol defines a set of protocols GET, POST, HEAD, PUT ... The client can use one of those methods to send requests to the server.
  • There may or may not be header fields
  • A blank line to mark the end of the Header fields.
  • Request Header Fields: The header fields allow the client to pass additional information about the request, and about the client itself, to the server. Some fields: Accept-Charset, Accept-Encoding, Accept- Language, Authorization, Expect, From, Host, ...

4. How HTTP Requests Work

HTTP requests serve as an intermediary mode of transport between a client/application and a server. The client sends an HTTP request to the server, and the server responds after internalizing the message. The response contains request status information. (rapidapi, 2021) Figure 9 : HTTP request and response works (Anon., 2022)

5. Methods GET and POST

The two most used methods in HTTP requests are GET and POST With GET, the query is appended to the HTTP request's path. ❖ Some features of the GET method:

  • GET requests can be cached, bookmarked, and saved in the browser's history.

9. Status Code

The Status-Code element is a 3-character integer. The first character of the state encoding defines the response class (type) and the last two characters do not have any categorical role. There are 5 values of the first character: Figure 10 : Status Code (tutorlalspoint, 2021)

10. Response Header Fields

The response-header fields enable the server to send additional information about the response that cannot be placed in the Status-Line. These header fields provide information about the server as well as additional access to the resource identified by the Request-URI. (tutorlalspoint, 2021)

  • Accept-Ranges
  • Age
  • ETag
  • Location
  • Proxy-Authenticate
  • Retry-After
  • Server
  • Vary
  • WWW-Authenticate

3. Practice demo HTTP in Cisco packet tracer and Wireshark

3.1 HTTP / Web server configuration in cisco packet

tracer

Now, I am going to write demo of the Cisco Packet Tracer for setting a web server. Figure 11 : Add PCO, Switch, and Server First, try to add a PCO, Switch, Server and rename it whatever you want, and then connect it with cross over cable