How to make devices across routers with the same vlan communicate with each other, different vlan does not communicate

Two approaches:

1, router interface using Ethernet port, and work in layer 2 mode, or directly TRUNK. equal to when the switch used.

2, the router two end port using VLAN layer three interconnect or sub-interface termination VLAN, then the two sides of the switch to the router is a layer three environment, also has nothing to do with VLAN. This time you need to fine QOS or advanced ACL to control access between address segments or IP addresses.

There is another kind:

MPLS, it depends on your application is not so complex, there is no need. In that case, the PE and P devices are on the router. Trouble is not too much trouble. Overall putting the problem at layer 2 solves it completely.