Estou configurando o host KVM, que terá várias máquinas virtuais visíveis do lado de fora com uma configuração /etc/network/interfaces
semelhante a essa
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
iface eth0 inet6 static
address 2001:0000:1004:1019::
netmask 64
post-up /sbin/ip -family inet6 route add 2001:0000:1004:10ff:ff:ff:ff:ff dev eth0
post-up /sbin/ip -family inet6 route add default via 2001:0000:1004:10ff:ff:ff:ff:ff
pre-down /sbin/ip -family inet6 route del default via 2001:0000:1004:10ff:ff:ff:ff:ff
pre-down /sbin/ip -family inet6 route del 2001:0000:1004:10ff:ff:ff:ff:ff dev eth0
auto br0
iface br0 inet static
address 41.100.60.25
netmask 255.255.255.0
network 41.100.60.0
broadcast 41.100.60.255
gateway 41.100.60.254
bridge_ports eth0
bridge_maxwait 12
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
dns-nameservers 8.8.8.8
dns-search ovh.net
post-up ip link set br0 address xx:xx:xx:xx:xx:xx
post-up ip addr add 164.123.123.123/32 dev br0 broadcast 164.123.123.123
post-down ip addr del 164.123.123.123/32 dev br0
post-up ip route add default via 41.100.60.254 dev br0
post-down ip route del default via 41.100.60.254 dev br0
post-down brctl delbr br0
e as interfaces eth0 e br0 estão sendo criadas no final (funcionam), mas estou vendo isso quando olho para a tela de inicialização (não está no log de inicialização por algum motivo):
Waiting for network configuration
Waiting upto 60 more seconds for network configuration"
Booting system without full network configuration
Além disso, quando eu corro
ifquery --state
ou
cat /run/network/ifstate
Eu posso ver que eth0 e br0 estão faltando
lo=lo
EDIT 1:
Usando o seguinte comando
ifup br0 --no-act
Eu tenho o seguinte conjunto de comandos que estão sendo executados se você usasse ifup br0
run-parts /etc/network/if-pre-up.d
ip addr add 41.100.60.25/255.255.255.0 broadcast 41.100.60.255 dev br0 label br0
ip link set dev br0 up
ip route add default via 41.100.60.254 dev br0
ip link set br0 address xx:xx:xx:xx:xx:xx
ip addr add 164.123.123.123/32 dev br0 broadcast 164.123.123.123
ip route add default via 41.100.60.254 dev br0
run-parts /etc/network/if-up.d
O que me diz que este comando é duplicado
ip route add default via 41.100.60.254 dev br0
então depois de remover isso da minha configuração
post-up ip route add default via 41.100.60.254 dev br0
post-down ip route del default via 41.100.60.254 dev br0
Eu posso ver
run-parts /etc/network/if-pre-up.d
ip addr add 41.100.60.25/255.255.255.0 broadcast 41.100.60.255 dev br0 label br0
ip link set dev br0 up
ip route add default via 41.100.60.254 dev br0
ip link set br0 address xx:xx:xx:xx:xx:xx
ip addr add 164.123.123.123/32 dev br0 broadcast 164.123.123.123
run-parts /etc/network/if-up.d
O que resolve o problema de falta de br0 APÓS REINICIALIZAR quando eu corro
ifquery --state
# or
cat /run/network/ifstate
porque eu posso ver
lo=lo
br0=br0