【问题标题】:VirtualBox "Bridged Adapter" network doesn't show up in VMVirtualBox“桥接适配器”网络未显示在 VM 中
【发布时间】:2014-11-11 20:18:34
【问题描述】:

长话短说,我正在尝试将信息从 Android 平板电脑重新路由到我的 Windows 7 主机上的 CentOS VM。我已将我的 Virtual Box 管理器设置为有两个“网络”适配器(在设置中):

  • 适配器 1 已连接到 NAT 并已启用
  • 适配器 2 连接到桥接适配器(适配器类型为 Intel PRO/1000 MT Desktop)

但是,当我启动我的虚拟机时,运行

/sbin/ifconfig

在 bash 中只显示一个以太网连接 (eth01) 对应于适配器 1 的 MAC 地址。如果我运行:

ifconfig -a,

显示 eth1 连接的 MAC 地址与我的桥接适配器匹配,但没有 IP 地址。

我不完全确定该怎么做 - 我尝试了所有混杂模式,但似乎无法在网上找到任何关于这个特定问题的信息。根据我的发现,这些问题大多来自使用 Wi-Fi 的用户,但我是通过以太网电缆连接的。

作为参考,这是我的 ifconfig -a:

eth0        Link encap: Ethernet  HWaddr 01:00:27:1D:C0:01
            inet addr: 10.0.2.15  Bcast: 10.0.2.255  Mask: 255.255.255.0
            UP BROADBAST RUNNING MULTICAST  MTU: 1500  Metric: 1
            RX packets: 35  errors: 0  dropped: 0  overruns: 0  frame: 0
            TX packets: 35  errors: 0  dropped: 0  overruns: 0  carrier: 0
            collisions: 0  txqueuelen:  1000
            RX bytes: 5305 (5.1 KiB) TX bytes: 3506 (3.4 KiB)

eth1        Link encap: Ethernet  HWaddr 01:00:27:39:AE:8F
            BROADBAST 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  txqeuelen: 1000
            RX bytes: 0 (0.0 b)  TX bytes: 0 (0.0 b)

有什么想法吗? 提前致谢!

【问题讨论】:

标签: networking centos virtual-machine virtualbox


【解决方案1】:

在我的 Debian 桥接连接中,不会自动获取地址,这可能是因为 NetworkManager Applet(Debian 中的基本网络管理器)无法处理它们。老实说,我不知道为什么。

要手动从 DHCP 获取正确的 IP 地址,您可以运行 dhclient:

dhclient eth0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-30
    • 1970-01-01
    • 2022-10-05
    • 1970-01-01
    相关资源
    最近更新 更多