I want to setup IPv6 in my LAN, but also want to have some machine to use IPv4 only. How do I do such setup so that every machine can communicate with each other ?
All machines supports dual-ip stack.
Set up the IPV4-only machines specially. E.g. using NetworkManager to disable IPV6 on the LAN connection. Done.
If they're mobile... I don't think you can tie those settings to a given wired network, at least not in the GUI. In that case you may have to accept the machines are mangled and will not work on IPv6-only nets.
They'll talk to each other just fine. Mainly over IPv4 :) if you're using linux MDNS for name resolution (.local addresses with Avahi). I have a feeling the same may apply with Samba (Windows-compatibility network software). Hopefully
But this seems a really arbitrary question ("some of my machines are religious objectors to IPv6"). It would be nice to indicate reason(s) for this requirement so we could help you more. If there's a way to avoid mangling your machines this would generally be preferable.
The simple answer is to use dual-stack. Give all devices IPv4 addresses. Devices that support IPv6 will likely already have configured themselves, but will need some help to communicate with each other. Setting up a zeroconf (avahi, bonjour, etc) server will help them find each other by name.
If your IPv6 provider (Tunnel Broker, or ISP) have provided you with a routeable address block setup
You will need a good firewall as IPv6 is not protected from Internet access by a NAT device.