A
A
Alexander2014-11-13 14:56:12
System administration
Alexander, 2014-11-13 14:56:12

How to configure traffic on the gateway between two networks?

The gateway has two interfaces that look into the same subnet,
10.10.10.0/24: 10.10.10.1 and 10.10.10.2. What settings need to be made on the
gateway so that the traffic of client computers (say, from the
10.10.2.0/24 subnet) connected to the gateway, addressed to the 10.10.10.0/24 subnet, goes
through the 10.10.10.2 interface. And the rest of the traffic of the same clients went
through the interface 10.10.10.1? I can’t figure out which way to dig...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
nfire, 2014-11-13
@nfire

What is the gateway?

A
Alexander, 2014-11-13
@nhl

linux machine with multiple cards

S
Sergey, 2014-11-13
@bk0011m

And it is possible to take an interest, what for such hemorrhoids?? Two IPs from the same subnet, on different network cards? You actually looped the network on your gateway. Catch the wagon with problems.
Is this really necessary, or did it just happen out of ignorance?
IMHO it would be logical that on each interface there would be an IP from different subnets.
Let's say on the first one 10.10.10.0/24: 10.10.10.1
then on the second one: 10.10.2.0/24: 10.10.2.1

A
anton1234, 2014-11-15
@anton1234

Either the question is a trick, or you have inaccurately described the conditions of the problem.
If the router has interfaces on both networks, then nothing but the permission to do forwarding on the gateway is needed (net.ipv4.ip_forward = 1). If the gateway is the default router on all clients, then packets from 10.10.10.0/25 will reach 10.10.2.0/24. But the condition about which interface they will pass through generally loses its meaning, because. there is no IP address change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question