Internet And World Wide Web Protocols-Programming For Web-Lecture Slides, Slides of Web Programming and Technologies

This lecture was delivered by Prof. Arun Ullal at Ankit Institute of Technology and Science for Web Programming course. It includes: Internet, HTML, TCP/IP, Protocols, Network, Layers, Domain, Name, System, Caching, Cookies

Typology: Slides

2011/2012

Uploaded on 07/18/2012

palvani
palvani 🇮🇳

4.5

(2)

83 documents

1 / 31

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMP519: Web Programming
Autumn 2011
Internet & World Wide Web Protocols
network layers
TCP/IP
domain name system, IP addresses, routing protocols
HTTP
GET/POST, headers, caching, cookies
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f

Partial preview of the text

Download Internet And World Wide Web Protocols-Programming For Web-Lecture Slides and more Slides Web Programming and Technologies in PDF only on Docsity!

COMP519: Web Programming

Autumn 2011

Internet & World Wide Web Protocols

network layers

TCP/IP

domain name system, IP addresses, routing protocols

HTTP

GET/POST, headers, caching, cookies

OSI 7-Layer Model

-^

in the 70's, computer networks were ad hoc, vendor-specific

Open Systems Interconnection

model

developed by the ISO (International Organizationfor Standardization) in 1984



provides an abstract model of networking



divides the tasks involved in moving informationbetween networked computers into 7 task groups



each task group is assigned a layer

Each layer is reasonably self-contained, so

can be implemented independently



changes/updates to a layer need not effect otherlayers

  • Protocols define how messages are sent and received, i.e. theformat and order of them, what happens when messages aretransmitted and received.• Efficient protocols are what allows the Internet to operate in thedecentralized manner that they do.

What is a protocol after all?

  • Packet routing using these protocols also allows for reasonablygood error checking/correcting methods, and reliability oftransmissions.

Layer Protocols

-^

across the network, processes at the same level can (seemingly) communicate

e.g., Web server & browser run at the application level, communicate via HTTP

-^

in reality, actual communication takes place at the physical layer

upper layers can only communicate with those above and below 

at the source

, as data is passed down the layers:

the protocol for each layer adds control information to the datathe protocol for each layer adds control information to the data



at the destination

, as data is passed up the layers:

the protocol for each layer strips and analyzes the control information for that layer

Internet Protocol (IP)

-^

The Internet Protocol divides information into packets for delivery.

-^

Internet Protocol adds packet routing info (20 bytes).

Time-to-live (TTL):

indicates amount of time packet is allowedto remain before being discardedto remain before being discarded

Source address:

IP address of host sending the packet

Destination address:

IP address of host to receive the packet

Options:

options such as sender-specified routingor security

Transmission Control Protocol (TCP)

TCP adds information that provides a virtual circuit, including

message formatting,

circuit management, flow control, error correction

Source & destination ports

a port is analogous to a mailbox

Sequence number:

identifies its place in sequenceidentifies its place in sequence (byte # in overall message)

Acknowledgement number:

specifies the next byte # in sequence,if destination does not receive it in Xamount of time, will notify sender

Control flags:

used to set up connection (3-wayhandshake: request, ack, ack),mark as urgent, terminate connection,

IP addresses

IP addresses are numerical labels assigned to

computers in a network, used for identificationand addressing (passing information) IP addresses (under IP version 4) are 32 bits long

10010011 10000110 00000010 00010100

written as a dotted sequence

147.134.2.

divided into 5 classes

^

class A: start with 0, then 7

  • bit code

^

class A: start with 0, then 7

  • bit code

(^242)

= 16,777,216 hosts in subnetwork

^

class B: start with 10, then 14-bit code

(^162)

= 65,536 hosts in subnetwork

^

class C: start with 110, then 21-bit code

(^82) = 256 hosts in subnetwork

^

class D: start with 1110

used for multicasting

^

class E: start with 11110

reserved for future use

IPv6 extends address size to 128 bits

^

extensions support authentication, dataintegrity, confidentiality

Domain Name System

-^

rarely do applications deal directly with IP addresses

a hierarchical system of domain names can be used instead 

top level domains: edu, com, gov, org, net, … commonly:

hostname.subdomain.domain

(possibly many subdomains)

e.g.,

csc.liv.ac.uk

-^

domain names serve as “listings” in a “phone book” for the internet, i.e. when youenter a domain name in a web browser, a “look up” is done to find thecorresponding IP address

-^

domain names also simplify things in that if the physical network changes (e.g. IPaddresses are modified), the domain names can remain the same while the“phone book” entries are updated with the new IP address

Routing Protocols

-^

routers

(or

gateways

) are special purpose machines on the Internet that

determine the path for packets from source to destination

when a router receives a packet, inspects the destination address 

looks up that address in a routing table 

based on the contents of the table, forwards the packet to another router (or to its finaldestination if possible)

•^

Routing Information Protocol (RIP)

-^

Routing Information Protocol (RIP) ^

describes how routers exchange routing table information ^

uses hop-count as the metric of a path's cost

•^

Open Shortest Path First Protocol (OSPF) ^

more robust, scalable protocol than RIP ^

doesn't exchange entire tables, only updates changed links

•^

Internet Control Message Protocol (ICMP) ^

adjunct to IP, notifies sender (or other router) of abnormal events

e.g., unreachable host, net congestion

User Datagram Protocol (UDP)

UDP protocol is a simple, connectionless alternative to TCP

used in many Internet applications that require only simple query/responsee.g.,

time

Source & destination ports

same as in TCP

Length:

number of bytes in the packet

Checksum:

rudimentary error detection

World Wide Web

•^

the Web is the world’s largest client/server system

communication occurs via message passing

•^

within browser, select URL of desired page

-^

browser requests page from server

-^

server responds with message containing

  • type of page (HTML, gif, pdf, zip, …)– type of page (HTML, gif, pdf, zip, …)– page contents -^

browser uses type info to correctly display page

-^

if page contains other items (images, applets, …), browser must request each separately

-^

Hypertext Transfer Protocol (HTTP):

application-level protocol for distributed, collaborative, hypermedia information systems 

generic, stateless, object-oriented 

can be used for many tasks, such as name servers & distributed object management systems 

underlying language of the Web

HTTP

•^

HTTP/1.0 allows only connectionless message passing ^

each request/response requires a new connection ^

to download a page with images requires multiple connections

can overload the server, require lots of overhead

•^

HTTP/1.1 provides persistent connection by default ^

once client & server connect, remains open until told to close it

(or timeout)

reduces number of connections, saves overhead

^

client can send multiple requests without waiting for responses

e.g., can request all images in a page at once

GET example

bash-3.1$

telnet

www.csc.liv.ac.uk

80

Trying

10.128.0.3...

Connected

to

www.csc.liv.ac.uk

(10.128.0.3). Escape

character

is

'^]'.

GET

/~martin/index.html

HTTP/1.

HTTP/1.

200

OK

Date:

Mon,

08

Oct 2007

10:01:

GMT

Server:

Apache/2.0.

HP-UX_Apache-based_Web_Server

(Unix)

mod_perl/1.99_

Perl/v5.8.

DAV/

PHP/5.0.

Last-Modified:

Mon,

01

Oct

2007

14:55:

GMT

ETag:

"ec3f-1122-9fd83d00"

Accept-Ranges:

bytes

Content-Length:

4386

Content-Type:

text/html

..

.

..

. ..

.

..

. Connection

closed by

foreign

host.

server response has assorted

header information, followedby the page

Response Header Fields

-^

the first line of the server’s response contains a status code

200 OK

request was processed successfully

301 Moved permanently

document has been moved

304 Not modified

if cached version is up-to-date

304 Not modified

if cached version is up-to-date

400 Bad request

syntax error in client’s request

403 Forbidden

client is not allowed access (e.g., protected)

404 Not found

file could not be found

500 Internal server error

server failed

503 Service unavailable

server is overloaded