Creating virtual networks using linux containers accesible from physical LAN

I think this picture will explain what I want to accomplish:

Main goal is to make LXC1 and LXC2 work as routers. Let’s say that network to which Host1 and Host2 are connected has IP 10.1.0.0/24, Subnet1 - 10.1.1.0/24 , Subnet2 - 10.1.2.0/24, Subnet3 - 10.1.3.0/24. When executing from Host 1 the command: “traceroute 10.1.3.2” I would like to get:
1 10.1.1.1 …
2 10.1.2.1 …
3 10.1.3.2 …
And vice versa when calling traceroute from LXC3:
1 10.1.3.1 …
2 10.1.2.1 …
3 10.1.1.1 …
Simply: I would like to simulate real network using Linux Containers. Is it possible to achieve?

It might be better to keep them on different subnets, due to dependency issue. You don’t want LXC2 to depend on any other LXC to operate.

I think having some kind of LAN is already possible, the challenge is more the routing part. Which will require service discovery, technically, if the machines are physically connected they can talk to each other, (you can ping them) which means the only missing piece is which request should go where.

If you could have each LXD containers register themselves in a service discovery of some sort (consul.io comes to mind) you could then have a routing layer routing traffic around the connected nodes to the right containers, that way no node depends on each other, and load balancing takes care of health check and routing packets to the right containers.