Lecture02 Circuits Packets
Lecture02 Circuits Packets
Computer Networks:
Architecture and Protocols
Lecture 2
Sharing Networks: “Packets” and “Flows”
Rachit Agarwal
Goal of Today’s Lecture
• Learn about:
• Two important performance metrics:
• Bandwidth
• Delay
• Why are these important?
Source Path
Destination
A computer network can be abstractly represented as a graph
Source Path
Path
Source
Destination
Destination
Many mechanisms!
• Locating the destination: Naming, addressing
Source Path
Path
Source
Destination
Destination
Today’s lecture: sharing computer networks
1. What does network sharing mean?
2. What are the performance metrics?
3. What are the various mechanisms for sharing networks?
4. Why “packets” and “flows”?
5. Understanding bandwidth and latency for packets
What does network sharing mean?
The problem of sharing networks
• Must support many “users” at the same time
• Each user wants to use the network (send and receive data)
• Limited resources
• Fundamental question:
• How does network decide which resource to allocate to which user
at any given point of time?
What are the performance metrics?
Performance metrics in computer networks!
• Bandwidth: Number of bits sent per unit time (bits per second, or bps)
• Depends on
Bandwidth
• Hardware
• Network traffic conditions
• ….
• Propagation delay: Time for one bit to move through the link (seconds)
• Depends on
• Hardware
• Network traffic conditions
Propagation
• How large is the unit? Delay
• ….
• Many other performance metrics (reliability, etc.)
• We will come back to other metrics later …
What are the various mechanisms for sharing networks?
Two approaches to sharing networks
• First: Reservations
• Reserve bandwidth needed in advance
• Set up circuits and send data over that circuit
• No need for packets
• Must reserve for peak bandwidth
• Peak bandwidth?
• Applications may generate data at rate varying over time
• 100MB in first second
• 10MB in second second …
• Reservations must be made for “peak”
Circuit switching: Implementing reservations since …
Telephone networks
• One of the many approaches to implementing reservations
• Mechanism:
• Source sends a reservation request for peak demand to destination
• Switches/routers establish a “circuit”
• Source sends data
• Source sends a “teardown circuit” message
Circuit switching: an example (red request fails)
Request =
Source 100Mbps
Bandwidth
= 100Mbps
Source
Destination
Destination
Circuit switching: another example (red request succeeds)
Request =
Source 10Mbps
Bandwidth
= 100Mbps
Request =
10Mbps
Source
Destination
Destination
Circuit switching and failures
• Circuit is established
• Link fails along path (!!!!!!!)
• First time we have seen failures making our life complicated.
• Remember this moment.
• Its gonna happen, over and over again.
• Goods:
• Predictable performance
• Reliable delivery
• Simple forwarding mechanism
• Not-so-goods
• Resource underutilization
• Blocked connections
• Connection set up overheads
• Per-connection state in switches (scalability problem)
Two approaches to sharing networks
• Second: On demand (also known as “best effort”)
• Designed specifically for the Internet
• Break data into packets
• Send packets when you have them
• Hope for the best …
Packet switching: an example
Source
Source
Destination
Destination
Packets
• Packets carry data (are bag of bits):
• Header: meaningful to network (and network stack)
• can be multiple headers
• Body: meaningful only to application
• More discussion in next lecture
• Thats the only way a router/switch can know what to do with the packet
Packet switching: what does a switch look like
Packet switching summary
• Goods:
• No resource underutilization
• A source can send more if others don’t use resources
• No blocked connection problem
• No per-connection state
• No set-up cost
• Not-so-goods:
• Unpredictable performance
• High latency
• Packet header overhead
Circuits vs packets
• Pros for circuits:
• Better application performance (reserved bandwidth)
• More predictable and understandable (w/o failures)
• Pros for packets:
• Better efficiency
• Simpler switches
• Easier recovery from failures
• Faster startup to first packet delivered
Summary of network sharing
Statistical multiplexing
• Statistical multiplexing: combining demands to share resources efficiently
Constraints:
• Packet size = 1000Byte
• Rate = 100Mbps
• Length = 30,000m