understanding networked applications: a first course chapter 18 by david g. messerschmitt
TRANSCRIPT
Understanding Networked Applications A First Course2
Objectives
• Major functions of the network
• Impact of network on application performance
• Collective issues in networking
Understanding Networked Applications A First Course3
Impact of network on applications
• Communication service provided the application– What does application have to do for itself?
• Impact on application performance– Message (packet) latency– Message (packet) loss– Message (packet) corruption
Understanding Networked Applications A First Course4
Internetworking (IP)
Subnetworks
Datagram (UDP) Bytestream session (TCP)
Remote method invocation (RMI)
Application
Middleware
OS
Network
Internet protocol architecture
Understanding Networked Applications A First Course5
Hosts
Switches
Backbonelinks
Access links
Network topology
Understanding Networked Applications A First Course6
Properties of a communication link
010101110101010 0000101101101100110110
Bits waiting to be sent
Bits that have arrived
Bits in transit
Bitrate = number transmitted per second(Bitrate is sometimes called “bandwidth”)Propagation delay = input-output delay experienced by each bit
Understanding Networked Applications A First Course7
Sending packets on a link
0101101011010011011010110101010101011010
Packet 1 Packet 2 Packet 3
There must be some way (bit patterns) for the receiver to distinguish packets
Bitrate > # packets per sec x average size of a packet
Understanding Networked Applications A First Course8
Messages on threeincoming links
Singleoutgoinglink
Queues
Statistical multiplexing
What are some other examples of statistical sharing?
Understanding Networked Applications A First Course9
Congestion
• Cause: irregular packet arrivals, and irregular packet length
• Direct effect: sometimes more packets have to wait in queues for space on output link– In severe cases, packets discarded
• Indirect effect: waiting time in queues contributes to packet (and hence message) latency
Understanding Networked Applications A First Course10
Packet structure
• Header– Indicate beginning of packet– Destination address for forwarding– Other information specified by network
protocols
• Payload– Unstructured data to be delivered to application
Header Payload
Understanding Networked Applications A First Course11
Packet switch
Addr OutLink
Output link
Routing table
Packet
Packet forwarding
Understanding Networked Applications A First Course12
Two basic functions in packet switching
• Packet forwarding– Transmitting each packet on the appropriate
output link– Based on routing table
• Routing– Updating the routing table– Objective: each packet gets closer to destination
via less congested links
Understanding Networked Applications A First Course13
Routing
• Full route not written down• Each packet switch has >1 output link• Routing table :
• Reducing table size– use wildcards: 141.211.* next hop is X
Final Destination Next hop141.211.203.32 X207.75.186.1 Y
Understanding Networked Applications A First Course14
Routing function
• Switches (routers) talk to each other– “I’m now accepting traffic for 141.211.*”
• Called “advertising a route”
– “Is anyone accepting traffic for 141.211.*?”
• Update entries in own routing table
• Sophistication is in deciding whether to accept traffic
Understanding Networked Applications A First Course15
Routing Dangers
• Long routes• Circular routes
– HopLimit limits damage
– Decrement HopLimit at each router
– Discard packet if HopLimit=0
• Hijacking routes– Advertise a route, but don’t deliver
• Route flapping– Frequent updates to routing table
Understanding Networked Applications A First Course16
Packet delivery not guaranteed
• Intermediate switch not responding– Temporary malfunction– Queues full (congestion)
• Bad routing– Too long or circular
• Corruption of packet, especially header• Network does not inform sender
– Network may not know!
Understanding Networked Applications A First Course17
Why packets?
• Fairness: short message doesn’t have to wait for long message– Allows messages to be sent concurrently– Reduces statistical waiting time
• Store and forward delay reduced
• Data garbling may necessitate resending only a packet, not a whole message
Understanding Networked Applications A First Course18
IP Addresses• Every host gets a distinct address
– Can be dynamically assigned
• IPv4 (current standard)– Each address 32 bits– Divide into 8 bit segments– Example: 141.211.203.32– 4 billion addresses
• IPv6 (future standard)– Each address 128 bits– ~1500 addresses per square foot
Recall three ways of locating something:
• Address
• Name
• Reference
Understanding Networked Applications A First Course19
Domain Name Service
• IP addresses are inconvenient for people– 32 bits hard to remember– 128 bits very hard to remember
• Domain names– e.g. www.sims.berkeley.edu
• Domain Name Service (DNS)– get an IP address from a domain name
Understanding Networked Applications A First Course20
Hierarchy in location
• Addresses hierarchical in topology– Maximize “wild cards” and distribute address
administration
• Names hierarchical in administration– Single administered organizations often
distributed topologically (e.g. ibm.com)
• DNS decouples these two issues
Understanding Networked Applications A First Course21
Simulcast Multicast
Forms of broadcast
Multicast requires more sophisticated addressing and routing within the network
Understanding Networked Applications A First Course22
Producer Consumer
Queue
Streamof messages
Flow control
Flow control
Normally the producer determines what information is sent, but consumer has to have a way to slow down producer
Understanding Networked Applications A First Course23
Network congestion
• Fluctuations of traffic can result in overloads in given network links– Failure of statistical multiplexing
• Analogous to processing congestion of a server, except resent packets can make the problem worse
• Congestion must be limited in some fashion
Understanding Networked Applications A First Course24
Carriedtraffic
Offeredtraffic
Network “capacity”
Increasing portion ofnetwork traffic is resentpackets
Socialoptimum
Congestion instability
Understanding Networked Applications A First Course25
Questions to address
• What social objectives should a congestion control method achieve?
• What technical approaches are available to achieve those objectives?
• What is the cost of those approaches?
• Ultimately, what will the customer pay for congestion control, and how does that relate to the value received?
Understanding Networked Applications A First Course26
Congestion control methods
• Over-provisioning of facilities (mitigation, not control)
• Network initiated– Network source flow control, or
– Source notification and policies, policing, or pricing incentives, or
– Admission control for sessions
• Sources initiated– Source detects congestion (necessary resent packets is one
method), and
– Voluntary or mandatory policiesExamples of each?
Understanding Networked Applications:A First Course
Quality of service (QoS)
by
David G. Messerschmitt
Understanding Networked Applications A First Course28
QoS attributes of a packet
• Packet latency– Time until packet delivered at destination
– Transmission time, propagation time, queuing delay, processing time
• Packet loss• Packet corruption
– Payload only
– Normally network will not deliver corrupt packet
Understanding Networked Applications A First Course29
Transport services
• “Raw” packet service is not what is needed by most applications
• Transport services “condition” packet service by adding layers– Reliable delivery
– Message service
– Session
– Time stamps
– etc
Understanding Networked Applications A First Course30
Audiocoder
Audiodecoder
End-to-enddelay
Stream ofpackets
Packetlatency
Packet latency affects transport service QoS
Understanding Networked Applications A First Course31
Reliable delivery
• Add acknowledgement for each packet
• Lost packet can be detected by missing ACK
• Lost packet can be retransmitted
• Tradeoff:– Reliable delivery for greater latency– Latency-sensitive applications must abandon
reliable delivery (e.g. remote conferencing)
Understanding Networked Applications A First Course32
QoS Guarantees
• Source and network enter “session contract”:– Source promises not to exceed specified traffic
parameters for that session• Rate and burstiness
– Network promises to limit impairments such as latency, loss, and corruption
Understanding Networked Applications A First Course33
Achieving QoS
• TCP/IP offers only best-effort– Every connection gets “best-effort” service
• Achieving maximum latency guarantees– Reserve resources
– Or attach priorities to packets• Contract may allow network to delay or discard low-priority
packets when necessary
– Application may guarantee traffic “shape”• e.g., steady flow rather than bursts
Understanding Networked Applications A First Course34
Pricing and Accounting
• What’s the incentive for using low quality service?– Why should user accept greater latency if less is
an option?– Why should application try to minimize
bandwidth, or shape its traffic?– Answer is good citizenship, or pricing
incentives
Understanding Networked Applications A First Course35
Pricing Today
• Commercial services: usually flat rate plus connect time (but no per-bit charges)– e.g., CompuServe, Prodigy, America On-Line
• Internet: flat rate, unlimited usage– Resellers can charge for connect time– Many people have unlimited use through a
university or company
Understanding Networked Applications A First Course36
Pricing options
Price component Cost recovery
Fixed Capital/operational costs of accessnetwork
Usage Shared costs of backbone network
QoS Cost of reduced statisticalmultiplexing advantage
Congestion Impact on other users, cost ofupgrading facilities
Understanding Networked Applications A First Course37
Congestion Pricing Rationale• The fixed cost of building the network is high• The marginal cost of accepting new session is
nearly zero (assuming not congested)• Economic efficiency: use whenever marginal
benefit > 0– But capacity is fixed (in the short run)
– Person A’s use may reduce B’s quality of service
Understanding Networked Applications A First Course38
Congestion Pricing
• If network is underutilized, charge nothing• If network is congested
– Charge person A the amount of B’s lost value
– A will drop out unless his value of use is greater than B’s lost value
• Theorem: this raises enough money to expand the network by the socially optimal amount
• Monitoring and billing overhead
Understanding Networked Applications A First Course39
Big advantage of pricing
• Congestion pricing uses incentives rather than forced control or policies to affect user/application behavior– Market mechanism like other goods and services
• User/application can determine freely and independently whether use of network during periods of congestion is warranted
• Major objection is cost of monitoring and billing