Sunum yükleniyor. Lütfen bekleyiniz

Sunum yükleniyor. Lütfen bekleyiniz

Computer Networks and Internets, 5e By Douglas E. Comer

Benzer bir sunumlar


... konulu sunumlar: "Computer Networks and Internets, 5e By Douglas E. Comer"— Sunum transkripti:

1 Computer Networks and Internets, 5e By Douglas E. Comer
Lecture PowerPoints By Lami Kaya, © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

2 Chapter 4 Traditional Internet Applications
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

3 Topics Covered 4.1 Introduction 4.2 Application-Layer Protocols
4.3 Representation And Transfer 4.4 Web Protocols 4.5 Document Representation With HTML 4.6 Uniform Resource Locators And Hyperlinks 4.7 Web Document Transfer With HTTP 4.8 Caching In Browsers 4.9 Browser Architecture 4.10 File Transfer Protocol (FTP) 4.11 FTP Communication Paradigm 4.12 Electronic Mail 4.13 The Simple Mail Transfer Protocol (SMTP) © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

4 Topics Covered 4.14 ISPs, Mail Servers, And Mail Access
4.15 Mail Access Protocols (POP, IMAP) Representation Standards (RFC2822, MIME) 4.17 Domain Name System (DNS) 4.18 Domain Names That Begin With www 4.19 The DNS Hierarchy And Server Model 4.20 Name Resolution 4.21 Caching In DNS Servers 4.22 Types Of DNS Entries 4.23 Aliases And CNAME Resource Records 4.24 Abbreviations And The DNS 4.25 Internationalized Domain Names 4.26 Extensible Representations (XML) © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

5 4.1 Introduction The chapter
Explains that Internet services are defined by application programs Characterizes the client-server model that such programs use to interact Covers the socket API Examines of Internet applications Defines the concept of a transfer protocol Explains how applications implement transfer protocols Considers standard Internet applications Describes the transfer protocol each uses © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

6 4.1 Giriş Bu bölümde Uygulama programlarına bağlı tanımlanan internet servisleri Programların etkileşim kuracağı client-server modellerinin karakteristikleri socket API Internet uygulamalarının incelenmesi İletim protokollerinin içeriği Uygulamaların nasıl iletim protokollerini kullandığı Standart internet uygulamaları Herbirinin kullandığı transfer protokolleri © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 6 6

7 4.2 Application-Layer Protocols
Whenever a programmer creates two network applications, the programmer specifies somedetails, such as: The syntax and semantics of messages that can be exchanged Whether the client or server initiates interaction Actions to be taken if an error arises How the two sides know when to terminate communication There are two broad types of application-layer protocols that depend on the intended use: Private communication Standardized service © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

8 4.2 Uygulama-Katmanı Protocols
Bir programcı ne zaman iki ağ uygulaması oluştursa, şu detayları belirtir: Değiş tokuş yapılacak mesajın syntax ve semantics leri client ve server ın ne zaman iletişim kuracağı herhangi bir hata durumunda yapılacaklar iki tarafın ne zaman bağlantıyı bitireceği kullanıma bağlı olarak iki temel uygulama-katman protokolü vardır: Private communication (özel haberleşme) Standardized service (standartlaşmış servis) © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 8 8

9 4.2 Application-Layer Protocols
Private communication A programmer creates a pair of applications that communicate over the Internet with the intention that the pair is for private use Interaction between the two applications is straightforward code can be written without writing a formal protocol specification Standardized service Expectation is that many programmers will create server software to offer the service or client software to access the service, in this case Application protocol must be documented independent of implementation The specification must be precise and unambiguous The size of a protocol specification depends on the complexity of the service © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 9 9

10 4.2 Uygulama-Katmanı Protocols
Özek haberleşme Programcı intrnet üzerinden özel bir kullanım için birbiriyle haberleşen karşılıklı uygulama oluşturur İki uygulamanın arasındaki etkileşim anlaşılır ve kolaydır code can be written without writing a formal protocol specification Standart Servisler Pek çok programcının servis sağlayan server yazılımı veya servise ulaşmak için client yazılımı oluşturması beklenir, bu durumda Application protocol must be documented independent of implementation The specification must be precise and unambiguous Protokol tanımlamalarının boyutu servisin karmaşıklığına bağlıdır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 10 10

11 4.3 Representation And Transfer
Application-layer protocols specify two aspects of interaction: Representation Transfer Figure 4.1 (below) explains the distinction © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

12 4.3 Gösterim ve Transfer Uygulama-katman protokolleri etkileşimi iki açıdan belirtir: Representation(verinin ifade edilme biçimi) Transfer(transfer edilme biçimi) Figure 4.1 farkı açıklar © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 12 12

13 4.4 Web Protocols The World Wide Web (WWW) is one of the most widely used services in the Internet Web is complex many protocol standards have been devised to specify various aspects and details Figure 4.2 (below) illustrate major WWW standards © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

14 4.4 Web protokolleri World Wide Web (WWW) internette en çok kullanılan servistir Web komplekstir Pek çok protokol standartı, pek çok detayı belirtmek için tasarlanmıştır Figure 4.2 temel WWW standartları © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 14 14

15 4.5 Document Representation With HTML
HyperText Markup Language (HTML) is a representation standard that specifies the syntax of a web page HTML has the following general characteristics: Uses a textual representation Describes pages that contain multimedia Follows a declarative rather than procedural paradigm Provides markup specifications instead of formatting Permits a hyperlink to be embedded in an arbitrary object Allows a document to include metadata HTML allows a programmer to specify a complex web page that contains graphics, audio and video, as well as text We should have used hypermedia in the name instead of hypertext © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

16 4.5 HTML ile Döküman ifadesi
HyperText Markup Language (HTML) web sayfalarının syntax ini belirten bir standart ifade şeklidir. HTML şu genel özelliklere sahiptir: Metinsel ifadeler kullanır Multimedia içeren sayfaları tanımlar Yordamsal paradigma yerine bildirim dili takip eder. Provides markup specifications instead of formatting Gelişi güzel objelerin içine hyperlink konulmasına izin verir Bir dökümanın Metadata yı include etmesine izin verir Html programcıya grafik, ses ve video içeren kompleks web sitelerinin belirtmeye izin verir. Hypertext yerine hypermedia terimini kullanmalıyız. © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 16 16

17 4.5 Document Representation With HTML
HTML is classified as declarative It allows one to specify what is to be done, not how to do it HTML is classified as a markup language It only gives general guidelines for display and does not include detailed formatting instructions HTML allows a page to specify the level of importance of a heading HTML does not require the author to specify the exact font, typeface, point size, or spacing for the heading HTML extensions have been created that do allow the specification of an exact font, typeface, point size, and formatting. A browser chooses all display details The use of a markup language is important because it allows a browser to adapt the page to the underlying display hardware a page can be formatted for a high resolution or low resolution display, a large screen or a small hand-held device such as an iPhone or PDA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 17 17

18 4.5 HTML ile Döküman ifadesi
HTML bildirimsel olarak sınıflandırılır Ne olacağını belirtir, nasıl olacağını değil HTML markup language olarak sınıflandırılmıştır Sadece görünüm için genel kuralları verir, detaylı bir şekilde biçimlebdirme ile ilğili yöntemleri içermez. HTML bir sayfanın bir başlığının önem seviyesini belirtmesine imkan sağlar. HTML başlık için font, size ve spacing işlemlerini belirtmek amacıyla yazara ihtiyaç duymaz. HTML extensions have been created that do allow the specification of an exact font, typeface, point size, and formatting. A browser chooses all display details Markup dilinin kullanımı önemlidir because it allows a browser to adapt the page to the underlying display hardware a page can be formatted for a high resolution or low resolution display, a large screen or a small hand-held device such as an iPhone or PDA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 18 18

19 4.5 Document Representation With HTML
To specify markup HTML uses tags embedded in the document, as shown in Fig.4.3 Tags provide structure as well as formatting Tags control all display white space (i.e., extra lines and blank characters) can be inserted at any point in the HTML document without any effect on the formatted version that a browser displays HTML tags are case insensitive does not distinguish between uppercase and lowercase letters Examples: IMG tag to encode a reference to an external image Additional parameters can be specified in an IMG tag to specify the alignment of the figure with surrounding text An example is given in Fig.4.4 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 19 19

20 4.5 HTML ile Döküman ifadesi
markup belirtmek için HTML dökümanın içine gömülü tag leri kullanır, as shown in Fig.4.3 Tag ler biçim sağlama amacıyla yaplılar sağlar Tag ler bütün görünümü kontrol eder white space (i.e., extra lines and blank characters) HTML dökümanında herhangi bir noktaya eklenebilir without any effect on the formatted version that a browser displays HTML tag leri büyük küçüjk harf e duyarlı değildir does not distinguish between uppercase and lowercase letters örnek: IMG tag dışardan bir görüntüye refernas sağlar Additional parameters can be specified in an IMG tag to specify the alignment of the figure with surrounding text An example is given in Fig.4.4 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 20 20

21 4.5 Document Representation With HTML
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

22 4.6 Uniform Resource Locators And Hyperlinks
The Web uses a syntactic form known as a Uniform Resource Locator (URL) to specify a web page The general form of a URL is: where protocol is the name of the protocol used to access the document computer_name is the domain name of the computer on which the document resides port (optional) port number at which the server is listening document_name (optional) name of the document % (optional) parameters for the page Example: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

23 4.6 Uniform Resource Locators And Hyperlinks
Web bir web sitesini belirtmek için Uniform Resource Locator (URL) olarak bilinen bir söz dizimi kullanır. Bir URL nin genel biçimi: burda protocol dökümana erişim için kullanılan protokol ismi computer_name dökümanın bulunduğu bilgisayarın alan adı port (isteğe bağlı) server ın dinlediği port numarası document_name (isteğe bağlı) dökümanın adı % (isteğe bağlı) sayfa için parametreler Example: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 23 23

24 4.6 Uniform Resource Locators And Hyperlinks
In a typical URL, a user can omit many of the parts Which omits the protocol (http is assumed) the port (80 is assumed) the document name (index.html is assumed) and parameters (none are assumed) A URL contains the information a browser needs to retrieve a page Browser uses the separator characters colon, slash, and percent, to divide the URL into four components: a protocol, a computer name, a document name, and parameters Browser uses the computer name and protocol port to form a connection to the server on which the page resides Browser uses the document name and parameters to request a page © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 24 24

25 4.6 Uniform Resource Locators And Hyperlinks
URL de, bir kullanıcı pek çok kısımı çıkarabilir Çıkarılan kısımlar protokol (http is assumed) port (80 is assumed) Döküman ismi (index.html is assumed) Ve parametreler (none are assumed) Bir URL browser ın sayfayı getirmesi için gereken bilgileri içerir Browser ayıraç karakterler kullanır colon, slash, ve percent, URL yi 4 bileşene ayırmak için: a protocol, a computer name, a document name, and parameters Browser bilgisayar adını ve protokol port numarasını sayfanın bulunduğu sunucuya bir bağlantı oluşturmada kullanır Browser döküman ismi ve parametreleri sayfayı isterken kullanır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 25 25

26 4.7 Web Document Transfer With HTTP
HyperText Transfer Protocol (HTTP) is the primary transfer protocol that a browser uses to interact with a web server A browser is a client that extracts a server name from a URL and contacts the server Most URLs contain an explicit protocol reference of or omit the protocol altogether (HTTP is assumed) HTTP can be characterized as follows: Uses textual control messages Transfers binary data files Can download or upload data Incorporates caching © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

27 4.7 HTTP ile Web dökümanı transferi
HyperText Transfer Protocol (HTTP) bir browserın bir web sunucu ile etkileşim kurabildiği birincil protokoldür Bir browser aynı zamanda bir URL den server ismini çıkaran ve server ile iletişim kuran bir client dir. Pek çok URLs nin açık protokol referansını veya protokolü çıkarılmış halini içerir (HTTP varsayılandır) HTTP şu şekilde karakterize edilir: Metinsel kontrol mesajları kullanır İkilik veri dosyaları iletir Veriyi indirip yükleyebilir Cache leme mekanizmasını bünyesinde bulundurur © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 27 27

28 4.7 Web Document Transfer With HTTP
Once it establishes a connection a browser sends an HTTP request to the server Figure 4.5 (below) lists the four major request types: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 28 28

29 4.7 HTTP ile Web dökümanı transferi
İlk önce bağlantı oluşturur Tarayıcı server a bir HTTP isteğinde bulunur Figure 4.5 dört temel istek tipini listeler: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 29 29

30 4.7 Web Document Transfer With HTTP
The most common form of interaction begins with the browser requesting a page from the server The browser (client) sends a GET request over The server responds by sending a header, a blank line, and the requested document A GET request has the following form: GET /item version CRLF item gives the URL for the item being requested, version specifies a version of the protocol (HTTP/1.0 or HTTP/1.1) CRLF denotes two ASCII characters carriage return and linefeed, that are used to signify the end of a line of tex Version information is important in HTTP it allows the protocol to change and yet remain backward compatible a browser sends version information which allows a server to choose the highest version that they can both understand © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 30 30

31 4.7 HTTP ile Web dökümanı transferi
Etkileşimin en genel şekli tarayıcının server dan bir sayfayı istemesiyle başlar Tarayıcı (client) GET isteği gönderir Server bir başlık, bir boş satır ve istenilen dökümanı cevap olarak gönderir GET isteği şu biçimdedir: GET /item version CRLF item istenilen kısımın URLsi, version protokol versiyonu (HTTP/1.0 or HTTP/1.1) CRLF 2 ASCII karakteri belirtmek carriage return and linefeed, that are used to signify the end of a line of tex Versiyon bilgisi HTTP için önemlidir Protokolün değişmesine ve tekrar geriye dönük uygunluk sağlamasına izin verir Tarayıcı kendi versiyonunu gönderir Server da her iki tarafın anlayabileceği en yüksek versiyonu seçer © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 31 31

32 4.7 Web Document Transfer With HTTP
The first line of a response header contains a status code that tells the browser whether the server handled the request If the request was incorrectly formed or the requested item was not available, the status code pinpoints the problem For example, a server returns status code 404 if the requested item cannot be found When it honors a request, a server returns status code 200 Additional lines of the header give further information, such as its length when it was last modified and the content type © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 32 32

33 4.7 HTTP ile Web dökümanı transferi
Cevap başlığının ilk satırında durum kodu vardır Tarayıcıya server ın isteği yakaladığını söyler Eğer istek doğru biçimlendirilmediyse veya istekte bulunulan öğe uygun değilse, durum kodu problem bildirir For example, a server returns status code 404 if the requested item cannot be found When it honors a request, a server returns status code 200 Başlığın ek kısımları şunları bildirir Onun uzunluğunu En son nezaman modifiye edildiğini İçerik tipini © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 33 33

34 4.7 Web Document Transfer With HTTP
Figure 4.6 shows the general format of lines in a basic response header © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 34 34

35 4.7 Web Document Transfer With HTTP
Figure 4.8 shows sample output from an Apache web server The item being requested is a text file containing 16 characters (i.e., the text This is a test. plus a NEWLINE character) Although the GET request specifies HTTP version 1.0, the server runs version 1.1 The server returns 9 lines of header, a blank line, and the contents of the file © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 35 35

36 4.7 HTTP ile Web dökümanı transferi
Figure 4.8 Apache web server dan alınan örnek bir çıktıdır 16 karakter içeren bir metin istemde bulunulmuştur (i.e., the text This is a test. plus a NEWLINE character) GET isteği HTTP 1.0 olarak belirtilsede, server 1.1 de çalışır Server 9 satır başlık, boş bir satır ve dosyanın içeriğini göndermiştir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 36 36

37 4.8 Caching In Browsers Caching provides an important optimization for web access because users tend to visit the same web sites repeatedly Much of the content at a given site consists of large images Graphics Image Format (GIF) Joint Picture Encoding Group (JPEG) Such images often contain backgrounds or banners they do not change frequently A browser can reduce download times significantly by saving a copy of each image in a cache on the user's disk and using the cached copy What happens if the document on the web server changes after a browser stores a copy in its cache? How can a browser tell whether its cached copy is stale? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

38 4.8 Tarayıcılarda Önbellek(cache)
Caching web sitelerine ulaşmada önemli bir optimizasyon sağlar çünkü kullanıcılar aynı sitelere tekrar tekrar girebilirler Sitelerin içerikleri büyük boyutta görüntü dosyalarından oluşabilir Graphics Image Format (GIF) Joint Picture Encoding Group (JPEG) Bu tip görüntüler arka fon ve afiş leri içerir Sık sık değişiklik olmaz bu görüntülerde Tarayıcı indirme sayısını azaltabilir Görüntünün kopyasını kullanıcının diskine kopyalayıp, cache lenmiş kopyayı kullanarak Tarayıcı cache kopya aldıktan sonra, server daki döküman değişrise ne olur? How can a browser tell whether its cached copy is stale? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 38 38

39 4.8 Caching In Browsers Whenever a browser obtains a document from a web server, the header specifies the last time the document was changed A browser saves the Last-Modified date information along with the cached copy A browser makes a HEAD request to the server and compares the Last-Modified date of the server's copy to the Last-Modified date in the cached If the cached version is stale, the browser downloads the new version Algorithm 4.1 summarizes caching, but omits several minor details: For example, HTTP allows a web site to include a No-cache header that specifies a given item should not be cached Browsers do not cache small items because the time to download the item with a GET request is approximately the same as the time to make a HEAD request and keeping many small items in a cache can increase cache lookup times © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 39 39

40 4.8 Tarayıcılarda Önbellek(cache)
Ne zaman tarayıcı web server dan bir döküman alırsa, dökümanın son zamanının belirtildiği başlık değiştirilir. Tarayıcı son-modifiye edilen bilgisinin cache lene kopya ile saklar Tarayıcı server a HEAD isteğinde bulunur ve dökümanın son-güncelleme zamanını cache kopyalamış olunan ile karşılaştırır Eğer cache dekinin zamanı eski ise yeniden indirilir 4.1 deki algoritma cache işlemini anlatır, fakat pek çok küçük ayrıntı atlanmıştır: Örneğin: HTTP No-cache başlığının bir web sitesine konulmasına imkan sağlar ve bu sitenin cache lenmeyeceğini belirtir Tarayıcı küçük öğeleri cache lemez Çünkü, küçük öğelerin GET ile tekrar istenmesi, HEAD ile istenmesi ile yaklaşık aynı süre de gerçekleşir ve bu küçük öğelerin cache depolanması cache arama süresini artırır © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 40 40

41 4.8 Caching In Browsers

42 4.9 Browser Architecture A browser structure is complex:
A browser must understand HTTP A browser also provides support for other protocols a browser must contain client code for each of the protocols used the browser must know how to interact with a server and how to interpret responses a browser must know how to access the FTP service Figure 4.9 illustrates components that a browser © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

43 4.9 Tarayıcı Mimarisi Tarayıcı yapısı karmaşıktır:
Tarayıcı HTTP yi anlamak zorundadır Tarayıcı aynı zamanda diğer protokollere de destek sağlamalıdır Tarayıcı kullanılan her protokol için client kodunu içermelidir Tarayıcı bir server ile nasıl etkileşim kuracağını ve cevapları nasıl yorumlayacağını bilmelidir Tarayıcı FTP servisine nasıl erişmesi gerektiğini bilmelidir Figure 4.9 tarayıcının bileşenlerini göstermiştir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 43 43

44 4.9 Browser Architecture Tarayıcı Mimarisi
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

45 4.10 File Transfer Protocol (FTP)
A file is the fundamental storage abstraction A file can hold an arbitrary object (e.g., a document, spreadsheet, computer program, graphic image, or data) FTP can send a copy of a file from one computer to another provides a powerful mechanism for the exchange of data File transfer across the Internet is complicated because computers are heterogeneous. Each computer system may have a different: file representations type information naming file access mechanisms © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

46 4.10 File Transfer Protocol (FTP)
Bir dosya temel depolama birimidir. (fundamental storage abstraction) Bir dosya rasgele nesneleri taşıyabilir (e.g., a document, spreadsheet, computer program, graphic image, or data) FTP bir dosyanın kopyasının bir bilgisayardan diğerine gönderilmesini sağlayan güçlü bir dosya paylaşım mekanizmasıdır Internet üzerinden dosya transferi bilgisayarların heterojen olmasından dolayı karmaşık bir işlemdir Her bilgisayar sistemi farklı : Dosya gösterimine Tip bilgisine isimleme Dosya erişim mekanizmasına sahiptir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 46 46

47 4.10 File Transfer Protocol (FTP)
On some OS, the extension .jpg is used for a JPEG image, and on others, the extension is .jpeg On some OS, each line in a text file is terminated by a single LINEFEED character On some OS may require CARRIAGE RETURN and LINEFEED Some OS use slash (/) as a separator in file names, and others use a backslash (\) An OS may define a set of user accounts that are each given the right to access certain files the account information differs among computers, so user X on one computer is not the same as user X on another © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

48 4.10 File Transfer Protocol (FTP)
Bazı OS de , uzantılar JPEG görüntü için .jpg dir. Bazılarında ise .jpeg olur Bazı OS de, metin dosaysının her satırı satırbesleme (LINEFEED) karakteri ile bitirilir Bazılarında CARRIAGE RETURN ve LINEFEED gerekir Bazı OS ler (/) slash karakterini dosya isimlerinin ayıraç olarak olarak kullanır, bazıları (\) backslash karakterini kullanır Bir OS kullanıcı hesaplarının herbirine bazı dosyalara erişim hakkı verebilir Hesap bilgisi bilgisayarlar arasında değişir, bir bilgisayardaki X kullancıısı, başkabir bilgisayarda aynı X olmayabilir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 48 48

49 4.10 File Transfer Protocol (FTP)
FTP can be characterized as: Arbitrary File Contents (can transfer any type of data) Bidirectional Transfer (download or upload) Support For Authentication And Ownership FTP allows each file to have ownership and access restrictions Ability To Browse Folders Textual Control Messages The control messages are sent as ASCII text Accommodates Heterogeneity FTP hides the details of individual computer OS Mostly FTP protocol is invisible FTP is invoked automatically by a browser when a user requests a file download © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

50 4.10 File Transfer Protocol (FTP)
FTP şu şekilde karakterize edilir: Rasgele dosya içeriği (herhangi bir tipte dosyayı transfer edebilir) İki yönlü transfer (download or upload) Kimlik doğrulama ve sahipliliği destekler FTP her dosyanın bir sahibibinin olmasını ve erişimine kısıtların olmasına imkan sağlar klasörlerin taranmasını sağlar Metinsel kontrol mesajları Kontrol mesajları ASCII metini olarak gönderilir Accommodates Heterogeneity FTP bireysel bilgisayar OS lerinin detaylarını saklar Genellikle FTP protokolü görünmezdir(gizli) Kullanıcı bir dosya indirme isteğinde bulununca, FTP tarayıcı tarfından otomatik çalıştırılır. © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 50 50

51 4.11 FTP Communication Paradigm
FTP employs the way a client and server interact: a client establishes a connection to an FTP server and sends a series of requests to which the server responds an FTP server does not send responses over the same connection on which the client sends requests Instead, the original connection the client creates, called a control connection, is reserved for commands Each time the server needs to download or upload a file, the server opens a new connection To distinguish them from the control connection, the connections used to transfer files are called data connections FTP inverts the client-server relationship for data connections Figure 4.10 illustrates the interaction © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

52 4.11 FTP Haberleşme Paradigması
FTP employs the way a client and server interact: Client FTP server a bir bağlantı oluşturur ve server ın cevap vereceği istekler gönderir FTP server client ın istek gönderdiği aynı bağlantıdan cevaplarını göndermez Instead, the original connection the client creates, called a control connection, is reserved for commands Server her dosya download veya upload işlemi için, server yeni bir bağlantı açar To distinguish them from the control connection, the connections used to transfer files are called data connections FTP client-server işlemini veri haberleşmesine dönüştürmüştür Figure 4.10 illustrates the interaction © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 52 52

53 Figure 4.10 Illustration of FTP connections during a typical session
Tipik bir oturum süresince, FTP bağlantısı © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

54 4.11 FTP Communication Paradigm
 Figure 4.10 omits several important details For example, after creating the control connection, a client must log into the server provides a USER command that the client sends to provide a login name, provides a PASS command that the client sends to provide a password The server sends a numeric status response over the control connection to let the client know whether the login was successful. A client can only send other commands after a login is successful When accessing public files, a client uses anonymous login which consists of user name anonymous and password mostly guest What protocol port number should a server specify when connecting to the client? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

55 4.11 FTP Haberleşme Paradigması
 Figure 4.10 pek çok önemli kısmı çıkarmıştır Örneğin; kontrol bağlantısı oluştuktan sonra, client server a log olmalıdır provides a USER command that the client sends to provide a login name, provides a PASS command that the client sends to provide a password Server client ın login işleminin başarılı olduğunu bilmesi amacıyla kontrol bağlantısı üzerinden numarasal bir durum cevabı gönderir. A client can only send other commands after a login is successful Public dosyalara ulaşıldığında, client izimsiz login işlemi kullanır Kullanıcı ismi anonymous ve şifresi genellikle guest Client e bağlanırken, server için hangi port numarası belirtilmelidir? © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 55 55

56 4.11 FTP Communication Paradigm
A client allocates a protocol port on its local OS and sends the port number to the server That is, the client binds to the port to await a connection Then transmits a PORT command over the control connection to inform the server about the port number being used Algorithm 4.2 summarizes the steps FTP protocol may face problems in certain cases: transmission of a protocol port number will fail if one of the two endpoints lies behind a Network Address Translation (NAT) device, such as a wireless router used in a residence or small office Chapter 23 explains that FTP is an exception to support FTP, a NAT device recognizes an FTP control connection, inspects the contents of the connection, and rewrites the values in a PORT command © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

57 4.11 FTP Haberleşme Paradigması
Client kendi local OS de bir protokol port numarası tahsis eder ve port numarası bilgisini server a gönderir Client port numarasını beklenen bağlantıya bağlar Sonrasında, kontrol bağlantısı üzerinden server ı kullanılan port bilgisini hakkında bilgilendirmek için bir PORT komutu aktarır. Algorithm 4.2 basamakları özetler FTP protocol şu durumlarda problemle karşılaşır: İletim protokolünün port numarası uç noktaların herhangi birinin bir Network Address Translation (NAT) aracının arkasında bulunması durumunda bozulur.örneğin; a wireless router used in a residence or small office Chapter 23 explains that FTP is an exception to support FTP, a NAT device recognizes an FTP control connection, inspects the contents of the connection, and rewrites the values in a PORT command © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 57 57

58 © 2009 Pearson Education Inc. , Upper Saddle River, NJ
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

59 4.12 Electronic Mail One of the most widely used Internet applications
Figure 4.11 illustrates the architecture of electronic software is divided into two conceptually pieces: An interface application A mechanism for a user to compose and edit outgoing messages as well as read and process incoming A mail transfer program acts as a client to send a message to the mail server on the destination computer; the mail server accepts incoming messages and deposits each in the appropriate user's mailbox  Algorithm 4.3 lists the steps taken to send an © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

60 4.12 Electronic Mail En fazla kullanılan bir diğer Internet uygulaması
Figure 4.11 electronic mimarisini gösterir yazılımı iki parçaya ayrılır: arayüz uygulaması (interface application) A mechanism for a user to compose and edit outgoing messages as well as read and process incoming Mail iletim programı (transfer program) acts as a client to send a message to the mail server on the destination computer; the mail server accepts incoming messages and deposits each in the appropriate user's mailbox  Algorithm 4.3 mail gönderme işleminin basamakları © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 60 60

61 4.12 Electronic Mail © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

62 © 2009 Pearson Education Inc. , Upper Saddle River, NJ
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

63 4.12 Electronic Mail The specifications used for Internet can be divided into three broad categories as Figure 4.12 lists © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

64 4.13 The Simple Mail Transfer Protocol (SMTP)
The Simple Mail Transfer Protocol (SMTP) is the standard protocol that a mail transfer program uses SMTP can be characterized as: Follows a stream paradigm Uses textual control messages Only transfers text messages Allows a sender to specify recipients’ names and check each name Sends one copy of a given message SMTP has a restriction to send only textual content MIME standard that allows to include attachments such as graphic images or binary files SMTP can send a single message to multiple recipients The protocol allows a client to list users and then send a single copy of a message for all users on the list © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

65 4.13 The Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP) mail transferi için kullanılan standart protokoldür SMTP şu şekilde karakterize edilir: stream paradigm takip eder Metinsel kontrol mesajları kullanır Sadece metin mesajlarını iletir Gönderenin alıcının ismini belitrmesine ve her ismi kontrol etmesine izin verir Verilen mesajın bir kopyasını gönderir SMTP sadece metinsel içerikleri gönderme kısıtlaması vardır MIME standartı attachment içeren mailleri göndermede kullanılır SMTP bir mesajı birden fazla alıcıya gönderebilir Bütün kullanıcıları listeleme ve sonra bir mesaj kopyasını listedeki bütün kullanıcılara göndermeye imkan sağlar © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 65 65

66 © 2009 Pearson Education Inc. , Upper Saddle River, NJ
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

67 4.14 ISPs, Mail Servers, And Mail Access
Most users leave their computer running continuously and do not know how to configure and manage an server ISPs began offering services An ISP runs an server and provides a mailbox for each user each ISP provides interface that allows a user to access their mailbox Figure 4.14 illustrates the arrangement access follows one of two forms: A special-purpose interface application A web browser that accesses an web page © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

68 4.14 ISPs, Mail Servers, ve Mail Erişimi
Pek çok kullanıcı devamlı bilgisayarlarını çalışır durumda bırakır ve nasıl konfigure edileceğini server larını nasıl kontrol edeceklerini bilmez ISPs servisleri sunmaya başladı Bir ISP emial server çalıştırır ve her kullanıcı için mail kutusu sağlar each ISP provides interface that allows a user to access their mailbox Figure 4.14 illustrates the arrangement erişimi iki yöntemi takip eder: Özel-amaçlı arayüz uygulamsı Bir web sitesine erişim sağlayan tarayıcı © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 68 68

69 4.14 ISPs, Mail Servers, And Mail Access
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

70 4.14 ISPs, Mail Servers, And Mail Access
The web browser approach is straightforward: an ISP provides a special web page that displays messages from a user's mailbox The chief advantage of using a web page for ability to read from any computer a user does not need to run a special mail interface application Using a special mail application can download an entire mailbox onto a local computer, such as a laptop when connected to the Internet, a user can run an program that downloads an entire mailbox onto the laptop the user can then process when the laptop is disconnected from the Internet (e.g., while on an airplane). once Internet connectivity is regained, it communicates with the server at the ISP to upload the user has created and download any new © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

71 4.14 ISPs, Mail Servers, ve Mail Erişimi
Web tarayıcı yaklaşımı basit ve kolaydır: Bir ISP kullanıcının mail kutusundan mesajlarını gösterdiği bir web sitesi sağlar Web sitesi kullanmanın avantajı herhangi bir bilgisayardan maillerin okunabilmesi Bir kullanıcı özel bir mail uygulama arayüzüne ihtiyaç duymaz Özel mail uygulamsı kullanmak, bütün mail kutusunu local bilgisayarınıza indirir mesela nootbook İnternete bağlanıldığında, kullanıcı bütün mail kutusunu kendi bilgisaayrına indirmek için programını çalıştırabilir Kullanıcı sonrasında internet olmadığında lerine bakabilir (e.g., while on an airplane). İnternet bağlantısı yeniden sağlandığında, oluşturduğu veya indirdiği yeni mailleri ISP deki server ile haberleşerek yeniden upload edebilir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 71 71

72 4.15 Mail Access Protocols (POP, IMAP)
Protocols have been created that provide access An access protocol is distinct from a transfer protocol access only involves a single user interacting with a single mailbox transfer protocols allow a user to send mail to other users Access protocols have the following characteristics: Provide access to a user’s mailbox Permit a user to view headers, download, delete, or send messages Client runs on user’s personal computer Server runs on a computer that stores user’s mailbox View a list of messages without downloading the message contents is useful Especially in cases where the link between two parties is slow For example, a user browsing on a cell phone may look at headers and delete spam without waiting to download the message contents © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

73 4.15 Mail Access Protocols (POP, IMAP)
Protocol ler erişimi amacıyla oluşturulmuştur Bir access protocol ü transfer protocol den farklıdır access sadece bir kullancının bir mail kutusu ile etkileşimidir transfer protokolleri bir kullanıcının diğer kullanıcılara mail göndermesini sağlar Access protocol leri şu karakteristiklere sahiptir: Kullanıcının mail kutusuna erişim sağlar Kullancının başlıkları görmesine, mesajları silmesine, indirmesine ve göndermesine izin verir Client kullancının kişisel bilgisayarında çalışır Server kullancıının mail kutusunu depolayan bilgisayarda çalışır Mesajın içeriğinin indirilmeden mesajların listelerinin görünmesi önemli değildir Especially in cases where the link between two parties is slow For example, a user browsing on a cell phone may look at headers and delete spam without waiting to download the message contents © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 73 73

74 4.15 Mail Access Protocols (POP, IMAP)
A variety of mechanisms available for access: Some ISPs provide free access software to their subscribers In addition, two standard access protocols have been created Figure 4.15 (below) lists the standard protocol names Two protocols differ in many details: In particular, each provides its own authentication mechanism that a user follows to identify themselves © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

75 4.15 Mail Access Protocols (POP, IMAP)
Emial erişimi için farklı mekanizmalar vardır: Bası ISPs bedava erişimi sağlarlar Ek olarak, iki stanadart erişim protokolü üretilmiştir Figure 4.15 (below) standart protokol isimleri İki protokol bazı detaylar bakımından farklıdır: Herbirisi kullanıcıların kendilerini tanıtmaları için, kendi kimlik doğrulama mekanizmasına sahiptir. © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 75 75

76 4.16 Email Representation Standards (RFC2822, MIME)
Two important representation standards exist: RFC (Request For Comments) 2822 Mail Message Format Multi-purpose Internet Mail Extensions (MIME) RFC 2822 Mail Message Format: takes its name from the IETF standards document RFC 2822 a mail message is represented as a text file and consists of a header section a blank line and a body Header lines each have the form: Keyword: information where the set of keywords is defined to include From:, To:, Subject:, Cc: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

77 4.16 Email gösterim standartları (RFC2822, MIME)
İki önemli gösterim standartı vardır: RFC (Request For Comments) 2822 Mail Message Format Multi-purpose Internet Mail Extensions (MIME) RFC 2822 Mail Message Format: İsmini IETF standartlarının döküman RFC 2822 den alır mail mesajı bir test doyası şeklinde gösterilir ve bunları kapsar Bir başlık kısımı Bir boş satır Ve bir gövde kısımı Başlık satırlarının herbiri şu forma sahiptir: Keyword: information where the set of keywords is defined to include From:, To:, Subject:, Cc: © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 77 77

78 4.16 Email Representation Standards (RFC2822, MIME)
Multi-purpose Internet Mail Extensions (MIME) The MIME standard extends the functionality of to allow the transfer of non-text data in a message MIME specifies how a binary file can be encoded into printable characters, included in a message, and decoded by the receiver  The Base64 encoding standard is most popular, but MIME does not restrict encoding to a specific form MIME permits a sender/receiver to choose a convenient encoding the sender includes additional lines in the header to specify encoding used MIME allows a sender to divide a message into several parts and to specify an encoding for each part independently a user can send a plain text message and attach a graphic image, a spreadsheet, and an audio clip, each with their own encoding © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

79 4.16 Email gösterim standartları (RFC2822, MIME)
Multi-purpose Internet Mail Extensions (MIME) MIME standartı mesajda metin olmayan kısımların gönderilmesinden sorumludur MIME mesajın içinde yeralan ikilik dosyaların nasıl yazdırılabilecek karakterlere şifreleneceğinin belirtir ve alıca tarafındanda şifresi çözülen  Base64 encoding standartı en popüler olanıdır, fakat MIME enkod lama işlemini belirli bir form için kıstlamaz MIME permits a sender/receiver to choose a convenient encoding the sender includes additional lines in the header to specify encoding used MIME gönderenin mesajı pek çok parçaya ayırmasını sağlar ve her parçayı bağımsız şekilde enkolamayı belirtir a user can send a plain text message and attach a graphic image, a spreadsheet, and an audio clip, each with their own encoding © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 79 79

80 4.16 Email Representation Standards (RFC2822, MIME)
MIME adds two lines to an header one to declare that MIME has been used to create the message and another to specify how MIME information is included in the body For example, the header lines: MIME-Version: 1.0 Content-Type: Multipart/Mixed; Boundary=Mime_separator Mime_separator will appear in the message body before each part When MIME is used to send a standard text message Content-Type: text/plain MIME is backward compatible with systems that do not understand the MIME standard or encoding such systems have no way of extracting non-text attachments they treat the body as a single block of text © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

81 4.16 Email gösterim standartları (RFC2822, MIME)
MIME başlığına iki satır ekler Mesajın oluşturulmasında MIME kullanıdığını belirtmek için bir satır Ve diğeri gövde kısmında bulunan MIME bilgisinin nasıl belirtildiği örnek, başlık satırları: MIME-Version: 1.0 Content-Type: Multipart/Mixed; Boundary=Mime_separator Mime_separator will appear in the message body before each part MIME bir satandart metin mesajı gönderirken kullanıldığında Content-Type: text/plain MIME (backward compatible) MIME standartını anlamayan bir emial sistemiyle geçmişle bağdaşır bir sistemdir.??? Böyle bir sistem metin olmayan attacment ları açamaz Bir mesaj gövdesini bir metin bloğu olarak bilir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 81 81

82 4.17 Domain Name System (DNS)
DNS provides a service that maps human-readable symbolic names to computer addresses Browsers, mail software, and most other Internet applications use the DNS It provides an interesting example of client-server interaction The mapping is not performed by a single server The naming information is distributed among a large set of servers located at sites across the Internet Whenever an application needs to translate a name the application becomes a client of the naming system the client sends a request message to a name server server finds the corresponding address and sends a reply message if it cannot answer a request, a name server temporarily becomes the client of another name server, until a server is found that can answer the request © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

83 4.17 Domain Name System (DNS)
DNS insanın okuyabileceği sembolik isimleri bilgisayar adresine işaret eden bir servisi sağlayıcıdır Tarayıcılar, mail yazılımları ve en popüler internet uygulamaları DNS kullanır İlginç bir Client server etkileşimi sağlar. İşaretleme sadece bir server tarafından olmaz İsim bilgisi internet boyunca büyük server kümeleri arasında dağılmıştır Ne zaman bir uygulama bir isimi çevirmek istese Uygulama isim sisteminin client ı olur Client isim server a istek mesajı gönderir Server ilişkili adresi bulur ve cevap mesajı olarak gönderir if it cannot answer a request, a name server temporarily becomes the client of another name server, until a server is found that can answer the request © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 83 83

84 4.17 Domain Name System (DNS)
Syntactically, each name consists of a sequence of alpha-numeric segments separated by periods For example, a computer in the Computer Science Department at Purdue University has the domain name: mordred.cs.purdue.edu A computer at Cisco, Incorporated has the domain name: anakin.cisco.com Domain names are hierarchical, with the most significant part of the name on the right The left-most segment of a name (mordred and anakin in the examples) is the name of an individual computer Other segments in a domain name identify the group that owns it For example, the segment purdue gives the name of a university, and cisco gives the name of a company © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 84 84

85 4.17 Domain Name System (DNS)
Söz dizimi olarak, her isim alpha-numeric segmentler halinde noktalar tarfından ayrılmış şekilde dizilerdir Örneğin, Purdue üniversitesidneki, bilgisayar bilimleri bölümğndeki bir bilgisayarın alan adı: mordred.cs.purdue.edu Cisco daki bilgisayar: anakin.cisco.com Alan adları hiyerarşiktir,en önemli kısımları sağ da olur En soldaki isim is bilgisayarın ismidir (mordred and anakin in the examples) Diğer segment ler grupları belirtir Örneğin purdue üniversite ismini, cisco firma ismini belirtir © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 85 85

86 4.17 Domain Name System (DNS)
DNS does not specify the number of segments in a name DNS does specify values for the most significant segment, which is called a top-level domain (TLD) Controlled by the Internet Corporation for Assigned Names and Numbers (ICANN) ICANN designates one or more domain registrars to administer a given top-level domain and approve specific names Some TLDs are generic, means they are generally available Other TLDs are restricted to specific groups or government agencies Figure 4.16 lists example top-level DNS domains An organization applies for a name under one of the existing top-level domains most US corporations choose to register under the com domain DNS allows organizations to use a geographic registration For example, the Corporation For National Research Initiatives registered the domain: cnri.reston.va.us © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 86 86

87 4.17 Domain Name System (DNS)
DNS isimdeki segment sayısını belirtmez DNS en önemli segmentin değerini belirtir ki buna top-level domain (TLD) denir Internet Corporation for Assigned Names and Numbers (ICANN) tarfından kontrol edilir ICANN verilen bir top-level domaini yönetmek için bir veya daha fazla domain registrar görevlendirir. Bazı TLDs kapsamlıdır, yani bunlar genellikle kullanılır durumdadır Other TLDs are restricted to specific groups or government agencies Figure 4.16 top-level DNS domain lerinin örneğidir Bir organizasyon mevcut bir top-level dmain altında bir isim uygulaaybilir Pek çok US birliktelkleri com domain altında kaydolmuştur DNS organizasyonların coğrafi kayıtları yapmasına izin verir Örneğin; Corporation For National Research Initiatives şu domain ile kayıtlıdır: cnri.reston.va.us © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 87 87

88 Figure 4.16 Example top-level domains and the group to which each is assigned
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

89 4.18 Domain Names That Begin With www
Many organizations assign domain names that reflect the service a computer provides For example, a computer that runs a server for FTP might be named: ftp.foobar.com Similarly, a computer that runs a web server, might be named: Such names are mnemonic, but are not required The use of www to name computers that run a web server is merely a convention an arbitrary computer can run a web server, even if the computer's domain name does not contain www a computer that has a domain name beginning with www is not required to run a web server © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

90 4.19 The DNS Hierarchy And Server Model
Each organization is free to choose the details of its servers For example, a small organization that only has a few computers can contract with an ISP to run a DNS server. An organization that runs its own server can choose to place all names for the organization in a single physical server, or it can choose to divide its names among multiple servers For example, Figure 4.17 illustrates how the hypothetical Foobar Corporation might choose to structure servers if the corporation had a candy division and a soap division © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

91 4.19 The DNS Hierarchy And Server Model
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

92 4.19 The DNS Hierarchy And Server Model
DNS is designed to allow each organization to assign names to computers or to change those names without informing a central authority To achieve autonomy, each organization is permitted to operate DNS servers for its part of the hierarchy Purdue University operates a server for names ending in purdue.edu IBM Corporation operates a server for names ending in ibm.com Each DNS server contains information that links the server to other domain name servers up and down the hierarchy a given server can be replicated, such that multiple physical copies of the server exist Replication is useful for heavily used servers, such as root servers that provide information about top-level domains administrators must guarantee that all copies are coordinated so they provide exactly the same information © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 92 92

93 4.19 The DNS Hierarchy And Server Model
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 93 93

94 4.20 Name Resolution The translation of a domain name into an address is called name resolution and the name is said to be resolved to an address Software to perform the translation is known as a name resolver (or simply resolver) In the socket API, for example, the resolver is invoked by calling function gethostbyname The resolver becomes a client by contacting a DNS server DNS server returns an answer to the caller Each resolver is configured with the address of one or more local domain name servers The resolver forms a DNS request message sends the message to the local server waits for the server to send a DNS reply message for the answer © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

95 4.20 Name Resolution A resolver can choose to use either the stream or message paradigm when communicating with a DNS server most resolvers are configured to use a message paradigm because it imposes less overhead for a small request Figure 4.17a illustrates, and assume a computer in the soap division generates a request for name chocolate.candy.foobar.com The resolver will be configured to send the request to the local DNS server (i.e., the server for foobar.com) Although it cannot answer the request the server knows to contact the server for candy.foobar.com, which can generate an answer © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 95 95

96 4.21 Caching In DNS Servers The locality of reference principle that forms the basis for caching applies to the Domain Name System in two ways: Spatial: A user tends to look up the names of local computers more often than the names of remote computers Temporal: A user tends to look up the same set of domain names repeatedly DNS exploits spatial locality a name resolver contacts a local server first To exploit temporal locality a DNS server caches all lookups Algorithm 4.4 summarizes the process © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

97 4.21 Caching In DNS Servers According to the algorithm, when a request arrives for a name outside the set for which the server is an authority further client-server interaction results The server temporarily becomes a client of another name server When the other server returns an answer the original server caches the answer and sends a copy of the answer back to the resolver from which the request arrived In addition to knowing the address of all servers down the hierarchy each DNS server must know the address of a root server How long items should be cached? if an item is cached too long, the item will become stale DNS specify a cache timeout for each item © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 97 97

98

99 4.22 Types Of DNS Entries Each entry in a DNS database consists of three items: a domain name a record type The record type specifies how the value is to be interpreted a value A query sent to a DNS server specifies both a domain name and a type the server only returns a binding that matches the type of the query The principal type maps a domain name to an IP address DNS classifies such bindings as type A, type A lookup is used by applications such as FTP, ping, or a browser DNS supports several other types, including type MX that specifies a Mail eXchanger when it looks up the name in an address, SMTP uses type MX © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

100 4.22 Types Of DNS Entries Each entry in a DNS server has a type
When a resolver looks up a name the resolver specifies the type that is desired the DNS server returns only entries that match the specified type The DNS type system can produce unexpected results because the address returned can depend on the type For example, a corporation may decide to use the name corporation.com for both web and services It is possible for the corporation to divide the workload between separate computers by mapping type A lookups to one computer and type MX lookups to another © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 100 100

101 4.23 Aliases And CNAME Resource Records
The DNS offers a CNAME it is analogous to a symbolic link in a file system the entry provides an alias for another DNS entry aliases can be useful, suppose Foobar Corporation has two computers, named as: hobbes.foobar.com and calvin.foobar.com Suppose that foobar decides to run a web server on computer hobbes, and wants to follow the convention of using the name www Organization could choose to rename computer hobbes A much easier solution exists: the organization can create a CNAME entry for that points to hobbes Whenever a resolver sends a request for the server returns the address of computer hobbes © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

102 4.23 Aliases And CNAME Resource Records
The use of aliases is especially convenient it permits an organization to change the computer used for a particular service without changing the names or addresses: For example, Foobar Corporation can move its web service from hobbes  calvin changing the CNAME record in the DNS server the two computers retain their original names and IP addresses The use of aliases also allows an organization to associate multiple aliases with a single computer Thus, Foobar corporation can run an FTP server and a web server on the same computer, and can create CNAME records: ftp.foobar.com © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 102 102

103 4.24 Abbreviations And The DNS
DNS does not incorporate abbreviations a server only responds to a full name Most resolvers can be configured with a set of suffixes that allow a user to abbreviate names For example, each resolver at Foobar Corporation might be programmed to look up a name twice: once with no change and once with the suffix foobar.com appended If a user enters a full domain name the local server will return the address, and processing will proceed If a user enters an abbreviated name it will first try to resolve the name and will receive an error because no such name exists then it will try appending a suffix and looking up the resulting name © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

104 4.25 Internationalized Domain Names
DNS uses the ASCII character set Languages such as Russian, Greek, Chinese, and Japanese each contain characters for which no ASCII representation exists Many European languages use diacritical marks that cannot be represented in ASCII IETF debated modifications and extensions of the DNS to accommodate international domain names After considering many proposals, the IETF chose an approach known as Internationalizing Domain Names in Applications (IDNA) IDNA uses ASCII to store all names If a domain name contains a non-ASCII character IDNA translates the name into a sequence of ASCII characters and stores the result in the DNS © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

105 4.25 Internationalized Domain Names
IDNA relies on applications to translate between the international character set and the internal ASCII form used The rules for translating international domain names are complex and use Unicode The latest versions of the widely-used browsers, such as Firefox and Internet Explorer, can accept and display non-ASCII domain names because they each implement IDNA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 105 105

106 4.26 Extensible Representations (XML)
The traditional application protocols covered in this chapter each employ a fixed representation Application protocol specifies an exact set of messages The chief disadvantage of a fixed approach arises from the difficulty involved in making changes For example, because standards restrict message content to text, a major change was needed to add MIME extensions The alternative to a fixed representation is an extensible system that allows a sender to specify the format of data One standard for extensible representation has become widely accepted: the Extensible Markup Language (XML) XML resembles HTML in the sense that both languages embed tags into a text document © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.

107 4.26 Extensible Representations (XML)
Unlike HTML, the tags in XML are not specified a priori and do not correspond to formatting commands XML describes the structure of data and provides names for each field Tags in XML are well-balanced each occurrence of a tag <X> must be followed by an occurrence of </X> XML does not assign any meaning to tags tag names can be created as needed tag names can be selected to make data easy to parse or access © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 107 107

108 4.26 Extensible Representations (XML)
For example, if two companies agree to exchange corporate telephone directories they can define an XML format that has data items such as an employee's name, phone number, and office they can choose to further divide a name into a last and a first name Figure 4.18 (below) contains an example © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 108 108


"Computer Networks and Internets, 5e By Douglas E. Comer" indir ppt

Benzer bir sunumlar


Google Reklamları