Re: Policy routing problem

Oleg <[email protected]> Tue, 23 Oct 2012 15:27:19 +0400
Newsgroups org.kernel.vger.linux-admin
Message-ID <20121023112719.GB21445@localhost>
On Tue, Oct 23, 2012 at 01:05:04PM +0200, Christoph Pleger wrote:
> Hello,

  Hi.

> 
> I am running a DHCP-Server that serves multiple subnets. The server has
> an IP address in all of these subnets, and its primary IP address in a
> subnet that is not served by DHCP. Every IP address has its own VLAN
> Ethernet interface, eth0.102, eth0.104, etc. In this setup, the DHCP
> server often does not send its unicast replies on the interface where it
> received the corresponding request, but on the interface of its primary
> IP address, and with that IP. My first thought how to change this was by
> setting routes depending on destination addresses, but this would cause
> big problems with other services running on the same machine, so I tried
> to combine iproute2 and iptables, like this:

  If you have a separate IP for an each interface, everything should be
ok, because of device routes.
  Show ip rou output for your vlans.