Vous êtes sur la page 1sur 30

CCM 4300 Lecture 11

Computer Networks, Wireless and


Mobile Communications
Dr Shahedur Rahman
School of Science and Technology
1

Recap
 Network security?
 Basic security definitions
 Security services
 Security mechanisms
Possible threats
 Firewalls types, limitations, gateways
IDS model, architecture.
2

Session Content
||| Introduction to WWW as a digital library
||| HyperText Markup Language (HTML)
- overview
- format and representation
||| HyperText Transfer Protocol (HTTP)
- overview
- message format
- http example
||| Summary
3

Lesson objectives
 At the completion of this lesson you should be
able to
- understand and describe characteristics of
the HTML
- understand and describe the concepts of
the HTTP

Introduction
||| A conventional library is a more or less coherent and comprehensive collection of
information: it so happens that the information is stored on paper.
||| The World Wide Web (WWW) can also be seen as a library: the fact that the
information is stored electronically in a digital format leads us to refer to it as a digital
library.
||| The web was first conceived in 1989 by Tim Berners-Lee (U.K.) at CERN.
 using traditional database was difficult to store information
the first web client and server in 1990
His specifications of URIs, HTTP and HTML were refined as Web
technology spread.
 used hypertext network of information instead
- any document can contain a link to any other document
 Marc Andreessen (USA) led a team that wrote Mosaic, the first graphical
web browser, by the end of 1993
- in 1994, Andreessen and some colleagues formed Netscape
Communication Corporation, which is now owned by AOL.
5

MOSAIC WEB BROWSER (1993)

Introduction - cont
||| With a digital library, as with a conventional one, information must
be stored and must then be made accessible.
||| On the Web, the information is stored in documents on Internet
computers, which act as Web servers, and is made available from
them on request by clients (i.e., uses a client-server model).
||| Documents are stored in mark-up language using HyperText
Markup Language (HTML).
||| A document is accessed by using a browser to send a request for
it and, when it is received, to display it in accordance with the way it
is marked up.
||| The interchange takes place using the communication protocol
known as HyperText Transfer Protocol (HTTP).
7

Network applications: some jargon


Process: program running
within a host.
 within same host, two
processes communicate
using interprocess
communication (defined
by OS).
 processes running in
different hosts
communicate with an
application-layer protocol

user agent: interfaces with


user above and
network below.
 implements user
interface & applicationlevel protocol




Web: browser
E-mail: mail reader
streaming audio/video:
media player

Applications and application-layer protocols


Application: communicating,
distributed processes


e.g., e-mail, Web, P2P file


sharing, instant messaging
running in end systems
(hosts)
exchange messages to
implement application

application
transport
network
data link
physical

Application-layer protocols



one piece of an app


define messages exchanged
by apps and actions taken
use communication services
provided by lower layer
protocols (TCP, UDP)

application
transport
network
data link
physical

application
transport
network
data link
physical

App-layer protocol defines




Types of messages
exchanged, eg, request
& response messages
Syntax of message
types: what fields in
messages & how fields
are delineated
Semantics of the fields,
ie, meaning of
information in fields
Rules for when and how
processes send &
respond to messages

Public-domain protocols:
 defined in RFCs
 allows for
interoperability
 eg, HTTP, SMTP
Proprietary protocols:
 eg, KaZaA

10

Client-server paradigm
Typical network app has two
pieces: client and server
Client:
initiates contact with server (speaks
first)
typically requests service from
server,
Web: client implemented in browser;
e-mail: in mail reader

Server:

application
transport
network
data link
physical

request

reply
application
transport
network
data link
physical

provides requested service to client


e.g., Web server sends requested Web
page, mail server delivers e-mail
11

Processes communicating across network




process sends/receives
messages to/from its
socket
socket analogous to door

host or
server

host or
server

process

controlled by
app developer

socket
sending process shoves
TCP with
message out door
Internet
buffers,
 sending process asssumes
variables
transport infrastructure on
other side of door which
controlled
brings message to socket at
by OS
receiving process
API: (1) choice of transport protocol; (2) ability to fix a few
parameters


process
socket
TCP with
buffers,
variables

API: Application Programming Interface


12

Processes communicating across network (2)

13

History of the Web









World Wide Web, Web, WWW


Tim Berners-Lee (3COM Founders , Director of the
World Wide Web Consortium (W3C), )at CERN in
1991
 Demonstrated prototype at a conf. in 91
 Text-based
Marc Andreessen developed the first graphical Web
browser in 1993: Mosaic
Andreessen founds Netscape Communications
Browser war starts around 1995-96
America Online buys Netscape in 1998
14

Some Web Terminology




Web page may contain links to other pages


(sometimes also called Web Objects)
Object can be HTML file, JPEG image, Java
applet, audio file,
Web pages are Hypertexts
 One page points to another
 Proposed by Prof. Vannevar Bush in 1945!
Each object is addressable by a URL:

http://www.someschool.edu/someDept/pic.gif
protocol

host name

path name
15

Types of web pages




Static page/document: contents do not change unless the author


changes it
Static
Dynamic page/document: does not exist in a predefined form, it is
created whenever a browser requests it
 Page content and page layout are created separately. The content
is retrieved from a database and is placed on a webpage only
when needed or asked.
http://www.cineworld.co.uk/
Active page/document: it is not fully specified, it consists of a
programme that understands how to compute and display the value,
the program can run on the client machine
(http://www.calculator.net/scientific-calculator.html)
16

Hypertext Mark-up Language (HTML)


0

||| Each Web pages are written in a language called HTML.


||| HTML allows users to produce a Web page that includes text, graphics,
and pointers to other Web pages known as hyperlinks.

||| Technically, the web is a distributed hypermedia (i.e. hypertext mixed with
other media e.g. audio tracks, video clips, or both) system that supports
interactive access

Why is HTML called a mark-up language?


Because it does not contain a detailed formatting instruction.
Instead of specifying a detailed document format, HTML allows a
document to contain a general guidelines for display, and allows a
browser to choose details. Consequently, two browsers may display
an HTML document differently.
17

HTML format and representation


0

||| Each HTML document is divided into two major parts:


 A head contains details about the document
 A body contains the majority of the information

||| Syntactically, each HTML document is represented as a text file


that contains tags along with other information.
||| HTML tags provide structure for the document as well as
formatting hints for the web browser.
||| To specify an immediate action or to start a formatting operation a
tag name is bracketed by less-than and greater-than symbol.

<TAGNAME>
||| To end operation - corresponding tag with two character sequence
less than and slash, and ends with a greater-than symbol.

</TAGNAME>

18

HTML format and representation


0

<html>...</html>
The Root element of an HTML document; all other elements are
contained in this.
The HTML element delimits the beginning and the end of an HTML
document.
Standardised in HTML 2.0; still current.
<head>...</head>
Container for processing information and metadata for an HTML
document.
Standardised in HTML 2.0; still current.
<body>...</body>
Container for the displayable content of an HTML document.
Standardised in HTML 2.0; still current.

19

HTML format and representation - cont


||| The following simple example illustrates the form of an HTML
document:
</html>
<head>
HEAD
<TITLE> Simple Example</TITLE>
BODY
</head>
<body>
<H1>Heading</H1>
<P>A short illustrative paragraph that includes a single
hyperlink to the
<A
HREF=http://www.w3.org/>WWW
Consortium
home
page</A>.</P>
</body>
</html>

||| The HTML code above will be interpreted and displayed by a browser
in a form similar to that shown below:
Heading
A short illustrative paragraph that includes a single hyperlink to the
20
WWW Consortium home page.

HTML EXAMPLE
<html>
<head>
<title>Hello</title>
</head>
<body>
<p>Hello, world!</p>
<p>This is a picture: <img src="some-image.gif"></p>
<p>This is a <a href="another-page.html">link</a> to another page.</p>
</body>
</html>

The HTTP protocol .


||| When a Web browser interacts with a Web server, the two
programs follow the HTTP.
||| HTTP is an application layer protocol
||| HTTP - client/server model
client: browser that requests,
receives, displays Web objects

PC running
Explorer

server: Web server sends objects


in response to requests

Server
running
apache Web
server

||| Before 1998 - http1.0: RFC 1945


||| http1.1: RFC 2068

Mac running
Navigator
22

The HTTP protocol - cont


||| The generic client-server interaction proceeds through four stages:
1. Send request.
e.g. http://www.mdx.ac.uk/cs/lecture6.html
2. Receive request.
The named computer (a Web
server) receives the request and
locates the file in its file store.
3. Send response.
The Web server sends the requested file to
the requesting computer.
4. Receive response.
The client machine receives the file and its
browser displays it in accordance with the way
it is marked up.

23

The HTTP protocol - cont


http: TCP transport service:

http is stateless

||| client initiates TCP connection


(creates socket) to server, port 80

||| server maintains no


information about past
client requests

||| server accepts TCP connection


from client
||| http messages (application-layer
protocol messages) exchanged
between browser (http client) and
Web server (http server)
||| TCP connection closed

aside

Protocols that maintain state


are complex!
||| past history (state) must be
maintained
||| if server/client crashes, their
views of state may be
inconsistent, must be
reconciled

24

The HTTP protocol - cont


Concepts

HTTP : Uniform Resource Locator


(URL)

||| A web page (also referred to as


document) consists of objects.

||| Each object is addressable by a


single URL

||| An object is simply a file such as


an HTML file, JPEG file, a Java
applet, an audio clip, etc.

||| Each URL has two components:


- the host name of the server that
houses the object and
- the objects path name

||| Most web pages consist of a base


HTML file and several referenced
objects

||| For example:


www.mdx.ac.uk/cs/alasebae/pec.jpg

||| For example, if a Web page


contains HTML text and five JPEG
images, then the Web page has six - www.mdx.ac.uk for a host name
objects.
- /someDepartment/logo.gif for a
path name
25

TCP three-way handshake


SYN

FIN
Initiates a
connection

Open

SYN +
ACK

time
Accepts and
acknowledges

FIN

ACK
Acknowledges
and begins tx

4. Data flow begins

application
transport
Network
Network
access

3. ACK
2. SYN + ACK
1. SYN

ACK

Three-way
Threehandshake

Close

ACK

4. Receive data
3. ACK

application
2. SYN + ACK transport
Network
1. SYN
Network
access
26

HTTP example (1.0)


Suppose user enters URL
www.someSchool.edu/someDepartment/home.index
1a. http client initiates TCP
connection to http server
(process) at www.cs.mdx.ac.uk
Port 80 is default for http server.

2. http client sends http request


message (containing URL) into
TCP connection socket

time

(e.g. contains text,


references to 5
jpeg images)

1b. http server at host


www.cs.mdx.ac.uk waiting for
TCP connection at port 80
(HTTP uses port 80 ). accepts
connection, notifying client
3. http server receives request
message, forms response
message containing requested
object
(someDepartment/home.index),
sends message into socket
27

HTTP example - cont


4. http server closes TCP
connection.

time

5. http client receives response


message containing html file,
displays html. Parsing html
file, finds 5 referenced jpeg
objects
6. Steps 1-5 repeated for each
of 5 jpeg objects

28

HTTP example shortcomings


||| Steps above above uses non-persistent connection because
each TCP connection is closed after the server sends the
object
 the connection does not persist for other objects
||| Thus, in this example, when a user request the Web page, 6

TCP connections are generated:


 for each connection, TCP buffers must be allocated
- serious burden on web server
 each object suffers two round-trip time (RTT)
- one RTT to establish the TCP connection and one
RTT to request and receive an object
 each object suffers from TCP slow start due to congestion
control mechanism employed by TCP
- slow start initially before ramp up to relative high rate
29

Summary
||| The WWW is a distributed hypermedia repository of
information (i.e. digital library) that is accessed with an
interactive browser
||| A browser displays a Web page of information.
||| Web pages are written in the HTML
||| Web browser interacts with a Web server via the HTTP

30

Vous aimerez peut-être aussi