El 2018-12-05 12:59, john doe escribió:
On 12/5/2018 1:58 PM, Geert Stappers wrote:
On Wed, Dec 05, 2018 at 09:09:25AM -0300, jmperrote wrote:
El 2018-12-04 12:26, john doe escribió:
On 12/4/2018 12:02 PM, jmperrote wrote:

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

    dhcp-range=interface:eth0,set:VLAN_37,10.11.37.50,10.11.37.200,6h
    dhcp-option=eth0,6,10.11.37.15 #dns primario
    dhcp-option=eth0,1,255.255.255.0 # mascara de red
    dhcp-option=eth0,option:router,10.11.37.1 # gateway

    dhcp-range=interface:eth1,set:VLAN_137,10.11.137.90,10.11.137.98,6h
    dhcp-option=eth1,6,10.11.37.15 #dns primario
    dhcp-option=eth1,1,255.255.255.0 # mascara de red
    dhcp-option=eth1,option:router,10.11.137.1 # gateway

    dhcp-range=interface:eth2,set:VLAN_237,10.11.237.50,10.11.237.200,6h
    dhcp-option=eth2,6,10.11.37.15 #dns primario
    dhcp-option=eth2,1,255.255.255.0 # mascara de red
    dhcp-option=eth2,option:router,10.11.237.1 # 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 10.11.237.1 gateway, to all PC

dhcp-range=interface:eth0.37,set:VLAN_37,10.11.37.90,10.11.37.98,6h
dhcp-option=eth0.37,6,10.11.37.15 #dns primario
dhcp-option=eth0.37,1,255.255.255.0 # mascara de red
dhcp-option=eth0.37,option:router,10.11.37.1 # gateway

dhcp-range=interface:eth0.137,set:VLAN_137,10.11.137.90,10.11.137.98,6h
dhcp-option=eth0.137,6,10.11.37.15 #dns primario
dhcp-option=eth0.137,1,255.255.255.0 # mascara de red
dhcp-option=eth0.137,option:router,10.11.137.1 # gateway

dhcp-range=interface:eth0.237,set:VLAN_237,10.11.237.50,10.11.237.200,6h
dhcp-option=eth0.237,6,10.11.37.15 #dns primario
dhcp-option=eth0.237,1,255.255.255.0 # mascara de red
dhcp-option=eth0.237,option:router,10.11.237.1 # 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,

Hello Mailinglist,


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 ?.

What I did read in the reply from john doe:

  Other options might resolve the original problem.


But, yes, it is possible to replace
three NICs with single NIC plus three VLANs.  Surely for DHCP stuff.
If three NICs were choose due high bandwidth usage,
that can't be solved by "VLAN".


I guess nick bonding could be used with VLAN.

Hello, ok trying a solution to resolv dnsmasq with vlans and one nic, I do next

I reconfigured the dnsmasq with this and the mikrotik router with tagged vlans.

dhcp-range=tag:eth0,set:eth0,10.11.37.50,10.11.37.200,6h
dhcp-range=tag:eth0,set:eth0,10.11.137.50,10.11.137.200,6h
dhcp-range=tag:eth0,set:eth0,10.11.237.50,10.11.237.200,6h
dhcp-option=tag:eth0,option:dns-server,10.11.37.15
dhcp-option=tag:eth0,option:dns-server,10.11.37.15
dhcp-option=tag:eth0,option:dns-server,10.11.37.15
dhcp-option=tag:eth0,option:router,10.11.137.1
dhcp-option=tag:eth0,option:router,10.11.37.1
dhcp-option=tag:eth0,option:router,10.11.237.1
dhcp-option=tag:eth0,1,255.255.255.0

The assign of ip work fine, each PC on each vlan pickup a IP on corresponding vlan, but on 3 PCs allways assign the same gateway --> 10.11.237.1

Example
Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 available DHCP range: 10.11.137.50 -- 10.11.137.200 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 available DHCP range: 10.11.237.50 -- 10.11.237.200 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 client provides name: networking3 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 DHCPREQUEST(eth0) 10.11.137.96 10:78:d2:d7:b2:5c
Dec  6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 tags: eth0
Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 DHCPACK(eth0) 10.11.137.96 10:78:d2:d7:b2:5c networking3 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 requested options: 15:domain-name, 6:dns-server, 119:domain-search, Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 requested options: 249, 33:static-route, 252
Dec  6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 next server: 10.11.37.15
Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 1 option: 53:message-type 05 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 54:server-identifier 10.11.37.15 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 51:lease-time 00:00:54:60 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 58:T1 00:00:2a:30 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 59:T2 00:00:49:d4 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 1:netmask 255.0.0.0 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 28:broadcast 10.11.37.255 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 23 option: 15:domain-name prueba.prueba.ar Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 11 option: 12:hostname networking3 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 3:router 10.11.237.1 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 3:router 10.11.37.1 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 3:router 10.11.137.1 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 6:dns-server 10.11.37.15 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 6:dns-server 10.11.37.15 Dec 6 14:38:57 dnsmasq-dhcp[1717]: 4259865864 sent size: 4 option: 6:dns-server 10.11.37.15


regards.

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to