The document is a lecture on computer networks and the transport layer. It covers topics such as transport layer services provided by TCP and UDP, multiplexing and demultiplexing, connectionless transport with UDP, principles of reliable data transfer, connection-oriented transport with TCP, congestion control, TCP congestion control, and TCP connection management with three-way handshakes and connection termination. Diagrams and examples are provided to illustrate key concepts such as segment structure, port numbers, sliding window flow control, retransmission strategies, and TCP handshake procedures.
Seizure stage detection of epileptic seizure using convolutional neural networks
Module 2
1. Vidya Vardhaka College of Engineering, Mysuru
Department of Computer Science & Engineering
Computer Networks (15CS52)
Module-2:Transport Layer
Gururaj H L
Assistant Professor,
Dept. of CSE, VVCE, Mysuru
gururaj1711@vvce.ac.in
gururajhl.blogspot.com
2. Contents
1. Introduction and Transport-Layer Services
2. Multiplexing and Demultiplexing
3. Connectionless Transport: UDP
4. Principles of Reliable Data Transfer
5. Connection-Oriented Transport: TCP
6. Principles of Congestion Control
7. TCP Congestion Control
30-07-2018 Dept. of CSE, VVCE, Mysuru 2
3. Introduction and Transport-Layer Services
• Provide logical communication between application processes running on
different hosts
• Transport protocols run in end systems
• sender side: breaks application messages into segments, passes to network
layer
• Receiver side: reassembles segments into messages, passes to app layer
• More than one transport protocol available to applications
• Internet: TCP and UDP
30-07-2018 Dept. of CSE, VVCE, Mysuru 3
5. Relationship Between Transport and Network Layers
• Network layer:
Logical communication between hosts
• Transport layer:
Logical communication between processes relies on,
enhances, network layer services.
Overview of the Transport Layer in the Internet
• TCP/IP Model
• UDP-datagram, packet ( RFC 768)
• TCP-segments (RFC 793)
30-07-2018 Dept. of CSE, VVCE, Mysuru 5
6. Overview of the Transport Layer in the Internet
TCP Services
• Reliable
• Ordered
• Point to point
• Byte stream
• Full duplex
• Flow and congestion control
30-07-2018 Dept. of CSE, VVCE, Mysuru 6
7. UDP Services
• Unreliable
• Unordered
• No flow and congestion control
• Checksum
• Connectionless service
Multiplexing and Demultiplexing
• Source port number field
• Destination port number field
• Port number is a 16-bit number (0 to 65535).
• The port numbers ranging from 0 to 1023 are called well-known port
numbers (HTTP :80 and FTP : 21).
30-07-2018 Dept. of CSE, VVCE, Mysuru 7
8. 30-07-2018 Dept. of CSE, VVCE, Mysuru 8
Figure 2 Transport layer multiplexing and demultiplexing
9. Multiplexing and Demultiplexing
• Connectionless/UDP Multiplexing & Demultiplexing
UDP socket is identified by a two-tuple: (destination IP address, destination
port number).
• Connection oriented/TCP Multiplexing & Demultiplexing
TCP socket is identified by a four-tuple: (source IP address, source port
number, destination IP address, destination port number).
30-07-2018 Dept. of CSE, VVCE, Mysuru 9
10. Figure 3 Two clients, using the same destination port number (80) to communicate with the same Web server application
30-07-2018 Dept. of CSE, VVCE, Mysuru 10
11. Connectionless Transport: UDP
• “No frills,” “bare bones” Internet transport protocol
• “best effort” service, UDP segments may be:
• lost
• delivered out-of-order to application
• Connectionless:
• No handshaking between UDP sender, receiver
• Each UDP segment handled independently of others
• UDP use:
• streaming multimedia applications (loss tolerant, rate sensitive)
• DNS
• SNMP
• Reliable transfer over UDP:
• Add reliability at application layer
• Application-specific error recovery.
30-07-2018 Dept. of CSE, VVCE, Mysuru 11
13. UDP Checksum
• The errors will be detected in the transmitted data
• Treat segment contents, including header fields, as sequence of 16-bit
integers.
• Checksum: addition (one’s complement sum) of segment contents
30-07-2018 Dept. of CSE, VVCE, Mysuru 13
14. Principles of Reliable Data Transfer
• Frames can corrupted or lost.
• Recover the corrupted or lost frames Reliable data transfer
• One of the most researched topic in networking
• We will provide a framework for reliable data transfer protocol in link
layer it will be extended to transport layer
30-07-2018 Dept. of CSE, VVCE, Mysuru 14
16. 30-07-2018 Dept. of CSE, VVCE, Mysuru 16
Reliable data transfer: Service model and service implementation
17. RDT1.0: reliable transfer over a reliable channel
• Underlying channel perfectly reliable
• no bit errors
• no loss of packets
• Separate FSMs for sender, receiver:
• sender sends data into underlying channel
• receiver reads data from underlying channel
30-07-2018 Dept. of CSE, VVCE, Mysuru 17
18. RDT1.0: Channel with bit errors
• Required Functionality
• CRC Checksum
• Receiver Feedback
• Positive feedback
• Negative feedback
30-07-2018 Dept. of CSE, VVCE, Mysuru 18
19. Automatic Repeat Request (ARQ)
• Protocols based on feedback and retransmission
• RDTv1.o has fatal flaw if ACK/ NACK got corrupted
30-07-2018 Dept. of CSE, VVCE, Mysuru 19
27. Channel with Errors and Losses
• Sender gets no feedback : Need a timeout mechanism
• Waiting time is a link level characteristics
• Propagation time
• Transmission time
• Processing time
30-07-2018 Dept. of CSE, VVCE, Mysuru 27
32. Performance of RDT 3.0
• The throughput achieved for 1 Gbps link, 15 ms prop. delay, 8000 bit
packet:
• Sender Utilization
30-07-2018 Dept. of CSE, VVCE, Mysuru 32
40. TCP RTT and Timeout
• Longer than RTT
• but RTT varies
• Too short: premature timeout, unnecessary retransmissions
• Too long: slow reaction to segment loss
30-07-2018 Dept. of CSE, VVCE, Mysuru 40
41. TCP Reliable Transfer Protocol
• TCP creates rdt service on top of IP’s unreliable service
• pipelined segments
• cumulative acks
• single retransmission timer
• retransmissions triggered by:
• timeout events
• duplicate acks
30-07-2018 Dept. of CSE, VVCE, Mysuru 41
let’s initially consider simplified TCP sender:
• ignore duplicate acks
• ignore flow control, congestion control
45. TCP Flow Control
• Receiver controls sender, so sender won’t overflow receiver’s buffer by
transmitting too much, too fast
• Receive window (rwnd) is used to give the sender an idea of how much free buffer
space is available at the receiver.
30-07-2018 Dept. of CSE, VVCE, Mysuru 45
46. TCP Connection Management
Before exchanging data, sender/receiver “handshake”:
• Agree to establish connection (each knowing the other willing to
establish connection)
• Agree on connection parameters
30-07-2018 Dept. of CSE, VVCE, Mysuru 46
49. REFERENCES
Text Book:
[1]James F kurose, Keith W Ross “Computer Networking -A
top down approach” Sixth Edition, Pearson publication, 2017
[2] NPTEL videos on Computer Networks.
30-07-2018 Dept. of CSE, VVCE, Mysuru 49