File sharing between two networks problem

Discussion in 'Tomato Firmware' started by propa, Mar 10, 2014.

  1. propa

    propa Serious Server Member

    I've already tried to solve few of my problems a year ago in another thread, but my setup changed so I create this new thread.
    This is the schematic of my setup:
    router 1 has his own network, DMZ to router 2
    router 2 has his own network and is connected to router 1 by its wan port, DMZ to router 3
    router 3 is in bridge mode
    router 4 & 5 extend router 3 network

    My problem:
    since router 1&2 have their own networks, file sharing from computers to router 1 goes through its public address, so through Qos, and is slow as hell.
    Subsequently: router 1 and freebox player are not "see" by computers.
    router 1 cannot "see" all machines between router 3 and computers.

    My question:
    How can I put router 1&2 on the same network but keeping router 2 still connected on its wan port, because I want to keep the QoS ability of this router ?

    If anyone has an idea ;) I'm completely stuck...
    any help appreciated!
  2. eibgrad

    eibgrad Network Guru Member

    There’s no real solution here given the requirements are contradictory. QoS only works between the WAN and LAN (which means different networks), yet you want the clients of router #2 to share the same network as router #1. These are mutually exclusive requirements.

    That said, the devices behind router #2 can’t “see” anything on router #1’s network (or vice versa) only in terms of network discovery, since network discovery doesn’t typically cross network boundaries. But those devices are still “accessible” by IP address, and by name if you add naming to the DNS server of router #2, provided the firewall is configured properly and you use static routes in the case of clients of router #1 needing to reach devices behind router #2.
  3. propa

    propa Serious Server Member

    Thanks for your answer, but I don't get it: "those devices are still “accessible” by IP address, and by name if you add naming to the DNS server of router #2..."
    I can't ping router #1 from a computer, I have to access it by its public address.

    I did a desperate move by connecting router #1 and #3 :
    and everything, I mean everything (usual speed for local file sharing, airplay on both networks, QoS for the rest of the traffic...) worked between the two networks.
    But as long as computers are connected to two networks they have two different addresses each (i.e. : &
    It keeps working as long as computers keep their ip given by the router #2, if they switch to router #1 DHCP (basically with a router #2 reboot) they're out of the QoS. :(
    Is there any hope with this workaround ? Is there a way to make router #2 dhcp a priority ?
    a startup script on router #2 to force dhcp renew ? maybe ?
    Last edited: Mar 11, 2014
  4. eibgrad

    eibgrad Network Guru Member

    It’s funny. I had a guy a couple years ago w/ almost the same problem. And after several days of back and forth, and desperation, he eventually did exactly as you did (seems everyone eventually reaches this point, lol). But he had to use manual TCP/IP configurations to avoid this problem w/ DHCP. So it did come to mind for a moment when I saw your situation.

    As I told him, the problem is that you want it both ways; you want clients bridged in some cases, routed in other cases. To the extent the bridge allows network discovery to work, it solves that narrow problem. But you can’t control which DHCP server will respond first. So routing remains a matter of luck unless you use manual TCP/IP configurations.

    There’s also another potential problem. You now have a situation where the same network is located on either side of the WL-500GP’s WAN. That’s a violation of fundamental routing. It makes routing ambiguous from the router’s point of view. And that might lead to unexpected behavior (or you might get lucky and it works). For example, if traffic headed for the internet is sent to the WL-500GP for routing, it’s entirely possible it gets routed back to the LAN rather than the WAN. It just depends on how the router responds to having two legitimate routes to the same network. Or consider the situation where you want some local devices located on opposite sides of the WL-500GP’s WAN to use QoS. You can't control that anymore since every client will always use the bridge given the source and destination IPs share the same network.

    That’s what I don’t like about it. It leaves too much to chance or luck. If you’re lucky and everything just happens to work, great. But once you start violating some fundamental principles of network configuration, it’s the more obscure situations that right now aren’t quite so obvious that concern me.
    Last edited: Mar 11, 2014
    koitsu likes this.
  5. propa

    propa Serious Server Member

    Thanks ;)
    You're right, it's not reliable. I guess I'll have to wait until my provider decides to implement a QoS in his router...
  6. blah123

    blah123 Reformed Router Member

    This should be possible but you will have to switch to static configurations for at least the default gateway setting for the clients that you want to use router 2. You need to add a secondary address to the lan on router 1 that is in a different subnet and also assign an ip from that subnet to the wan of router 2. So for example add as a secondary address for router 1 lan and as router 2 wan. Set the router 2 gateway to Leave router 1 DHCP on. Turn router 2 DHCP off. For clients that you want to use router 2 set their default gateway to the router 2 lan ip. You may just have to use completely static configurations for those clients. I'm not sure if you can just statically set the default gateway.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice