Electronic configuration of N-atom (Z=7) is . Total number of electrons present in N2 molecule is 14, 7 from each N-atom. From the view of various rules for filling of molecular orbitals, the electronic configuration of N2 molecule will be
Comparative stude of the relative stability and the magnetic behaviour of the following species
(i)  molecule 
Here, 
Hence, Bond order
Hence, presence of no unpaired electron indicates it to be diamagnetic.
(ii)  ions 
Here, 
so that BO
Further, as ion has one unpaired electron in the  orbital, therefore, it is paramagnetic in nature.
(iii)  ions 
Here, 
so that BO
Again, as it has one unpaired electron in the  orbital, therefore, it is paramagnetic.
(iv)  ions 
Here, 
Hence, BO
The presence of no unpaired electron indicates it to be diamagnetic in nature.