1 pertemuan 23 layer transport matakuliah: h0174/jaringan komputer tahun: 2006 versi: 1/0

41
1 Pertemuan 23 Layer Transport Matakuliah : H0174/Jaringan Komputer Tahun : 2006 Versi : 1/0

Post on 15-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

1

Pertemuan 23Layer Transport

Matakuliah : H0174/Jaringan Komputer

Tahun : 2006

Versi : 1/0

Page 2: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu :

• Menjelaskan fungsi Transport Layer

Page 3: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

3

Outline Materi

• TCP• UDP

Page 4: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

4

Transport layer duties

Page 5: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

5

Addressing

• TCP uses the concept of source and destination port numbers which uniquely identify a particular communicating process on a host.

• Port numbers• Well known port numbers (defined by IANA)

• Server applications run by privileged users to communicate on these ports (0 – 1023)

Registered ports (1024 - 49151) Administratively assigned to some specific

applications. Private ports/Ephemereal (49152 - 65535)

application associated with them. Used by applications that are ephemeral in nature

Page 6: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

6

Well-Known Port Addresses

• Port 80 – HTTP (web server)• Port 25 – SMTP (mail server)• Port 23 – Telnet• Port 22 – SSH• Port 110 – POP3

Page 7: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

7

IP Addresses vs Port Numbers

Page 8: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

8

Application Addressing

• Target user specified by User identification called socket in TCP/IP

• Consist of usually IP address (host), port• Port represents a particular transport service

(TS) user– Transport entity identification

• Generally only one per host• If more than one, then usually one of each

type– Specify transport protocol (TCP, UDP)

– Host address• An attached network device• In an internet, a global internet address

Page 9: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

9

Socket address

Page 10: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

10

Multiplexing

• Multiple users employ same transport protocol• User identified by port number or service

access point (SAP)• May also multiplex with respect to network

services used

Page 11: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

11

Transport Layer Protocol

• Transmission Control Protocol– Connection oriented– RFC 793

• User Datagram Protocol (UDP)– Connectionless– RFC 768

Page 12: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

12

Types of data deliveries

The transport layer is responsible for process-to-process delivery

Page 13: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

13

TCP segment format

Page 14: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

14

TCP Services

• Reliable communication between pairs of processes• Across variety of reliable and unreliable networks

and internets• Two labeling facilities

– Data stream push• TCP user can require transmission of all data

up to push flag• Receiver will deliver in same manner• Avoids waiting for full buffers

– Urgent data signal• Indicates urgent data is upcoming in stream• User decides how to handle it

Page 15: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

15

TCP Mechanisms

• Connection establishment– Three way handshake– Between pairs of ports– One port can connect to multiple

destinations

Page 16: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

16

Connection Establishment

Page 17: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

17

TCP Mechanisms

• The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number

• The value of the sequence number field in a segment defines the number of the first data byte contained in that segment

• The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive

• The acknowledgment number is cumulative.• Data transfer

– Logical stream of octets, Octets numbered modulo 223

– Flow control by credit allocation of number of octets– Data buffered at transmitter and receiver

Page 18: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

18

UDP

• UDP is a connectionless, unreliable protocol that has no flow and error control

• It uses port numbers to multiplex data from the application layer (e.g. network management)

• Delivery and duplication control not guaranteed• Reduced overhead• UDP is a convenient transport-layer protocol for

applications that provide flow and error control. It is also used by multimedia applications

Page 19: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

19

User datagram format

The calculation of checksum and its inclusion in the user datagram are optional

Page 20: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

20

Pertemuan 24Layer Application

Matakuliah : H0174/Jaringan Komputer

Tahun : 2006

Versi : 1/0

Page 21: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

21

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu :

• Menjelaskan peran Application Layer

Page 22: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

22

Outline Materi

• SMTP• HTTP

Page 23: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

23

Electronic Mail

• Most heavily used application on any network• Simple Mail Transfer Protocol (SMTP)

– TCP/IP– Delivery of simple text messages

• Multi-purpose Internet Mail Extension (MIME)– Delivery of other types of data– Voice, images, video clips

Page 24: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

24

SMTP

• RFC 821• Not concerned with format of messages or data

– Covered in RFC 822 (see later)• SMTP uses info written on envelope of mail

– Message header• Does not look at contents

– Message body• Except:

– Standardize message character set to 7 bit ASCII– Add log info to start of message

• Shows path taken

Page 25: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

25

Basic Operation

• Mail created by user agent program (mail client)– Message consists of:

• Header containing recipient’s address and other info

• Body containing user data• Messages queued and sent as input to SMTP sender

program– Typically a server process (daemon on UNIX)

Page 26: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

26

SMTP Sender

• Takes message from queue• Transmits to proper destination host

– Via SMTP transaction– Over one or more TCP connections to port 25

• Host may have multiple senders active• Host should be able to create receivers on demand• When delivery complete, sender deletes destination

from list for that message• When all destinations processed, message is deleted

Page 27: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

27

SMTP Receiver

• Accepts arriving message• Places in user mailbox or copies to outgoing queue

for forwarding• Receiver must:

– Verify local mail destinations– Deal with errors

• Transmission• Lack of disk space

• Sender responsible for message until receiver confirm complete transfer– Indicates mail has arrived at host, not user

Page 28: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

28

SMTP Mail Flow

Page 29: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

29

Text Messages RFC 882

• Message viewed as having envelope and contents• Envelope contains information required to transmit

and deliver message• Message is sequence of lines of text

– Uses general memo framework– Header usually keyword followed by colon

followed by arguments

Page 30: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

30

MIME

• Multipurpose Internet Mail Extension (MIME) Extension to RFC822

• SMTP can not transmit executables• Can not transmit text including international characters

(e.g. â, å, ä, è, é, ê, ë)– Need 8 bit ASCII

• Servers may reject mail over certain size• Translation between ASCII and EBCDIC not standard• SMTP gateways to X.400 can not handle none text data in

X.400 messages• Some SMTP implementations do not adhere to standard

– CRLF, truncate or wrap long lines, removal of white space, etc.

Page 31: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

31

Overview of MIME

• Five new message header fields– MIME version– Content type– Content transfer encoding– Content Id– Content Description

• Number of content formats defines• Transfer encoding defined

Page 32: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

32

HTTP

• Hypertext Transfer Protocol• Underlying protocol of the World Wide Web• Not a protocol for transferring hypertext

– For transmitting information with efficiency necessary for hypertext jumps

• Can transfer plain text, hypertext, audio, images, and Internet accessible information

Page 33: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

33

HTTP Overview

• Transaction oriented client/server protocol• Usually between Web browser (clinet) and Web

server• Uses TCP connections• Stateless

– Each transaction treated independently– Each new TCP connection for each transaction– Terminate connection when transaction complete

Page 34: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

34

Headers

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

Page 35: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

35

Retrieve Image

Page 36: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

36

Distributed services

Page 37: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

37

Browser architecture

Page 38: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

38

Categories of Web documents

Page 39: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

39

Static document

Page 40: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

40

Dynamic document

Page 41: 1 Pertemuan 23 Layer Transport Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0

41

Active document