to find out which is the main router a priority is established on each of them