We give a representation of the packet-level dynamical behavior of the Reno
and Tahoe variants of TCP over a single end-to-end connection. This repres
entation allows one to consider the case when the connection involves a net
work made of several, possibly heterogeneous, deterministic or random route
rs in series. It is shown that the key features of the protocol and of the
network can be expressed via a linear dynamical system in the so called max
-plus algebra. This opens new ways of both analytical evaluation and fast s
imulation based on products of matrices in this algebra. This also leads to
closed form formulas for the throughput allowed by TCP under natural assum
ptions on the behavior of the routers and on the detection of losses and ti
meouts; these new formulas are shown to refine those obtained from earlier
models which either assume that the network could be reduced to a single bo
ttleneck router and/or approximate the packets by a fluid.