When Messenger of Allah ﷺ performed Tawaf of the Kaʿba for Hajj or ʿUmra, he used to do Ramal during the first three rounds, and in the last four rounds he used to walk; then after the Tawaf he used to offer two rakʿat and then performed Tawaf between Safa and Marwa.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا طَافَ فِي الْحَجِّ أَوِ الْعُمْرَةِ أَوَّلَ مَا يَقْدَمُ سَعَى ثَلاَثَةَ أَطْوَافٍ وَمَشَى أَرْبَعَةً ثُمَّ سَجَدَ سَجْدَتَيْنِ ثُمَّ يَطُوفُ بَيْنَ الصَّفَا وَالْمَرْوَةِ