This sounds like a DHCP issue since you factory reset it... Can you tell us what the display shows as it goes through it's process, particularly right before it reboots?
It is possible you need to manually assign the a VLAN, have an incorrectly configured port or switch, or you need to place the phone in teleworker mode as well...
Sent from my Moto G (5) Plus using Tapatalk