• No results found

Lecture #21: Lecture #21: Application Layer Application Layer

N/A
N/A
Protected

Academic year: 2021

Share "Lecture #21: Lecture #21: Application Layer Application Layer"

Copied!
107
0
0

Loading.... (view fulltext now)

Full text

(1)

Protocols: DNS, TELNET, Protocols: DNS, TELNET, e-Mail, FTP, WWW, NNTP, e-Mail, FTP, WWW, NNTP,

SNMP, NTP SNMP, NTP

etc. etc.

Lecture #21:

Lecture #21:

Application Layer

Application Layer

(2)

TCP/IP Application Layer TCP/IP Application Layer

User application 1 ...

Encryption/

decryption

compression/

expansion

Choice of syntax Session

control

Session to transport mapping

Session management Session

synch.

Layer and flow control

Error recovery

Multiplexing Connection

control

Routing Addressing

Error control

Flow control Data link

establishment

Synch Framing

Access to transm. media

Physical and electrical interface

Activation/

deactivation of con.

Application layer Presentation layer

Session layer Transport layer

Network layer

Link layer

Physical layer

OSI layers

Wide used Application protocols:

Wide used Application protocols: DNS, HTTP, FTP, SMTP, DNS, HTTP, FTP, SMTP,

(3)

3

DNS - The purpose DNS - The purpose

To map a To map a hostname hostname to an to an IP-address IP-address and and vice versa.

vice versa.

Example:

Example:

www.acad.bg

www.acad.bg 194.141.0.9 194.141.0.9

Each hostname may has zero or more corresponding IP- Each hostname may has zero or more corresponding IP-

addresses.

addresses.

Each IP-address may correspond to zero or more Each IP-address may correspond to zero or more

hostnames.

hostnames.

(4)

DNS - Historical remarks DNS - Historical remarks

Host name to address mappings were maintained by the Host name to address mappings were maintained by the

Network Information Center

Network Information Center (NIC) in a (NIC) in a single file single file

( ( HOSTS.TXT HOSTS.TXT ) which was transferred to ) which was transferred to all hosts all hosts using FTP using FTP (about 25 years ago).

(about 25 years ago).

Disadvantages:

Disadvantages:

Ineffective – Bandwidth consumed in distributing a new version Ineffective – Bandwidth consumed in distributing a new version by this scheme is proportional to the square of the number of by this scheme is proportional to the square of the number of

hosts in the network.

hosts in the network.

The network population was also changing in character. The network population was also changing in character.

The applications on the Internet were getting more The applications on the Internet were getting more

sophisticated and creating a need for general purpose name

sophisticated and creating a need for general purpose name

(5)

5

DNS design goals DNS design goals

The primary goal is a consistent name space The primary goal is a consistent name space which will be used for referring to resources.

which will be used for referring to resources.

The database which holds the names must be The database which holds the names must be distributed.

distributed.

The costs of implementing such a facility The costs of implementing such a facility dictate that it be generally useful, and not dictate that it be generally useful, and not

restricted to a single application.

restricted to a single application.

(6)

DNS design goals (contd.) DNS design goals (contd.)

Use the same Use the same name space name space with different with different protocol families or management.

protocol families or management.

Name server transactions must be Name server transactions must be independent independent of the communications system that carries

of the communications system that carries them.

them.

The system should be useful across a wide The system should be useful across a wide spectrum of host capabilities. Both

spectrum of host capabilities. Both personal personal computers

computers and large and large timeshared hosts timeshared hosts

(mainframes) should be able to use the system,

(mainframes) should be able to use the system,

(7)

7

Elements of the DNS Elements of the DNS

Three main componets Three main componets

1.1.

The The DOMAIN NAME SPACE DOMAIN NAME SPACE and and RESOURCE RESOURCE RECORDS

RECORDS , which are specifications for a tree , which are specifications for a tree structured name space and data associated structured name space and data associated

with the names.

with the names.

2.2.

NAME SERVERS NAME SERVERS are server programs which are server programs which hold information about the domain tree's

hold information about the domain tree's structure and set information.

structure and set information.

3.3.

RESOLVERS RESOLVERS are programs that extract are programs that extract

information from name servers in response to information from name servers in response to

client requests.

client requests.

(8)

Elements of the DNS (contd.) Elements of the DNS (contd.)

These three components roughly correspond to These three components roughly correspond to

the three layers or views of the DNS:

the three layers or views of the DNS:

From the user's point of view, the domain system is From the user's point of view, the domain system is accessed through a simple procedure.

accessed through a simple procedure.

From the resolver's point of view, the domain system From the resolver's point of view, the domain system is composed of an unknown number of name servers.

is composed of an unknown number of name servers.

From a name server's point of view, the domain From a name server's point of view, the domain

system consists of separate sets of local information

system consists of separate sets of local information

(9)

9

Name space specifications Name space specifications

and terminology and terminology

The domain name space is a tree structure The domain name space is a tree structure composed by

composed by nodes nodes . .

Each node has a label, which is zero to 63 Each node has a label, which is zero to 63 octets in length.

octets in length.

The domain name of a node is the list of the The domain name of a node is the list of the

labels on the path from the node to the root of labels on the path from the node to the root of

the tree.

the tree.

The name of the

The name of the root node root node is empty string is empty string (zero length) – “”.

(zero length) – “”.

(10)

Internally, programs that manipulate domain Internally, programs that manipulate domain names should represent them as sequences of names should represent them as sequences of

labels, where each label is a

labels, where each label is a length octet length octet followed by an

followed by an octet string octet string . .

Domain names are Domain names are case-insensitive case-insensitive using the using the ASCII codes with high order zero bit.

ASCII codes with high order zero bit.

When a user types a domain name, the length When a user types a domain name, the length of each label is omitted and the labels are

of each label is omitted and the labels are separated by dots ("."). Since a complete separated by dots ("."). Since a complete

domain name ends with the root label, this domain name ends with the root label, this

leads to a printed form which ends in a dot.

leads to a printed form which ends in a dot.

Name space specifications Name space specifications

and terminology

and terminology (contd.) (contd.)

(11)

11

Example Name Space Example Name Space

(a graphical tree view) (a graphical tree view)

com edu bg eu info

ucla

physics yahoo

joe

acad

amigo val

see-grid

www kevin

mary

Top Level Domains (TLD)

One Root domain (“”)

test sigma

book mail

Delegation

2nd Level Domains

Up to 127 levels 3rd Level Domains

ICANN, IANA

(12)

Top Level Domains Top Level Domains

Generic domains (gTLD): Generic domains (gTLD):

com, org, net, int

com, org, net, int (all around the world); (all around the world);

edu, gov, mil

edu, gov, mil (located in USA only); (located in USA only);

aero, biz, coop, info, museum, name, pro aero, biz, coop, info, museum, name, pro

(new domains, since 2000).

(new domains, since 2000).

Country code domains (ccTLD): Country code domains (ccTLD):

bg, uk, fr, it,

bg, uk, fr, it, ... ...

Special infrastructure domain: Special infrastructure domain:

arpa arpa

Loopback domains: Loopback domains:

localhost, localdomain

localhost, localdomain

(13)

13

Resource Records Resource Records

The distributed database which holds the The distributed database which holds the names consists of several

names consists of several Resource Records Resource Records . .

Resource record Resource record - Set of resource information - Set of resource information associated with a particular name.

associated with a particular name.

(14)

DNS server DNS server

A computer with software which:

A computer with software which:

1.1.

Holds and maintains specified part of the distributed Holds and maintains specified part of the distributed database of resource records.

database of resource records.

2.2.

Responds to the name queries. Responds to the name queries.

3.3.

Exchanges the zone information with other DNS Exchanges the zone information with other DNS servers.

servers.

These tasks are described in the

These tasks are described in the DNS protocol DNS protocol (RFC 1035) (RFC 1035) located located

(15)

15

The root DNS servers The root DNS servers

At the heart of the DNS are 13 special computers, At the heart of the DNS are 13 special computers,

called

called root servers root servers . They are coordinated by . They are coordinated by ICANN ICANN and are

and are distributed distributed around the world. around the world.

A.ROOT-SERVERS.NET. 198.41.0.4 A.ROOT-SERVERS.NET. 198.41.0.4

B.ROOT-SERVERS.NET. 192.228.79.201 B.ROOT-SERVERS.NET. 192.228.79.201

C.ROOT-SERVERS.NET. 192.33.4.12 C.ROOT-SERVERS.NET. 192.33.4.12 D.ROOT-SERVERS.NET. 128.8.10.90 D.ROOT-SERVERS.NET. 128.8.10.90

E.ROOT-SERVERS.NET. 192.203.230.10 E.ROOT-SERVERS.NET. 192.203.230.10

F.ROOT-SERVERS.NET. 192.5.5.241 F.ROOT-SERVERS.NET. 192.5.5.241

G.ROOT-SERVERS.NET. 192.112.36.4 G.ROOT-SERVERS.NET. 192.112.36.4

H.ROOT-SERVERS.NET. 128.63.2.53 H.ROOT-SERVERS.NET. 128.63.2.53

I.ROOT-SERVERS.NET. 192.36.148.17 I.ROOT-SERVERS.NET. 192.36.148.17 J.ROOT-SERVERS.NET. 192.58.128.30 J.ROOT-SERVERS.NET. 192.58.128.30

K.ROOT-SERVERS.NET. 193.0.14.129 K.ROOT-SERVERS.NET. 193.0.14.129

L.ROOT-SERVERS.NET. 199.7.83.42 L.ROOT-SERVERS.NET. 199.7.83.42

M.ROOT-SERVERS.NET. 202.12.27.33

M.ROOT-SERVERS.NET. 202.12.27.33

(16)

K.ROOT-SERVERS.NET K.ROOT-SERVERS.NET

(operated by

(operated by RIPE NCC) RIPE NCC)

(17)

17

DNS servers (contd.) DNS servers (contd.)

Delegation:

Delegation:

ICANN organization delegates root DNS servers. ICANN organization delegates root DNS servers.

The root servers delegate TLD DNS servers. The root servers delegate TLD DNS servers.

A TLD DNS server delegates Second Level DNS server. A TLD DNS server delegates Second Level DNS server.

etc. etc.

Primary DNS server

Primary DNS server for a given domain – holds resource records for for a given domain – holds resource records for the the zone zone . The zone configuration is written by the system . The zone configuration is written by the system

administrator.

administrator.

Secondary DNS server

Secondary DNS server for a given domain – it exists for the case for a given domain – it exists for the case

when the Primary DNS server is failed or overloaded. The Secondary when the Primary DNS server is failed or overloaded. The Secondary

server downloads the

server downloads the zone zone information from the information from the Primary Primary periodically or by notification.

periodically or by notification.

(18)

DNS servers (contd.) DNS servers (contd.)

Every domain must have one Primary DNS server Every domain must have one Primary DNS server and at least one Secondary.

and at least one Secondary.

The The Primary and Secondary DNS servers Primary and Secondary DNS servers are also are also called

called authoritative authoritative for their domain and for their domain and non- non- authoritative

authoritative for the rest of domains in the world. E.g. for the rest of domains in the world. E.g.

the the authoritative authoritative servers always hold up to date zone servers always hold up to date zone information for the domain.

information for the domain.

Caching only DNS servers Caching only DNS servers they cache DNS queries they cache DNS queries and answers for speed-up the service. These servers are and answers for speed-up the service. These servers are

not authoritative for any domain.

not authoritative for any domain.

(19)

19

DNS query flow DNS query flow

1.

1.

A A DNS client DNS client forms the query and sends it according the OS forms the query and sends it according the OS configuration.

configuration.

2.

2.

The local The local resolver resolver opens a special file called opens a special file called hosts hosts and looks in case and looks in case the answer is already written here. If not then next:

the answer is already written here. If not then next:

3.3.

The The client client calls one of the OS configured calls one of the OS configured DNS servers DNS servers . .

4.

4.

If the If the DNS server DNS server knows (or already cached) the answer, then returns knows (or already cached) the answer, then returns it. it.

5.

5.

If the If the DNS server DNS server doesn’t know the answer, it sends a doesn’t know the answer, it sends a recursive recursive query

query through the DNS hierarchy, starting from the root domain. The through the DNS hierarchy, starting from the root domain. The recursive query consists of several sub-queries to the corresponding recursive query consists of several sub-queries to the corresponding

DNS servers DNS servers . .

6.

6.

The The DNS servers DNS servers returns the result – the answer or error message. returns the result – the answer or error message.

(20)

Reverse DNS query Reverse DNS query

The reverse query uses the special The reverse query uses the special infrastructure domain

infrastructure domain in-addr.arpa in-addr.arpa

The IP is written before this special domain in The IP is written before this special domain in reverse order of numbers separated with dots.

reverse order of numbers separated with dots.

– Example: 1 Example: 1 94.141.0.0 94.141.0.0 corresponds to corresponds to 0.0.141.194.in-addr.arpa 0.0.141.194.in-addr.arpa

The reverse query starts from a root DNS The reverse query starts from a root DNS server and follows the delegation path.

server and follows the delegation path.

– Example in Unix/Linux: Example in Unix/Linux:

dig 0.0.141.194.in-addr.arpa +trace dig 0.0.141.194.in-addr.arpa +trace

(It traces and shows the delegation path from the (It traces and shows the delegation path from the

root name servers

root name servers down to SOA DNS server) down to SOA DNS server)

(21)

21

DNS protocol details DNS protocol details

The protocol uses two transport protocols from the The protocol uses two transport protocols from the

lower layer:

lower layer:

UDP UDP on on port 53 port 53 and and TCP TCP on on port 53. port 53.

The The queries and answers queries and answers are transferred using the are transferred using the unreliable protocol

unreliable protocol UDP UDP for speed. But it is preferred for speed. But it is preferred because the OS configured DNS servers are near,

because the OS configured DNS servers are near, usually in the same LAN.

usually in the same LAN.

The The zone transfers zone transfers between the DNS servers are between the DNS servers are performed through

performed through TCP TCP , because it must be reliable. , because it must be reliable.

(22)

DNS protocol details

DNS protocol details (contd.) (contd.)

Resource Records described Resource Records described

Each resource record consists of the following Each resource record consists of the following

data fields data fields

( ( in text readable format! in text readable format! ): ):

owner type class TTL RDATA

owner type class TTL RDATA

(23)

23

Resource Records Resource Records

The data fields The data fields

owner

owner - A string which is the domain name - A string which is the domain name where the RR is found.

where the RR is found.

type type - which is an encoded 16 bit value that - which is an encoded 16 bit value that specifies the type of the resource in this

specifies the type of the resource in this resource record. Types refer to abstract resource record. Types refer to abstract

resources. Each abstract resource has memo resources. Each abstract resource has memo

name:

name:

A A - a host address - a host address CNAME

CNAME - identifies the canonical name of an alias - identifies the canonical name of an alias MX MX - identifies a mail exchange for the domain - identifies a mail exchange for the domain

PTR PTR - a pointer to another part of the domain name space - a pointer to another part of the domain name space

etc. etc.

(24)

DNS protocol details

DNS protocol details (contd.) (contd.)

Resource Records Resource Records

The data fields The data fields

class class - which is an encoded 16 bit value which - which is an encoded 16 bit value which

identifies a protocol family or instance of a protocol.

identifies a protocol family or instance of a protocol.

This memo uses the following classes:

This memo uses the following classes:

IN IN - the Internet system or - the Internet system or CH CH - the Chaos system - the Chaos system

TTL TTL - which is the time to live of the RR. This field is a - which is the time to live of the RR. This field is a 32 bit integer in units of seconds, an is primarily used 32 bit integer in units of seconds, an is primarily used by resolvers when they cache RRs. The TTL describes by resolvers when they cache RRs. The TTL describes

how long a RR can be cached before it should be how long a RR can be cached before it should be

discarded.

discarded.

RDATA RDATA - which is the type and sometimes class - which is the type and sometimes class

(25)

25

Resource Records Resource Records

Example Example

(in text readable format!) (in text readable format!) acad.bg. IN A 194.141.0.9 acad.bg. IN A 194.141.0.9

acad.bg. IN MX 10 mx-a.acad.bg.

acad.bg. IN MX 10 mx-a.acad.bg.

IN MX 20 mx-b.acad.bg. IN MX 20 mx-b.acad.bg.

IN NS amigo.acad.bg. IN NS amigo.acad.bg.

IN NS unicom.acad.bg. IN NS unicom.acad.bg.

localhost IN A 127.0.0.1 localhost IN A 127.0.0.1 poseidon IN A 194.141.0.1 poseidon IN A 194.141.0.1 backbone IN A 194.141.252.2 backbone IN A 194.141.252.2 iris IN A 194.141.0.2 iris IN A 194.141.0.2

amigo IN AAAA 2001:4b58:acad::3 amigo IN AAAA 2001:4b58:acad::3 unicom IN AAAA 2001:4b58:acad::9 unicom IN AAAA 2001:4b58:acad::9 bis-21++ IN CNAME unicom.acad.bg.

bis-21++ IN CNAME unicom.acad.bg.

3 IN PTR amigo.acad.bg.

3 IN PTR amigo.acad.bg.

... ...

(26)

DNS protocol details

DNS protocol details (contd.) (contd.) The DNS message in binary format The DNS message in binary format

(RR means Resource Record)

(RR means Resource Record)

(27)

27

DNS protocol details

DNS protocol details (contd.) (contd.)

The DNS message data fields The DNS message data fields

The The IDENTIFICATION IDENTIFICATION field is set by the client and returned by the server. field is set by the client and returned by the server.

The 16-bit The 16-bit PARAMETER PARAMETER consists of: consists of:

– 0-th bit field: 0 means the message is a query,1 means it's a response. 0-th bit field: 0 means the message is a query,1 means it's a response.

– 1-4 bit fields - OPCODE: 1-4 bit fields - OPCODE:

• 0000 - is a normal value (Standard query). 0000 - is a normal value (Standard query).

• 0001 - an inverse query. 0001 - an inverse query.

• 0010 - the server status request. 0010 - the server status request.

– 5-th bit field - Authoritative answer. The name server is authoritative for 5-th bit field - Authoritative answer. The name server is authoritative for the domain in the question section.

the domain in the question section.

– 6-th bit field is set if message truncated. With UDP this means that the 6-th bit field is set if message truncated. With UDP this means that the total size of the reply exceeded 512 bytes, and only the first 512 bytes total size of the reply exceeded 512 bytes, and only the first 512 bytes the of the reply were returned.

the of the reply were returned.

– 7-th bit field - Recursion Desired. This bit can be set in a query and is 7-th bit field - Recursion Desired. This bit can be set in a query and is then returned in the response.

then returned in the response.

– 8-th bit field - Recursion Available. 8-th bit field - Recursion Available.

– 9-11 -th bits field has to be 0. 9-11 -th bits field has to be 0.

– 12-15 -th bits field - Return Code. 0- no error, 3- name error. 12-15 -th bits field - Return Code. 0- no error, 3- name error.

(28)

DNS protocol details

DNS protocol details (contd.) (contd.)

The DNS message data fields The DNS message data fields

The fields labeled The fields labeled NUMBER OF ... NUMBER OF ... give each a count of entries give each a count of entries in the corresponding sections in the message.

in the corresponding sections in the message.

The The QUESTION SECTION QUESTION SECTION contains queries for which answers contains queries for which answers are desired. The client fills in only the question section; the are desired. The client fills in only the question section; the server returns the question and answers with its response.

server returns the question and answers with its response.

Each question has

Each question has Query Domain Name Query Domain Name followed by followed by Query Query Type Type and and Query Class Query Class fields (as depicted in the next slides) fields (as depicted in the next slides)

ANSWER,AUTHORITY,ADDITIONAL INFORMATION ANSWER,AUTHORITY,ADDITIONAL INFORMATION sections sections consist of a set of resource records that describe domain consist of a set of resource records that describe domain

names and mappings. Each resource record describes one names and mappings. Each resource record describes one

name (as depicted in the next slides)

name (as depicted in the next slides)

(29)

29

DNS protocol details

DNS protocol details (contd.) (contd.)

The QUESTION section format in the DNS message The QUESTION section format in the DNS message

The DOMAIN NAME has variable length.

Clients fill in the questions; servers return them along with the answers.

(30)

DNS protocol details

DNS protocol details (contd.) (contd.)

The RESOURCE RECORD binary format returned The RESOURCE RECORD binary format returned

by the DNS servers

by the DNS servers

(31)

31

DNS DNS

Further reading Further reading

InterNIC InterNIC organization - organization - provides the public provides the public information regarding Internet

information regarding Internet Domain Name Domain Name registration services. - http://www.internic.net registration services. - http://www.internic.net

ICANN ICANN - responsible for the global coordination of the - responsible for the global coordination of the Internet's system of unique identifiers -

Internet's system of unique identifiers - http://www.icann.org/

http://www.icann.org/

RFC1034, RFC1035, STD0013 - http://www.rfc-editor.org RFC1034, RFC1035, STD0013 - http://www.rfc-editor.org

BIND BIND (Berkeley Internet Name Domain) – the most popular (Berkeley Internet Name Domain) – the most popular implementation of the DNS software

implementation of the DNS software -http://www.isc.org/index.pl?/sw/bind/

-http://www.isc.org/index.pl?/sw/bind/

Paul Albitz, Cricket Liu, “DNS and BIND”, 4 Paul Albitz, Cricket Liu, “DNS and BIND”, 4

thth

edition, O’REILLY edition, O’REILLY

(32)

TELNET protocol TELNET protocol

TELNET TELNET (TELecommunication NETwork) was developed in (TELecommunication NETwork) was developed in

1969 1969 beginning with beginning with RFC 15 RFC 15 and standardized as and standardized as IETF IETF STD 8 STD 8 , , one of the first Internet standards.

one of the first Internet standards.

TELNET clients have been available on most Unix systems for TELNET clients have been available on most Unix systems for many years and are available for virtually all platforms. Most many years and are available for virtually all platforms. Most

network equipment and OSs with a TCP/IP stack support some network equipment and OSs with a TCP/IP stack support some

kind of TELNET service server for their remote configuration kind of TELNET service server for their remote configuration

(including ones based on MS Windows NT and later).

(including ones based on MS Windows NT and later).

Because of security issues with TELNET, it use has waned as it Because of security issues with TELNET, it use has waned as it is replaced by the use of

is replaced by the use of SSH SSH for remote access. for remote access.

(33)

33

TELNET protocol (2) TELNET protocol (2)

Most often, a user will be telneting to a Unix-like Most often, a user will be telneting to a Unix-like

server system or a simple network device such as a server system or a simple network device such as a

switch. Once the connection is established, he would switch. Once the connection is established, he would then log in with his account information and execute then log in with his account information and execute

operating system commands remotely on that operating system commands remotely on that

computer, such as

computer, such as ls ls or or cd cd etc. etc.

For testing and debugging purposes For testing and debugging purposes : On many : On many systems, the client may also be used to make systems, the client may also be used to make

interactive

interactive raw-TCP sessions raw-TCP sessions , even when that option , even when that option is not available. The sessions are equivalent to

is not available. The sessions are equivalent to raw raw TCP TCP as long as as long as byte 255 byte 255 never appears in the data. never appears in the data.

TELNET works on the well known TELNET works on the well known TCP port 23 TCP port 23 . .

(34)

Electronic mail Electronic mail

Before 1990, it was mostly used in Before 1990, it was mostly used in academic area - universities and research academic area - universities and research centers.

centers.

During the 1990s, it became known to the public at large and grew During the 1990s, it became known to the public at large and grew exponentially.

exponentially.

The first e-mail systems simply consisted of text file transfer protocols. As time The first e-mail systems simply consisted of text file transfer protocols. As time went on, the limitations of this approach became more obvious.

went on, the limitations of this approach became more obvious.

Some of the complaints were as follows:Some of the complaints were as follows:

Sending a message to a group of people was inconvenient.Sending a message to a group of people was inconvenient.

Messages had no defined internal structure.Messages had no defined internal structure.

The sender never knew if a message arrived or not.The sender never knew if a message arrived or not.

Lack of Lack of "I'm temporary away""I'm temporary away" management. management.

Poor user interface.Poor user interface.

(35)

35

E-mail: Architectures and services E-mail: Architectures and services

Typically, e-mail systems support five basic functions: Typically, e-mail systems support five basic functions:

– Composition Composition refers to the process of creating messages refers to the process of creating messages and answers.

and answers.

– Transfer Transfer refers to moving messages from the originator refers to moving messages from the originator to the recipient. The e-mail system should do this

to the recipient. The e-mail system should do this automatically, without bothering the user.

automatically, without bothering the user.

– Reporting Reporting has to do with telling the originator what has to do with telling the originator what happened to the message.

happened to the message.

– Displaying Displaying incoming messages is needed so people can incoming messages is needed so people can read their e-mail. Sometimes conversion is required or a read their e-mail. Sometimes conversion is required or a

special viewer must be invoked.

special viewer must be invoked.

– Disposition Disposition is the final step and concerns what the is the final step and concerns what the recipient does with the message after receiving it.

recipient does with the message after receiving it.

(Delete, Replay, Forward, Save ...)

(Delete, Replay, Forward, Save ...)

(36)

Electronic Mail Electronic Mail

The User Agent

The User Agent

(37)

37

Reading E-mail Reading E-mail

An example of mailbox

(38)

Message Formats –

Message Formats – RFC 822 RFC 822

(39)

39

MIME – Multipurpose Internet Mail MIME – Multipurpose Internet Mail

Extensions Extensions

Problems with international languages: Problems with international languages:

Languages with accents Languages with accents (French, German).

(French, German).

Languages in non-Latin alphabets Languages in non-Latin alphabets (Hebrew, Cyrillic ...).

(Hebrew, Cyrillic ...).

Languages without alphabets Languages without alphabets (Chinese, Japanese).

(Chinese, Japanese).

Messages not containing text at all Messages not containing text at all (audio or images).

(audio or images).

The original e-mail was designed

to transfer 7-bit text (ASCII) characters only, so ...

(40)

MIME MIME

(41)

41

MIME – a multipart message example

MIME – a multipart message example

(42)

Message Transfer example Message Transfer example

using SMTP using SMTP

Transferring a message from Transferring a message from

[email protected] [email protected] to to

[email protected].

[email protected].

(43)

43

Final e-mail delivery Final e-mail delivery

(a) (a) Sending and reading mail when the receiver has a Sending and reading mail when the receiver has a permanent Internet connection and the

permanent Internet connection and the user agent user agent runs on runs on the same machine as the message

the same machine as the message transfer agent transfer agent . .

(b) (b) Reading e-mail when the receiver has a dial-up connection Reading e-mail when the receiver has a dial-up connection to an ISP.

to an ISP.

(44)

Post Office Protocol (POP3)

Post Office Protocol (POP3)

(45)

45

Internet Message Access Protocol Internet Message Access Protocol

(IMAP.

(IMAP. TCP port 143 TCP port 143 ) )

A comparison of

A comparison of POP3 POP3 and and IMAP IMAP . .

The current version of IMAP is 4 revision 1 – RFC 3501

(46)

File Transfer Protocol (FTP)

• File Transfer Protocol ( File Transfer Protocol ( FTP FTP ) is the standard ) is the standard

mechanism provided by TCP/IP for copying of any kind mechanism provided by TCP/IP for copying of any kind

of files from one host to another.

of files from one host to another.

• Defined in Defined in RFC 959 RFC 959 (1985). (1985).

• FTP uses the services of TCP. It needs FTP uses the services of TCP. It needs two TCP two TCP connections

connections . .

• The well-known The well-known TCP port 21 TCP port 21 is used for the is used for the control control connection

connection and the well-known and the well-known port 20 port 20 for the for the data data connection

connection . .

(47)

47

FTP operation

File transfer

(48)

FTP – the file transfer proccess

(49)

49

FTP – an example session

FTP – an example session

(50)

FTP - access commands

(51)

51

FTP – file management commands

(52)

FTP – data formatting commands

Port definition commands

(53)

53

FTP – file transfer commands

(54)

FTP – Miscellaneous commands

(55)

55

FTP – Some responses

(56)

Trivial FTP

Trivial FTP (TFTP) (TFTP)

A very simple file transfer protocol, with the functionality of a very basic form of FTP. Defined in 1980.

TFTP uses UDP port 69 (not TCP!)

An example of TFTP usage for remote boot through BOOTP

protocol in a LAN:

(57)

57

FTP pros and cons FTP pros and cons

Advantages Advantages : :

– Simple implementation Simple implementation – Universal application Universal application

– Wide used and standartized Wide used and standartized

Disadvantages: Disadvantages:

– Clear text passwords, unencrypted data. Clear text passwords, unencrypted data.

– Multiple TCP/IP connections are used = > Firewalls problems. Multiple TCP/IP connections are used = > Firewalls problems.

– Hard to filter active mode FTP traffic on the client side by using a Hard to filter active mode FTP traffic on the client side by using a firewall.

firewall.

– It is possible to abuse the protocol's built-in proxy features to tell It is possible to abuse the protocol's built-in proxy features to tell a server to send data to an arbitrary port of a third computer; see a server to send data to an arbitrary port of a third computer; see FXP.

FXP.

– High latency. High latency.

– No integrity check on the receiver side. No integrity check on the receiver side.

– No date/timestamp attribute transfer. No date/timestamp attribute transfer.

(58)

W W orld orld W W ide ide W W eb eb

Architectural Overview Architectural Overview

The parts of the Web model.

The parts of the Web model.

(59)

59

The Client Side The Client Side

(a) (a) A browser plug-in. A browser plug-in. (b) (b) A helper application. A helper application.

(60)

The Server Side The Server Side

A multithreaded Web server with a front end and A multithreaded Web server with a front end and

processing modules.

processing modules.

(61)

61

The Server Side (2) The Server Side (2)

A server farm.

A server farm.

(62)

The Server Side (3) The Server Side (3)

(a) (a) Normal request-reply message sequence. Normal request-reply message sequence.

(63)

63

Hypertext Transfer Protocol Hypertext Transfer Protocol ( ( HTTP HTTP ) is a ) is a

communications protocol used to transfer or convey communications protocol used to transfer or convey

information on intranets and the World Wide Web. Its information on intranets and the World Wide Web. Its

original purpose was to provide a way to publish and original purpose was to provide a way to publish and

retrieve hypertext pages, mainly scientific paper.

retrieve hypertext pages, mainly scientific paper.

Created in

Created in CERN CERN , Geneva. , Geneva.

Development of HTTP was coordinated by the Development of HTTP was coordinated by the W3C W3C (World Wide Web Consortium) and the

(World Wide Web Consortium) and the IETF IETF (Internet (Internet Engineering Task Force), culminating in the publication Engineering Task Force), culminating in the publication

of a series of RFCs, most notably of a series of RFCs, most notably

RFC 2616

RFC 2616 (June 1999), which defines (June 1999), which defines HTTP/1.1 HTTP/1.1 , the , the current version.

current version.

HTTP HTTP is a is a request/response protocol request/response protocol between a between a client and a server. It works on the well known

client and a server. It works on the well known TCP TCP port 80

port 80 . .

The World Wide Web - HTTP

The World Wide Web - HTTP

(64)

HTTP - methods HTTP - methods

HTTP - responses

HTTP - responses

(65)

65

HTTP - Some Message Headers

HTTP - Some Message Headers

(66)

Example HTTP usage in a Example HTTP usage in a

TELNET session:

TELNET session:

telnet www.ietf.org 80 >test.log telnet www.ietf.org 80 >test.log GET /rfc.html

GET /rfc.html

Connection closed by foreign host.

Connection closed by foreign host.

Trying 2610:a0:c779:b::d1ad:35b4...

Connected to www.ietf.org.

Escape character is '^]'.

<HTML>

<head>

<TITLE>IETF RFC Page</TITLE>

<SCRIPT LANGUAGE="JavaScript">

function url() {

var x = document.form1.number.value if (x.length == 1) {x = "000" + x } if (x.length == 2) {x = "00" + x } if (x.length == 3) {x = "0" + x } document.form1.action =

"http://www.ietf.org/rfc/rfc" + x +

".txt"

document.form1.submit }</SCRIPT>

</head>

<!-- begin new headers and page layout -->

<body text="#000000"

bgcolor="#ffffff" >

test.log partial content

(67)

67

HTTP - Caching HTTP - Caching

Hierarchical caching with 3 proxies.

Hierarchical caching with 3 proxies.

(68)

URLs – Uniform Resource Locaters URLs – Uniform Resource Locaters

Some common URLs.

Some common URLs.

(69)

69

Statelessness and Cookies Statelessness and Cookies

Some examples:

Some examples:

(70)

In 1980, physicist In 1980, physicist Tim Berners-Lee Tim Berners-Lee , who was , who was an independent contractor at

an independent contractor at CERN CERN , proposed , proposed and prototyped

and prototyped ENQUIRE ENQUIRE , a hypertext system , a hypertext system for CERN researchers to use to share

for CERN researchers to use to share documents. In

documents. In 1989 1989 , Berners-Lee and CERN , Berners-Lee and CERN data systems engineer Robert Cailliau each data systems engineer Robert Cailliau each

submitted separate proposals for an Internet- submitted separate proposals for an Internet-

based hypertext system providing similar based hypertext system providing similar

functionality. In

functionality. In 1990 1990 , they collaborated on a , they collaborated on a joint proposal, the

joint proposal, the World Wide Web (W3) World Wide Web (W3)

HTML – HyperText Markup HTML – HyperText Markup

Language

Language

(71)

71

HTML (2) HTML (2)

July, 1993: a draft by IETF (that is: not a standard – yet).July, 1993: a draft by IETF (that is: not a standard – yet).

November, 1995November, 1995: HTML 2.0 published as IETF RFC 1866, supplemented by RFC 1867: HTML 2.0 published as IETF RFC 1866, supplemented by RFC 1867

RFC 1942 (tables) in RFC 1942 (tables) in May 1996, May 1996,

RFC 1980 (client-side image maps) in RFC 1980 (client-side image maps) in August 1996August 1996, and , and

RFC 2070 (internationalization) in RFC 2070 (internationalization) in January 1997; January 1997;

An HTML 3.0 standard was proposed inAn HTML 3.0 standard was proposed in April 1995. April 1995.

January 14, 1997: HTML 3.2, published as a W3C Recommendation.January 14, 1997: HTML 3.2, published as a W3C Recommendation.

HTML 3.2 was never submitted to the IETFHTML 3.2 was never submitted to the IETF

December 18, 1997December 18, 1997: HTML 4.0, published as a W3C Recommendation. It offers three : HTML 4.0, published as a W3C Recommendation. It offers three "flavors":"flavors": Strict, in which deprecated elements are forbidden, Strict, in which deprecated elements are forbidden,

Transitional, in which deprecated elements are allowed, Transitional, in which deprecated elements are allowed,

Frameset, in which mostly only frame related elements are allowed; Frameset, in which mostly only frame related elements are allowed;

April 24, 1998April 24, 1998: HTML 4.0 was reissued with minor edits without incrementing the version number.: HTML 4.0 was reissued with minor edits without incrementing the version number.

December 24, 1999December 24, 1999: HTML 4.01, published as a W3C Recommendation. It offers the same three flavors as : HTML 4.01, published as a W3C Recommendation. It offers the same three flavors as HTML 4.0, and its last errata was published

HTML 4.0, and its last errata was published May 12, 2001May 12, 2001..

HTML 4.01 and ISO/IEC 15445:2000 are the most recent and final versions of HTMLHTML 4.01 and ISO/IEC 15445:2000 are the most recent and final versions of HTML..

May 15, 2000May 15, 2000: ISO/IEC 15445:2000 ("ISO HTML", based on HTML 4.01 Strict), published as an : ISO/IEC 15445:2000 ("ISO HTML", based on HTML 4.01 Strict), published as an ISO/IEC ISO/IEC international standard

international standard..

HTML 5 is still an Editor’s Draft, and HTML 5 is still an Editor’s Draft, and not endorsed by not endorsed by W3C yet.W3C yet.

(72)

HTML (3) HTML (3)

(a) (a) The HTML for a sample page. The HTML for a sample page. (b) (b) The formatted page. The formatted page.

(b)

(73)

73

HTML (3) HTML (3)

A selection of common HTML

A selection of common HTML tags tags . some can . some can have additional parameters (attributes).

have additional parameters (attributes).

(74)

HTML Tables HTML Tables

(a) (a) An HTML table. An HTML table.

(b) (b) A possible rendition A possible rendition of this table.

of this table.

(75)

75

HTML Forms HTML Forms

(a) The HTML for an order form.

(a) The HTML for an order form.

(b) The formatted page.

(b) The formatted page.

(76)

HTML Forms (2) HTML Forms (2)

A possible response from the browser to the A possible response from the browser to the

server with information filled in by the user.

server with information filled in by the user.

(77)

77

XML and XSL XML and XSL

e e X X tensible tensible M M arkup arkup L L anguage anguage

A simple Web page in XML.

A simple Web page in XML.

(78)

A style sheet in XSL.

A style sheet in XSL.

XML and XSL XML and XSL

e e X X tensible tensible S S tylesheet tylesheet L L anguage anguage

(79)

79

Dynamic Web Documents Dynamic Web Documents

Steps in processing the information from an HTML form.

Steps in processing the information from an HTML form.

(80)

Dynamic Web Documents (2) Dynamic Web Documents (2)

A sample HTML page with embedded

A sample HTML page with embedded PHP PHP script. script.

(81)

81

Web Services” Web Services”

The The W3C W3C defines a defines a Web Service Web Service as as

“A software system designed to support interoperable

“A software system designed to support interoperable Machine to Machine interaction over a network.“

Machine to Machine interaction over a network.“

Web services are frequently just Web

Web services are frequently just Web API API s that can be s that can be

accessed over a network, such as the Internet, and executed accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.

on a remote system hosting the requested services.

The The W3C W3C Web Service definition encompasses many different Web Service definition encompasses many different systems, but in common usage the term refers to clients and systems, but in common usage the term refers to clients and servers that communicate using

servers that communicate using XML messages XML messages that follow the that follow the SOAP SOAP (Simple Object Access Protocol) (Simple Object Access Protocol) standard. Common in standard. Common in both the field and the terminology is the assumption that

both the field and the terminology is the assumption that there is also a

there is also a machine readable description of the machine readable description of the operations

operations supported by the server written in the supported by the server written in the Web Web Services Description Language (

Services Description Language ( WSDL WSDL ) ) . The latter is not a . The latter is not a

requirement of a SOAP endpoint, but it is a prerequisite for

requirement of a SOAP endpoint, but it is a prerequisite for

automated client-side code generation in the mainstream

automated client-side code generation in the mainstream

Java Java , , .NET .NET SOAP etc. frameworks. SOAP etc. frameworks.

(82)

Network News Transfer Protocol Network News Transfer Protocol

(NNTP) (NNTP)

An Internet application protocol used primarily An Internet application protocol used primarily for reading and posting

for reading and posting Usenet Usenet articles (aka articles (aka netnews or simply: news), as well as

netnews or simply: news), as well as transferring news among

transferring news among news servers news servers . .

Created by Brian Kantor of the University of Created by Brian Kantor of the University of California, San Diego.

California, San Diego.

Phil Lapsley of the University of California, Phil Lapsley of the University of California, Berkeley completed

Berkeley completed RFC 977 RFC 977 (1986). (1986).

Originally designed around the Originally designed around the UUCP UUCP (Unix to (Unix to

Unix CoPy) network, with most article transfers

Unix CoPy) network, with most article transfers

taking place over direct computer-to-computer

taking place over direct computer-to-computer

(83)

83

NNTP (2) NNTP (2)

Because networked Internet-compatible Because networked Internet-compatible

filesystems were not yet widely available, it was filesystems were not yet widely available, it was

decided to develop a new

decided to develop a new text text protocol that protocol that resembled

resembled SMTP SMTP , but was tailored for reading , but was tailored for reading newsgroups.

newsgroups.

The well-known The well-known TCP port 119 TCP port 119 is reserved for is reserved for NNTP.

NNTP. TCP port 563 TCP port 563 is used for connectiong is used for connectiong through

through SSL SSL (a.k.a. (a.k.a. NNTPS) NNTPS) . .

IETF IETF released released RFC 3977 RFC 3977 in Oct 2006, which in Oct 2006, which updates the NNTP protocol.

updates the NNTP protocol.

The The IMAP IMAP protocol can also be used for protocol can also be used for reading newsgroups.

reading newsgroups.

(84)

An e-mail client as a News reader

An e-mail client as a News reader

(85)

85

Simple Network Management Protocol Simple Network Management Protocol

(SNMP) (SNMP)

Application layer protocol within the OSI model. Application layer protocol within the OSI model.

It uses

It uses UDP UDP as transport. as transport.

“ “ The protocol that specifies how a network The protocol that specifies how a network management station communicates with

management station communicates with agent agent software

software in remote devices such as routers. in remote devices such as routers.

SNMP defines the format of messages and their SNMP defines the format of messages and their

meaning.”

meaning.”

- - Computer Networks and Internets Computer Networks and Internets by by Douglas E. Comer.

Douglas E. Comer.

(86)

SNMP – some history SNMP – some history

Size and number of networks required a Size and number of networks required a

standard protocol in order to communicate with standard protocol in order to communicate with

devices on the network.

devices on the network.

1970’s 1970’s - - SNMPv1 SNMPv1 , the first network , the first network management protocol.

management protocol.

– Originally designed as a Originally designed as a “quick-fix” “quick-fix” . .

1988 1988 - - SNMPv2 SNMPv2 standard designed. standard designed.

2004 2004 – – SNMPv3 SNMPv3 , the current version , the current version

(87)

87

Exchanges network information through Exchanges network information through PDU PDU ’s. ’s.

Part of the Internet Network Management Architecture Part of the Internet Network Management Architecture

Internet Management Model Internet Management Model

– Network elements Network elements – Agents Agents

– Managed objects Managed objects

– MIB’s MIB’s

(Management Information Bases)(Management Information Bases)

– Syntax notation Syntax notation

– SMI SMI

(Structure of Management Info)(Structure of Management Info)

– NMS NMS

(Network-management systems)(Network-management systems)

– Parties Parties

– Management protocols Management protocols

SNMP Technology SNMP Technology

Agent Agent Agent

MIB MIB MIB

Network Management

Application User Interface

SNMP SNMP SNMP

Managed Device Managed Device Managed Device NMS

(88)

SNMP Operations SNMP Operations

SNMP SNMP is a simple is a simple “request/response” “request/response” protocol protocol which uses six operations:

which uses six operations:

– Get Get

– GetNext GetNext – GetBulk GetBulk – Set Set

– Trap Trap

– Inform Inform

References

Related documents

Findings did not indicate a significant difference in the proportion of the variance in terrorist incidents that was predictable from political stability in the DRC and

The Simple Network Management Protocol (SNMP) is an application layer protocol that facilitates the exchange of management information between network devices.. It is part of

Hence, in this study ERPs were recorded during an implicit reading task in order to (1) distinguish the effect of the sublexical orthographic properties from the whole-word

Network Layer Routing Protocols PIM OSPF RIP Application Layer Data Link Layer IP ARP Ethernet Network Interface Transport Layer TCP UDP SNMP FTP DNS HTTP ICMP IGMP ping

Un elemento que sin duda va a repercutir sobre la posibilidad de que esta nueva planificación comunitaria arraigue y poder lograr así el objetivo de una ciudad más cohesiva

The most common cause of a left shift is inflammation, because inflammatory cytokines stimulate both neutrophil production and release of mature and immature forms from the

[r]

• After a few moments, the student can try to bring the hands to the floor beside the legs; • Try not to lean away from the knees … keep the heart open, arching the back forward;