1 / 26

Modul 4 Transport Protocol TCP / UDP

Modul 4 Transport Protocol TCP / UDP. Mata Kuliah Sistem Telekomunikasi Semester Genap 2009 - 2010. Pengenalan. Layer Transport adalah layer end-to-end pertama dalam OSI 7 Layer Reference Model Hanya beroperasi di end-systems ( misalnya hosts / terminals)

ahanu
Download Presentation

Modul 4 Transport Protocol TCP / UDP

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modul 4Transport Protocol TCP / UDP Mata Kuliah Sistem Telekomunikasi Semester Genap 2009 - 2010

  2. Pengenalan • Layer Transport adalah layer end-to-end pertama dalam OSI 7 Layer Reference Model • Hanya beroperasi di end-systems (misalnya hosts / terminals) • Layer transport TCP adalah layer tertinggi berorientasi fungsi komunikasi • Layer diatasnya dianggap berorientasi “user” atau “application” • The transport layer is typically implemented in software running in the host operating system’s kernel (kerneladalahsuatuperangkatlunak yang menjadibagianutamadarisebuahsistemoperasi. Tugasnyamelayanibermacam program aplikasiuntukmengaksesperangkatkeraskomputersecaraaman) • Higher layers are typically running within application • programs i.e. they are realised as software libraries linked with them • A running transport protocol is called a Transport Entity Sistem Telekomunikasi Semester Genap 2009-2010

  3. CONNECTION-ORIENTED AND CONNECTIONLESS • A transport protocol can be: • Connection-oriented (CO) reliable • Connectionless (CL) unreliable • There do not exist connection-oriented unreliable transport protocols in a similar fashion to protocols in lower layers • Remember that ATM (network) and Frame Relay (data link) are connection-oriented unreliable • A transport connection is an end-system notion (i.e. state kept in the two communicating hosts), totally unrelated to virtual circuits in the lower layers • We may have CO transport over CL network layer e.g. TCP over IP • We may also have CO transport over CO network layer (i.e. VC-based) e.g. OSI TP over X.25 Sistem Telekomunikasi Semester Genap 2009-2010

  4. TRANSPORT PROTOCOLS • OSI Transport Protocol (TP) • It is used with ISO/ITU-T OSI network layer protocols e.g. X.25, CLNP • Tidak dibahas • Transmission Control Protocol (TCP) • Used over IP (the latter goes over anything) • User Datagram Protocol (UDP) • CL unreliable service over IP • Real-Time Protocol (RTP) • CL unreliable service over UDP/IP for real-time traffic streams e.g. voice, video Sistem Telekomunikasi Semester Genap 2009-2010

  5. TRANSPORT LAYER FOR INTERNET SNMP Simple Network Management Protocol NFS Network File System RPC Remote Procedure Call, e.g. Sun RPC,but OMG CORBA RPC (GIOP) uses TCP (T)FTP (Trivial) File Transfer Protocol BOOTP BOOT Protocol DNS Domain Name System HTTP HyperText Transfer Protocol SMTP Simple Mail Transfer Protocol UDP User Datagram Protocol TCP Transmission Control Protocol IP Internet Protocol Sistem Telekomunikasi Semester Genap 2009-2010

  6. INTERNET PROTOCOL STACK AND SAPs • TSAP: Transport Service Access Point  Port • NSAP: Network Service Access Point IP Address Sistem Telekomunikasi Semester Genap 2009-2010

  7. ADDRESSING • A host is identified through its IP address • TCP/UDP can serve several applications within a host through different ports • An Internet port is equivalent to the OSI transport selector • Since there are no explicit session and presentation layers in the Internet protocol architecture, there exists only one type of port i.e. transport • An application (in fact transport) address is thus the combination {port, IP address} Sistem Telekomunikasi Semester Genap 2009-2010

  8. ADDRESSING • The transport protocol (TCP or UDP) needs also to be known as the same port number identifies different applications over TCP and over UDP • Port numbers below 256 are well-known ports, used for standard services • For example, TCP port 23 is the one in which the Telnetserver listens • The UDP port 161 is the one in which the SNMP agent (daemon) listens • An ever-running server is called daemon in UNIX terminology and its program name ends typically with the letter d e.g. telnetd, snmpd, etc. Sistem Telekomunikasi Semester Genap 2009-2010

  9. TRANSMISSION CONTROL PROTOCOL (TCP)

  10. PENGENALAN • TCP provides a reliable error-free transport service over an unreliable internetwork; TCP adapts dynamically to the properties of the internetwork and is robust to many kinds of failures • Data is delivered in sequence, with no losses or duplicates • The reliable transport service provided is similar to the OSI COtransport service, with one key difference: • The TCP service is “stream-based” while the OSI transport service is “packet-based” • TCP treats all user data as a byte (octet) stream; since full duplex communication is provided, two unidirectional streams are supported • TCP “protocol data units” (OSI terminology) are called segments; a segment may contain several short TCP user messages or can be part of a larger message Sistem Telekomunikasi Semester Genap 2009-2010

  11. PENGENALAN (Cont. ) • Because of its stream nature, the sending TCP entity may store data passed to it to transmit in a buffer and transmit it when the buffer has “enough” data. • The same may take place in the receiving TPC entity, regarding data delivery to the application • The user may force data to be transmitted and delivered immediately • The user may also indicate that data is urgent which means it will be delivered outside the flow control of normal data • This is similar to “expedited data” in the OSI transport protocol • When an acknowledgement is not received within a time-out period, the segment is retransmitted – TCP deploys a sliding window ARQ protocol for flow control with its own special characteristics • Because of its stream nature, the sequence and acknowledgment numbersrefer to bytes in the byte stream, not to segments • Window size is adaptive to congestion in the network and performs “selfpolicing” to avoid burdening the network further and achieve fairness Sistem Telekomunikasi Semester Genap 2009-2010

  12. TCP USER SERVICE PRIMITIVES: CONNECTION ESTABLISHMENT • “Full passive open” means that a remote address and possibly port from which to expect a connection are specified • “Active open with data” means that initial data is sent to the server in the connection request Sistem Telekomunikasi Semester Genap 2009-2010

  13. TCP USER SERVICE PRIMITIVES: DATA EXCHANGE Sistem Telekomunikasi Semester Genap 2009-2010

  14. TCP USER SERVICE PRIMITIVES: CONNECTION RELEASE • Orderly connection release needs both ends to agree – remember that OSI TP supports only abrupt connection release; this is of course also supported in TCP Sistem Telekomunikasi Semester Genap 2009-2010

  15. TCP DATA TRANSFER • 3W data has to be delivered in 3 segments of W data. The client buffers the first segment and delivers 2W buffered data to the application. The first ACK reduces the window to W since there is W buffered data and the second ack restores it. After the first ack, the server can send the third segment. This is buffered for a while with the window reduced to W but then it is delivered to the application and a second ack is sent, restoring the window to 2W. Sistem Telekomunikasi Semester Genap 2009-2010

  16. TCP CONNECTION ESTABLISHMENT If both ends try to establish a connection to each other simultaneously, only one connection is established because of the three-way handshake procedure required – in the OSI TP two connections are established Sistem Telekomunikasi Semester Genap 2009-2010

  17. TCP GRACEFUL CONNECTION TERMINATION • Here we assume that the server has still outstanding data of length N (N<=W) to send after the client has required connection termination; the server sends it together with its own request to close the connection • If the client had closed the connection unilaterally, this data would be lost Sistem Telekomunikasi Semester Genap 2009-2010

  18. USER DATAGRAM PROTOCOL UDP

  19. USER DATAGRAM PROTOCOL • User Datagram Protocol (UDP) is a connectionless transport protocol provided in the TCP/IP suite • It allows applications to send encapsulated IP datagrams withouthaving to establish a transport connection • IP does not provide error/flow control and UDP allows upper layer applications to exploit this property: • Useful for real-time multimedia streams where retransmission is meaningless and flow control causes packet jitter • Its connectionless nature makes it also suitable for real-time multicast • Also useful for applications prepared to perform their own error control e.g. NFS/RPC, SNMP • Note that the protocol field in the IP header indicates the transport protocol to deliver the datagram (TCP or UDP) • Many applications in a host may use UDP services; this is done through different transport ports as explained • Remember that an Internet application is attached to an equivalent to the OSI TSAP, with the address being {port, IP Address} Sistem Telekomunikasi Semester Genap 2009-2010

  20. UDP SEGMENT HEADER • The UPD header consists of • Source and Destination port • Length of datagram, including 8 byte header and body • Checksum of the complete datagram • The source application needs to know the IP address and the port number of the destination to send a datagram to it Sistem Telekomunikasi Semester Genap 2009-2010

  21. UDP FUNCTIONALITY • UDP is the simplest possible transport protocol, being an almost direct pass-through to IP services • It allows many applications to use UDP/IP services through different transport ports • Applications are not allowed to use network services directly since this means layering violation • Using UDP is as close as possible to using directly IP services i.e. best-effort datagrams are sent Sistem Telekomunikasi Semester Genap 2009-2010

  22. REAL TIME PROTOCOL RTP

  23. REAL-TIME STREAMS AND TRANSPORT RELIABILITY • Real-time traffic requires guaranteed throughput, low latency, low jitter, low packet loss and low processing overhead both in the network routers and in the terminals • TCP is not suitable for real-time traffic due to its error-free nature through error and flow control • Introduces jitter and also increases processing overhead • Reliability is not an issue for real-time audio/video streams • Packet re-transmission for reliability is meaningless, packets in error should be simply dropped • Possibility of adaptive applications: • An application could be made aware about error rate and about the quality of delivery to the other end in general • It may then deal with it e.g. adaptive applications may reduce their send rate according to the network condition • TCP adapts to network congestion but UDP does not – we sometimes refer to TCP traffic as “network friendly” since it takes into account the state of the network Sistem Telekomunikasi Semester Genap 2009-2010

  24. REAL-TIME PROTOCOL • The Real-Time Protocol (RTP) operates on top of UDP for realtime(potentially multicast) traffic and can provide input to the application about network performance and delivery quality • As such, it is not strictly speaking a transport protocol. It can be thought as as a generic application layer protocol that provides transport facilities • In terms of functionality though, it is certainly a transport protocol, hence its examination here • RTP consists in fact of two protocols: • The RTP Data Transfer Protocol, whose header includes among other fields a sequence number and a (local clock) timestamp • The RTP Control Protocol (RTCP) which provides feedback to RTP data sources as well as to (mcast) session participants • They both use UDP as transport, with separate ports at each sender for RTP and RTCP Sistem Telekomunikasi Semester Genap 2009-2010

  25. REAL-TIME PROTOCOL (cont’d) • RTP (i.e. the Data Transfer Protocol) multiplexes various multimedia streams to a single UDP stream e.g. a video and two audio channels for a TV stereo broadcast • The timestamps allow the receiver to estimate jitter but also to buffer accordingly so that the streams are synchronised with each-other • RTCP reports enable receivers to estimate data rates / transmission quality and possibly adjust accordingly • It should be stated that RTP is suited for “soft real-time” communication, with feedback to allow adjust sources in the end systems – IntServ and DiffServ support “hard real-time” communication with guarantees supported by the network Sistem Telekomunikasi Semester Genap 2009-2010

  26. Terima Kasih

More Related