Packet Switching - Berkman Center for Internet & Society

Download Report

Transcript Packet Switching - Berkman Center for Internet & Society

Internet Technology:
A Sampler
Ramesh Johari
Massachusetts Institute of Technology
[email protected]
Part I: Routing
A Simplified Internet
My Computer
Router
Website
A Telephone Network
My Telephone
Switch
Your Telephone
The Difference?
Telephone Networks
Circuit Switched
= Guaranteed service from the network
The Internet
Packet Switched
= No guarantees from the network!
Packets
To: Website
Please send me your home page
Header Data
From: My Computer
All files transmitted on the Internet
are first broken into packets.
Routing
How does a router know
where to send a packet?
Routing Tables
Packet’s
Destination
Next
Router
Distance to
Destination
Website
Router B
2 Hops
Router A
Routing Table
Routing Table Update
Router A
Router B
Website
Router C says:
“I am 1 hop away
from Website.”
Router C
Routing Table Update
Router A
Website
Router A’s routing
table is updated.
Router C
Routing Table Update
Packet’s
Destination
Next
Router
Distance to
Destination
Website
Router C
1 Hop
Router A
Routing Table
Routing
KEY POINTS:
Routing is:
Decentralized
Anonymous
Part II:
TCP and Denial of Service
Transmission Control Protocol
Transmission Control Protocol
(reliable end-to-end)
Internet Protocol (routing)
Reliable Transmission
...
Sender
Packets
4
3
2
1
1
2
3
4
Receiver
Acknowledgements
No acknowledgement: Sender resends packet
TCP Examples
•
•
•
•
E-mail upload/download
Telnet session
FTP file transfer
Web page download
– one web page download may mean many
TCP connections!
Setting Up a TCP Connection
SYN: Can I set up a connection with you?
My Computer
1.2.3.4
SYN-ACK:
Yes, 1.2.3.4...
Website
…as long as you respond to this message.
Denial of Service
What if:
1.
1.2.3.4 isn’t my real IP address? (spoofing)
No response!
2.
I repeat 1 million times per minute?
1 million “half-open” connections!
The Website can’t handle the load!
Countermeasures: Filtering
1.
Block Incoming SYN requests
2.
Check source address on outgoing
packets
For More Information
Vern Paxson,
“How to Own the Internet in Your
Spare Time:”
A discussion of how “worms” gain
control of vulnerable computers.
Part III: Cryptography
Cryptography
Cryptography :
The art and/or science of encoding
data so it can only be decoded by
specific individuals.
Modern Cryptography
Most modern cryptographic
algorithms are widely known.
The “secret” is the key which
drives the algorithm.
Modern Cryptography
• Symmetric Key Cryptography
• Public Key Cryptography
Symmetric Keys: Example
Encryption: Add a fixed key to each number in a sequence.
Sender’s Message:
6-1-7-4-9-5-7-5-4-7
+ The Key : 3
Encrypted Message:
9-4-10-7-12-8-10-8-7-10
Decryption: Subtract key from each number in sequence.
Symmetric Keys
“Symmetric Keys” means:
Both sender and receiver have the same key.
An Internet problem:
How do customers and websites share keys
with each other?
Public Keys: Example
Receiver says to sender:
“Take this open padlock and box.”
Public Keys: Example
Receiver says to sender:
“Take this open padlock and box.”
“Put anything you want to send me inside.”
Public Keys: Example
Receiver says to sender:
“Take this open padlock and box.
Put anything you want to send me inside.
Then close the box, and lock it.”
Public Keys: Example
Receiver says to sender:
“Take this open padlock and box.
Put anything you want to send me inside.
Then close the box, and lock it.”
Public Keys: Example
• Locking the box is one-way:
– It is easy to do, but hard to undo
• But the receiver has a trap door:
– He uses the key to unlock the box
On the Internet
• Customers use a website’s public key
to encrypt data.
• Even though everyone knows the
algorithm used, decryption is hard
without the receiver’s private key.
A Final Note:
Secure Sockets Layer (SSL)
1.
Use public key encryption to ensure
both parties share a symmetric key
2.
Use (faster) symmetric key encryption
for communication
Part IV: Spiders
Recursive Retrieval
My Computer
Web Page
Where is the Spider?
My Computer
Web Page
Where is the Spider?
My Computer
Web Page
Where is the Spider?
My Computer
Web Page
The Reality
My Computer
Web Page
THE SPIDER STAYS HERE!