Hi,
sorry if it took so long - too much work and too few time.
Your two gateways simulation has a structural issue - i.e., it won't work. Let's analyze why.
First and foremost, you have a CSMA network connecting n1, n4, n5, and n8. No matter how you draw it, the four nodes are connected, and they can all talk to each other.
That's a good thing - otherwise you would have two network with the same prefix - even worse.
However, I don't know if it's the thing you wanted.
The two Wi-Fi networks have a more important issue: two APs (each) using the same prefix. This is really a bad idea, as routing will go nuts.
Just think about it. How is it possible to know that n2 (for example) is reachable through n1 and not n4 ?
You can't say from it's IP address, and the packets will be sent to one of the two APs - probably the wrong one.
Unless you have a coordinated AP deployment - i.e., one with a common controller handling the AP/associated STA binding - this configuration is impossible.
Note that it's not feasible in ns-3 AND in real life.
I hope this can help,
T.