The linear and nonlinear properties of the ion-acoustic (IA) waves are investigated in a relativistically degenerate magnetoplasma, whose constituents are the electrons, positrons, and ions. The electrons and positrons are assumed to obey the Fermi-Dirac statistics, whereas the cold ions are taken to be inertial and magnetized. In linear analysis, various limiting cases are discussed both analytically and numerically. However, for nonlinear studies, the well-known reductive perturbation technique is employed to derive the Zakharov-Kuznetsov and Zakharov-Kuznetsov Burgers equations in the presence of relativistically degenerate electrons and positrons. Furthermore, with the use of hyperbolic tangent method, the equations are simplified to admit the soliton and shock wave solutions. Numerically, it is shown that the amplitude, width, and phase speed associated with the localized IA solitons and shocks are significantly influenced by the various intrinsic plasma parameters relevant to our model. The present analysis can be useful for understanding the collective processes in dense astrophysical environments like neutron stars, where the electrons and positrons are expected to be relativistic and degenerate. (C) 2014 AIP Publishing LLC.