Abstract. Through case studies involving Cluster waveform observations, solitary waves in the form of bipolar and tripolar pulses have recently been found to be quite abundant in the near-Earth dayside magnetosheath. We expand on the results of those previous studies by examining the distribution of solitary waves from the bow shock to the magnetopause using Cluster waveform data. Cluster's orbit allows for the measurement of solitary waves in the magnetosheath from about 10 RE to 19.5 RE. Our results clearly show that within the magnetosheath, solitary waves are likely to be observed at any distance from the bow shock and that this distance has no dependence on the time durations and amplitudes of the solitary waves. In addition we have found that these same two quantities show no dependence on either the ion velocity or the angle between the ion velocity and the local magnetic field direction. These results point to the conclusion that the solitary waves are probably created locally in the magnetosheath at multiple locations, and that the generation mechanism is most likely not solely related to ion dynamics, if at all. To gain insight into a possible local generation mechanism, we have examined the electron differential energy flux characteristics parallel and perpendicular to the magnetic field, as well as the local electron plasma and cyclotron frequencies and the type of bow shock that Cluster is behind, for several time intervals where solitary waves were observed in the magnetosheath. We have found that solitary waves are most likely to be observed when there are counterstreaming (~parallel and anti-parallel to the magnetic field) electrons at or below about 100eV. However, there are times when these counterstreaming electrons are present when solitary waves are not. During these times the background magnetic field strength is usually very low (<10nT), implying that the amplitudes of the solitary waves, if present, would be near or below those of other waves and electrostatic fluctuations in this region making it impossible to isolate or clearly distinguish them from these other emissions in the waveform data. Based on these results, we have concluded that some of the near-Earth magnetosheath solitary waves, perhaps in the form of electron phase-space holes, may be generated locally by a two-stream instability involving electrons based on the counterstreaming electrons that are often observed when solitary waves are present. We have not ruled out the possibility that the solitary waves could be generated as a result of the lower-hybrid Buneman instability in the presence of an electron beam, through the electron acoustic mode or through processes involving turbulence, which is almost always present in the magnetosheath, but these will be examined in a more comprehensive study in the future.