Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Libvirt/Qemu with macvtap - wrong network via dhcp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3239
Location: de

PostPosted: Thu Dec 01, 2016 11:14 pm    Post subject: [solved] Libvirt/Qemu with macvtap - wrong network via dhcp Reply with quote

Hi there,

I'm running a NAS with Gentoo. Installed on that thing is a dhcp server. Works fine so far.

/etc/dhcp/dhcpd.conf:

authoritative;

allow booting;
allow bootp;

option domain-name "localnet.loc";
option domain-search "localnet.loc";
option domain-name-servers 192.168.109.11, 192.168.109.1;
option routers 192.168.109.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.109.255;
option ntp-servers 192.168.109.1;
option architecture code 93 = unsigned integer 16;

default-lease-time 604800;
max-lease-time 1209600;
ddns-update-style none;

subnet 192.168.109.0 netmask 255.255.255.0 {
    range 192.168.109.50 192.168.109.79;
}

# TFTP-Server
group {
    #next-server 192.168.109.11;
    next-server nas.blechnet.de;
    if option architecture = 00:07 {
        filename "/tftproot/syslinux.efi";
    } else {
        filename "/tftproot/pxelinux.0";
    }
}

host …

  • 192.168.109.1 is my router (Fritzbox) with DHCP deaktivated
  • 192.168.109.11 is my NAS with DHCP and DNS
  • 192.168.109.20 is the fixed assigned IP to my desktop computer.


Now I wanted start a virtual machine (libvirt/Qemu) in bridged mode (macvtap). And here starts something, which I don't understand.

dhcp log on NAS:
Dez 01 23:55:51 nas dhcpd[21613]: DHCPNAK on 192.168.2.100 to 52:54:00:d6:09:32 via eth0
Dez 01 23:55:52 nas dhcpd[21613]: DHCPOFFER on 192.168.109.66 to 52:54:00:d6:09:32 via eth0


That means: The VM wants to assign for some unknown reason the IP 192.168.2.100, but my DHCP server denies. Instead it offers 192.168.109.66.

Nevertheless inside the virtual machine I get access to the world outside (ping google). But I don't get any ping to the other machines inside my home network.
ip a:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:d6:09:32 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.100/24 brd 192.168.2.255 scope global dynamic eth0


Where is the VM getting its strange IP (192.168.2.100) from? And why isn't it accepting an IP from my DHCP server?


Last edited by musv on Fri Dec 02, 2016 10:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3239
Location: de

PostPosted: Fri Dec 02, 2016 10:47 pm    Post subject: Reply with quote

Found the solution. I'm using a powerline network connection. And my neighbor in the same building seems to have a powerline connection too. So I got a dhcp response from his router.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum