The problem of estimating an unknown variance function in a random design Gaussian heteroscedastic regression model is considered. Both the regression function and the logarithm of the variance function are modelled by piecewise polynomials. A finite collection of such parametric models based on a family of partitions of support of an explanatory variable is studied. Penalized model selection criteria as well as post-model-selection estimates are introduced based on Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) methods of estimation of the parameters of the models. The estimators are defined as ML or REML estimators in the models with dimensions determined by respective selection rules. Some encouraging simulation results are presented and consistency results on the solution pertaining to ML estimation for this approach are proved.