Ubuntu checks network configuration on its startup.
Although this process passes quickly when the network connection is normal, it takes about 5 minutes if there exist some problems in the configuration.
There is a way to reduce the waiting time for the network configuration.
You can change the value of the waiting time.
Set the value of
TimeoutStartSec in the file,
My system was Ubuntu 16.04, FYI.
Good luck! :D