The formation of the ionospheric layers F-1 and F-2