Presentation Layer, Congestion Control
- Lossy Compression
- Security
- Congestion Control
- Queueing Disciplines
- Fairness
Presentation Layer: Lossy Compression
- JPEG:
- discrete cosine transform (almost lossless)
- quantization: reduced precision of high spatial frequencies
- run-length encoding of quantized data
- MPEG:
- JPEG on each frame
- 3 frame types:
- I (Intrapicture), like JPEG
- P (Predicted), specified in terms of the differences from prior I frame
- B (Bidirectional Predicted), specified in terms of the differences from
prior I/P frame to next I/P frame
Presentation Layer: Security
- trusted system(s): own computer, partner's computer
- untrusted system: network
- plaintext encrypted to give cyphertext, decrypted
to give back plaintext
- secret key is required for decryption, may be required
for encryption:
- if encryption and decryption keys are same, encryption key must
be kept secret: this is secret key cryptography
- if encryption and decryption keys are same, encryption key may
be published: this is public key cryptography
- in both cases, the decryption key {\bf must} be kept secret to
guarantee privacy
Security Algorithms, Protocols
- one-time pad: unbreakable, but key security is difficult (secret key)
- DES: hard to break 56-bit key, commercial use (secret key)
- Kerberos: security protocol, distributes and renews session keys
based on host keys (secret key)
- RSA: arbitrary size keys, public keys
- message integrity: can I prove in court that this message was sent
to me by person X?
In-Class Discussion
- how would you make contact with a perfect stranger over an
insecure medium (e.g. the internet) using:
- public-key encryption
- private-key encryption
- what attacks are possible?
- how do you know who you are talking with? does it matter?
- how does this change if you are allowed one secure exchange before
you start?
Congestion Control
- April 6th:
- flow control slows down the sender
the receiver's pace
- congestion control slows down the sender
to avoid overwhelming the network:
- finite router buffer space means discarding packets
when buffers full
- even with infinite buffer space, data would get stale as it sits
in the queues
- discarding packets wastes resources, makes network unpredictable
- who is "causing" the congestion?
- everyone
- those who increase their sending rate
Network Model
- packet switched network
- connectionless, but routers keep soft state (" flows" --
see IPv6 flow identifier)
- best-effort vs. QoS
- who is responsible for congestion control?
- routers: have more information
- hosts: have more control
- reservation or feedback
- window-based or rate-based
Fairness
- absolute fairness: everyone gets the same bandwidth out of the network
- capitalism: everyone gets bandwidth proportional to what they pay
- socialism: everyone gets bandwidth proportional to what they need
- local fairness: every flow gets the same bandwidth at each router
(parking structure problem)
- QoS: you don't get the bandwidth you need, you get the bandwidth
you reserved
Router Queueing Strategies
- FIFO:
- packets are added to outbound queue in the order received
- packets received while queue is full are discarded
- end-systems become responsible for congestion control
- Fair Queueing:
- each flow has a logical queue
- packets are sent in order one from each non-empty queue
- packets from the fastest flows are discarded first
- enforces local fairness
Fair Queueing with Variable-Sized Packets
- for variable-sized packets, must compute fair time to send
- record for each packet, as it arrives, stamp F_i, where
- F_i = max(F[i-1], A_i)+P_i
- F[i-1] is the stamp of the packet before us in this flow
- A_i is the actual time of the packet arrival
- P_i is the packet size (in time to transmit)
- always send the packet with the lowest value of F