Network Performance and Security
Network Performance and Security
National University of
Computer & Emerging
Sciences
Spring 2025
BSCS
Lecture 04
Network Performance(Delay, Loss, Throughput)
and Security
Chapter 1: roadmap
• What is the Internet?
• What is a protocol?
• Network edge: hosts, access network,
physical media
• Network core: packet/circuit switching,
internet structure
• Protocol layers, service models
• Performance: loss, delay, throughput
• Security
• History
B
packets in buffers (queueing delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
B
nodal
processing queueing
transmission
A propagation
B
nodal
processing queueing
Example
What are the propagation time and the transmission time for a
2.5-kbyte message (an e-mail) if the bandwidth of the network is
1 Gbps? Assume that the distance between the sender and the
receiver is 12,000 km and that light travels at 2.4 × 108 m/s.
Note that in this case, because the message is short and the bandwidth is
high, the dominant factor is the propagation time, not the transmission
time. The transmission time can be ignored.
Caravan analogy
100 km 100 km
Caravan analogy
100 km 100 km
3 probes 3 probes
3 probes
Packet loss
queue (aka buffer) preceding link in buffer has finite capacity
packet arriving to full queue dropped (aka lost)
lost packet may be retransmitted by previous node, by source end
system, or not at all
buffer
(waiting area) packet being transmitted
A
B
packet arriving to
full buffer is lost
* Check out the Java applet for an interactive animation (on publisher’s website) of queuing and loss
Throughput
throughput: rate (bits/time unit) at which bits are being sent from
sender to receiver
• instantaneous: rate at given point in time
• average: rate over longer period of time
link
pipecapacity
that can carry linkthat
pipe capacity
can carry
serverserver,
sendswith
bits Rsfluid at rate
bits/sec Rfluid at rate
c bits/sec
(fluid)
fileinto
of Fpipe
bits (Rs bits/sec) (Rc bits/sec)
to send to client
Throughput
Rs < Rc What is average end-end throughput?
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
bottleneck link
link on end-end path that constrains end-end throughput
Chapter 1: roadmap
• What is the Internet?
• What is a protocol?
• Network edge: hosts, access network,
physical media
• Network core: packet/circuit switching,
internet structure
• Performance: loss, delay, throughput
• Security
• Protocol layers, service models
• History
Network security
Internet not originally designed with (much) security in
mind
• original vision: “a group of mutually trusting users attached
to a transparent network”
• Internet protocol designers playing “catch-up”
• security considerations in all layers!
We now need to think about:
• how bad guys can attack computer networks
• how we can defend networks against attacks
• how to design architectures that are immune to attacks
Introduction: 1-18
A C
src:B dest:A
payload B
A C
src:B dest:A
payload
B
Introduction: 1-20
1. select target
2. break into hosts around
the network (see botnet)
Introduction: 1-21
Lines of defense:
authentication: proving you are who you say you are
• cellular networks provides hardware identity via SIM card; no such
hardware assist in traditional Internet
confidentiality: via encryption
integrity checks: digital signatures prevent/detect tampering
access restrictions: password-protected VPNs
firewalls: specialized “middleboxes” in access and core
networks:
off-by-default: filter incoming packets to restrict senders, receivers,
applications
detecting/reacting to DOS attacks
23
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Network security
Alice Bob
channel data, control
messages
Trudy
28
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Roadmap
29
FAST, National University of Computer and Emerging Sciences, Islamabad
The language of
Lecture 04: Network Delays
cryptography
Alice’s Bob’s
K encryption K decryption
A
key Bkey
30
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
KS KS
31
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
32
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Symmetric key crypto: DES
DES: Data Encryption Standard
• US encryption standard [NIST 1993]
33
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
AES: Advanced Encryption
Standard
• New (Nov. 2001) symmetric-key NIST
standard, replacing DES
• Processes data in 128 bit blocks
• 128, 192, or 256 bit keys
• Brute force decryption (try each key) takes
149 trillion years for AES
34
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Roadmap
35
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Authentication
“I am Alice”
Failure scenario??
36
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Authentication
in a network,
Bob can not “see” Alice, so
Trudy simply declares
herself to be Alice
“I am Alice”
37
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Alice’s
IP address
“I am Alice”
Failure scenario??
38
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
39
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Authentication: yet another
try
Protocol ap3: Alice says “I am Alice” and sends he
encrypted secret password to “prove” i
Alice’s encrypted
“I’m Alice”
IP addr password
40
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Authentication: yet another
try
Protocol ap3: Alice says “I am Alice” and sends he
encrypted secret password to “prove” i
Alice’s encrypted
“I’m Alice” record
IP addr password
and
Alice’s
OK playback
IP addr
still works!
Alice’s encrypted
“I’m Alice”
IP addr password
41
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Authentication: yet another
try
Goal: avoid playback attack
nonce: number (R) used only once-in-a-lifetime
ap4.0: to prove Alice “live”, Bob sends Alice
nonce, R. Alice
must return R, encrypted with shared secret
“I am Alice” key
R
KA-B(R) Alice is live, and
only Alice knows
key to encrypt
nonce, so it must
be Alice!
42
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Roadmap
43
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Message Integrity
Bob receives msg from Alice, wants to ensure:
• message originally came from Alice
• message not changed since sent by Alice
44
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Digital
signatures
cryptographic technique analogous to
hand-written signatures:
• sender (Bob) digitally signs document,
establishing he is document
owner/creator.
• verifiable, nonforgeable: recipient (Alice)
can prove to someone that Bob, and no
one else (including Alice), must have
signed document
45
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Digital signatures (Asymmetric
cryptography)
- Bob’s private -
Bob’s message, m KB m,K B(m)
key
Dear Alice
Bob’s message,
Oh, how I have missed Public key m, signed
you. I think of you all the
time! …(blah blah blah) encryption (encrypted) with
algorithm his private key
Bob
46
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Digital
signatures
-
suppose Alice receives msg m, with signature: m,
KB(m)
Alice verifies m signed by Bob by applying Bob’s
public key
Alice thus verifies that:
Bob signed m
no one else signed m
non-repudiation:
Alice can take m, and signature KB(m) to
court and prove that Bob signed m
47
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
48
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Digital signatures (Asymmetric cryptography) =
Authentication
49
FAST, National University of Computer and Emerging Sciences, Islamabad
Lecture 04: Network Delays
Digital signatures (with Hashing) =
Authentication + Message integrity
50
FAST, National University of Computer and Emerging Sciences, Islamabad