O servidor KVM no CentOS 7 unindo 2 NICs e conectando a configuração de rede de vlans não funciona

1

Estou tentando configurar o CentOS 7 em um servidor para hospedar VMs via KVM. A rede que estou tentando configurar deve permitir várias vlans entre as duas NICs por meio da configuração de ligação / ponte. Não está funcionando de jeito nenhum. Eu não consigo descobrir o que estou fazendo errado. Alguém pode me indicar a direção certa?

bonding.conf

alias bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1

bond0.conf

alias bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1

ifcfg-lo

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

ifcfg-bond0

# Use tagged VLANs
ARP=no
BOOTPROTO=none
DEVICE=bond0
IPV6INIT=no
## Optional, use for jumbo frames if needed
#MTU=9000
NM_CONTROLLED=yes
NOZEROCONF=yes
ONBOOT=yes
BONDING_MASTER=yes
BONDING_OPTS="mode=4 miimon=100 updelay=30000"

ifcfg-bond0.341

DEVICE=bond0.341
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
VLAN=yes
BRIDGE=br341
NM_CONTROLLED=yes

ifcfg-bond0.342

DEVICE=bond0.342
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
VLAN=yes
BRIDGE=br342
NM_CONTROLLED=yes

ifcfg-bond0.400

DEVICE=bond0.400
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
VLAN=yes
BRIDGE=br400
NM_CONTROLLED=yes

ifcfg-bond0.450

DEVICE=bond0.450
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
VLAN=yes
BRIDGE=br450
NM_CONTROLLED=yes

ifcfg-br341

NM_CONTROLLED=yes
DEVICE=br341
ONBOOT=yes
TYPE=Bridge
VLAN=yes
# IPv4
DNS1=192.168.36.3
DNS2=192.168.100.3
DNS3=192.168.160.10
NOZEROCONF=yes
STP=yes
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Bridge br341"
BRIDGING_OPTS=priority=32768
IPADDR=192.168.34.21
PREFIX=26
GATEWAY=192.168.34.1
NETWORK=192.168.34.0

ifcfg-br342

NM_CONTROLLED=yes
DEVICE=br342
ONBOOT=yes
TYPE=Bridge
VLAN=yes
# IPv4
DNS1=192.168.36.3
DNS2=192.168.100.3
DNS3=192.168.160.10
NOZEROCONF=yes
STP=yes
BRIDGING_OPTS=priority=32768
BOOTPROTO=none
IPADDR=192.168.34.86
GATEWAY=192.168.34.65
NETWORK=192.168.34.64
PREFIX=26
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="Bridge br342"

ifcfg-br400

NM_CONTROLLED=yes
DEVICE=br400
ONBOOT=yes
TYPE=Bridge
VLAN=yes
# IPv4
DNS1=192.168.36.3
DNS2=192.168.100.3
DNS3=192.168.160.10
NOZEROCONF=yes
STP=yes
BRIDGING_OPTS=priority=32768
BOOTPROTO=none
IPADDR=192.168.43.21
GATEWAY=192.168.43.1
NETWORK=192.168.43.0
PREFIX=26
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Bridge br400"

ifcfg-br450

NM_CONTROLLED=yes
DEVICE=br450
ONBOOT=yes
TYPE=Bridge
VLAN=yes
# IPv4
DNS1=192.168.36.3
DNS2=192.168.100.3
DNS3=192.168.160.10
NOZEROCONF=yes
STP=yes
BOOTPROTO=none
IPADDR=192.168.34.150
GATEWAY=192.168.34.129
NETWORK=192.168.34.128
PREFIX=26
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Bridge br450"

ifcfg-em1

TYPE=Ethernet
DEVICE=em1
ONBOOT=yes
MASTER=bond0
NOZEROCONF=yes
ONBOOT=yes
SLAVE=yes
NAME="System em1"
NM_CONTROLLED="yes"

ifcfg-em1.341

DEVICE=em1.341
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.341
NM_CONTROLLED=yes

ifcfg-em1.342

DEVICE=em1.342
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.342
NM_CONTROLLED=yes

ifcfg-em1.400

DEVICE=em1.342
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.342
NM_CONTROLLED=yes

ifcfg-em1.450

DEVICE=em1.450
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.450
NM_CONTROLLED=yes

ifcfg-em2

NM_CONTROLLED="yes"
DEVICE=em2
ONBOOT=yes
MASTER=bond0
NOZEROCONF=yes
ONBOOT=yes
SLAVE=yes
TYPE=Ethernet
NAME="System em2"

ifcfg-em2.341

DEVICE=em2.341
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.341
NM_CONTROLLED=yes

ifcfg-em2.342

DEVICE=em2.342
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.342
NM_CONTROLLED=yes

ifcfg-em2.400

DEVICE=em2.400
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.400
NM_CONTROLLED=yes

ifcfg-em2.450

DEVICE=em2.450
ONBOOT=yes
VLAN=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0.450
NM_CONTROLLED=yes
    
por Vladinatrix 08.08.2017 / 00:57

1 resposta

1

Resumindo meus comentários:

    A tag vlan
  • ocorre na interface de ligação. ifcfg-em *. * deve ser removido
  • NM_CONTROLLED = não deve ser definido (não quero que NM incremente as coisas)
  • neste cenário de rede VM com pontes, o STP geralmente é desativado
  • VLAN = yes nas interfaces de ponte provavelmente está incorreto
por 09.08.2017 / 02:13