  By analyzing brane configurations in detail, and extracting general lessons,
we develop methods for analyzing S-duality of supersymmetric boundary
conditions in N=4 super Yang-Mills theory. In the process, we find that
S-duality of boundary conditions is closely related to mirror symmetry of
three-dimensional gauge theories, and we analyze the IR behavior of large
classes of quiver gauge theories.
