无法 ping 到 virtualbox 实例 [英] Can't ping to virtualbox instance

查看:57
本文介绍了无法 ping 到 virtualbox 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 vagrant lucid32 框

I'm trying to set up the vagrant lucid32 box

实例网络设置为NAT

虚拟机实例可以ping到Mac,反之则不能

the virtual box instance can ping to the Mac, but can't vice versa

这是我的 Mac 配置

here is my Mac config

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 10:9a:dd:a9:43:44 
    inet6 fe80::129a:ddff:fea9:4344%en0 prefixlen 64 scopeid 0x4 
    inet 10.32.24.78 netmask 0xffff0000 broadcast 10.32.255.255
    media: autoselect
    status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 02:9a:dd:a9:43:44 
    media: autoselect
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
    inet6 fe80::69ca:da35:534a:9504%utun0 prefixlen 64 scopeid 0x6 
    inet6 fd78:f3ab:2fb2:b8b8:69ca:da35:534a:9504 prefixlen 64 

这是虚拟机网络配置:

推荐答案

很明显,当您使用 NAT 时,在 NAT 后无法 ping 主机.这就是 NAT 的工作方式……即使您拥有真正的非虚拟主机,行为也会相同.

It is quite obvious that when you are using NAT it will be impossible to ping host after NAT. It is how the NAT works... even if you will have real not virtual host the bechaviour will be the same.

这篇关于无法 ping 到 virtualbox 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆