Context. The study of detached eclipsing binaries which are members of stellar clusters is is a powerful way of determining the properties of the cluster and of constraining the physical ingredients of theoretical stellar evolutionary models. Aims. DW Carinae is a close but detached early B-type eclipsing binary in the young open cluster Collinder 228. We have measured accurate physical properties of the components of DW Car (masses and radii to 1%, effective temperatures to 0.02 dex) and used these to derive the age, metallicity and distance of Collinder 228. Methods. The rotational velocities of both components of DW Car are high, so we have investigated the performance of doubleGaussian fitting, one-and two-dimensional cross-correlation and spectral disentangling for deriving spectroscopic radial velocites in the presence of strong line blending. Gaussian and cross-correlation analyses require substantial corrections for the effects of line blending, which are only partially successful for cross-correlation. Spectral disentangling is to be preferred because it does not assume anything about the shapes of spectral lines, and is not significantly affected by blending. However, it suffers from a proliferation of local minima in the least-squares fit. We show that the most reliable radial velocities are obtained using spectral disentangling constrained by the results of Gaussian fitting. Complete Strömgren uvby light curves have been obtained and accurate radii have been measured from them by modelling the light curves using the Wilson-Devinney program. This procedure also suffers from the presence of many local minima in parameter space, so we have constrained the solution using an accurate spectroscopic light ratio. The effective temperatures and reddening of the system have been found from Strömgren photometric calibrations. Results. The mass and radius of DW Car A are M A = 11.34 ± 0.12 M and R A = 4.558 ± 0.045 R . The values for DW Car B are M B = 10.63 ± 0.14 M and R B = 4.297 ± 0.055 R . Strömgren photometric calibrations give effective temperatures of T eff A = 27 900 ± 1000 K and T eff B = 26 500 ± 1000 K, and a reddening of E b−y = 0.18 ± 0.02, where the quoted uncertainties include a contribution from the intrinsic uncertainty of the calibrations. The membership of DW Car in Cr 228 allows us to measure the distance, age and chemical composition of the cluster. We have used empirical bolometric corrections to calculate a distance modulus of 12.24 ± 0.12 mag for DW Car, which is in agreement with, and more accurate than, literature values. A comparison between the properties of DW Car and the predictions of recent theoretical evolutionary models is undertaken in the mass-radius and mass-T eff diagrams. The model predictions match the measured properties of DW Car for an age of about 6 Myr and a fractional metal abundance of Z ≈ 0.01.