O host não pode efetuar ping no Guest | Caixa virtual

2

Estou usando o LinuxMint17 (host) e executando outro LinuxMint17 como convidado usando o Virtual Box.

Meu convidado LinuxMint é capaz de fazer ping no Host LinuxMint, mas vice-versa não está acontecendo.

Configuração de Rede no VirtualBox Adaptador de rede 1 - rede somente de host (isso eu fiz para que o IP de convidado estivesse alinhado com o host) Adaptador de rede 2- NAT (para obter meu trabalho de internet no convidado)

ifconfig (HOST) -

 ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 44:8a:5b:42:46:69  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18 

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:41595 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41595 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:14653896 (14.6 MB)  TX bytes:14653896 (14.6 MB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:508 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:90705 (90.7 KB)

wlan0     Link encap:Ethernet  HWaddr 54:27:1e:40:f0:d1  
          inet addr:192.168.1.72  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5627:1eff:fe40:f0d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7743461 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4638376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10989028454 (10.9 GB)  TX bytes:411974451 (411.9 MB)

ifconfig (convidado)

linuxmint@linuxmint-VirtualBox ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:97:c5:ee  
          inet addr:192.168.56.103  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe97:c5ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1723 (1.7 KB)  TX bytes:17391 (17.3 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:06:0f:b3  
          inet addr:10.0.3.15  Bcast:10.0.3.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe06:fb3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22668 (22.6 KB)  TX bytes:24575 (24.5 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:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2878 (2.8 KB)  TX bytes:2878 (2.8 KB)

Saída de ping -

Convidado para convidado

~ $ ping 192.168.56.103
PING 192.168.56.103 (192.168.56.103) 56(84) bytes of data.
^C
--- 192.168.56.103 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

Guest-to-Host

linuxmint@linuxmint-VirtualBox ~ $ ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
64 bytes from 192.168.50.1: icmp_seq=1 ttl=63 time=0.435 ms
64 bytes from 192.168.50.1: icmp_seq=2 ttl=63 time=0.185 ms
^C
--- 192.168.50.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.185/0.310/0.435/0.125 ms
linuxmint@linuxmint-VirtualBox ~ $ ping 192.168.1.72
PING 192.168.1.72 (192.168.1.72) 56(84) bytes of data.
64 bytes from 192.168.1.72: icmp_seq=1 ttl=63 time=0.250 ms
64 bytes from 192.168.1.72: icmp_seq=2 ttl=63 time=0.148 ms
^C
--- 192.168.1.72 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.148/0.199/0.250/0.051 ms

Alguém pode sugerir o que estou fazendo errado?

    
por pradeep 07.07.2014 / 15:19

1 resposta

1

O que define o IP da interface eth0 no convidado? Não parece certo; os IPs devem estar na mesma sub-rede .

Experimente (no convidado, como root):

ip addr del 192.168.56.103/24 dev eth0
ip addr add 192.168.50.2/24 dev eth0

Isso excluirá o endereço IP existente e adicionará um que esteja na mesma sub-rede.

    
por 07.07.2014 / 15:39