The packet fragmentation problem in computer networks is that of breaking a packet into smaller pieces (fragments) due to packet-size limitations along the packet’s route. This is a typical internetworking problem. We show that the commonly used simplistic approach whereby the routing and fragmentation functions operate completely independently is far from being efficient and has adverse effects on network performance. This paper deals with the combined fragmentation-and-routing problem. We discuss several possible fragmentation machines and indicate their equivalence. This enables the formulation of a comprehensive yet tractable flows model, whose performance measure is total network delay. An analysis of this model leads to necessary and sufficient optimality conditions for the fragmentation-and-routing problem. The optimality conditions serve as a base line for devising several optimal algorithms, both centralized and distributed. To deal with minimum first derivative length algorithms, we generalize the concept of minimum first derivative paths in order to accommodate them into our environment. Several special cases of practical interest are discussed. We show how the problem size and the running time of the algorithms are considerably shortened in networks in which packet sizes come in a limited number of sizes. We also show how our approach can accommodate performance measures other than total delay. The case of networks with virtual circuits is also discussed. q 1997 John Wiley & Sons, Inc.