
Tengo un servidor con 4 IP públicas. Lo tengo con esta configuración y quiero conectar la interfaz eth0 para usarlo con KVM:
Entonces, tengo 3 IP (ABC144, ABC145, ABC146) y otra interfaz con la IP principal que quiero conectar (188.165.XY).
/etc/red/interfaces:
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 188.165.X.Y
netmask 255.255.255.0
network 188.165.255.0
broadcast 188.165.255.255
gateway 188.165.255.254
# KVM Bridge
auto br0
iface br0 inet static
address 188.165.X.Y
netmask 255.255.255.0
network 188.165.255.0
broadcast 188.165.255.255
gateway 188.165.255.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
auto eth0:0
iface eth0:0 inet static
address A.B.C.145
netmask 255.255.255.255
auto eth0:1
iface eth0:1 inet static
address A.B.C.146
netmask 255.255.255.255
auto eth0:2
iface eth0:2 inet static
address A.B.C.147
netmask 255.255.255.255
Todo (eth0, eth0:0: eth0:1, eth0:2) funciona bien excepto el puente (br0). Pero si lo hago:
ifup br0
Pierdo la conexión y tengo que restaurar la configuración sin br0.
¿Qué tengo que hacer?
Con configuración @Ulrich:
device eth0 entered promiscuous mode
e1000e 0000:00:19.0: irq 43 for MSI/MSI-X
e1000e 0000:00:19.0: irq 43 for MSI/MSI-X
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): br0: link is not ready
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
br0: port 1(eth0) entering forwarding state
br0: port 1(eth0) entering forwarding state
ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
Respuesta1
Si realmente desea conectar eth0 con sus invitados kvm, solo debe configurar sus cosas a través de su puente, por ejemplo:
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 188.165.X.Y
netmask 255.255.255.0
network 188.165.255.0
broadcast 188.165.255.255
gateway 188.165.255.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
Si no desea establecer un puente, sino simplemente crear un enrutador (esto depende de la configuración de su red), deberá crear un puente sin ningún puerto en su /etc/network/interface
y crear las entradas de enrutamiento apropiadas. libvirt puede crear un puente correcto pero el puente tendrá que tener una IP adicional.