Network
Network
NETWORK
Network
Network
Http
HTTP Transaction
What is a Network:
A network consists of two or more computers that are linked in order to share resources (such as printers
and CDs), exchange files, or allow electronic communications. The computers on a network may be
linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
Two very common types of networks include:
A Local Area Network (LAN) is a group of computers or other devices interconnected within a single, limited
area, typically via Ethernet or Wi-Fi.
Network Layer:
Network-to-network connections are what make the Internet possible. The "network layer" is the part of the
Internet communications process where these connections occur, by sending packets of data back and forth
between different networks. In the 7-layer OSI model (see below), the network layer is layer 3. The Internet
Protocol (IP) is one of the main protocols used at this layer, along with several other protocols for routing,
testing, and encryption.
Suppose Bob and Alice are connected to the same local area network (LAN), and Bob wants to send Alice a
message. Because Bob is on the same network as Alice, he could send it directly to her computer across the
network. However, if Alice is instead on a different LAN several miles away, Bob's message will have to be
addressed and sent to Alice's network before it can reach her computer, which is a network layer process.
What happens at the network layer?
Anything that has to do with inter-network connections takes place at the network layer. This includes setting
up the routes for data packets to take, checking to see if a server in another network is up and running, and
addressing and receiving IP packets from other networks. This last process is perhaps the most important, as
the vast majority of Internet traffic is sent over IP.
The Open Systems Interconnection (OSI) Model is a description of how the Internet works. It breaks down
the functions involved in sending data over the Internet into seven layers. Each layer has some function that
prepares the data to be sent over wires, cables, and radio waves as a series of bits.
What is the difference between the 'network' layer and the
'Internet' layer?
In the TCP/IP model, there is no "network" layer. The OSI model network layer roughly corresponds
to the TCP/IP model Internet layer. In the OSI model the network layer is layer 3; in the TCP/IP
model the Internet layer is layer 2.
In other words, the network layer and the Internet layer are basically the same thing, but they come
from different models of how the Internet works.
HTTP:
Hypertext Transfer Protocol The communications protocol used to connect to Web servers on the
Internet or on a local network (intranet). Its primary function is to establish a connection with the server and
send HTML pages back to the user's browser. It is also used to download files from the server either to the
browser or to any other requesting application that uses HTTP.
What is the purpose of HTTP:
HTTP was invented along side HTML to create the first interactive, text-based web browser: the original
World Wide Web. Today, the protocol remains one of the primary means of using the Internet.
HTTP utilizes specific request methods in order to perform various tasks. All HTTP servers use the GET and
HEAD methods, but not all support the rest of these request methods:
• Caching How documents are cached can be controlled by HTTP. The server can instruct proxies and
clients about what to cache and for how long. The client can instruct intermediate cache proxies to ignore
the stored document.
• Relaxing the origin constraint To prevent snooping and other privacy invasions, Web browsers enforce
strict separation between Web sites. Only pages from the same origin can access all the information of a
Web page. Though such a constraint is a burden to the server, HTTP headers can relax this strict separation
on the server-side, allowing a document to become a patchwork of information sourced from different
domains; there could even be security-related reasons to do so.
What can be controlled by HTTP:
• Authentication Some pages may be protected so that only specific users can access them. Basic
authentication may be provided by HTTP, either using the WWW-Authenticate and similar headers, or by
setting a specific session using HTTP cookies.
• Proxy and tunnelling Servers or clients are often located on intranets and hide their true IP address from
other computers. HTTP requests then go through proxies to cross this network barrier. Not all proxies are
HTTP proxies. The SOCKS protocol, for example, operates at a lower level. Other protocols, like ftp, can be
handled by these proxies.
• Sessions Using HTTP cookies allows you to link requests with the state of the server. This creates sessions,
despite basic HTTP being a stateless protocol. This is useful not only for e-commerce shopping baskets, but
also for any site allowing user configuration of the output.
HTTP Messages:
There are two types of HTTP messages, requests and responses, each with its own
format.
HTTP Messages:
There are two types of HTTP messages, requests and responses, each with its own
format.
Simple HTTP Transaction:
Simple HTTP Transaction:
A simple HTTP transaction is one where the client makes a single request for HTTP content.
1.DNS Lookup: The client tries to resolve the domain name for the request.
2.Client sends DNS Query to local ISP DNS server.
3.DNS server responds with the IP address for hostname.com
4.Connect: Client establishes TCP connection with the IP address of hostname.com
5.Client sends SYN packet.
6.Web server sends SYN-ACK packet.
7.Client answers with ACK packet, concluding the three-way TCP connection establishment.
8.Send: Client sends the HTTP request to the web server.
9.Wait: Client waits for the server to respond to the request.
10.Web server processes the request, finds the resource, and sends the response to the Client.
Client receives the first byte of the first packet from the web server, which contains the HTTP
Response headers and content.
11.Load: Client loads the content of the response.
12.Web server sends second TCP segment with the PSH flag set.
13.Client sends ACK. (Client sends ACK every two segments it receives. from the host)
14.Web server sends third TCP segment with HTTP_Continue.
15.Close: Client sends a a FIN packet to close the TCP connection.
THANK YOU!