El 2018-12-04 12:26, john doe escribió:
On 12/4/2018 12:02 PM, jmperrote wrote:
El 2018-12-03 13:30, john doe escribió:
On 12/3/2018 4:27 PM, jmperrote wrote:
We need help to configure dnsmasq with vlans tagged on router.

We actually have a dnsmasq server serving dns and dhcp, and 3 nics, one
for each vlans:

dhcp-option=eth0,6, #dns primario
dhcp-option=eth0,1, # mascara de red
dhcp-option=eth0,option:router, # gateway

dhcp-option=eth0,6, #dns primario
dhcp-option=eth0,1, # mascara de red
dhcp-option=eth0,option:router, # gateway

dhcp-option=eth0,6, #dns primario
dhcp-option=eth0,1, # mascara de red
dhcp-option=eth0,option:router, # gateway

Know we are migratting to a dnsmasq solution with one nic a tagged
vlans: But the result is not that we want:

We configure this:


But all clients recive allways the same gateway,

I'm not sure to fully understand the issue(s) you are facing.
As far as dnsmasq is concerned, there is no differences between 3
physical "nicks" and 3 VLAN tagged interfaces  (802.1Q).
So for a start you could simply try:

# Specify DHCP range with a tag

 John Doe, sorry for my mistake, my actual configuration of dnsmasq are:

    dhcp-option=eth0,6, #dns primario
    dhcp-option=eth0,1, # mascara de red
    dhcp-option=eth0,option:router, # gateway

    dhcp-option=eth1,6, #dns primario
    dhcp-option=eth1,1, # mascara de red
    dhcp-option=eth1,option:router, # gateway

    dhcp-option=eth2,6, #dns primario
    dhcp-option=eth2,1, # mascara de red
    dhcp-option=eth2,option:router, # gateway

We have 3 nics on the system eth0/eth1/eth2, one for each VLAN, and try
to replace for one nic with VLANs tagged.

We try the tag option and the dhcp assign ip on correct range for each
PC on each vlan, but dnsmasq allways assign to the PC the same gateway,
that is the las vlan configured.

For example on this configuraton assign the correct range to the PC, but
the gateway always assign gateway, to all PC

dhcp-option=eth0.37,6, #dns primario
dhcp-option=eth0.37,1, # mascara de red
dhcp-option=eth0.37,option:router, # gateway

dhcp-option=eth0.137,6, #dns primario
dhcp-option=eth0.137,1, # mascara de red
dhcp-option=eth0.137,option:router, # gateway

dhcp-option=eth0.237,6, #dns primario
dhcp-option=eth0.237,1, # mascara de red
dhcp-option=eth0.237,option:router, # gateway

It is necessary to use "vconfig" to configure virtual vlan interface on
the operating system, or can use tagged vlans from the router ?

To be able to answer your question I need to know the following:

 - What hardware is the router (netgear, cisco ...)?
 - What type of distribution (name and version) are you using 'vconfig'
on (Linux, Oracle)?

I can't answer your question without knowing your network topology, but
if the router is VLAN tagging capable I would use it and also use the
DHCP capability from that router.

Also, to isolate whether it is a vlan configuration or a dnsmasq issue
simply try the line I have provided, obviously you can change the Ip
ranges to your liking.

Hello john doe,

Send the data:
 -- Router mikrotik RB1100 AH
 -- Ubuntu 16.04
 -- Using vconfig with 3 VLANs

Yes, the router have capabilitie to dhcp, you recommend to use that instead of dnsmasq for dhcp ?.


Dnsmasq-discuss mailing list

Reply via email to