VMs não podem pingar umas nas outras

2

Eu criei duas máquinas virtuais no virt-manager. Todas as máquinas (host e convidados) executam o Ubuntu 14.04.

A máquina host possui dois NICs. eth1 é usado pelo host. A interface de rede virtual para cada VM / convidado está definida como "Host device eth0: macvtap".

O IP do host é 192.168.1.35

O IP do convidado 1 é 192.168.1.41

O IP do convidado 2 é 192.168.1.54

Eu posso pingar host do convidado e convidado do host. Mas os convidados não são acessíveis um do outro. Quando eu pingar o convidado 2 do convidado 1, a saída do tcpdump no host é:

17:55:11.631825 ARP, Request who-has 192.168.1.54 tell 192.168.1.41, length 28
17:55:12.631626 ARP, Request who-has 192.168.1.54 tell 192.168.1.41, length 28
17:55:13.632127 ARP, Request who-has 192.168.1.54 tell 192.168.1.41, length 28
...

Da mesma forma, quando faço ping no convidado 1 do convidado 2:

17:57:39.509281 ARP, Request who-has 192.168.1.41 tell 192.168.1.54, length 28
17:57:40.509280 ARP, Request who-has 192.168.1.41 tell 192.168.1.54, length 28
17:57:41.526726 ARP, Request who-has 192.168.1.41 tell 192.168.1.54, length 28
....

Ambos os convidados têm a seguinte configuração de rede:

/etc/network/interfaces
    auto lo
        iface lo inet loopback
    auto eth1
        iface eth1 inet dhcp

route -n
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1       

iptables -L
    (nothing)

ifconfig (Guest 1)
    eth1      Link encap:Ethernet  HWaddr 52:54:00:ab:e6:fa  
              inet addr:192.168.1.41  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::5054:ff:feab:e6fa/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:728 errors:0 dropped:0 overruns:0 frame:0
              TX packets:638 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:817117 (817.1 KB)  TX bytes:51190 (51.1 KB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:16 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1184 (1.1 KB)  TX bytes:1184 (1.1 KB)

Anfitrião:

/etc/network/interfaces
    auto lo
    iface lo inet loopback

route -n
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
    192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth1

iptables -L
    (nothing)

ifconfig
    eth0      Link encap:Ethernet  HWaddr 08:62:66:26:eb:d8  
              inet6 addr: fe80::a62:66ff:fe26:ebd8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:218 errors:0 dropped:0 overruns:0 frame:0
              TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:67520 (67.5 KB)  TX bytes:20012 (20.0 KB)

    eth1      Link encap:Ethernet  HWaddr 70:62:b8:b5:2c:1b  
              inet addr:192.168.1.35  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::7262:b8ff:feb5:2c1b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4100 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4678 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1030310 (1.0 MB)  TX bytes:834427 (834.4 KB)

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:15192 errors:0 dropped:0 overruns:0 frame:0
              TX packets:15192 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1386699 (1.3 MB)  TX bytes:1386699 (1.3 MB)

    macvtap0  Link encap:Ethernet  HWaddr 52:54:00:db:29:6c  
              inet6 addr: fe80::5054:ff:fedb:296c/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:19 errors:0 dropped:0 overruns:0 frame:0
              TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500 
              RX bytes:2286 (2.2 KB)  TX bytes:5930 (5.9 KB)

    macvtap1  Link encap:Ethernet  HWaddr 52:54:00:ab:e6:fa  
              inet6 addr: fe80::5054:ff:feab:e6fa/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:29 errors:0 dropped:0 overruns:0 frame:0
              TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500 
              RX bytes:4395 (4.3 KB)  TX bytes:7980 (7.9 KB)
    
por user302681 04.08.2015 / 15:39

1 resposta

0

A substituição de eth0 por uma interface de ponte resolveu o problema. Mas há outro problema: baixa velocidade de internet-quando-adicionar-bridge-interface

    
por user302681 04.08.2015 / 18:48