This paper investigates the H∞ leader-following consensus problem for nonlinear multi-agent systems under semi-Markovian switching topologies. The switching of the topologies is governed by a semi-Markovian jump process, which covers a Markovian jump process as a special case. In many practical systems, it is difficult to obtain the transition rate matrix , thus the transition rates are considered to be not completely known in the paper. External perturbations are considered in the paper, and H∞ control theory is applied. By utilising stochastic technique, sufficient conditions expressed in terms of linear matrix inequalities are derived to ensure that the H∞ leader-following consensus can be reached with a prescribed performance index. Finally, a numerical example is given to show the effectiveness of the theoretical results.