Host kann Gast nicht anpingen | Virtual Box

Host kann Gast nicht anpingen | Virtual Box

Ich verwende LinuxMint17 (Host) und führe ein anderes LinuxMint17 als Gast mit Virtual Box aus.

Mein Gast-LinuxMint kann den Host-LinuxMint anpingen, umgekehrt funktioniert das jedoch nicht.

Netzwerkeinstellungen in VirtualBox Netzwerkadapter 1 – Host-Only-Netzwerk (Das habe ich gemacht, damit die Gast-IP mit der des Hosts übereinstimmt) Netzwerkadapter 2 – NAT (Damit mein Internet auf dem Gast funktioniert)

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(Gast)

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)

Ping-Ausgabe -

Vom Gastgeber zum Gast

~ $ 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

Vom Gast zum Gastgeber

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

Kann mir jemand sagen, was ich falsch mache?

Antwort1

Was hat die IP der eth0Schnittstelle auf dem Gast eingestellt? Es sieht nicht richtig aus; die IPs sollten beide im selbenSubnetz.

Versuchen Sie (auf dem Gast, als Root):

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

Dadurch wird die vorhandene IP-Adresse gelöscht und eine neue Adresse im selben Subnetz hinzugefügt.

verwandte Informationen