You are not logged in.

#1 2018-07-24 17:17:23

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Bridge weirdness

So, I set up a bridge interface on my machine in order to use with QEMU/KVM, nothing special, done it a hundred times. This time however, I am experiencing some weirdness with the bridge. I have a single virtual machine, the first one that was imported, that works, all other virtual machines (whether new or imported) fail to get a DHCP address from my router. All of them show up in the router (as in I can see that their MAC address at least started a connection), but none of them complete the connection cycle.

I can see that the correct interfaces have ip addresses:

3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
    link/ether 40:16:7e:e9:14:ab brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4216:7eff:fee9:14ab/64 scope link 
       valid_lft forever preferred_lft forever
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 66:58:2e:40:fd:61 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic br0
       valid_lft 74777sec preferred_lft 74777sec
    inet6 fe80::6458:2eff:fe40:fd61/64 scope link 
       valid_lft forever preferred_lft forever

I can also see that the bridge interface is in forwarding mode:

# brctl showstp br0
br0
 bridge id		8000.66582e40fd61
 designated root	8000.66582e40fd61
 root port		   0			path cost		   0
 max age		  19.99			bridge max age		  19.99
 hello time		   1.99			bridge hello time	   1.99
 forward delay		  14.99			bridge forward delay	  14.99
 ageing time		 299.99
 hello timer		   0.89			tcn timer		   0.00
 topology change timer	   0.00			gc timer		 101.56
 flags			


eno1 (1)
 port id		8001			state		     forwarding
 designated root	8000.66582e40fd61	path cost		   4
 designated bridge	8000.66582e40fd61	message age timer	   0.00
 designated port	8001			forward delay timer	   0.00
 designated cost	   0			hold timer		   0.00
 flags			

The bridge is aware of the MAC addresses (although they show up twice which is weird):

# brctl showmacs br0
port no	mac addr		is local?	ageing timer
  1	00:fc:8b:c9:f3:51	no		 122.71
  1	40:16:7e:e9:14:ab	yes		   0.00
  1	40:16:7e:e9:14:ab	yes		   0.00
  1	40:b8:9a:c0:b8:20	no		  87.07
  1	40:cb:c0:75:ee:18	no		  15.46
  2	52:54:00:3d:f6:4b	no		  72.57
  1	78:8a:20:43:21:9f	no		  25.93
  1	b0:ee:7b:ee:f3:f1	no		 270.46
  1	b8:27:eb:f4:30:64	no		   1.71
  1	b8:c1:11:82:ed:14	no		  18.00
  1	d8:8f:76:98:75:25	no		   2.52
  1	d8:8f:76:a3:5e:5c	no		 117.65
  1	f0:9f:c2:76:44:b3	no		  24.63
  1	f0:9f:c2:76:44:cc	no		  19.39
  1	f0:9f:c2:c2:fb:2d	no		  12.69
  1	f0:9f:c2:c2:fb:2e	no		   6.95
  1	f4:8c:50:7e:bc:e7	no		  45.99
  2	fe:54:00:3d:f6:4b	yes		   0.00
  2	fe:54:00:3d:f6:4b	yes		   0.00

You can see here that the switch is aware of the connection, but no ip address is assigned:
Unifi Screenshot

The bridge is set up using systemd. I followed the wiki guide here.

I am truly stumped by this, as I have never run into a bridge that correctly forwards for a single VM.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#2 2018-08-04 21:07:13

newsboost
Member
Registered: 2016-07-24
Posts: 157

Re: Bridge weirdness

Well, I'm not sure - but I think you're making it way too complicated... In my case (and I also use QEMU/KVM) I can do e.g:

# virsh net-list --all
Name                 State      Autostart     Persistent
----------------------------------------------------------
default              inactive   no            yes

This probably looks the same on your side. Then I type "virsh net-start default" and it automatically creates the bridge for me and I have a shared internet connection, both for the host as well as for the virtual machine I'm running... It's as easy as that for me...

Offline

Board footer

Powered by FluxBB