0

I'm not able to figure out a good strategy for this situation.

There's one router per client and all the routers are in the same network. Each router is able to connect to an external router in a different network, but only one at a time (it's a physical limitation, so we can consider that there is an on/off switch in each router that can change every 5 seconds, but they are always synchronised in order to ensure that there's only one closed).


                  ------------
                  | router X |                         10.0.0.0/24
                  ------------
                         |
     ____________________|_________________
     |                   |                |
     |                   |                |
      / off switch1      | on switch2      / off switchN
     |                   |                |
     |                   |                |
------------       ------------     ------------
| router 1 |-------| router 2 |-----| router N |       20.0.0.0/24
------------       ------------     ------------
     |                   |                |
     |                   |                |
------------       ------------     ------------
| client a |       | client b |     | client N |
------------       ------------     ------------

How would be the clients able to send/receive to/from router X assuming that there is only one closed switch?

So far, my ideas are:

  • Change client's gateways dynamically, i.e. when switch2 is ON, gw for client a and client N will be router 1, furthermore, router 1 and router N will behave as a layer 2 switch.

Problem here is that clients rely on the idea that they are notified with the new gw which may end up loosing data, non-synchronised behaviours and the idea that it's a dynamic design.

  • Virtual gateway. All the clients have the same virtual gw, so the routers have to negotiate (based on the ON switch) each other to know which is the master (the real gateway).

The most similar idea I have seen are VRRP, CARP, etc protocols, but they are slightly different, I don't need an advertisement in order to know if the master is alive because the limitations are external to the router, furthermore, the clients are not connected to the same router, so the slaves will still have to work. However, that's my closest idea to the "virtual gateway" concept.

  • NAT. Each router of each client modifies the packets and pass them to the gateway.

Limitations here are speed, I prefer to avoid the idea that each router will have to modify the data.

Any other idea or suggestion?

Thanks,

1
  • 2
    If all the routers are connected, as your diagram suggests, you can simply run a routing protocol on all routers. They will figure out the best path to X. but it really sounds like there are a lot more limitations than you're describing. Can you provide more information?
    – Ron Trunk
    Commented Feb 12, 2021 at 17:05

1 Answer 1

0

I'm pretty sure that's any XY problem, but anyway. Maybe you should tell us more about your situation (in your question).

Simply assign each Router 1..N its own IP address in the network towards Router X. If each Client A..N is located in a unique IP subnet than you'd set up routes to those (remote) subnets on Router X. For the non-direct paths, set up secondary routes through adjacent routers with a higher metric. (If all client networks are identical or overlapping, the easiest solution is to NAT at router 1..N but that's not a very bright idea.)

Actually, the physical switching is rather useless since the point of a network is to allow N:M communication. If you need to control traffic from/to Client 1..N, Router X is the point you'd do that (logically). Obviously, you'd put a network switch between Router 1..N and Router X.

To cope with failing connections towards Router X you could set default routes towards neighbor routers with higher metrics, so the direct connection would be used when available. Of course, you'd need to provide routes for all remote client subnets as well, so setting up OSPF would take care of all the route exchanges.

VRRP won't easily work because you'd need N different failover groups which could be a nightmare - and there's simply no need for that. VRRP is useful to provide end-node (default) gateway redundancy. Routers can handle that themselves, provided they know the required routes and distances.

Note that 20.0.0.0/24 is NOT an RFC 1918 ie. private network but it belongs to Microsoft. You can only use private addresses or those you officially own.

2
  • Agree on the fact that it sounds like a XY problem. The mechanical switches were my way to explain "disruptions" at the physical layer level in all the paths except one, it does sound weird though... Anyway, thanks for your time and your very helpful explanation.
    – Layer2
    Commented Feb 12, 2021 at 17:49
  • You're welcome. I still think we could provide better advice if you'd provide a better insight into your situation.
    – Zac67
    Commented Feb 12, 2021 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.