My laptop's NIC went bad and I had to start using a USB Ethernet adapter. When I start up the computer, or even simply unplug and plug in the adapter, it gets two default gateways which show up in ipconfig: the router's IP address and 0.0.0.0.
Looking into this more, I did a route print and this showed up:
0.0.0.0 0.0.0.0 On-link 192.168.0.5 20
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.5 20
Searching the internet results in the majority of the blame being a service called "Bonjour" but I don't have that on my system.
If I can't find the root cause of the incorrect route, is there a way to change the metric for that 0.0.0.0 on-link route so it doesn't get used? I am new to Windows routing tables and I would like this to be persistent and I don't want to have to change things every time I connect to a different network.
Right now, my temporary solution is to run a command prompt and type in the following command, but I have to edit the gateway for every network I connect to. I also have to run this after every reboot, sleep, or disconnect of the USB Ethernet adapter.
route change 0.0.0.0 MASK 0.0.0.0 192.168.0.1
After more troubleshooting, I see the route to 0.0.0.0 default gateway being added when it gets the automatic private IP. It seems to assign itself a 169 address and 0.0.0.0 gateway too fast, before it gets the DHCP response and information.