I have two computers connected to an ethernet switch. The switch is connected to my ISP router for internet access, through the switch upstream port (of course). What happens if I unplug the upstream port?
My goal is simple: I want to have a local LAN without Internet access, but I still want to be able for my two machines to talk to each other thorough TCP. Is it possible or once I disconnect the upstream port my network is dead? Does it depend on the switch?
I'm buying a cheap 1000 Mbps switch for $15 at Amazon.
Yes, it should work as you expect. The switch most probably works as DHCP server as well for LAN ports and uses some local IP segment for internal communication (like 192.168.x.x) so it should work fine.
When you reconnect the upstream port again, the switch should request WAN IP (the IP assigned by your Internet access provider). When the WAN IP is established, your Internet connection should work again.