Hello @ranciere and welcome to the STM32 Community :)
I recommend you to check the datasheet of your board that helps you in the pins configuration.
Also, refer to the "Ethernet section" in this UM2411 User manual Discovery kit with STM32H747XI MCU , and check the possible Ethernet settings of all solder bridges or resistor associated with the Ethernet on the board.
You'll probably want to look at this article How to create project for STM32H7 with Ethernet and LwIP stack working that help you to configure your project using STM32CubeMX.
Hope my answer helps you :smiling_face_with_smiling_eyes:!
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks