We built a portable device that starts a DHCP client and tries to get a lease on an Ethernet plug event, and if no lease is acquired after a certain amount of time, the device assumes it has been plugged directly to a PC (or an "ad-hoc", isolated network with a switch and no router) and will kill the client and start a DHCP server itself, so you can access the device's webserver directly. I wasn't onsite, but the solution was simple - we just increased the timeout to wait for a lease before starting the server.