I did the following:
1. In the switch I created a VLAN of two ports.
2. I connected the two switch ports to two NICs of 2 RHEL hosts.
3. I created static IP address in each host.
4. I attempted to ping between the host. The system complains that the host unreachable.

If my understanding of VLAN is correct, then it should work because VLAN is like a tunnel where the ping should be reached by the other machine because they can hear each other out but they are isolated from the rest of the world. But I wonder how can't I make it work without vonfig inside the host.