Ionic Foreshock of a Near-Earth Shock Wave: Theoretical Model and Observational Data