Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
avahi + dhcp on host <-> VM bridge breaks down (regularly)
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
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Thu May 08, 2014 7:21 pm    Post subject: avahi + dhcp on host <-> VM bridge breaks down (regul Reply with quote

I often use qemu for runing test environments, so here's my setup on host machine:

eth0 - connected to the internet
vn0 - bridge with assigned static IP address. Data routed to the internet with iptables. Provides dhcp service.
br0 - "Detached" bridge. No IP, no routing, no services, nothing. Pretends it's disconnected from host, used exclusively by VMs for their own purposes.

So, to create testing environment I need several virtual machines. They all use avahi, mdns, and attempt to mount host:/usr/portage over NFS. With a single machine attached to vn0 everything works. Pings pass both ways, mount kicks in during boot, time goes on and it remains fine.
Problem: as soon as I launch second VM attached to vn0 resolving names breaks down. Avahi can still see "something", but it can't resolve names anymore. Host can't ping any VM by name, VMs can't ping host, other VMs, not even themselves. Anything provided with IP directly works though.

Now, if I launch it on br0 without it's own address assigned, resolving names between VMs seems fine with both, static IP and with IP obtained with dhcp "borrowed" from another project residing on it's own VM.
It doesn't really make any sense to me, but there is a pattern, so maybe someone can figure it out.

bridges are created with netifrc according to this:
Quote:
config_vn0="10.0.1.1/24"
brctl_vn0="setfd 0
sethello 10
stp off"
rc_net_vn0_provide="!net"

config_br0="null"
brctl_br0="setfd 0
sethello 10
stp off"
rc_net_br0_provide="!net"


Short fragments from host's system log:

Quote:
### launching virtual machine 1
May 08 20:54:06 [kernel] device host-1 entered promiscuous mode
May 08 20:54:06 [kernel] IPv6: ADDRCONF(NETDEV_UP): guest-1: link is not ready
May 08 20:54:06 [kernel] IPv6: ADDRCONF(NETDEV_CHANGE): guest-1: link becomes ready
May 08 20:54:06 [kernel] vn0: port 1(guest-1) entered forwarding state
May 08 20:54:07 [avahi-daemon] Joining mDNS multicast group on interface guest-1.IPv6 with address fe80::2491:8cff:fe21:fa21.
May 08 20:54:07 [avahi-daemon] New relevant interface guest-1.IPv6 for mDNS.
May 08 20:54:07 [avahi-daemon] Registering new address record for fe80::2491:8cff:fe21:fa21 on guest-1.*.
May 08 20:54:14 [kernel] kvm [2074]: vcpu0 unhandled rdmsr: 0xc0010001
May 08 20:54:22 [dhcpd] DHCPDISCOVER from de:ad:be:ef:b0:da via vn0
May 08 20:54:23 [dhcpd] DHCPOFFER on 10.0.1.81 to de:ad:be:ef:b0:da (guest) via vn0
May 08 20:54:23 [dhcpd] DHCPREQUEST for 10.0.1.81 (10.0.1.1) from de:ad:be:ef:b0:da (guest) via vn0
May 08 20:54:23 [dhcpd] DHCPACK on 10.0.1.81 to de:ad:be:ef:b0:da (guest) via vn0
May 08 20:54:24 [rpc.mountd] authenticated mount request from 10.0.1.81:763 for /usr/portage (/usr/portage)

### launching virtual machine 2
May 08 20:55:11 [kernel] device target-1 entered promiscuous mode
May 08 20:55:11 [kernel] IPv6: ADDRCONF(NETDEV_UP): target-1: link is not ready
May 08 20:55:11 [kernel] IPv6: ADDRCONF(NETDEV_CHANGE): target-1: link becomes ready
May 08 20:55:11 [kernel] vn0: port 2(target-1) entered forwarding state
May 08 20:55:13 [avahi-daemon] Joining mDNS multicast group on interface target-1.IPv6 with address fe80::5c5b:a2ff:feaa:be32.
May 08 20:55:13 [avahi-daemon] New relevant interface target-1.IPv6 for mDNS.
May 08 20:55:13 [avahi-daemon] Registering new address record for fe80::5c5b:a2ff:feaa:be32 on target-1.*.
May 08 20:55:21 [kernel] kvm [8117]: vcpu0 unhandled rdmsr: 0xc0010001
May 08 20:55:31 [dhcpd] DHCPDISCOVER from de:ad:be:ef:b8:21 via vn0
May 08 20:55:32 [dhcpd] DHCPOFFER on 10.0.1.83 to de:ad:be:ef:b8:21 (target) via vn0
May 08 20:55:32 [dhcpd] DHCPREQUEST for 10.0.1.83 (10.0.1.1) from de:ad:be:ef:b8:21 (target) via vn0
May 08 20:55:32 [dhcpd] DHCPACK on 10.0.1.83 to de:ad:be:ef:b8:21 (target) via vn0
May 08 20:55:32 [avahi-daemon] Received response from host 10.0.1.1 with invalid source port 1028 on interface 'vn0.0'
May 08 20:55:32 [avahi-daemon] Invalid legacy unicast query packet.
May 08 20:55:33 [avahi-daemon] Received response from host 10.0.1.1 with invalid source port 1028 on interface 'vn0.0'


Also, I have noticed that pinging one VM from another (still on vn0, using IP directly) gives duplicates
Maybe someone knows what is wrong? I'll run some more tests on br0 just to make sure, but... well. Any ideas in the meantime?


edit: when launching VMs on br0 everything works. Mounting NFS share during boot (using vn0) changes nothing. Static IP assigned to br0 doesn't break things. Looks like avahi didn't like dhcpd listening on the same interface. There are no duplicates when pinging one VM from the other on br0.
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