  In this article, we present a class of relativistic solutions describing
spherically symmetric and static anisotropic stars in hydrostatic equilibrium.
For this purpose, we consider a particularized matric potential, namely,
Buchdahl ansatz [Phys. Rev. D \textbf{116}, 1027 (1959).] which encompasses
almost all the known analytic solutions to the spherically symmetric, static
Einstein field equations(EFEs) with a perfect fluid source, including in
particular the Vaidya-Tikekar and Finch-Skea. We here developed the model by
considering an anisotropic spherically symmetric static general relativistic
configuration that plays a significant effect on the structure and properties
of stellar objects. We have considered eight different cases for generalized
Buchdahl dimensionless parameter $K$, and analyzed them in a uniform manner. As
a result, it turns out that all the considered cases are valid at every point
in the interior spacetime. In addition to this, we show that the model
satisfies all the energy conditions and maintains the hydrostatic equilibrium
equation. In the framework of the anisotropic hypothesis, we consider analogue
objects with similar mass and radii such as LMC X-4, SMC X-1, EXO 1785-248
\emph{etc} to restrict the model parameter arbitrariness. Also, establishing a
relation between pressure and density in the form of $P = P (\rho)$, we
demonstrate that EoSs can be approximated to a linear function of density.
Despite the simplicity of this model, the obtained results are satisfactory.
