📜 ⬆️ ⬇️

Configure routing for two providers

Yesterday I ran into a small problem - there are 2 network cards and 2 providers installed on a machine with Win2k3. The problem turned out to be the following: subnets intersect (more precisely, they coincide). It was decided to use the 1st provider for the main gateway, and to walk on the intranet resources through the 2nd one. And everything would be fine, but the machine should serve incoming connections from both interfaces. But, thanks to static routes, the responses to requests from the subnet 10.0.0.0/8 that came from the first provider went through the channel of the second provider, which was, to put it mildly, not what was needed. How to solve this problem under linux - I knew (and I will also tell in this article). A little googling solution was found (in msdn'e stumbled upon managing the priorities of connections). A colleague (WAJIM, hello) thought - and found the 2nd option. Then I thought a little (quite a bit) - and by analogy the 2nd version of the solution for linux appeared :)
Total, under the cut you will find 4 options for solving the problem of routing by 2m providers - 2 for Windows and 2 for Linux.

Given:

Well ... let's get started.

The choice is yours. Let me just say that it was decided to dwell on the second versions for both systems (changing the metrics on windows and iproute2 on debian).
Anyone interested in the topic of routing in Linux - I recommend reading this item here lartc.org/howto
I hope someone this information will be useful.
')
And once again, colleagues - happy holiday :)

Source: https://habr.com/ru/post/30076/


All Articles