Retry 10 sec later if network fail to connect to router

how could you loop it in the void setup?

Just like you would "loop it" in the loop() function.

while(Ethernet.begin(mac, IP) == 0)
{
   // do nothing
}