Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

CS232

Computer Networks

Topics:
Summer 2024
• Application Layer (Ch. 2)
Sayeed Ghani • Overview (Cont.)
Lecture 12 • Traffic Calculations
• TCP vs UDP
Thursday, July 4th • TLS
Bits vs Bytes

• 1 Byte = 8 bits

• File sizes are normally in Bytes


e.g. 100 byte file = 800 bits

• Communication speeds are in bits/sec

1-2
Real-time Application Throughput requirements

Real Time applications:


1. Text messaging:
sending 1 message of size 1000 bytes every 10 seconds,
Throughput required = ?

2. Video conferencing:
sending 1 message (image) of size 1000 bytes every msec
Throughput required = ?

1-3
Real-time Application Throughput requirements

Real Time applications:


1. Text messaging:
sending 1 message of size 1000 bytes every 10 seconds,
Throughput required = 1000x8/10 = 800 bits/sec

2. Video conferencing:
sending 1 message (image) of size 1000 bytes every msec
Throughput required = 1000x8 / 0.001 sec = 8 Mbps

1-4
Non-real time Applications
Non-real time application:
1. File download (no timing issue)
downloading MP3 file of size 100 Mbytes
Assume throughput is 1 Mbps, how long will it take?
Time = ?

2. File download (with time constraint)


downloading MP3 file of size 100 Mbytes
Assume we want this in 20 seconds, how much throughput is required?
throughput required = ?

1-5
Non-real time Applications
Non-real time application:
1. File download (no timing issue)
downloading MP3 file of size 100 Mbytes
Assume throughput is 1 Mbps, how long will it take?
Time = Size / throughput = 100x8 Mbits / 1 Mb/sec = 800 seconds

2. File download (with time constraint)


downloading MP3 file of size 100 Mbytes
Assume we want this in 20 seconds, how much throughput is required?
throughput required = 100x8 Mbits / 20 sec = 40 Mb/s

1-6
Throughput vs Delay
L=5000 bits s=200,000 km/s

R = 1 Mbps
d=2000 km
A B

d(prop) = d/s = 2000km/200,000 km/s = 0.01 sec = 10 msec


d(trans) = L/R = 5000 bits / 1000,000 b/s = 0.005 sec = 5 msec

Total Delay for a packet to get from A to B = ?

Throughput = ?

1-7
Throughput vs Delay
L=5000 bits s=200,000 km/s

R = 1 Mbps
d=2000 km
A B

d(prop) = d/s = 2000km/200,000 km/s = 0.01 sec = 10 msec


d(trans) = L/R = 5000 bits / 1000,000 b/s = 0.005 sec = 5 msec

Total Delay for a single packet to get from A to B


= d(prop) + d(trans) + d(queue) + d(proc)
= 10mse + 5 msec + 0 +0
= 15msec

Throughput from A to B = ?

1-8
Throughput vs Delay
L=5000 bits s=200,000 km/s

R = 1 Mbps
d=2000 km
A B

d(prop) = d/s = 2000km/200,000 km/s = 0.01 sec = 10 msec


d(trans) = L/R = 5000 bits / 1000,000 b/s = 0.005 sec = 5 msec

Total Delay for a single packet to get from A to B


= d(prop) + d(trans) + d(queue) + d(proc)
= 10mse + 5 msec + 0 +0
= 15msec

Throughput from A to B = 1 Mbps

1-9
Throughput vs Delay
Rs = 1 Mbps, R = 100 Mbps, Rc = 0.1 Mbps A
i.e. throughput from A to B = 0.1 Mbps

Now assume Total delay from A to B = 3 msec Rs

sending 1 message (image) of size 1000 bits every msec R


Throughput required = 1000 bits / 0.001 sec = 1 Mbps
Rc

1-10
Throughput vs Delay

Application Layer: 2-11


Internet transport protocols services
TCP service: UDP service:
▪ reliable transport between sending ▪ unreliable data transfer
and receiving process between sending and receiving
▪ flow control: sender won’t process
overwhelm receiver ▪ does not provide: reliability,
▪ congestion control: throttle sender flow control, congestion
when network overloaded control, timing, throughput
guarantee, security, or
▪ connection-oriented: setup required connection setup.
between client and server processes
▪ does not provide: timing, minimum Q: why bother? Why
throughput guarantee, security is there a UDP?
Application Layer: 2-12
Internet applications, and transport protocols
application
application layer protocol transport protocol

file transfer/download FTP [RFC 959] TCP


e-mail SMTP [RFC 5321] TCP
Web documents HTTP [RFC 7230, 9110] TCP
Internet telephony SIP [RFC 3261], RTP [RFC TCP or UDP
3550], or proprietary
streaming audio/video HTTP [RFC 7230], DASH TCP
interactive games WOW, FPS (proprietary) UDP or TCP

Application Layer: 2-13


Securing TCP
Vanilla TCP & UDP sockets: TLS implemented in
▪ no encryption application layer
▪ cleartext passwords sent into socket ▪ apps use TLS libraries, that
traverse Internet in cleartext (!) use TCP in turn
Transport Layer Security (TLS) ▪ cleartext sent into “socket”
▪ provides encrypted TCP connections traverse Internet encrypted
▪ data integrity ▪ more: Chapter 8
▪ end-point authentication

Application Layer: 2-14

You might also like