A simplified two-band model for describing the longitudinal dielectric function for a layered MgB 2 system has been developed to reveal the attractive pairing mechanism leading to the superconducting state. A model dielectric function for σ and π band carriers is set up that fulfils the appropriate sum rules on the electronic and ionic polarizabilities. The value of the in-layer electron-phonon coupling strength and the Coulomb screening parameter for σ (π ) band carriers is obtained from the residues of the dielectric function. It is noticed that the σ -holes in the two-dimensional boron planes via the screened phonon coupling is responsible for the attractive interaction and the superconductor is in the strong coupling regime. Within this framework, the superconducting transition temperature T c of MgB 2 is estimated as 42 K and the pressure derivative of T c is negative. The isotope effect, coherence length, magnetic penetration depth, and volume derivative of T c are also estimated to be consistent with the earlier results. Within the two-band model of superconductivity in MgB 2 , we place particular emphasis on intraband channels, carriers either in σ or π bands, as interband effects are negligible. In such a situation the superconductivity originates from either σ or π band carriers. The implications of the effective interactive potential with both σ and π carriers and its analysis are discussed.