[Bug 876458] Re: dnsmasq started before all interfaces are up
Thomas, thanks for the updates. I think you have a pretty complicated setup, and we can't necessarily cater to such a setup in the packaging given the number of options dnsmasq has. There's a path for other users with a similar setup to yours, and that is --listen-interface. Closing this as Invalid, but please feel free to re-open it if you feel there is more we can do in Ubuntu to address the issue. ** Changed in: dnsmasq (Ubuntu) Status: Incomplete = Invalid -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
Thanks for the clarification here. I've tried now with --listen- interface and I am sure dnsmasq does what it is supposed to do --- only answer dhcp requests arriving on certain interfaces, but ignoring others! In this case It was a missinterpretation of how the various interface related options work. Thanks again for clarification. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
That's exactly what happens without --bind-interface, interfaces which are configured in dnsmasq but don't exist at startup generate a warning only, and start to work when they are created. This seems to be correct. Packets from interfaces which are not configured are ignored. This isn't correct at all. Assume configuration: auto vm0 iface vm0 inet dhcp bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off bridge_ports eth0 auto vm1 iface vm1 inet static address 172.18.1.1 netmask 255.255.255.0 bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off pre-up brctl addbr $IFACE post-down brctl delbr $IFACE auto vm8 iface vm1 inet static address 172.18.8.1 netmask 255.255.255.0 bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off pre-up brctl addbr $IFACE post-down brctl delbr $IFACE and in /etc/dnsmasq.conf: localise-queries domain-needed expand-hosts no-negcache filterwin2k cache-size=150 dhcp-authoritative dhcp-fqdn dhcp-leasefile=/var/lib/misc/dnsmasq.leases dhcp-boot=boot/grub/i386-pc/core.0 dhcp-no-override tftp-root=/srv/tftpboot enable-tftp listen-address=127.0.0.1 resolv-file=/etc/resolv.dhcp domain=fritz.box #== Interface vm1 listen-address=172.18.1.1 domain=fritz.box,172.18.1.0/24 dhcp-range=172-18-1,172.18.1.129,172.18.1.200,255.255.255.0,30m dhcp-option=net:172-18-1,28,172.18.1.255 # option broadcast address dhcp-option=net:172-18-1,3,172.18.1.1 # option default route dhcp-option=net:172-18-1,option:domain-search,fritz.box# option domain search (RFC-3397) dhcp-option=net:172-18-1,42,172.18.1.1 # option ntp-servers dhcp-option=net:172-18-1,6,172.18.1.1 # option domain name servers dhcp-option=net:172-18-1,15,fritz.box # option domain name dhcp-option=net:172-18-1,40,fritz.box # option nis domain dhcp-option=net:172-18-1,23,50 # option ttl dhcp-option=net:172-18-1,19,0 # option ip-forwarding off dhcp-option=net:172-18-1,44,0.0.0.0# set netbios-over-TCP/IP nameserver(s) aka WINS server(s) dhcp-option=net:172-18-1,45,0.0.0.0# netbios datagram distribution server dhcp-option=net:172-18-1,46,8 # netbios node type dhcp-option=net:172-18-1,vendor:PXEClient,1,0.0.0.0 dhcp-option=net:172-18-1,vendor:MSFT,2,1i # Microsoft: tell client to release the lease #== Interface vm8 listen-address=172.18.8.1 domain=fritz.box,172.18.8.0/24 dhcp-range=172-18-8,172.18.8.129,172.18.8.200,255.255.255.0,30m dhcp-option=net:172-18-8,28,172.18.8.255# option broadcast address dhcp-option=net:172-18-8,3,172.18.8.1 # option default route dhcp-option=net:172-18-8,option:domain-search,fritz.box # option domain search (RFC-3397) dhcp-option=net:172-18-8,42,172.18.8.1 # option ntp-servers dhcp-option=net:172-18-8,6,172.18.8.1 # option domain name servers dhcp-option=net:172-18-8,15,fritz.box # option domain name dhcp-option=net:172-18-8,40,fritz.box # option nis domain dhcp-option=net:172-18-8,23,50 # option ttl dhcp-option=net:172-18-8,19,0 # option ip-forwarding off dhcp-option=net:172-18-8,44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) dhcp-option=net:172-18-8,45,0.0.0.0 # netbios datagram distribution server dhcp-option=net:172-18-8,46,8 # netbios node type dhcp-option=net:172-18-8,vendor:PXEClient,1,0.0.0.0 dhcp-option=net:172-18-8,vendor:MSFT,2,1i # Microsoft: tell client to release the lease dhcp-queries are answered on interfaces connected to all bridges! As soon, as I turn on dnsmasq systems connected via ethernet receive addresses from my dnsmasq dhcp server I'd suppose only being seen from virtual bridges inside the host. If I turn on bind-interfaces all is OK again. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com
[Bug 876458] Re: dnsmasq started before all interfaces are up
Have to be a bit more precise: there is an additional interface not configured at all. This interface only receives and answers dhcp queries. The other interface, which is configured is OK. The problem seems to be interfaces which are not configured and may be up sometimes. As soon as I configure this interface, all is OK again --- no more answered queries on this interface. But I have to configure it not to answer any dhcp-queries. If I leave it unconfigured this Interface will receive dhcp-queries and answer them. The Interface in question is configured: auto vm2 iface vm2 inet static address 192.168.116.1 netmask 255.255.255.0 bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off bridge_ports eth1 pre-up brctl addbr $IFACE post-down brctl delbr $IFACE -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 876458] Re: dnsmasq started before all interfaces are up
An addition to my last reply: If a DHCP request is received via in interface which doesn't have an IP address, there will be a log message, but the request will be otherwise ignored. Cheers, Simon. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 876458] Re: dnsmasq started before all interfaces are up
On 02/01/12 09:44, Thomas Schweikle wrote: That's exactly what happens without --bind-interface, interfaces which are configured in dnsmasq but don't exist at startup generate a warning only, and start to work when they are created. This seems to be correct. Packets from interfaces which are not configured are ignored. This isn't correct at all. Assume configuration: auto vm0 iface vm0 inet dhcp bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off bridge_ports eth0 auto vm1 iface vm1 inet static address 172.18.1.1 netmask 255.255.255.0 bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off pre-up brctl addbr $IFACE post-down brctl delbr $IFACE auto vm8 iface vm1 inet static address 172.18.8.1 netmask 255.255.255.0 bridge_fd 3 bridge_hello 2 bridge_maxage 12 bridge_stp off pre-up brctl addbr $IFACE post-down brctl delbr $IFACE and in /etc/dnsmasq.conf: localise-queries domain-needed expand-hosts no-negcache filterwin2k cache-size=150 dhcp-authoritative dhcp-fqdn dhcp-leasefile=/var/lib/misc/dnsmasq.leases dhcp-boot=boot/grub/i386-pc/core.0 dhcp-no-override tftp-root=/srv/tftpboot enable-tftp listen-address=127.0.0.1 resolv-file=/etc/resolv.dhcp domain=fritz.box #== Interface vm1 listen-address=172.18.1.1 domain=fritz.box,172.18.1.0/24 dhcp-range=172-18-1,172.18.1.129,172.18.1.200,255.255.255.0,30m dhcp-option=net:172-18-1,28,172.18.1.255 # option broadcast address dhcp-option=net:172-18-1,3,172.18.1.1 # option default route dhcp-option=net:172-18-1,option:domain-search,fritz.box# option domain search (RFC-3397) dhcp-option=net:172-18-1,42,172.18.1.1 # option ntp-servers dhcp-option=net:172-18-1,6,172.18.1.1 # option domain name servers dhcp-option=net:172-18-1,15,fritz.box # option domain name dhcp-option=net:172-18-1,40,fritz.box # option nis domain dhcp-option=net:172-18-1,23,50 # option ttl dhcp-option=net:172-18-1,19,0 # option ip-forwarding off dhcp-option=net:172-18-1,44,0.0.0.0# set netbios-over-TCP/IP nameserver(s) aka WINS server(s) dhcp-option=net:172-18-1,45,0.0.0.0# netbios datagram distribution server dhcp-option=net:172-18-1,46,8 # netbios node type dhcp-option=net:172-18-1,vendor:PXEClient,1,0.0.0.0 dhcp-option=net:172-18-1,vendor:MSFT,2,1i # Microsoft: tell client to release the lease #== Interface vm8 listen-address=172.18.8.1 domain=fritz.box,172.18.8.0/24 dhcp-range=172-18-8,172.18.8.129,172.18.8.200,255.255.255.0,30m dhcp-option=net:172-18-8,28,172.18.8.255# option broadcast address dhcp-option=net:172-18-8,3,172.18.8.1 # option default route dhcp-option=net:172-18-8,option:domain-search,fritz.box # option domain search (RFC-3397) dhcp-option=net:172-18-8,42,172.18.8.1 # option ntp-servers dhcp-option=net:172-18-8,6,172.18.8.1 # option domain name servers dhcp-option=net:172-18-8,15,fritz.box # option domain name dhcp-option=net:172-18-8,40,fritz.box # option nis domain dhcp-option=net:172-18-8,23,50 # option ttl dhcp-option=net:172-18-8,19,0 # option ip-forwarding off dhcp-option=net:172-18-8,44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) dhcp-option=net:172-18-8,45,0.0.0.0 # netbios datagram distribution server dhcp-option=net:172-18-8,46,8 # netbios node type dhcp-option=net:172-18-8,vendor:PXEClient,1,0.0.0.0 dhcp-option=net:172-18-8,vendor:MSFT,2,1i # Microsoft: tell client to release the lease dhcp-queries are answered on interfaces connected to all bridges! As soon, as I turn on dnsmasq systems connected via ethernet receive addresses from my dnsmasq dhcp server I'd suppose only being seen from virtual bridges inside the host. If I turn on bind-interfaces all is OK again. OK, some of this behaviour, I think I understand, some not. The first thing to say, is that it's much better to use --interface, instead of --listen-address to control this stuff with DHCP. --listen-address works fine for DNS or TFTP, because the
[Bug 876458] Re: dnsmasq started before all interfaces are up
H. If this is the reason, how to force dnsmasq not to respond on some interfaces, while listening on all others, with different configurations per interface? Wouldn't it be better to configure dnsmasq even for interfaces not there at startup, and if these interfaces come up take them, if configs match? Avoiding unconfigured interfaces? -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 876458] Re: dnsmasq started before all interfaces are up
On 20/12/11 20:55, Thomas Schweikle wrote: H. If this is the reason, how to force dnsmasq not to respond on some interfaces, while listening on all others, with different configurations per interface? Wouldn't it be better to configure dnsmasq even for interfaces not there at startup, and if these interfaces come up take them, if configs match? Avoiding unconfigured interfaces? That's exactly what happens without --bind-interface, interfaces which are configured in dnsmasq but don't exist at startup generate a warning only, and start to work when they are created. Packets from interfaces which are not configured are ignored. Simon. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
Yes, that's right, but there are interfaces not started from /etc/network/interfaces or Network Manager: * VMware Workstation / Player installs interfaces starting VMware daemons * VirtualBox installs interfaces * KVM may install an additional bridge * some VPN software installs tun/tap interfaces or virtual interfaces up on an existing interface As far as I could find: * VMware is started after dnsmasq, leading to a situation dhcp via dnsmasq works, but DNS doesn't * VirtualBox creates interfaces and bridges on the fly --- sometimes dhcp works, sometimes it doesn't; DNS did not work always * KVM interfaces are started concurently with dnsmasq, because kvm is started after network is up. Sometimes you'll get full functionality, sometimes you do not. If KVM starts its own dnsmasq both daemons challenge with each other about whom answers dhcp --- sometimes the VM is assigned the one address, sometimes the other. DNS may work or may not. * VPN: sometimes dnsmasq binds dhcp to VPN, sometimes it doesn't. Either way: it leads into trouble. To make dnsmasq work with dhcp, dns (and, if configured tftp) you'll have to restart the daemon each time a new interface it shall bind to is started. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
** Attachment added: A bit a complicated interfaces file ... :-) https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+attachment/2624512/+files/interfaces -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 876458] Re: dnsmasq started before all interfaces are up
On 08/12/11 12:57, Thomas Schweikle wrote: Yes, that's right, but there are interfaces not started from /etc/network/interfaces or Network Manager: * VMware Workstation / Player installs interfaces starting VMware daemons * VirtualBox installs interfaces * KVM may install an additional bridge * some VPN software installs tun/tap interfaces or virtual interfaces up on an existing interface As far as I could find: * VMware is started after dnsmasq, leading to a situation dhcp via dnsmasq works, but DNS doesn't * VirtualBox creates interfaces and bridges on the fly --- sometimes dhcp works, sometimes it doesn't; DNS did not work always * KVM interfaces are started concurently with dnsmasq, because kvm is started after network is up. Sometimes you'll get full functionality, sometimes you do not. If KVM starts its own dnsmasq both daemons challenge with each other about whom answers dhcp --- sometimes the VM is assigned the one address, sometimes the other. DNS may work or may not. * VPN: sometimes dnsmasq binds dhcp to VPN, sometimes it doesn't. Either way: it leads into trouble. To make dnsmasq work with dhcp, dns (and, if configured tftp) you'll have to restart the daemon each time a new interface it shall bind to is started. Dnsmasq will cope fine with dynamically-created interfaces, as long as bind-interfaces is NOT set in the configuration. Simon. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
Thomas, i'd argue that any service not using ifup/ifdown, and not manually calling the /etc/network/if-up.d scripts after bringing interfaces up is the bug then. NetworkManager has a plugin specifically to do this, and vmware/virtualbox should too if they're going to manage interfaces. Of course, it also means that they need to start before runlevel 2, so they'll need upstart jobs. Still, I don't think this is dnsmasq's problem. As Simon says, just make sure dnsmasq is not binding to specific interfaces. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
Thomas, runlevel 2 is not entered until after all interfaces listed as 'auto' in /etc/network/interfaces are up, as of Ubuntu 11.10. Since dnsmasq starts in runlevel 2, it should not have any chance to start before that network configuration is applied. Can you send an ls -l /etc/rcS.d and /etc/rc2.d along with your /etc/network/interfaces file and ls -l /run/network ? THANKS! marking incomplete. ** Changed in: dnsmasq (Ubuntu) Status: New = Incomplete -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
** Changed in: dnsmasq (Ubuntu) Importance: Undecided = High -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 876458] Re: dnsmasq started before all interfaces are up
-- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/876458 Title: dnsmasq started before all interfaces are up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/876458/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs