D
D
Danil2016-07-05 08:38:55
Computer networks
Danil, 2016-07-05 08:38:55

Why is the Internet not working with a dynamically specified gateway?

On the port eth-WAN 1- DHCP client, with "add default route" checked. In this route, the gateway is specified 192.168.1.1. But if I uncheck the box and create the same route with my hands (but I choose the gateway eth-WAN 1, it doesn’t work. If I change everything to 192.168.1.1that, everything is ok). I am balancing and it is important for me that this route is created by me, because I need to send marked traffic through it. Why doesn't the variant with the one specified eth-WAN 1in the role of the gateway work, but the variant with the specified one 192.168.1.1works?
c8c7d72ccf0e480f84611fc16681fe9b.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Chudnovsky, 2016-07-05
@Frankenstine

If I understand correctly, then you are trying to force packets to go through the client, and of course this does not work because the client does not have the Internet itself, except through the gateway.
Those.
is incorrect, since the eth1 interface has an IP assigned via DHCP, say, 192.168.1.2 - and, of course, nothing will go through it.
In addition, I suspect that you are doing something
that is fundamentally wrong, since in this case eth1 will be the name of the device on the network, and not the interface (which is indicated through dev)
How to properly balance through several channels is described for example here .

K
Kirill Vasiliev, 2016-07-05
@vasilevkirill

Since an interface can only be specified in some cases

  1. In the first one, the interface type is Broadcast and the destination address is in the broodcast domain. (connection type is connected)
  2. In the second case, when the interface type is Point-To-Point, in this case the traffic will always have one recipient.
  3. Well, the first option has an exception if there is an arp-proxy on the network that will respond to such a broadcst request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question