  Given a finite group $G$, the invariably generating graph of $G$ is defined
as the undirected graph in which the vertices are the nontrivial conjugacy
classes of $G$, and two classes are adjacent if and only if they invariably
generate $G$. In this paper we study this object for alternating and symmetric
groups. The main result of the paper states that, if we remove the isolated
vertices from the graph, the resulting graph is connected and has diameter at
most $6$.
