Actually, brebs, this
isn't correct, and a VLAN won't have any effect on it.
Every computer sees only its own incoming traffic and obeys only its own rules. If the OP wishes for traffic to "go from A to B
via C," this means that
two routes must be established, on
two machines:
- "A" must route the traffic to "B" ... designating "B" as a gateway. (Because "B" is not the final destination.)
- "B" must also know to route the traffic coming from "B," to "C."
There are two "hops" here, and each participant – each "hop" – must independently(!) know what to do with the packet. Packets do not carry any information whatsoever that says how they should be routed. Each and every participant makes its own independent routing decisions with regards to the traffic that is presented to it.
Furthermore, since traffic is
two-way, the reply packets must also be able to make their way back home. Each "hop" computer, operating independently, must know how to do the right thing.
In this scenario, "B" is effectively a
router that 'exposes' "C" to "A."