fall 2005 by: h. veisi computer networks course olum-fonoon babol chapter 6 the transport layer
TRANSCRIPT
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 2
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. VeisiH. Veisi Fall 2005 Page 3
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
Transport vs. Network Layer
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 4
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. VeisiH. Veisi Fall 2005 Page 5
Transport service primitives (2)
Connection/Transmission scenario:
Host A Host B
ListenConnect
Connection Request TPDUConnection Accept TPDU
Send
Receive
Send
Receive
Data
Disconnect
Disconnect TPDU
Send
Disconnect
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 6
Addressing
Transport Service Access Pint = Port No.
Network Service Access Pint = IP No.
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 7
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. VeisiH. Veisi Fall 2005 Page 8
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. VeisiH. Veisi Fall 2005 Page 9
Reliable transfer over UDP: add reliability at application layer application-specific error recovery!
UDP segment format
source port # dest port #
32 bits
Applicationdata
(message)
length checksumLength, in
bytes of UDPsegment,including
header
UDP (2)
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 11
Full duplex data: bi-directional data flow in
same connection Connection-oriented:
handshaking (exchange of control msgs) init’s sender, receiver state before data exchange
Flow controlled: sender will not
overwhelm receiver
Point-to-point: one sender, one receiver
Reliable, in-order byte steam: no “message boundaries”
Pipelined: TCP congestion and flow
control set window size send & receive buffers
Processwrites data
Processwrites data
TCPsendbuffer
TCPsendbuffer
SocketSocket
Processreads data
Processreads data
TCPreceivebuffer
TCPreceivebuffer
SocketSocket
segment segment
TCP (1)
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 12
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. VeisiH. Veisi Fall 2005 Page 13
TCP (3)
Some standard ports :
Port Protocol Use21 FTP File transfer23 Telnet Remote login25 SMTP E-mail69 TFTP Trivial File Transfer Protocol79 Finger Lookup info about a user80 HTTP World Wide Web
110 POP-3 Remote e-mail access119 NNTP USENET news
Computer networking, Olum-Fonoon Babol H. VeisiH. Veisi Fall 2005 Page 14
source port # dest port #
32 bits
applicationdata
(variable length)
sequence number
acknowledgement numberReceive window
Urg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG: urgent data (generally not used)
ACK: ACK #valid
PSH: push data now(generally not used)
RST, SYN, FIN:connection estab(setup, teardown
commands)
# bytes rcvr willingto accept
Internetchecksum
(as in UDP)
window scaling factor,Time-stamping,maximum segment length,…RFCs: 854, 1323
[4Bytes]
seq # is byte-stream number of first data
byte in segment
TCP (4)