ccm 4300 lecture 11

30
CCM 4300 Lecture 11 Computer Networks, Wireless and Mobile Communications 1 Mobile Communications Dr Shahedur Rahman School of Science and Technology

Upload: others

Post on 04-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

CCM 4300 Lecture 11Computer Networks, Wireless and

Mobile Communications

1

Mobile Communications

Dr Shahedur Rahman

School of Science and Technology

Recap� Network security?

� Basic security definitions

� Security services

� Security mechanisms

2

� Security mechanisms

�Possible threats

� Firewalls – types, limitations, gateways

�IDS – model, architecture.

Session Content

||| Introduction to WWW as a digital library

||| HyperText Markup Language (HTML)

- overview

- format and representation

3

- format and representation

||| HyperText Transfer Protocol (HTTP)

- overview

- message format

- http example

||| Summary

Lesson objectives

� At the completion of this lesson you should be

able to

- understand and describe characteristics of

the HTML

4

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.

5

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

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

7

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

Network applications: some jargon

Process: program running

within a host.

� within same host, two

processes communicate

using interprocess

user agent: interfaces with

user “above” and

network “below”.

� implements user

8

using interprocess

communication (defined

by OS).

� processes running in

different hosts

communicate with an

application-layer protocol

� implements user

interface & application-

level 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

application

transport

network

data link

physical

9

� exchange messages to implement application

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

Public-domain protocols:

� defined in RFCs

� allows for

interoperability

� eg, HTTP, SMTP

10

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

� eg, HTTP, SMTP

Proprietary protocols:

� eg, KaZaA

Client-server paradigmTypical network app has two

pieces: client and serverapplicationtransportnetworkdata linkphysical

Client:

initiates contact with server (“speaks first”)

typically requests service from

request

11

applicationtransportnetworkdata linkphysical

typically requests service from server,

Web: client implemented in browser; e-mail: in mail reader

reply

Server:

provides requested service to client

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

Processes communicating across network

� process sends/receives

messages to/from its

socket

� socket analogous to door

� sending process shoves

process

socket

host or

server

process

socket

host or

server

controlled by

app developer

12

� sending process shoves message out door

� sending process asssumes transport infrastructure on other side of door which brings message to socket at receiving process

TCP with

buffers,

variables

TCP with

buffers,

variables

Internet

controlled

by OS

r API: (1) choice of transport protocol; (2) ability to fix a few parameters

API: Application Programming Interface

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

14

� 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

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”

15

� 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

path namehost nameprotocol

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

16

� 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)

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

17

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.

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

0

HTML format and representation

18

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

0

HTML format and representation<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>

19

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

||| The following simple example illustrates the form of an HTML document:</html>

<head>

<TITLE> Simple Example</TITLE>

</head>

<body>

<H1>Heading</H1>

HTML format and representation - cont

HEAD

BODY

20

<H1>Heading</H1>

<P>A short illustrative paragraph that includes a singlehyperlink to the

<A HREF=“http://www.w3.org/”>WWW Consortium homepage</A>.</P>

</body>

</html>

||| The HTML code above will be interpreted and displayed by a browserin a form similar to that shown below:

Heading

A short illustrative paragraph that includes a single hyperlink to theWWW Consortium home page.

HTML EXAMPLE

<html>

<head>

<title>Hello</title>

</head></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>

||| When a Web browser interacts with a Web server, the two

programs follow the HTTP.

||| HTTP is an layer protocol

The HTTP protocol ….

||| HTTP - client/server modelPC running

application

22

�client: browser that requests, receives, “displays” Web objects

�server: Web server sends objects in response to requests

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

||| http1.1: RFC 2068

PC runningExplorer

Server running

apache Webserver

Mac runningNavigator

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

The HTTP protocol - cont

23

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.

The HTTP protocol - cont

http: TCP transport service:

||| client initiates TCP connection (creates socket) to server, port 80

||| server accepts TCP connection from client

http is “stateless”

||| server maintains no information about past client requests

aside

24

from client

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

||| TCP connection closed

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

aside

Concepts

||| A web page (also referred to as document) consists of objects.

||| An object is simply a file such as an HTML file, JPEG file, a Java applet, an audio clip, etc.

The HTTP protocol - contHTTP : Uniform Resource Locator (URL)

||| Each object is addressable by a single URL

||| Each URL has two components:- the host name of the server thathouses the object and

25

applet, an audio clip, etc.

||| Most web pages consist of a baseHTML file and several referencedobjects

||| For example, if a Web pagecontains HTML text and five JPEGimages, then the Web page has sixobjects.

houses the object and- the object’s path name

||| For example:

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

- www.mdx.ac.uk for a host name

- /someDepartment/logo.gif for apath name

TCP three-way handshake

ThreeThree--wayway

handshakehandshake

CloseClose

timetime

SYNSYN

ACKACK

SYN +SYN +

ACKACKOpenOpen

FINFIN

ACKACK

ACKACK

FINFIN

Initiates a

connection

Accepts and

acknowledges

Acknowledges

and begins tx

26

applicationtransportNetworkNetwork access

1. SYN 1. SYN

2. SYN + ACK2. SYN + ACK3. ACK 3. ACKapplication

transportNetworkNetwork access

4. Data flow begins 4. Receive data

handshakehandshakeand begins tx

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.ukPort 80 is default for http server.

1b. http server at host www.cs.mdx.ac.uk waiting for

TCP connection at port 80

(e.g. contains text,

references to 5 jpeg images)

27

Port 80 is default for http server.

2. http client sends http request

message (containing URL) into TCP connection socket

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

time

HTTP example - cont

5. http client receives response message containing html file,

4. http server closes TCP connection.

28

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

time

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

HTTP example shortcomings

29

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

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

30

||| Web pages are written in the HTML

||| Web browser interacts with a Web server via the HTTP