Architectural designs for routers and networks of routers to support mobile communication are analysed for their end-to-end performance using a simple Markov model. In view of the diverse design options, such models have many adjustable parameters and choosing the best set for a particular performance objective is a delicate and time-consuming task. We introduce an optimisation approach to automate this task, illustrated in a two-node, tandem network of routers with finite capacity and recovery buffers. We minimise the mean end-to-end delay subject to an upper limit on the rate of losses, which may be due to either full buffers or corrupted data. Losses at a full buffer are inferred by a time-out whereas corrupted data is detected immediately on receipt of a packet at a router, causing a N-ACK to be sent upstream. Recovery buffers hold successfully transmitted packets so that on receiving a N-ACK, the packet, if present, can be retransmitted, avoiding an expensive resend from source. Hence, a critical parameter that affects both loss rate and transmission time is the ratio of arrival-buffer size to recovery-buffer size. We develop a queueing model of this network and present graphs showing how end-to-end delay varies with certain parameter combinations. The tedious nature of trying to find the best parameter values in this way motivates our formal optimisation which yields optimal parameter values directly from the model specification using standard software.