Application Layer
Application Layer
Application Layer
OSI layers
Example:
www.acad.bg 194.141.0.9
Disadvantages:
Delegation
com edu bg eu info
mail 11
Up to 127 levels sigma
Top Level Domains
Generic domains (gTLD):
com, org, net, int (all around the world);
edu, gov, mil (located in USA only);
aero, biz, coop, info, museum, name, pro
(new domains, since 2000).
Loopback domains:
localhost, localdomain
13
DNS server
A computer with software which:
These tasks are described in the DNS protocol (RFC 1035) located
on the Application Layer of the “TCP/IP reference model”.
14
The root DNS servers
At the heart of the DNS are 13 special computers,
called root servers. They are coordinated by ICANN
and are distributed around the world.
A.ROOT-SERVERS.NET. 198.41.0.4
B.ROOT-SERVERS.NET. 192.228.79.201
C.ROOT-SERVERS.NET. 192.33.4.12
D.ROOT-SERVERS.NET. 128.8.10.90
E.ROOT-SERVERS.NET. 192.203.230.10
F.ROOT-SERVERS.NET. 192.5.5.241
G.ROOT-SERVERS.NET. 192.112.36.4
H.ROOT-SERVERS.NET. 128.63.2.53
I.ROOT-SERVERS.NET. 192.36.148.17
J.ROOT-SERVERS.NET. 192.58.128.30
K.ROOT-SERVERS.NET. 193.0.14.129
L.ROOT-SERVERS.NET. 199.7.83.42
M.ROOT-SERVERS.NET. 202.12.27.33
15
K.ROOT-SERVERS.NET
(operated by RIPE NCC)
Source: http://k.root-servers.org
16
DNS servers (contd.)
Delegation:
Primary DNS server for a given domain – holds resource records for
the zone. The zone configuration is written by the system
administrator.
Secondary DNS server for a given domain – it exists for the case
when the Primary DNS server is failed or overloaded. The Secondary
server downloads the zone information from the Primary
periodically or by notification.
17
DNS servers (contd.)
Every domain must have one Primary DNS server
and at least one Secondary.
2. The local resolver opens a special file called hosts and looks in case
the answer is already written here. If not then next:
4. If the DNS server knows (or already cached) the answer, then
returns it.
6. The DNS servers returns the result – the answer or error message.
19
Reverse DNS query
The reverse query uses the special
infrastructure domain in-addr.arpa
The IP is written before this special domain in
reverse order of numbers separated with dots.
– Example: 194.141.0.0 corresponds to 0.0.141.194.in-addr.arpa
22
Resource Records
The data fields
owner - A string which is the domain name
where the RR is found.
type - which is an encoded 16 bit value that
specifies the type of the resource in this
resource record. Types refer to abstract
resources. Each abstract resource has memo
name:
A - a host address
CNAME - identifies the canonical name of an alias
MX - identifies a mail exchange for the domain
PTR - a pointer to another part of the domain name space
etc.
23
DNS protocol details (contd.)
Resource Records
The data fields
class - which is an encoded 16 bit value which
identifies a protocol family or instance of a protocol.
This memo uses the following classes:
IN - the Internet system or CH - the Chaos system
acad.bg. IN A 194.141.0.9
acad.bg. IN MX 10 mx-a.acad.bg.
IN MX 20 mx-b.acad.bg.
IN NS amigo.acad.bg.
IN NS unicom.acad.bg.
localhost IN A 127.0.0.1
poseidon IN A 194.141.0.1
backbone IN A 194.141.252.2
iris IN A 194.141.0.2
amigo IN AAAA 2001:4b58:acad::3
unicom IN AAAA 2001:4b58:acad::9
bis-21++ IN CNAME unicom.acad.bg.
3 IN PTR amigo.acad.bg.
...
25
DNS protocol details (contd.)
The DNS message in binary format
(RR means Resource Record)
26
DNS protocol details (contd.)
The DNS message data fields
The IDENTIFICATION field is set by the client and returned by the server.
30
DNS
Further reading
InterNIC organization - provides the public
information regarding Internet Domain Name
registration services. - http://www.internic.net
Paul Albitz, Cricket Liu, “DNS and BIND”, 4th edition, O’REILLY 31
TELNET protocol
TELNET (TELecommunication NETwork) was developed in
1969 beginning with RFC 15 and standardized as IETF STD 8,
one of the first Internet standards.
32
TELNET protocol (2)
Most often, a user will be telneting to a Unix-like
server system or a simple network device such as a
switch. Once the connection is established, he would
then log in with his account information and execute
operating system commands remotely on that
computer, such as ls or cd etc.
The first e-mail systems simply consisted of text file transfer protocols. As
time went on, the limitations of this approach became more obvious.
– It was not possible to create and send messages containing a mixture of text 34
and binary data: drawings, photos, facsimile, and voice.
E-mail: Architectures and services
Typically, e-mail systems support five basic functions:
– Composition refers to the process of creating messages
and answers.
– Transfer refers to moving messages from the originator
to the recipient. The e-mail system should do this
automatically, without bothering the user.
– Reporting has to do with telling the originator what
happened to the message.
– Displaying incoming messages is needed so people can
read their e-mail. Sometimes conversion is required or a
special viewer must be invoked.
– Disposition is the final step and concerns what the
recipient does with the message after receiving it.
(Delete, Replay, Forward, Save ...) 35
Electronic Mail
The User Agent
An example of mailbox
37
Message Formats – RFC 822
38
MIME – Multipurpose Internet Mail
Extensions
The original e-mail was designed
to transfer 7-bit text (ASCII) characters only, so ...
Problems with international languages:
Languages with accents
(French, German).
Languages in non-Latin alphabets
(Hebrew, Cyrillic ...).
Languages without alphabets
(Chinese, Japanese).
Messages not containing text at all
(audio or images). 39
MIME
40
MIME – a multipart message example
41
Message Transfer example
using SMTP
42
Final e-mail delivery
File transfer
47
FTP – the file transfer proccess
48
FTP – an example session
49
FTP - access commands
50
FTP – file management commands
51
FTP – data formatting commands
52
FTP – file transfer commands
53
FTP – Miscellaneous commands
54
FTP – Some responses
55
Trivial FTP (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:
56
FTP pros and cons
Advantages:
– Simple implementation
– Universal application
– Wide used and standartized
Disadvantages:
– Clear text passwords, unencrypted data.
– Multiple TCP/IP connections are used = > Firewalls problems.
– Hard to filter active mode FTP traffic on the client side by using a
firewall.
– 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
FXP.
– High latency.
– No integrity check on the receiver side.
– No date/timestamp attribute transfer. 57
World Wide Web
Architectural Overview
The parts of the Web model.
58
The Client Side
59
The Server Side
A multithreaded Web server with a front end and
processing modules.
60
The Server Side (2)
A server farm.
61
The Server Side (3)
HTTP - responses
64
HTTP - Some Message Headers
65
test.log partial
Example HTTP usage in a content
Trying 2610:a0:c779:b::d1ad:35b4...
TELNET session: Connected to www.ietf.org.
Escape character is '^]'.
<HTML>
<head>
telnet www.ietf.org 80 >test.log <TITLE>IETF RFC Page</TITLE>
GET /rfc.html
<SCRIPT LANGUAGE="JavaScript">
Connection closed by foreign host.
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>
67
URLs – Uniform Resource Locaters
Some common URLs.
68
Statelessness and Cookies
Some examples:
69
HTML – HyperText Markup
Language
In 1980, physicist Tim Berners-Lee, who was
an independent contractor at CERN, proposed
and prototyped ENQUIRE, a hypertext system
for CERN researchers to use to share
documents. In 1989, Berners-Lee and CERN
data systems engineer Robert Cailliau each
submitted separate proposals for an Internet-
based hypertext system providing similar
functionality. In 1990, they collaborated on a
joint proposal, the World Wide Web (W3)
project, which was accepted by CERN. 70
HTML (2)
July, 1993: a draft by IETF (that is: not a standard – yet).
November, 1995: HTML 2.0 published as IETF RFC 1866, supplemented by RFC 1867
RFC 1942 (tables) in May 1996,
RFC 1980 (client-side image maps) in August 1996, and
RFC 2070 (internationalization) in January 1997;
December 18, 1997: HTML 4.0, published as a W3C Recommendation. It offers three "flavors":
– Strict, in which deprecated elements are forbidden,
– Transitional, in which deprecated elements are allowed,
– Frameset, in which mostly only frame related elements are allowed;
April 24, 1998: HTML 4.0 was reissued with minor edits without incrementing the version number.
December 24, 1999: HTML 4.01, published as a W3C Recommendation. It offers the same three flavors as
HTML 4.0, and its last errata was published May 12, 2001.
HTML 4.01 and ISO/IEC 15445:2000 are the most recent and final versions of HTML.
May 15, 2000: ISO/IEC 15445:2000 ("ISO HTML", based on HTML 4.01 Strict), published as an ISO/IEC
international standard.
HTML 5 is still an Editor’s Draft, and not endorsed by W3C yet.
71
HTML (3)
(a) The HTML for a sample page. (b) The formatted page.
(b)
72
HTML (3)
A selection of common HTML tags. some can
have additional parameters (attributes).
73
HTML Tables
(a) An HTML table.
74
HTML Forms
(a) The HTML for an order form.
75
HTML Forms (2)
A possible response from the browser to the
server with information filled in by the user.
76
XML and XSL
eXtensible Markup Language
A simple Web page in XML.
77
XML and XSL
eXtensible Stylesheet Language
A style sheet in XSL.
78
Dynamic Web Documents
79
Dynamic Web Documents (2)
A sample HTML page with embedded PHP script.
80
“Web Services”
The W3C defines a Web Service as
“A software system designed to support
interoperable Machine to Machine interaction over a
network.“
Web services are frequently just Web APIs that can be
accessed over a network, such as the Internet, and executed
on a remote system hosting the requested services.
84
Public News servers: http://www.dmoz.org/Computers/Usenet/Public_News_Servers
Simple Network Management Protocol
(SNMP)
Application layer protocol within the OSI model.
It uses UDP as transport.
– Managed objects
Management
Application
– Syntax notation
– SMI (Structure of Management Info) Agent Agent Agent
– Get
– GetNext
– GetBulk
– Set
– Trap
– Inform
88
SNMP v1 Packet Format
SNMP v1 packets contain two parts:
– First part contains version and community name.
– Second part contains PDU.
89
SNMP v2 Packet Format
Like SNMP v1, SNMP v2 contain two parts:
– First part is called a wrapper which contains authentication,
privacy information and a context.
– Second contains a PDU with similarities to SNMP v1.
90
SNMP v1 and v2
Advantages and Disadvantages
Advantages Disadvantages
– Simple design. – Security holes.
– Easy implementation – Old technology.
– Wide spread usage.
– Expandability.
91
The new SNMP v3
Structure, components and architecture similar to v1 and v2.
http://www.ietf.org/html.charters/snmpv3-charter.html
92
SNMP Conclusion
The goals: Integrated network management,
Interoperability, Standards.
* *
S4 S3 S3
Workstation Clients
(a) (b)
S1 S1 S1 S1 S1 S1
* * *
S2 S2 S2
103
Squeezing the nanoseconds