Re: dnsmasq + vlans = troubles



On 31.5.10 8:29 , itba wrote:
Hello,
I have a production server running a slackware (
Linux skoll 2.6.28.7-smp #1 SMP Sat Feb 28 12:26:08)
whit dnsmasq (Dnsmasq version 2.47) and 3 vlans, so I have one file per vlan
ir
order to act as a dhcp server in each virtual interface
The reason for having 3 diferents networks is for security, so:
the configs it's as follows

cat /etc/dnsmasq.conf
dhcp-lease-max=5000
log-dhcp
conf-dir=/etc/dnsmasq.d

cat /etc/dnsmasq.d/red_uno
domain-needed
bogus-priv
interface=lo
interface=eth0.100
dhcp-range=red_uno,10.0.100.0,10.0.255.255,12h
domain=itba.edu.ar,10.0.0.0/16
# Opcion 44: Servidores WINS
dhcp-option=net:red_uno,44,10.0.0.66

cat /etc/dnsmasq.d/red_dos
domain-needed
bogus-priv
interface=lo
interface=eth0.200
domain=alu.itba.edu.ar,172.17.0.0/16
dhcp-range=red_dos,172.17.24.0,172.17.25.255,12h
# Opcion 44: Servidores WINS
dhcp-option=net:red_dos,44,172.17.8.16

cat /etc/dnsmasq.d/red_tres
domain-needed
bogus-priv
interface=lo
interface=eth0.300
dhcp-range=red_tres,10.2.1.0,10.2.100.255,12h
domain=lanwifi.itba.edu.ar,10.2.0.0/16

So, the problems become when a host of a network request an ip, and the
service
responds offering 3 diferent ips, one of each network !
for example: the mac-address of client is 00:13:20:da:ab:69 and it's belong to
"/etc/dnsmasq.d/red_dos" so the valid range is
172.17.24.0,172.17.25.255 and look what it happens then:
grep 00:13:20:da:ab:69 /var/log/dnsmasq/dnsmasq.log

May 31 09:09:21 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.100) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:21 skoll dnsmasq[3379]: DHCPOFFER(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:09:24 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.200) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:24 skoll dnsmasq[3379]: DHCPOFFER(eth0.200) 172.17.25.34
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.300) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPOFFER(eth0.300) 10.2.68.33
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.100) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPOFFER(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.200) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPOFFER(eth0.200) 172.17.25.34
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPDISCOVER(eth0.300) 169.254.217.131
00:13:20:da:ab:69
May 31 09:09:27 skoll dnsmasq[3379]: DHCPOFFER(eth0.300) 10.2.68.33
00:13:20:da:ab:69
May 31 09:09:28 skoll dnsmasq[3379]: DHCPREQUEST(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:09:28 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:09:29 skoll dnsmasq[3379]: DHCPREQUEST(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:09:29 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:10:37 skoll dnsmasq[3379]: DHCPINFORM(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:10:37 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:12:38 skoll dnsmasq[3379]: DHCPREQUEST(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:38 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:12:38 skoll dnsmasq[3379]: DHCPREQUEST(eth0.200) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:38 skoll dnsmasq[3379]: DHCPNAK(eth0.200) 10.0.235.33
00:13:20:da:ab:69 wrong network
May 31 09:12:38 skoll dnsmasq[3379]: DHCPREQUEST(eth0.300) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:38 skoll dnsmasq[3379]: DHCPNAK(eth0.300) 10.0.235.33
00:13:20:da:ab:69 wrong network
May 31 09:12:42 skoll dnsmasq[3379]: DHCPREQUEST(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:42 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:12:42 skoll dnsmasq[3379]: DHCPREQUEST(eth0.200) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:42 skoll dnsmasq[3379]: DHCPNAK(eth0.200) 10.0.235.33
00:13:20:da:ab:69 wrong network
May 31 09:12:42 skoll dnsmasq[3379]: DHCPREQUEST(eth0.300) 10.0.235.33
00:13:20:da:ab:69
May 31 09:12:42 skoll dnsmasq[3379]: DHCPNAK(eth0.300) 10.0.235.33
00:13:20:da:ab:69 wrong network
May 31 09:16:25 skoll dnsmasq[3379]: DHCPINFORM(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:16:25 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 09:16:25 skoll dnsmasq[3379]: DHCPINFORM(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 09:16:25 skoll dnsmasq[3379]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 11:50:35 skoll dnsmasq[20676]: DHCPREQUEST(eth0.100) 10.0.235.33
00:13:20:da:ab:69
May 31 11:50:35 skoll dnsmasq[20676]: DHCPACK(eth0.100) 10.0.235.33
00:13:20:da:ab:69 labb14
May 31 11:50:36 skoll dnsmasq[20676]: DHCPREQUEST(eth0.200) 10.0.235.33
00:13:20:da:ab:69
May 31 11:50:36 skoll dnsmasq[20676]: DHCPNAK(eth0.200) 10.0.235.33
00:13:20:da:ab:69 wrong network
May 31 11:50:36 skoll dnsmasq[20676]: DHCPREQUEST(eth0.300) 10.0.235.33
00:13:20:da:ab:69
May 31 11:50:36 skoll dnsmasq[20676]: DHCPNAK(eth0.300) 10.0.235.33
00:13:20:da:ab:69 wrong network


What is wrong here ?

The DHCP server in dnsmasq ia a simple one intended for a
simple single network. Install a dedicated DHCP server
instead and disable the DHCP service in dnsmasq.

How do you intend to tell the server which VLAN a
client is intended to go? The operating system
is not telling the server which VLAN was used
for the requests.

--

Tauno Voipio
tauno voipio (at) iki fi

.



Relevant Pages

  • getting pxelinux to work
    ... I am wanting to run an IBM U47 as a server and I am wanting it to boot ... Here is the config for DNSMAsq: ... DNSMasq Configuration Starts Here ... If you have more than one network, ...
    (Ubuntu)
  • Re: Anyone else out there with the same cluster problem?
    ... >> is disabled because our network hw is not supporting this function. ... >> One VLAN for the public NIC and one VLAN for the private NIC. ... All nics are full duplex where it possible ... >> SQL Server is installed by myself. ...
    (microsoft.public.windows.server.clustering)
  • Re: dnsmasq + vlans = troubles
    ... I have a production server running a slackware ( ... whit dnsmasq and 3 vlans, so I have one file per vlan ... order to act as a dhcp server in each virtual interface ...
    (comp.os.linux.networking)
  • Re: Cisco Vlan and IP helper
    ... Our 10.1.20.x network was not switched, and what was switched was VLAN ... can't "DISCOVER" the citrix server. ... kind of broadcast to discover the server farm. ...
    (comp.dcom.sys.cisco)
  • Re: DHCP & DOMAIN
    ... VLAN 1: 192.168.1.0 255.255.255.0 ... I have one server and i would like this to be the DHCP server and ... the DHCP request comes from a network (usually via the router allowing ... the DHCP server will then assign a correct set of IP addressing ...
    (microsoft.public.windows.server.general)