Diffusion of ions in the ionosphere