Boundary layers of the Earth's outer magnetosphere