We present two-level nonoverlapping and overlapping Schwarz preconditioners for the linear algebraic system arising from the weighted symmetric interior penalty Galerkin approximation of elliptic problems with highly heterogeneous coefficients. The coarse space is constructed by the local Dirichlet-to-Neumann maps the theoretical results show that the condition number of the preconditioned system is independent of the discontinuous coefficient, the number of subdomains and the mesh size for the nonoverlapping case. For the overlapping case adding an extra assumption of coefficient distribution, the similar conclusion is also obtained. Numerical experiments validate the theoretical results and illustrate the performance and robustness of the proposed two-level methods.