protocol_intro

Download Report

Transcript protocol_intro

Introduction to Network Protocols
Kang Li
CSx760 Computer Networks
1
Outline
 Administrative trivia’s
 TA Class Account
 [email protected]
 TA Individual Contact Information
 Arsham Mesbah <[email protected]>
 Yingfeng Wang <[email protected]>
 What is a network protocol?
CSx760 Computer Networks
2
What is a Network Protocol?
 A network protocol is about Format
 Data Format
 Routine (Action) Format
 A network protocol defines the format and the
order of messages exchanged between two or
more communicating entities, as well as the actions
taken on the transmission and/or receipt of a
message or other event.
CSx760 Computer Networks
3
The Protocol Stack and Ways to Traverse It
 Protocol stack
 collection of protocols
implementing a series of layers
 Traverse
 Bottom-up
 Top-down
CSx760 Computer Networks
4
Top-down by examples
What happens when you type in a web page
Your computer
?
www.google.com
Internet
CSx760 Computer Networks
5
Application Layer
Turn the typed in URL into HTTP Get Request
Your computer
Get http://www.google.com
HTTP 1.1
Host: www.google.com
Connection: keep-alive
…
CSx760 Computer Networks
6
Application Layer (cont.)
Finding the right IP address: DNS
Where is www.google.com?
Local
Domain Name Server
(129.95.50.2)
Your computer
(129.95.50.53)
What’s the IP address for www.google.com?
Oh, it is 216.239.53.100
What if the local DNS server doesn’t know?
CSx760 Computer Networks
7
Transport Layer (TCP)
Break message into packets (TCP segments),
and deliver them (in order and reliably)
Your computer
Get http://www.google.com
HTTP 1.1
Host: www.google.com
Connection: keep-alive
…
3 w.goog
2 p://ww
1 Get htt
CSx760 Computer Networks
8
Network Layer (IP)
Address each packet so that it can traverse the
network from the sender to the destination.
Your computer
(128.192.4.122)
www.google.com
(216.239.51.100)
Destination
216.239.51.100
source
data
128.192.4.122 1 Get htt
CSx760 Computer Networks
9
Network Layer (cont.)
Getting to the Campus backbone (static routing)
Your computer
(128.192.4.122)
Default route
Local
router
(128.192.4.1)
Please send my packet to 216.239.51.100
UGA
CSx760 Computer Networks
10
Network Layer (cont.)
Getting to the Internet (intra-domain routing)
Each router forward packets toward the destination
Peach Net
CS department
UGA Campus Network
CSx760 Computer Networks
11
Network Layer (cont.)
Getting through the Internet (inter-domain routing)
Qwest
Sprint
PeachNet
Level3
Exodus
CSx760 Computer Networks
12
Link Layer
Address each IP packet with hardware address so
that it be deliver to the next hop
Local
router
(128.192.4.122)
Your computer
(128.192.4.122)
Dst MAC
Hardware Address
(08:00:20:9D:01:1E)
Src MAC
IP Packet
Hardware Address
(00:03:E4:3D:A8:00)
How to know the next hop’s
hardware address?
CSx760 Computer Networks
UGA
13
Link and Physical Layer
OC-3
CSx760 Computer Networks
14
Summary of the Example
 Top-down Traverse of 5 layers
 Application:
HTTP
 turn the typed in URL into Get
Request
 Transport:
TCP
 break message into segments, make
in-order and reliable delivery
 Network:
IP
 routing of datagram from source to
destination
 Link:
Ethernet/Wavelan
 data transfer between neighboring
network elements
 Physical:
 bits “on the wire”
CSx760 Computer Networks
15
What’s inside
 Network Protocols are about format and the order
of messages exchanged.
 What are the challenge of designing protocols?
 Or, why some protocols are complicated?
 You need to know why a particular format or order is
chosen.
 Here is the same example …
CSx760 Computer Networks
16
What if the Data gets Lost?
Problem: Lost Data
GET index.html
Internet
Solution: Timeout and Retransmit
GET index.html
Internet
GET index.html
GET index.html
CSx760 Computer Networks
17
What if the Data Doesn’t Fit?
Problem: Packet size
 On Ethernet, max IP packet is 1.5kbytes
 Typical web page is 10kbytes
Solution: Fragment data across packets
ml
x.ht
inde
GET
GET index.html
CSx760 Computer Networks
18
What if the Data is Out of Order?
Problem: Out of Order
ml
inde
x.th
GET
GET x.thindeml
Solution: Add Sequence Numbers
ml 4
inde 2
x.th 3
GET 1
GET index.html
CSx760 Computer Networks
19
What if receiver has no resources (flow control)?
Problem: Overflowing receiver buffers
PUT remix.mp3
Internet
Solution: Receiver advertised window
PUT remix.mp3
Internet
16KB free
CSx760 Computer Networks
20
What if Network is Overloaded?
Problem: Network Overload
Solution: Buffering and Congestion Control
 Short bursts: buffer
 What if buffer overflows?
 Packets dropped and retransmitted
 Sender adjusts rate until load = resources
CSx760 Computer Networks
21
What if the Data gets Corrupted?
Problem: Data Corruption
GET index.html
Internet
GET windex.html
Solution: Add a checksum
0,9 9
6,7,8 21
X
4,5 7
CSx760 Computer Networks
1,2,3 6
22
Questions?
CSx760 Computer Networks
23