Sunum yükleniyor. Lütfen bekleyiniz

Sunum yükleniyor. Lütfen bekleyiniz

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

Benzer bir sunumlar


... konulu sunumlar: "© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints."— Sunum transkripti:

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

2 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.2 Chapter 25 UDP: Datagram Transport Service

3 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.3 Topics Covered 25.1 Introduction 25.2 Transport Protocols And End-To-End Communication 25.3 The User Datagram Protocol 25.4 The Connectionless Paradigm 25.5 Message-Oriented Interface 25.6 UDP Communication Semantics 25.7 Modes Of Interaction And Broadcast Delivery 25.8 Endpoint Identification With Protocol Port Numbers 25.9 UDP Datagram Format 25.10 The UDP Checksum And The Pseudo Header 25.11 UDP Encapsulation

4 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.4 25.2 Transport Protocols And End-To- End Communication IP cannot distinguish among multiple application programs running on a given host –If a user runs an email application and a web browser at the same time or runs multiple copies of a given application they must be able to communicate independently From IP's point of view, the source and destination fields in a datagram identify a host –IP does not contain additional bits to identify an application on the host –We say that IP treats a computer as an endpoint of communication Transport-layer protocols are known as end-to-end protocols –a transport protocol allows an application to be an endpoint of communication TCP/IP placed end-to-end protocols in Layer 4

5 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.5 25.2 Transport Protocols And End-To- End Communication IP host üzerinde çalışan birçok uygulama programlarını ayırt edemez –Eğer kullanıcı e-mail uygululaması ile web browser’ı aynı anda çılıştırır yada bu programları kopyasını birden çok çalıştırır ise Bunların hepsi birbirlerinden bağımsız iletişime geçmek zorundadırlar IP bakış açısı ile, datagram’ın kaynak ve hedef alanları host’u tanımlar –IP host üzerinde çalışan uygulamaları belirtecek bitler, IP içerisinde bulunmaz –IP bilgisayarlara uç iletişim gibi davrandığını söyleyebiliriz Transport-layer protokolleri end-to-end protokoller olarak bilinir –transport protokol uygulamaların uç noktalarla iletişime geçebiliyor TCP/IP end-to-end protokollerinde 4. seviyede bulunmaktadır

6 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.6 25.3 The User Datagram Protocol TCP/IP suite contains two transport protocols –User Datagram Protocol (UDP) –Transmission Control Protocol (TCP) They differ in the service they offer to applications UDP is less complex and easy to understand UDP can be characterized as: End-to-end –UDP can distinguish among multiple applications running on a given computer Connectionless Message-oriented –UDP sends and receives individual messages

7 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.7 25.3 The User Datagram Protocol TCP/IP iki transport protokolü içerir –User Datagram Protocol (UDP) –Transmission Control Protocol (TCP) Uygulamalara sağlamış oldukları servis yönünden ayrışırlar UDP anlaşılması daha kolay ve daha az komplekstir UDP şu şekilde de kategorize edilebilir: End-to-end –UDP aynı bilgisayar üzerinde çalışan bir çok uygulamayı birbirinden ayırt etmez Connectionless (Bağlantısız) Message-oriented (Mesaj tabanlı) –UDP kişisel mesajlar gönderip alırlar

8 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.8 25.3 The User Datagram Protocol Best-effort Delivery –It offers applications the same best-effort delivery semantics as IP Arbitrary Interaction –UDP allows an application to send to many other applications receive from many other applications or communicate with exactly one other application Operating System Independent –UDP provides a means of identifying application programs –It does not depend on identifiers used by the local OS UDP is sometimes characterized as a thin protocol layer

9 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.9 25.3 The User Datagram Protocol Best-effort iletim –Uygulamalara IP semantiğinden bulunan aynı best-effort trafiği sunar Gelişigüzel Etkileşim –UDP uygulamardan şunları kabul ediyor Diğer bir sürü uygulamaya veri iletimi Diğer bütün bilgisayarlardan veri alımı Yada tam olarak bir uygulamadan veri iletimi İşletim sisteminden bağımsız –UDP provides a means of identifying application programs –It does not depend on identifiers used by the local OS UDP baze ince protokol katmanı olarak ta sınıflandırılabilir

10 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.10 25.4 The Connectionless Paradigm UDP bağlantısız (connectionless ) iletişim paradigmasını kullanır –Şu manaya geliyor, UDP’yi kullanan programlar veri göndermeden önce iletişim kurmalarına gerek yok (TCP deki 3 handshake) –Uygulama herhangi bir zamanda veri üretebilir ve gönderebilir –UDP iki mesaj arasında gelişigüzel iletim arasında gecikme gelişigüzel olabilir UDP durum’u (o esnadaki) korumaz UDP kontrol mesajlarını kullanmaz –İletimde sadece veri mesajlarının kendileri bulunur UDP oldukça küçük overhead’i vardır

11 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.11 25.5 Message-Oriented Interface UDP offers applications a message-oriented interface Each time an application requests that UDP send data –UDP places the data in a single message for transmission –UDP does not divide a message into multiple packets –UDP does not combine messages for delivery Message-oriented interface has several consequences: –On the positive side applications preserve data boundaries –each message will be exactly the same as was transmitted –On the negative side each UDP message must fit into a single IP datagram

12 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.12 25.5 Message-Oriented Interface UDP uygulamalara mesaj tabanlı arayüz sunmaktadır Her seferinde uygulam istekte bulunur ve böylelikle UDP veri iletimi yapar –UDP göndereceği veriyi tek bir paketin içerisine koyar –UDP mesajı paketlere bölmez –UDP mesajları iletim için birleştirmez Mesaj-Tabanlı arayüz bir çok sonuçları vardır: –Pozitif yönü Uygulamalar veri sınırlarını korur –each message will be exactly the same as was transmitted –On the negative side –Negatif yönü Her UDP mesajı tek bir IP datagram’ın içerisine sığmak zorunda

13 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.13 25.5 Message-Oriented Interface IP datagram size forms an absolute limit on the size UDP message size can lead to inefficient use of the network If an application sends extremely small messages –datagrams will have a large ratio of header octets to data octets If an application sends extremely large messages –Datagrams may be larger than the network MTU –Datagrams will be fragmented by IP An application programmer can achieve higher efficiency by using large transfers –With UDP, however, sending large messages leads to less efficiency because large messages cause fragmentation

14 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.14 25.5 Message-Oriented Interface IP datagram büyüklüğü mutlak büyüklü limitindedir UDP mesaj büyüklüğü ağ kullanımı açısından faydasız olabilir Eğer uygulama olduğkça küçük paketler gönderirse –Datagramlar da toplam verinin içerisindeki başlık verisinin oranı büyük olur Eğer uygulama oldukça büyük paketler gönderirse –Datagramlar ağ MTU’sundan daha büyük olabilirler –Datagramlar IP tarafından parçalanacaktır Uygulama programcıları daha fazla verimlilik sağlamak için büyük transferler yaparlar –UDP ile, büyük mesajların gönderimi daha az verimliliğe sebep olabilir because large messages cause fragmentation

15 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.15 25.6 UDP Communication Semantics UDP uses IP for all delivery UDP, IP deki gibi best-effort iletim sağlıyor Bu şu manaya geliyor, mesajlar: –Lost (kaybolabilir) –Duplicated ( çoğaltmak ) –Delayed ( gecikme ) –Delivered out-of-order (sırasız iletim) –Corrupted ( bozulabilir ) Uygulamalar için UDP best-effort iletim önemli sonuçlar doğurur –Uygulama problemlere karşı bağışıklık kazanır yada programcı ek adımlar sağlayarak problemerin farkına varığ düzeltebilir

16 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.16 25.6 UDP Communication Semantics Bu tarz uygulamara, paketlerdeki hataları tolere edebilecek, örnek olarak, ses iletimi örnek verilebilir –Eğer gönderici ses’i küçük mesajların içerisine koyarsa Bir paketin kaybı ses verisinin geri oynatımı esnasında küçük bir boşluk bırakacaktır Bu buşluk clik yada pop olarak duyulacaktır Gerekli olan gürültü, bazı durumlarda sinirlendirici olabilir Ters ucunda, online alışveriş uygulamasını düşünün –Bu tarz uygulamalar UDP kullanmaz Çünkü paket kayıpları ciddi sonuçlar doğurabilir –(mesela mesajın tekrarlanması iki siparişin verilmesine sebep olabilir, gibi) (e.g., duplication of a message that carries a catalog order can result in two orders, with double charges being made to the buyer's credit card)

17 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.17 25.7 Modes Of Interaction And Broadcast Delivery UDP allows four styles of interaction: –1-to-1 –1-to-many –Many-to-1 –Many-to-many An application using UDP has a choice A 1-to-many interaction can be achieved as follows –An application to repeatedly send a message to multiple recipients, UDP allows an application to transmit the message via IP multicast or broadcast For example, local broadcast can be specified by using IP's limited broadcast address, 255.255.255.255

18 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.18 25.7 Etkileşim Modları ve Yayın Teslimi UDP 4 etkileşim sitiline imkan sağlar: –1-to-1 –1-to-many –Many-to-1 –Many-to-many UDP kullanan bir uygulamanın bir seçimi vardır 1-to-many etkileşimi şu şekilde gerçekleşir –Bir uygulama birden fazla alıcıya peş peşe mesaj gönderir, UDP bu uygulamanın mesajları IP multicast veya broadcast olarak taşınmasına imkan sağlar For example, local broadcast can be specified by using IP's limited broadcast address, 255.255.255.255

19 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.19 25.8 Endpoint Identification With Protocol Port Numbers How should UDP identify an application as an endpoint? –UDP could use the same mechanism that the OS uses –Because UDP must span heterogeneous computers no common mechanism exists For example –some OS use process identifiers –others use job names –and others use task identifiers To avoid ambiguity –UDP defines an abstract set of identifiers called protocol port numbers that are independent of the OS –UDP must provide a mapping between protocol port numbers and the program identifiers that the OS uses All computers running UDP recognize the standard protocol port numbers, independent of the OS

20 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.20 25.8 Protokol Port Numaraları ile Endpoint Tanımlama UDp nasıl bir uygulamayı endpoint olarak tanımlıyor? –UDP, OS nin kullandığı aynı mekanizmayı kullanır –Çünkü UDP heterojen bilgisayara yayılmalıdır no common mechanism exists Örneğin –Bazı OS process tanımlayıcıları kullanır –Diğerleri iş isimleri kullanır –Ve diğerleri görev tanımlayıcıları kullanır Belirsizliği önlemek –UDP her OS için bağımsız olan protokol pot numaraları adında soyut tanımlayıcılar tanımlar –UDP protokol port numaraları ve OS in kullandığı program tanımlayıcıları arasında bir bağlantı sağlamalıdır UDP çalıştıran bütün bilgisayarlar standart protokol numaralarını tanır, OS den bağımsız

21 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.21 25.9 UDP Datagram Format Each UDP message is called a user datagram and consists of two parts: –a short header that specifies the sending and receiving application –a payload that carries the data being sent Figure 25.1 (below) illustrates the user datagram format.

22 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.22 25.9 UDP Datagram Format Her UDP mesajı kullancı datagramı olarak bilinir ve iki parçadan oluşur: –Gönderilen ve alınan uygulamaları belirten bir kısa başlık –Datayı taşıyan bir payload Figure 25.1 (below) illustrates the user datagram format.

23 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.23 25.11 UDP Encapsulation Each UDP datagram is encapsulated in an IP datagram for transmission across the Internet Figure 25.3 (below) illustrates the encapsulation

24 © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.24 25.11 UDP Encapsulation Her UDP datgaramı internette iletilmek için bir Ip datagramı içine kapsüllenir Figure 25.3 (aşağıda) kapsülleme tasvir edilmiştir


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

Benzer bir sunumlar


Google Reklamları