The bow shock forms the outermost layer of the magnetosphere; the boundary between the magnetosphere and the ambient medium. For stars, this is usually the boundary between the stellar wind and interstellar medium ; for planets, the speed of the solar wind there decreases as it approaches the magnetopause. Due to interactions with the bow shock, the stellar wind plasma gains a substantial anisotropy, leading to various plasma instabilities upstream and downstream of the bow shock.