APIPA
File Sharing operates upon PORTS, not IP addresses Class A,C, or C.
Windows Firewall however, *may* get in the way of your objective.
With a decent firewall, you would create rules like:
Allow in tcp/udp src range 169.254.0.0-169.254.255.253 ports 137-139,445
Allow out tcp/udp dest range 169.254.0.0-169.254.255.253 ports 137-139,445
Question: WHY? You mentioned hub/switch. If you do not have a router, then this
setup suggestions you have a private lan without internet access.
If you had a router, the DHCP service would be there and APIPA would be unnecessary.
btw: the article sited above credits Microsoft for APIPA; not so. APIPA is provided by every NIC manufacture and is the default when DHCP can bot be found.