Topological interference alignment refers to the alignment of interference in partially connected linear communication networks, wired and wireless, when only the knowledge of the end-to-end network topology is available to the transmitters. In particular the values of the non-zero channel coefficients are not known to the transmitters. We show that in general with arbitrary connectivity, the capacity of the wired network, and the degrees of freedom of the corresponding wireless network, are intimately connected to a corresponding index coding problem, and interference alignment plays a non-trivial role in the solution of all three problems.