Week2.1
-
Upload
digvijay-singh -
Category
Technology
-
view
608 -
download
0
description
Transcript of Week2.1
Introduction 1-1
Chapter 1Introduction
Computer Networking: A Top Down Approach ,3rd/5th edition. Jim Kurose, Keith RossPearson/Addison-Wesley, April 2009.
A note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2009J.F Kurose and K.W. Ross, All Rights Reserved
Introduction 1-2
Goals
Examine the Types of Network Models
Understand nature of an Internet Protocol
Postal System
3
• Write address• Put stamp• Close envelop
Drop letter
Take letter to local post office
• Verify postage• “Route” letter
Take letter to destination’s postal office
Check destination address
Take letter to destination• Check address
• Open envelope
Other Information Networks
4
Fire signalsSending messages by birds
Other Networks
5
6
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Skeleton View of Internet
7
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
BroadcastCommunication
Network
8
• Information transmitted by any node is received by every other node in the network– Usually only in LANs (Local Area Networks)
E.g., WiFi, Ethernet (classical, but not current) E.g., lecture!
• What problems does this raise?
• Problem #1: limited range (the killer)
• Problem #2: privacy of communication
• Problem #3: coordinating access to the shared communication medium (Multiple Access Problem)
Broadcast Communication Networks
9
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
SwitchedCommunication
Network
BroadcastCommunication
Network
10
Information transmitted along a path of intermediary nodes“switches” or “routers”
Each switch acts as a small switchboardInformation comes in on one linkSwitch directs it out some other link
Basic issue: how do the switches figure out the next hop along the path?
Switched Communication Networks
11
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
SwitchedCommunication
Network
BroadcastCommunication
Network
Circuit-SwitchedCommunication
Network
Introduction 1-12
Circuit Switching
End-end resources reserved for “call”
link bandwidth, switch capacity
dedicated resources: no sharing
circuit-like (guaranteed) performance
call setup required
Introduction 1-13
Circuit Switching
network resources (e.g., bandwidth) divided into “pieces”
pieces allocated to calls
resource piece idle if not used by owning call (no sharing)
dividing link bandwidth into “pieces” frequency division time division
14
Circuit Switching (e.g., Phone Network)• Establish: source creates circuit to
destination– Nodes along the path store connection info– Nodes generally reserve resources for the
connection– If circuit not available: “Busy signal”
• Transfer: source sends data over the circuit– No destination address, since nodes know path
• Teardown: source tears down circuit when done
15
Circuit Switching With Human Operator
Telephone Network
Almon Brown Strowger (1839 - 1902)1889: Invents the mechanical switching system for telephone network
17
Timing in Circuit Switching
Host 1 Host 2Switch 1 Switch 2
time
18
Timing in Circuit Switching
Circuit Establishment
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
time
19
Timing in Circuit Switching
Circuit Establishment
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
Transmission delay
time
20
Timing in Circuit Switching
Circuit Establishment
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
Transmission delay
time
21
Timing in Circuit Switching
Circuit Establishment
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
propagation delay between Host 1 and Host 2
Transmission delay
time
22
Timing in Circuit Switching
Information
Circuit Establishment
Transfer
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
propagation delay between Host 1 and Host 2
Transmission delay
time
23
Timing in Circuit Switching
Information
Circuit Establishment
Transfer
Circuit Teardown
Host 1 Host 2Switch 1 Switch 2
propagation delay between Host 1 and Switch1
propagation delay between Host 1 and Host 2
Transmission delay
time
24
Circuit Switching• Node (switch) in a circuit switching network
incoming links outgoing linksNode
How do the black and orange circuits share the outgoing link?
25
Circuit Switching: Multiplexing a Link
• Time-division– Each circuit
allocated certain time slots
• Frequency-division– Each circuit
allocated certain frequencies
timefr
eque
ncy
time
26
Time-Division Multiplexing Illustration
• Time divided into frames; frames into slots
• Relative slot position inside a frame determines to which conversation data belongs
– E.g., slot 0 belongs to orange conversation
• Requires synchronization between sender and receiver—surprisingly non-trivial!
• In case of non-permanent conversations– Need to dynamically bind a slot to a conversation
• If a conversation does not use its circuit the capacity is lost!
Frames
0 1 2 3 4 5 0 1 2 3 4 5Slots =
27
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
SwitchedCommunication
Network
BroadcastCommunication
Network
Circuit-SwitchedCommunication
Network
Packet-SwitchedCommunication
Network
Introduction 1-28
Packet Switching
each end-end data stream divided into packets
user A, B packets share network resources
each packet uses full link bandwidth
resources used as needed
resource contention: aggregate resource
demand can exceed amount available
congestion: packets queue, wait for link use
store and forward: packets move one hop at a time Node receives complete
packet before forwarding
Bandwidth division into “pieces”
Dedicated allocationResource reservation
29
Packet Switching• Data sent as chunks of formatted bit-sequences
(Packets)
• Packets have following structure:
Header and Trailer carry control information (e.g., destination address, checksum)
• Each packet traverses the network from node to node along some path (Routing) based on header info.
• Usually, once a node receives the entire packet, it stores it (hopefully briefly) and then forwards it to the next node (Store-and-Forward Networks)
Header Data Trailer (sometimes)
30
Packet Switching• Node in a packet switching network
incoming links outgoing linksNode
Memory
Introduction 1-31
Packet-switching: store-and-forward
takes L/R seconds to transmit (push out) packet of L bits on to link at R bps
store and forward: entire packet must arrive at router before it can be transmitted on next link
delay = 3L/R (assuming zero propagation delay)
Example: L = 7.5 Mbits R = 1.5 Mbps transmission delay =
15 sec
R R RL
more on delay shortly …
Introduction 1-32
Packet Switching: Statistical Multiplexing
Sequence of A & B packets does not have fixed pattern, bandwidth shared on demand statistical multiplexing.
TDM: each host gets same slot in revolving TDM frame.
A
B
C100 Mb/sEthernet
1.5 Mb/s
D E
statistical multiplexing
queue of packetswaiting for output
link
33
Packet Switching: Multiplexing/Demultiplexing
• Data from any conversation can be transmitted at any given time
– Single conversation can use the entire link capacity if it is alone
• How to tell them apart?– Use meta-data (header) to describe data
34
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
SwitchedCommunication
Network
BroadcastCommunication
Network
Circuit-SwitchedCommunication
Network
Packet-SwitchedCommunication
Network
Datagram Network
35
Datagram Packet SwitchingEach packet is independently switchedEach packet header contains full destination address
No resources are pre-allocated (reserved) in advance
Leverages “statistical multiplexing” (or stat-muxing)Gambling that packets from different conversations won’t all arrive at the same time, so we don’t need enough capacity for all of them at their peak transmission rateAssuming independence of traffic sources, can compute probability that there is enough capacity
Example: IP networks; postal system
36
Timing of Datagram Packet Switching
Packet 1
Host 1 Host 2Node 1 Node 2
propagationdelay betweenHost 1 and Node 1
37
Timing of Datagram Packet Switching
Packet 1
Host 1 Host 2Node 1 Node 2
propagationdelay betweenHost 1 and Node 1
transmission time of Packet 1at Host 1
38
Packet 1
Packet 1
Timing of Datagram Packet Switching
Packet 1 processing
delay of Packet 1 at Node 2
Host 1 Host 2Node 1 Node 2
propagationdelay betweenHost 1 and Node 1
transmission time of Packet 1at Host 1
39
Packet 1
Packet 2
Packet 3
Packet 1
Packet 2
Packet 3
Timing of Datagram Packet Switching
Packet 1
Packet 2
Packet 3
processing
delay of Packet 1 at Node 2
Host 1 Host 2Node 1 Node 2
propagationdelay betweenHost 1 and Node 1
transmission time of Packet 1at Host 1
40
Datagram Packet Switching
Host A
Host BHost E
Host D
Host C
Node 1 Node 2
Node 3
Node 4
Node 5
Node 6 Node 7
41
Datagram Packet Switching
Host A
Host BHost E
Host D
Host C
Node 1 Node 2
Node 3
Node 4
Node 5
Node 6 Node 7
42
Datagram Packet Switching
Host A
Host BHost E
Host D
Host C
Node 1 Node 2
Node 3
Node 4
Node 5
Node 6 Node 7
43
Communication networks can be classified based on the way in which the nodes exchange information:
Taxonomy of Communication Networks
Communication Network
SwitchedCommunication
Network
BroadcastCommunication
Network
Circuit-SwitchedCommunication
Network
Packet-SwitchedCommunication
Network
Datagram Network
Virtual Circuit Network
A hybrid of circuits and packets; headers include a
“circuit identifier” established during a setup phase
44
Advantages of Circuit Switching• Guaranteed bandwidth
– Predictable communication performance– Not “best-effort” delivery with no real
guarantees
• Simple abstraction– Reliable communication channel between hosts– No worries about lost or out-of-order packets
• Simple forwarding – Forwarding based on time slot or frequency– No need to inspect a packet header
• Low per-packet overhead– Forwarding based on time slot or frequency– No IP (and TCP/UDP) header on each packet
45
Disadvantages of Circuit Switching• Wasted bandwidth
– Bursty traffic leads to idle connection during silent period– Unable to achieve gains from “statistical multiplexing”
• Blocked connections– Connection refused when resources are not sufficient– Unable to offer “okay” service to everybody
• Connection set-up delay – No communication until the connection is set up– Unable to avoid extra latency for small data transfers
• Network state– Network nodes must store per-connection information– Unable to avoid per-connection storage and state– This makes failures more disruptive!
46
Packet-Switching vs. Circuit-Switching
• Performance advantage of packet-switching over circuit switching: Exploitation of statistical multiplexing
• Reliability advantage: since routers don’t know about individual conversations, when a router or link fails, it’s:Easy to fail over to a different path
• Deployability advantage: easier for different parties to link their networks together because they’re not promising to reserve resources for one another
• Disadvantage: packet-switching must handle congestion
– More complex routers (more buffering, sophisticated dropping)
– Harder to provide good network services (e.g., delay and bandwidth guarantees)
Introduction 1-47
Packet switching versus circuit switching
1 Mb/s link each user:
100 kb/s when “active”
active 10% of time
circuit-switching: 10 users
packet switching: with 35 users,
probability > 10 active at same time is less than .0004 (leave as exercise)
Packet switching allows more users to use network!
N users
1 Mbps link
Introduction 1-48
Packet switching versus circuit switching
great for bursty data resource sharing simpler, no call setup
excessive congestion: packet delay and loss protocols needed for reliable data transfer,
congestion control Q: How to provide circuit-like behavior?
bandwidth guarantees needed for audio/video apps
still an unsolved problem (chapter 7)
Is packet switching an outright winner?
Q: human analogies of reserved resources (circuit switching) versus on-demand allocation (packet-switching)?
CombinationsCan a packet switched network run over a circuit-switched one?
Can a circuit-switched network run over a packet-switched one?
49
Introduction 1-50
What’s a protocol?human protocols: “what’s the time?” “I have a question” introductions
… specific msgs sent… specific actions
taken when msgs received, or other events
network protocols: machines rather
than humans all communication
activity in Internet governed by protocols
protocols define format, order of msgs sent and
received among network entities, and actions taken on msg transmission, receipt
Introduction 1-51
What’s a protocol?a human protocol and a computer network
protocol:
Q: Other human protocols?
Hi
Hi
Got thetime?
2:00
TCP connection request
TCP connectionresponseGet http://www.awl.com/kurose-ross
<file>time
52
What Is A Protocol?
• A protocol is an agreement on how to communicate
• Includes syntax and semantics– How a communication is specified & structured
Format, order messages are sent and received
– What a communication means Actions taken when transmitting, receiving, or when a
timer expires
53
Examples of Protocols in Human Interactions
• Telephone1. (Pick up / open up the phone.)2. Listen for a dial tone / see that you have
service.3. Dial.4. Should hear ringing …5. Callee: “Hello?”6. Caller: “Hi, it’s Alice ….”
Or: “Hi, it’s me” ( what’s that about?)7. Caller: “Hey, do you think … blah blah blah …”
pause8. Callee: “Yeah, blah blah blah …” pause
54
Examples of Protocols in Human Interactions
• Asking a question1. Raise your hand.2. Wait to be called on.
1. Or: wait for speaker to pause and vocalize
55
Example: HyperText Transfer Protocol
GET /courses/archive/spring06/cos461/ HTTP/1.1Host: www.cs.princeton.eduUser-Agent: Mozilla/4.03CRLF
HTTP/1.1 200 OKDate: Mon, 6 Feb 2006 13:09:03 GMTServer: Netscape-Enterprise/3.5.1Last-Modified: Mon, 6 Feb 2006 11:12:23 GMTContent-Length: 21CRLFSite under construction
Request
Response
56
Example: The Internet Protocol (IP)Problem:Many different network technologiese.g., Ethernet, Token Ring, ATM, Frame Relay, etc.How can you hook them together?
• n x n translations?
IP was invented to glue them togethern translationsMinimal requirements (datagram)
The Internet is founded on IP“IP over everything”
What does an internet protocol do?What would the protocol need to communicate?
57
58
Example: IP Packet
4-bitVersion
4-bitHeaderLength
8-bit Type ofService (TOS)
16-bit Total Length (Bytes)
16-bit Identification3-bitFlags 13-bit Fragment Offset
8-bit Time to Live (TTL)
8-bit Protocol 16-bit Header Checksum
32-bit Source IP Address
32-bit Destination IP Address
Options (if any)
Payload
20-byte20-byteheaderheader
59
Example: IP: “Best-Effort” Packet Delivery ProtocolDatagram packet switchingSend data in packetsHeader with source & destination address
Service it provides:Packets may be lostPackets may be corruptedPackets may be delivered out of order
source destination
IP network
60
Example: Transmission Control Protocol
• Communication service– Ordered, reliable byte stream– Simultaneous transmission in both directions
• Key mechanisms at end hosts– Retransmit lost and corrupted packets– Discard duplicate packets and put packets in order– Flow control to avoid overloading the receiver buffer– Congestion control to adapt sending rate to network load
source network destination
TCP connection
61
Protocol Standardization• Ensure communicating hosts speak the same
protocol– Standardization to enable multiple implementations– Or, the same folks have to write all the software
• Standardization: Internet Engineering Task Force– Based on working groups that focus on specific issues– Produces “Request For Comments” (RFCs)
Promoted to standards via rough consensus and running code
– IETF Web site is http://www.ietf.org– RFCs archived at http://www.rfc-editor.org
• De facto standards: same folks writing the code– P2P file sharing, Skype, <your protocol here>…
Summary
Examined the types of Communication Networks
Got introduced to the concept of protocol
Acknowledgment & CopyrightThe instructor duly acknowledges the authors
of the text book “Computer Networking: A Top-down approach”, James Kurose & Keith Ross and the instructors of EE122 “Computer Networks” course at UC Berkeley, Ian Stoica, Scott Shenker, Jennifer Rexford, Vern Paxson and other instructors at Princeton University for the course material.
Please note: certain modifications may have been done to adapt the slides to the current audience -Bruhadeshwar @cs335 Spring 2011(C)