Theory of Ion Boundary Layers