Download Chapter6

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Olum-fonoon Babol
Computer networks course
Chapter 6
The Transport Layer
Fall 2005
By: H. Veisi
Overview
 It’s task is to provide efficient, reliable and cost-effective
transport from the source to destination.
 Hardware and/or Software within transport layer that does
the work is called Transport entity.
 Transport layer services:
 Connectionless
 Connection-oriented
 Very similar to Network layer! So why we need this layer?!
 Transport layer runs on user’s machine, Network layer mostly
runs on routers and result inadequate services.
 Provides Primitive functions to application layer for
programmers.
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 2
Transport vs. Network Layer
 Network layer: logical
communication between
hosts
 Transport layer: logical
communication between
processes
 relies on, enhances,
network layer services
University analogy:
7 students sending letters to 7
students




processes = students
app messages = letters in envelopes
hosts = universities
transport protocol = post office of
universities
 network-layer protocol = postal
service
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 3
Transport service primitives (1)
 The primitives for a simple transport service:
 Nesting of TPDU (Transport Protocol Data Unit), packets and frames:
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 4
Transport service primitives (2)
 Connection/Transmission scenario:
Host A
Host B
Connection
Accept
TPDU
Disconnect
TPDUTPDU
Connection
Request
Data
Disconnect
Connect
Send
Send
Listen
Disconnect
Receive
Receive
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 5
Addressing
Transport Service Access Pint = Port No.
Network Service Access Pint = IP No.
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 6
The Internet Transport layer protocols
 Two types:
 UDP (User Datagram Protocol)
 Connectionless transport, Like IP!
 unreliable, unordered delivery
TCP: Transmission Control Protocol





Connection-oriented transport
reliable, in-order delivery (TCP)
Congestion control
Flow control
Connection setup
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 7
UDP (1)





No connection establishment (which can add delay)
Simple: no connection state at sender, receiver
Small segment header
No congestion control: UDP can blast away as fast as desired
UDP segments may be:
 lost
 delivered out of order to app
 Applications:
 RPC: Remote Procedure Call
 In DNS servers
 RTP: Real-Time Transport Protocol
 Audio, video, …
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 8
UDP (2)
 Reliable transfer over UDP: add reliability at application layer
 application-specific error recovery!
 UDP segment format
32 bits
Length, in
bytes of UDP
segment,
including
source port #
dest port #
length
checksum
header
Application
data
(message)
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 9
TCP (1)

Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 10
TCP (1)
 Full duplex data:
 Point-to-point:
 bi-directional data flow in
same connection
 one sender, one receiver
 Reliable, in-order byte steam:
 no “message boundaries”
 Connection-oriented:
 handshaking (exchange of
control msgs) init’s sender,
receiver state before data
exchange
 Pipelined:
 TCP congestion and flow
control set window size
 send & receive buffers
 Flow controlled:
 sender will not overwhelm
receiver
Process
writes data
Process
reads data
Socket
Socket
segment
segment
TCP
send
buffer
Computer networking, Olum-Fonoon Babol
TCP
receive
buffer
H. Veisi
Fall 2005
Page 11
TCP (2)
 A TCP entity accepts user data stream and breaks
them to segments.
 For obtaining TCP services, both sender and
receiver creating end points called sockets.
 Socket No.= IP address of machine+ 16 bits local
add. (Port No.)
 Port No.s bellow 1024 are called Well-known ports
TCP does not support multicasting or broadcasting
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 12
TCP (3)
 Some standard ports :
Port
21
23
25
69
79
80
110
119
Protocol
FTP
Telnet
SMTP
TFTP
Finger
HTTP
POP-3
NNTP
Use
File transfer
Remote login
E-mail
Trivial File Transfer Protocol
Lookup info about a user
World Wide Web
Remote e-mail access
USENET news
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 13
TCP (4)
32 bits
URG: urgent data
(generally not used)
[4Bytes]
ACK: ACK #
valid
PSH: push data now
(generally not used)
RST, SYN, FIN:
connection estab
(setup, teardown
commands)
Internet
checksum
(as in UDP)
source port #
dest port #
sequence number
seq # is byte-stream
number of first data
byte in segment
acknowledgement number
head not
UA P R S F
len used
checksum
Receive window
# bytes
rcvr willing
to accept
Urg data pnter
Options (variable length)
application
data
(variable length)
Computer networking, Olum-Fonoon Babol
H. Veisi
window scaling factor,
Time-stamping,
maximum segment
length,…
RFCs: 854, 1323
Fall 2005
Page 14
TCP (5)
 Connection Establishment
Host B
Host A
 Tree-way handshaking
 Use Sliding Window Protocol
 Go-Back-N and Selective Repeat
Computer networking, Olum-Fonoon Babol
H. Veisi
Fall 2005
Page 15
Related documents