I would say, the question is kind of confusing, but looks like here is what you need
You need 8 machines to be able to talk to the same default gateway, but they should not be able to talk to each other.
If this is what you need, follow on...
- Devices can only have default gateway IP address only in the subnet that they are on. (so for example, if you need to have a GW and you give the IP address 192.168.0.5 and subnet mask 255.255.255.0 (/24) , Your gateway can only be in the range of 192.168.0.1 - 192.168.0.255 )
Having said the above, you can say you need them to be on the same VLAN and also on the same subnet.
Which leaves us with the second part of the problem, they should not be able to talk to each other.
Now there are various ways to achieve it, but the simplest is by using a concept of Private VLAN's (PVLAN's) for short. In cisco world you can deploy a full fledged PVLAN or use a switchport protected (which is also a rudimentary form of PVLAN)
So here is how you would do it on a cisco switch (I have taken vlan 2 as example)
switcport mode access
switchport access vlan 2
Similarly do it for all the 8 ports, IP them normally as if in the same subnet. Remember that protected ports cannot talk to another protected ports
Protected Port <-- XXXX ---> Protected Port
Protected Port <-----------> Un Protected Port
So, though they will be in the same VLAN having same gateway, they will be isolated from each other. Remember, that in this case, no traffic will pass between them. If you want to deploy a full fleged PVLAN configuration or more info on how to do stuff
Let me know if you need more information