
Eu tenho um servidor com 4 IPs públicos. Eu tenho essa configuração e quero fazer a ponte entre a interface eth0 para usá-la com KVM:
Então, tenho 3 IP's (ABC144, ABC145, ABC146) e outra interface com o IP principal que quero fazer a ponte (188.165.XY)
/etc/rede/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
Tudo (eth0, eth0:0: eth0:1, eth0:2) está funcionando bem, exceto a ponte (br0). Mas, se eu fizer:
ifup br0
Perco a conexão e tenho que restaurar a configuração sem br0.
O que devo fazer?
Com configuração @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
Responder1
Se você realmente deseja conectar a eth0 com seus convidados kvm, você só deve configurar suas coisas através de sua ponte, por exemplo:
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
Se você não deseja fazer uma ponte, mas apenas criar um roteador (isso depende da configuração da sua rede), você terá que criar uma ponte sem portas /etc/network/interface
e criar as entradas de roteamento apropriadas. libvirt pode criar uma ponte correta, mas a ponte terá que ter um ip extra.