Outline
- congestion control for TCP: AIMD
- fairness
- network layer
- virtual circuit and datagram networks
Additive Increase, Multiplicative Decrease
- exponential growth is very fast, and may itself cause congestion
- sending faster is an experiment: the window at which the packet is
dropped is experimentally determined to be unsustainable
- but what rate is sustainable?
- probably, but not certainly, half of the window at which the packet
was dropped
- if the timeout occurred, be conservative, and use slow start to
reach the threshold
- if fast recovery occurred, be a little more aggressive, and start
at the threshold
- and then, increase slowly, to probe the network
- until another packet loss is detected
- then again set the threshold to half the congestion window, and
begin either slow start or linear increase
- this is Additive Increase, Multiplicative Decrease, AIMD
- it has been shown that any strategy that relies on packet loss and
decreases more slowly than Multiplicatively is not stable, i.e. leads
to congestion collapse
- assuming that 1 congestion window is sent every RTT, and
- we would like to increase by 1 MSS every RTT, so the increase
per data acked should be:
MSS * (data acked) / congestion window
- in a proposed alternative, TCP Vegas, TCP keeps track of
round-trip times, and if they increase above the minimum measured,
the window is decreased linearly
- this linear decrease is assumed to work because it does not cause
as much congestion as the traditional AIMD
Macroscopic TCP throughput
- under AIMD, the window is cut in half when the peak throughput is
reached
- and then the window grows by one MSS every RTT, until it reaches
the same sending rate
- assume the network throughput is a constant B
- ignoring slow start, TCP will oscillate between througputs of
B/2 and B, with a mean of 3/4 B
- since one window is sent every RTT, and assuming W = B/RTT, the
window will vary between W/2 and W, with a mean of 3/4 W
- this was first presented in 1997
- a more recent note
by one of the same authors suggests the Internet is relying less on
end-system cooperation, and more on bandwidth limitations at the access
link
TCP Congestion Control Fairness
- data that is not congestion controlled, such as UDP, can
crowd out data that is "well behaved"
- newer transport protocols, such as Stream Control Transport
Protocol (SCTP) and the Datagram Congestion Control Protocol
try to make UDP "behave well"
- multiple TCP connections that have the same bottleneck link,
flow control window, and RTT, tend to converge to the same range
of congestion control windows
- but connections that have longer (slower) RTTs will get a lower
share of the bandwidth than connections with shorter RTTs
- and connections are free! anyone wanting a higher share of
the bandwidth can open more connections
TCP Summary
- TCP connections: state at the endpoints (real connections involve the
network as well)
- TCP state machine: closed, to established, to closed
- three-way handshake
- closing connections, 2x half-closing
- sequence numbers, acks, timers for reliable transmission
- careful timer design to retransmit as soon as possible, but no sooner
- multiple (3) duplicate acks used as a NAK: fast retransmission,
also fast recovery for congestion control
- congestion "window" maintained by sender, AIMD for discovery of
available throughput
- flow control window sent (in acks) by receiver
Network Layer
- transferring a packet from an incoming link to an outgoing link
of a router is forwarding
- getting a packet from source to destination, perhaps over
many routers, is routing
- when a packet reaches a router, its destination address (or other
value in the header) is used as an index in a table, the routing
table or forwarding table
- each row of the table has (at least) a destination address
and an output link
- a routing protocol is used to build and maintain the routing table
- the routing protocol implements a routing algorithm
- a router is an example of a packet switch
- a router is a packet switch that forwards based on the network-layer
header
- another example is an ethernet switch, which forwards based on the
link-layer header
Network-Layer Connections
- the Internet is connectionless
- but other network-layer technologies (ATM, Frame Relay) are
connection-oriented
- in a connection-oriented network, the network layer must also
provide connection management
Network Service Models
- network-wide: guaranteed delivery, possibly with bounded delay
- per-flow:
- in-order delivery
- guaranteed minimum bandwidth
- guaranteed maximum jitter
- security: encryption, authentication
- Internet: best-effort (none of the above)
- ATM Available Bit Rate (ABR): in-order delivery, minimum bandwidth
guarantee, congestion notification
- ATM Constant Bit Rate (CBR): in-order delivery, minimum bandwidth
guarantee, maximum jitter guarantee, maximum packet loss
Virtual Circuit Network
- the Internet Protocol is connectionless: data is forwarded based
only on its destination address
- other technologies, e.g. ATM, are connection-oriented: data is
forwarded based on a connection identifier carried in each cell
(packet)
- a path through a network is a virtual circuit if, at each
router/switch, it is identified by a Virtual Connection Identifier (VCI)
- the forwarding table is indexed by interface and incoming VCI
- an entry in the forwarding table must have outgoing interface
and outgoing VCI
- the VCI changes every time a cell is forwarded
- the entries in the forwarding table must be managed by an
appropriate signaling protocol which adds or removes
entries in the forwarding table of each router/switch
- the signaling protocol requires that routers communicate
with each other to set up the virtual circuit
- the granularity of Virtual Circuits can be set up so that each
gets special treatment, e.g. higher priority, lower delay, lower chance
of packet loss
Datagram Network
- in a datagram network, forwarding for each packet is based on
its destination address
- since a destination address must be unique in the entire network,
the routing table could grow very large
Comparisons of Virtual Circuits to Datagrams
- Virtual Circuits make it easier to provide specific services
- Virtual Circuits are based on the true circuits of wired telephones
- with Virtual Circuits, the complexity and cost are in the network
- with datagrams, the complexity and cost are in the end-systems
- in today's world, that means that datagram networks can be more
flexible and provide new services faster
- the network part of a datagram network is typically cheaper than
the Virtual Circuit equivalent
- the end-system part of a datagram network may have to be more
complex than the equivalent in a Virtual Circuit network
- but there are economies of scale to building such end-systems,
so it need not be expensive