[Dnsmasq-discuss] Problem with VM and dnsmasq

Albert ARIBAUD albert.aribaud at free.fr
Thu Oct 8 07:38:19 BST 2015


Bonjour mario,

Le Wed, 7 Oct 2015 22:48:15 +0200, mario <jjskoli at gmail.com> a écrit :

> Hello, Albert.
> 
> On 10/07/2015 09:09 PM, Albert ARIBAUD wrote:
> > Hi again mario,
> >
> > Le Wed, 7 Oct 2015 19:06:15 +0200, Albert ARIBAUD
> > <albert.aribaud at free.fr> a écrit :
> >
> >> Stupid question BTW: how does yor host get its eth and wlan IPs? Does
> >> it ask another DHCP server on the segment, or are they fixed? In the
> >> end, does it get the same or different addresses on both I/Fs?
> 
> The whole LAN is served by the single dnsmasq we are discussing, both 
> DHCP and DNS.
> The different NICs are dished distinct IP addresses, except for the few 
> with reserved addresses.

OK, so the host has different IPs depending on whether it uses eth0 or
wlan0, correct?

> > Also: when your VM switches between host eth tand host wlan for its
> > bridge, does it do it while off or is it still on? What if both the
> > host and VM boot on wlan and never switch to eth?
> 
> 
> The VM is brought down completely, powered off. I then
> disconnect the host, count to 5 ;-)  re-connect the host thru the other 
> NIC,
> change guest setup as regards to network configuration,  then I
> bring up the VM.
> 
> It is as fresh a start as I can concoct, short of bringing the whole 
> host down.
> 
> I do not know what you mean by
> 
> .... What if VM boot[s] on wlan and never switch[es] to eth?
> 
> The VM does not have access to a wifi connection. It has a single 
> ethernet NIC;
> as per VirtualBox (or any Hypervisor) it is connected either to wired or 
> to the
> wifi NIC of the host. I never switch the guest while it is up and running.
> When I want to switch the host's connection, I bring the VM down (=powered
> off), reconnect the host, change the VM network configuration so that it 
> hooks up now with the new alive NIC, then bring it up.

I meant to ask if you had tried a scenario where everything starts up
cold with wlan. AIAU, while the hosts does not boot cold with only
wlan0 up, you *do* boot the VM cold with its interface bridged to the
host's wlan0, so I have my answer: the VM does boot cold on wlan0.

(to be complete, a real cold boot scenario would also include erasing
the client lease files on the host and VM before powering them back on,
to make sure we're in a clean state, but let's put this aside for now)

> When the host is conneted via wifi, the VM never receives a reply to its 
> BOOTP/DHCP
> request: I can see, in the tcpdump records, hundreds of requests, dnsmasq
> makes hundred of replies, not a single one of them leaves the gateway: 
> the VM
> never gets a DHCP reply. If the host is connected via ethernet, the same 
> occurs except
> the reply occurs in a couple of seconds, and that's the end of the DHCP 
> process:
> the VM is served a proper IP address in a matter of seconds.

Hartmut suggested that you run tcpdump / wireshark on all three
machines. IIUC, the current dumps are of the DHCP server. With a dump
on the host at the same time, we'd see if the DHCP answers reach the
host, and if they do, then with a dump on the VM we could see if they
have left the host.

One thing I'm thinking of all of a sudden: did you check if your Wifi
setting allows packets to a MAC which is not that of the destination
Wifi interface? Most, and probably all nowadays, ethernet interface
allows this in promiscuous mode, but not all wireless interfaces might
not always.

IOW, what happens if you configure the VM to use a fixed IP address,
then cold boot it to bridge over wlan0 and try to ping the server from
the VM, and from the VM to the server?

> Cheers, and thanks for your help,

NP. :)

> Mario

Amicalement,
-- 
Albert.



More information about the Dnsmasq-discuss mailing list