Week12.2 Final
Week12.2 Final
Computer Networks
1
Dijkstra’s algorithm
Link Layer
Physical Layer
Transport Protocol - Summary
• Provides end-to-end data transfer
• Shields upper layer application protocols from the details of
networks
• TCP: complicated flow and error control since the underlying
network service (IP) is unreliable
• TCP is connection oriented
• UDP is another transport layer protocol but connectionless
Connection Oriented Transport Protocol
Mechanisms
• Logical connections between end users
—Connection Establishment
—Data Transfer
—Connection Termination
• Reliable service
• e.g. TCP
5 Issues in a Simple Transport Protocol
• Addressing
• Multiplexing
• Flow Control
• Connection establishment and termination
1&2 -Addressing and Multiplexing
• Multiple users employ same transport protocol
— Users are multiplexed
— User (Client process) is locally identified by port number
• User identification for the target
—Usually host address + port
• Called a socket in TCP and UDP
• Port represents a particular transport service (TS) user
—25 SMTP, 80 HTTP, etc. -> these are for server
—Client port numbers are >1024 and selected arbitrarily
• Host address
—An attached network device
—In the Internet, a global internet address (e.g. IP addr.)
Transport services and protocols
application
transport
enterprise
network
Transport vs. network layer services and
protocols
Sender:
application ▪ is passed an application- application
app. msg
layer message
transport ▪ determines segment TThhtransport
app. msg
header fields values
network (IP) ▪ creates segment network (IP)
physical physical
Transport Layer Actions: Demultiplex
Receiver:
application ▪ receives segment from IP application
▪ checks header values
transport
app. msg ▪ extracts application-layer transport
message
network (IP) network (IP)
▪ demultiplexes message up
link to application via socket link
physical physical
Th app. msg
HTTP server
client
application application
HTTP msg
transport
Hnnetwork
Ht HTTP msg transport
transport
network link network
link physical link
physical physical
HTTP server
client
application application
transport
Hn Ht HTTP msg
HTTP server
client1 client2
application P-client1 P-client2 application
transport
application
-
Sliding window metaphore ☺
https://youtube.com/shorts/6nxexmfjIiw?si=iYxl0
Zg243P8sZvT
TCP segment structure
32 bits
L/R L/R
Usender=
RTT + L / R
.008 RTT
=
30.008
= 0.00027
U 3L / R .0024
sender = = = 0.00081
RTT + L / R 30.008
Go-Back-N ARQ (Automatic Repeat Request)
sender window (N=4) sender receiver
012345678 send pkt0
012345678 send pkt1
012345678 send pkt2 receive pkt0, send ack0
012345678 send pkt3 Xloss receive pkt1, send ack1
(wait)
receive pkt3, discard,
012345678 rcv ack0, send pkt4 (re)send ack1
012345678 rcv ack1, send pkt5 receive pkt4, discard,
(re)send ack1
ignore duplicate ACK receive pkt5, discard,
(re)send ack1
pkt 2 timeout
012345678 send pkt2
012345678 send pkt3
012345678 send pkt4 rcv pkt2, deliver, send ack2
012345678 send pkt5 rcv pkt3, deliver, send ack3
rcv pkt4, deliver, send ack4
rcv pkt5, deliver, send ack5
Go-Back-N: sender
▪ sender: “window” of up to N, consecutive transmitted but unACKed pkts
• k-bit seq # in pkt header
rcv_base
Not received
3-Selective repeat
▪receiver individually acknowledges all correctly received packets
• buffers packets, as needed, for eventual in-order delivery to upper
layer
▪sender times-out/retransmits individually for unACKed packets
• sender maintains timer for each unACKed pkt
▪sender window
• N consecutive seq #s
• limits seq #s of sent, unACKed packets
Selective Repeat ARQ Automatic Repeat Request
• https://nikhilsahu.me/Sliding-window-simulator/
Example of TCP Credit - Assume 200 octets/segment
- Initial credit (window size) 1400 octets
Allocation Mechanism - Beginning octet number 1001
Flow Control Protocols