Datorn tverk a lektion 14 applikationslagret
Download
1 / 68

- PowerPoint PPT Presentation


  • 137 Views
  • Uploaded on

Datornätverk A – lektion 14: Applikationslagret. Kap 24: Sockets Kapitel 25: DNS Kapitel 26: SMTP och FTP Kapitel 27: HTTP och WWW. PART VI. Application Layer. Position of application layer. Chapter 24. Client-Server Model: Socket Interface. Figure 24.2 Client-server relationship.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - lelia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Datorn tverk a lektion 14 applikationslagret

Datornätverk A – lektion 14:Applikationslagret

Kap 24: Sockets

Kapitel 25: DNS

Kapitel 26: SMTP och FTP

Kapitel 27: HTTP och WWW


Datorn tverk a lektion 14 applikationslagret

PART VI

Application Layer



Datorn tverk a lektion 14 applikationslagret

Chapter 24

Client-ServerModel:Socket Interface


Datorn tverk a lektion 14 applikationslagret

Figure 24.2Client-server relationship


Datorn tverk a lektion 14 applikationslagret

Figure 24.3Connectionless iterative server


Datorn tverk a lektion 14 applikationslagret

Figure 24.4Connection-oriented concurrent server


Datorn tverk a lektion 14 applikationslagret

Figure 24.6Socket types


Datorn tverk a lektion 14 applikationslagret

Figure 24.7Socket interface for connectionless iterative server


Datorn tverk a lektion 14 applikationslagret

Figure 24.8Socket interface for connection-oriented concurrent server


Datorn tverk a lektion 14 applikationslagret

Chapter 25

DNS = DomainName System


Datorn tverk a lektion 14 applikationslagret

Figure 25.1Domain name space


Datorn tverk a lektion 14 applikationslagret

Domain Name System - DNS

En distribuerad databas som används till att koppla IP-nummer till textbaserade internetadresser.

Ex www.gb.se <-> 195.7.73.37

  • Varje sökning utgår från någon av rootservrarna som håller ordning på toppdomänerna. (.com .edu .se m fl)

  • All information rörande en domän ligger i den ”Name Server” som hanterar domänen.

  • För att lägga upp en ny domän krävs ”tillstånd” från närmast högre


Datorn tverk a lektion 14 applikationslagret

Figure 25.2Domain names and labels


Datorn tverk a lektion 14 applikationslagret

Figure 25.4Domains


Datorn tverk a lektion 14 applikationslagret

Figure 25.5Hierarchy of name servers


Datorn tverk a lektion 14 applikationslagret

Note:

A primary DNS server loads all information from the disk file; the secondary server loads all information from the primary server.


Datorn tverk a lektion 14 applikationslagret

Figure 25.7DNS in the Internet


Datorn tverk a lektion 14 applikationslagret

Table 25.1 Generic domain labels


Datorn tverk a lektion 14 applikationslagret

Table 25.2 New generic domain labels


Datorn tverk a lektion 14 applikationslagret

Figure 25.9Country domains


Datorn tverk a lektion 14 applikationslagret

Figure 25.10Inverse domain


Datorn tverk a lektion 14 applikationslagret

Figure 25.11Recursive resolution


Datorn tverk a lektion 14 applikationslagret

Figure 25.12Iterative resolution


Datorn tverk a lektion 14 applikationslagret

Figure 25.13Query and response messages


Datorn tverk a lektion 14 applikationslagret

Figure 25.14Header format


Datorn tverk a lektion 14 applikationslagret

Note:

DNS can use the services of UDP or TCP, using the well-known port 53.


Datorn tverk a lektion 14 applikationslagret

LAN Tjänster

  • Elektronisk Post via SMTP, POP eller IMAP

  • Konferenssystem via USENET News och NNTP

  • Fildelning via t.ex NFS

  • Filöverföring via t.ex FTP

  • Skrivardelning

  • World Wide Web via HTTP

  • Massutsändningar Mbone - Multicast Backbone


Datorn tverk a lektion 14 applikationslagret

Chapter 26

Internet E-mail


Datorn tverk a lektion 14 applikationslagret

Figure 26.10Email delivery



Datorn tverk a lektion 14 applikationslagret

Figure 26.1Format of an email


Datorn tverk a lektion 14 applikationslagret

Figure 26.2Email address


Datorn tverk a lektion 14 applikationslagret

Figure 26.3User agent



Datorn tverk a lektion 14 applikationslagret

Figure 26.5MIME header


Datorn tverk a lektion 14 applikationslagret

Table 26.1 Data types and subtypes in MIME


Datorn tverk a lektion 14 applikationslagret

Table 26.2 Content-transfer encoding



Datorn tverk a lektion 14 applikationslagret

Table 26.3 Base64 encoding table


Datorn tverk a lektion 14 applikationslagret

Figure 26.7Quoted-printable


Datorn tverk a lektion 14 applikationslagret

Figure 26.8Email client and server


Datorn tverk a lektion 14 applikationslagret

26.2 File Transfer

Connections

Communication

File Transfer

User Interface

Anonymous


Datorn tverk a lektion 14 applikationslagret

Note:

FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection, and the well-known port 20 is used for the data connection.



Datorn tverk a lektion 14 applikationslagret

Figure 26.13Using the control connection


Datorn tverk a lektion 14 applikationslagret

Figure 26.14Using the data connection


Datorn tverk a lektion 14 applikationslagret

Figure 26.15File transfer


Datorn tverk a lektion 14 applikationslagret

Example 1

  • Figure 26.16 (next slide) shows an example of how a file is stored.

  • The control connection is created, and several control commands and responses are exchanged.

  • Data are transferred record by record.

  • A few commands and responses are exchanged to close the connection.


Datorn tverk a lektion 14 applikationslagret

Figure 26.16Example 1


Datorn tverk a lektion 14 applikationslagret

Table 26.4 List of FTP commands in UNIX


Datorn tverk a lektion 14 applikationslagret

Example 2

We show some of the user interface commands that accomplish the same task as in Example 1. The user input is shown in boldface. As shown below, some of the commands are provided automatically by the interface. The user receives a prompt and provides only the arguments.

$ ftp challenger.atc.fhda.edu

Connected to challenger.atc.fhda.edu

220 Server ready

Name: forouzan

Password: xxxxxxx

ftp > ls /usr/user/report

200 OK

150 Opening ASCII mode

...........

...........

226 transfer complete

ftp > close

221 Goodbye

ftp > quit


Datorn tverk a lektion 14 applikationslagret

Example 3

We show an example of using anonymous FTP. We connect to internic.net, where we assume there are some public data available.

$ ftp internic.net

Connected to internic.net

220 Server ready

Name: anonymous

331 Guest login OK, send "guest" as password

Password: guest

ftp > pwd

257 '/' is current directory

ftp > ls

200 OK

150 Opening ASCII mode

bin

...

ftp > close

221 Goodbye

ftp > quit


Datorn tverk a lektion 14 applikationslagret

Chapter 27

HTTPandWWW


Datorn tverk a lektion 14 applikationslagret

Note:

HTTP uses the services of TCP on well-known port 80.


Datorn tverk a lektion 14 applikationslagret

Figure 27.1HTTP transaction


Datorn tverk a lektion 14 applikationslagret

Figure 27.9Example 1


Datorn tverk a lektion 14 applikationslagret

Example 1

This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in GIF and JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Fig. 27.9, next slide).


Datorn tverk a lektion 14 applikationslagret

Figure 27.3Request line



Datorn tverk a lektion 14 applikationslagret

Figure 27.6Status line


Datorn tverk a lektion 14 applikationslagret

Figure 27.7Header format


Datorn tverk a lektion 14 applikationslagret

Figure 27.10Example 2


Datorn tverk a lektion 14 applikationslagret

Example 2

This example retrieves information about a document. We use the HEAD method to retrieve information about an HTML document (see the next section). The request line shows the method (HEAD), URL, and HTTP version (1.1). The header is one line showing that the client can accept the document in any format (wild card). The request does not have a body. The response message contains the status line and five lines of header. The header lines define the date, server, MIME version, type of document, and length of the document (see Fig. 27.10, next slide). Note that the response message does not contain a body.


Datorn tverk a lektion 14 applikationslagret

Note:

HTTP version 1.1 specifies a persistent connection by default.


Datorn tverk a lektion 14 applikationslagret

Figure 27.12Hypertext


Datorn tverk a lektion 14 applikationslagret

Figure 27.11WWW

Hyperlinks


Datorn tverk a lektion 14 applikationslagret

Figure 27.13Browser architecture