windows – Computer getting Unable to Identify Network UNLESS Vlan is changed

Question moved from Network Engineering to Server Fault.

This is a problem that has long plagued this environment.
At seemingly random times (measured generally in months), a computer may suddenly lose connectivity to the network.

It still is able to send packets through, reach and get an IP from the DHCP server, but it will simply fail to identify the network and display the yellow ! icon.

All the typical fixes – rebooting PC/port/switch, switching from DHCP to static or vise versa, changing ports, resetting NIC/winsock, reinstalling driver, etc. None of them will work.

But somehow, changing the access VLAN of the port will suddenly allow it to work. And seemingly nothing else. It doesn’t have to be a VLAN it was on before, or even one that existed on the switch before. I think I found out by accident from completely wiping the port config and forgetting to put anything back.

This is of course, not a great solution or workaround and trying to search for the problem is kinda difficult given the far more commonplace issues with the same error.

I have seen this happen with Win 7 and some older machines. Possibly a Win 10 but I don’t recall. Cisco Catalyst switches of various models. I’ve removed all but switchport mode access, and switchport access vlan ### from the switchport so it doesn’t seem to depend on anything besides the vlan.