I'm not a networking expert so I need a clear answer regarding this matter:
I have 4 machines. Each machine is located in a different rack. Can I - through a VLAN - link all machines and have them all use (real) IPs from a single IP class? Or the IP class can be used on machines ONLY from the same rack?
Yes you may use IP address part of the same class. But, it depends on the network they are connected or belong. If all your machines are belong only to a single VLAN, you need to ensure that their IP addresses are belonged to the same Network Address. But, if they belong to different VLAN, you need to subnet the IP address class to different network.