J
J
Janus742016-02-04 11:34:14
linux
Janus74, 2016-02-04 11:34:14

How to configure DNSMASQ for two interfaces?

Hello!
There is a task to raise the gateway.
I used bind9 and dhcp before, this time decide to look towards DNSMASQ.
But I can't figure out how to set up dhcp for two interfaces.
The thing is that I need to explicitly specify dns-server, ntp-server, router, and parameter 44, which specifies the address of the WINS server.
But how to specify these parameters for the desired interface, I can not understand.
I have three interfaces eth0 - the Internet, eth2 - the guest network (you do not need to specify the wins server in it), eth1 - the local network, you need to specify the wins server in it.
Google found a way to set ranges for different interfaces, for example:
dhcp-range
=interface:eth0,192.168.1.128,192.168.1.254,24h
But how now to set options for each range?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-02-04
@Janus74

man dnsmasq
1) You can run multiple copies:

-z, --bind-interfaces
is useful is when running another nameserver (or another instance of dnsmasq) on the same machine. Setting this option also enables multiple instances of dnsmasq which provide DHCP service
to run in the same machine.
2)
--dhcp-range= [tag:[,tag:],][set:,] [,][,][,[,]][,]
--dhcp-option =[tag:,[tag :,]] [encap:,][vi-encap:,][vendor:[],][|option:|option6:|option6:],
i.e. if
dhcp-range=interface:eth0,192.168.1.128,192.168.1.254,24h works
, then the
--dhcp-option = interface:eth0,option:router, 192.168.1.1 construction should also work
The optional set: sets an alphanumeric label which marks this network so that dhcp options may be specified on a per-network basis. When it is prefixed with 'tag:' instead, then
its meaning changes from setting a tag to matching it. Only one tag may be set, but more than one tag may be matched.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question