Ramos gave Real Madrid the Lead 52 minutes into the game as Kroos floats a free-kick into the box and the centre-half deftly glances the ball into the bottom-left corner
65 minutes on, Perez equalised for Alaves. The striker steps up and coolly dispatched a penalty into the bottom-right corner, sending Areola the wrong way
However, Carvajal poked home a rebound just four minutes later and Real Madrid held on for a nervy win as Alaves threatened from a succession of corners.
It finished 2-1 to Madrid, who go top of LaLiga.