There are two routers in the provider's local network. Routers see each other.

  • IP address of router A : 10.173.236.10 (router model: Asus rtn-12d1)
  • Network address of router A : 192.168.1.1


  • IP address of router B : 10.173.239.17 (Tp-link manufacturer, I don’t remember the model).

  • IP address of router B network: 192.168.0.1

It is necessary that the computer from network A ( IP address, for example, 192.168.1.192 ) see the computer from network B ( for example, 192.168.0.19 ) as local, preferably without third-party software ( virtual adapters in the current context are not considered as such), and if with software, then Please explain the algorithm of its operation.


PS

Just let me ask you a personal question. Do you see clients of your own provider (as in this example)? If so, could you indicate the provider and the area in which you live. Well, a couple more sub-questions for experienced uncles;)

  1. How often does this feature occur (do all providers have clients visible to each other?).
  2. Is it used by regular users / companies and again as often.

    All this is needed to play Heroes 5 and the project, if you're curious.

UPDATED

You can check the availability of clients in the following way (hesitated for a long time, on the one hand, most likely, the person who gathered to answer the question I asked knows how to do this, on the other hand, it will not be superfluous, plus again somebody can fix / improve the algorithm):

  1. Go to the settings of the router, if there is none, then the settings of the network adapter.
  2. We copy the IP address of the main gateway.
  3. We send ping request to the main gateway.

    • If he answered, then send ping requests to "neighboring" gateways. Here is an example of a loop for cmd: for / l% i in (1,1,254) do ping -n 1 <first and second octets of the gateway>.% I. <4 octets of the gateway (254)> This is more than enough to answer my question .

    • If he did not answer, then we send ping requests to clients, and not to the main gateway. Here is an example loop for cmd: for / l% i in (1,1,254) do ping -n 1 <First three octets>.% I.

Tracert between them:

  1. 192.168.1.1 [Router A] --->
  2. 178.173.25.33 [host-33.pool25] --->
  3. 192.168.2.107 [sr-2.107] --->
  4. 10.173.239.17 [external IP router B].

    2 answers 2

    In order for the hosts on the same LAN to access the hosts of another, you need to:

    1. On the first router, register a static route to the second network through the external interface of the second router;
    2. On the second router, register a static route to the first network through the external interface of the first router;
    3. If the internal interface of the network's router is not the default gateway of the hosts of this network - on these hosts register or distribute via DHCP a route to the second network through the internal interface of the network's router.

    After that, access to the hosts of another network at the address will appear.

    To get access by names, not addresses, you need to additionally raise the service (s) of the corresponding namespace (DNS server, WINS server, LDAP server, etc.) and assign it (them) to the hosts of both networks (or distribute to DHCP).

    • This will only work if routers are connected to the same network segment by their external interfaces. Those. must see each other at the MAC level. But it is unlikely. Provider equipment performs network segmentation and routing between segments. In the best case, a package sent to another LAN will simply disappear, at worst it will wrap up somewhere in the provider’s network and spoil your entire Internet. Only VPN will help to connect two (and more) lokalki. Routers often have VPN capabilities. - Sergey
    • This will only work if routers are connected to the same network segment by their external interfaces. Those. must see each other at the MAC level. Yours is not true. See points 1 and 2. If they are in different subnets, then yes, it is possible that the settings of the entire route between them will be required. But that in the middle, there is no half a word. - Akina
    • I added the tracert result, I don’t know if this fits the “what’s in the middle”, if you need other tests, you’ll ask. I tried to make a static route on router A. In Asus, the task of a static route is: (like a pancake, go to the next line?). 1.IP address of the network or host (entered external IP router B). 2. Network mask: 255.255.255.0 (or is our target a host?). 3. Gateway: (10.56.40.2 IP virtual adapter on my machine, the setup, although swore, but put the gateway 192.168.1.1). 4. Interface: WAN (There are options with MAN and LAN). - Mihail D Arsentev
    • As I understand it, now all packets from router B should be redirected to the virtual adapter. I tried to send a UDP packet using sockets (zabindil sockets on the IP of the virtual adapter). Did not work. Now I will try with a normal IP address (without a virtual adapter) - Mihail D Arsentev
    • @MihailDArsentev See Dldmyt answer. This is not your option. Asus can be a VPN server, judging by the description on the Internet. See the manual on Tp-link. Select the VPN protocol that both routers support. PPTP is usually at all. If there is L2TP, then it is better to do it. - Sergey

    Well, create a pptp connection, on one you set up a pptp server, on the second client. then you set up routing for both networks that are distributed, i.e. on the first, the network of the second is written, on the second, the first. How and where to poke I will not say, but the asus seems to be more wide-tuned, it is better to do server-based pinging on it