S
S
Sergey2014-06-18 06:13:27
Mikrotik
Sergey, 2014-06-18 06:13:27

How to implement a network using 2 physical gateways?

The customer has 2 providers providing Internet access services. There was a desire to put 2 physical gateways in order to avoid downtime when one of the lines falls or one of the pieces of iron dies. Both gateways come to the switch (which needs to be changed). How to design this network and what the equipment should support so that the gateway switches seamlessly for the client. I did not implement this myself. so bright ideas are needed)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cool Admin, 2014-06-18
@edinorog

You have absolutely nothing to do with two gateways. Routing and balancing must be done inside the same piece of hardware, in the case of iptables or routeOS (there is a similar one in Cisco, juniper, but I don’t know the exact implementation there - google) you need the following:
1. There is one piece of iron - it is the default gateway for the local network.
2. There are two providers on the hardware
3. Configure NAT for both providers
4. Mark traffic incoming through each provider with your label
5. Create a separate routing table for each provider with your provider's gateway for route 0.0.0.0/0
6. Direct outbound tagged traffic (answers to incoming requests from clause 4) to the corresponding routing tables.
7. For outgoing traffic, make a balancing rule between gateways (for AA mode) or default route switching (for AP mode) based on, for example, ping up to 8.8.8.8
8. Set ports both there and there, they will work through both providers if you use items 4-6
Two pieces of iron can only be used if there is VRRP between them and they share a common IP address of the local network and this IP address is the gateway for it. In this case, it is possible to transfer the role of the master (active node) and route through them, but in practice it is rather problematic to bring two pieces of iron (if they do not know how to auto-sync).
Ask if something is unclear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question