There's quite a few scenarios here.
If you have a standard consumer router also connected to this switch, it should have a built-in DHCP server that assigns IP addresses. You can also usually configure static mappings from there, and they will also frequently resolve hostnames via their built-in DNS caching server.
If you only have these two devices connected to the switch and no DHCP server (or consumer router containing one), you can:
- Use link-local addresses
- Or, manually assign static IP addresses (picked from the same RFC1918 subnet) on each device
- Or, set up a DHCP server
Link-local addresses, especially with IPv6, may "just work". IPv6 interfaces should always have a link-local address. You can look for the address within your network configuration on each device. On Linux, the
ip addr show command may help. On Windows,
ipconfig /all. The syntax for connecting to one may be a bit funny.
A link-local/APIPA IPv4 address from
169.254.0.0/16 address may also work. Windows will assign one automatically if it does not receive an address from manual config or DHCP. Linux might not, depending on your network stack - look at Avahi.
Note that link-local and DHCP-assigned addresses are not "stable" - they can change, especially when you re-connect to the network. You may wish to also use a name service like NetBIOS/LLMNR, mDNS (Bounjour), etc., to enable you to discover these addresses by hostname.