We present multi-epoch spectroscopic observations of the massive binary system WR21a, which include the 2011 January periastron passage. Our spectra reveal multiple SB2 lines and facilitate an accurate determination of the orbit and the spectral types of the components. We obtain minimum masses of 64.4+/-4.8M_{sun} and 36.3+/-1.7M_{sun} for the two components of WR21a. Using disentangled spectra of the individual components, we derive spectral types of O3/WN5ha and O3Vz ((f*)) for the primary and secondary, respectively. Using the spectral type of the secondary as an indication for its mass, we estimate an orbital inclination of i=58.8+/-2.5{deg} and absolute masses of 103.6+/-10.2M_{sun} and 58.3+/-3.7M_{sun}_, in agreement with the luminosity of the system. The spectral types of the WR21a components indicate that the stars are very young (1-2Myr), similar to the age of the nearby Westerlund 2 cluster. We use evolutionary tracks to determine the mass-luminosity relation for the total system mass. We find that for a distance of 8kpc and an age of 1.5Myr, the derived absolute masses are in good agreement with those from evolutionary predictions.