D
D
deptk2018-05-11 11:09:21
linux
deptk, 2018-05-11 11:09:21

How to merge two networks?

There are two debian machines with the same functions: dnsmasq (for distributing IP and DNS) and a gateway to the Internet via iptables.
Both have two network cards: one to the provider, the other distributes the Internet to the local area.
The first network has a ball (a separate device) that needs to be accessed from the second one.
Networks can be connected physically: throw a cable from one switch to another (red line).
5af54ecec0f84576967287.png
It is necessary that everyone has their own Internet and dhcp distribution, and the second subnet gets access to the local resources of the first or a specific IP.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vreitech, 2018-05-11
@fzfx

it looks like installing a router, connecting it with two cables (one to each switch), and configuring it to route between the two subnets should solve your problem.
as a special case - configuring one of these servers as a router and connecting it with a separate network adapter (physical or virtual) to a switch of another subnet.

P
poisons, 2018-05-11
@poisons

The question is what? You already have a ready-made scheme, throw a string between switches, create a new vlan, drag this new vlan to the machines that you have as servers, and route it there.

D
Dmitry Aleksandrov, 2018-05-11
@jamakasi666

- If the switches are managed:
1) Connect them with a cord
2) On the ports that connect the switches, register vlan
3) On the servers, register vlan to each switch
4) On the servers, register static routes to subnets through these vlan
5) It is likely to correct the iptables rules
6) It is likely to conjure with dnsmasq by linking them between servers so that clients on both subnets resolve the names of machines on the neighboring subnet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question