This doesn't sound like something "ROS" (which is a bit ambiguous, as there are only ROS packages, and those might or might not support something) needs to support necessarily I believe.
Routing IP traffic between different subnets is a task of the OS. As long as bi-directional UDP/IP and TCP/IP traffic can flow between hosts participating in a ROS node graph, the rest should just work. ROS does not change anything here. It's "just" a network application.
Allowing hosts on different subnets to communicate would require either:
- a router, capable of routing between the two subnets (possibly with the help of other routers), or
- a "virtual network" (such as a VPN), which would provide a means for hosts to bypass local routing by participating in an overlay network in which they are directly connected
(there are more options, but these would be the two most common solutions I believe)