【问题标题】:Assign static local ip address to OS inside virtual machine with bridged connection将静态本地 IP 地址分配给具有桥接连接的虚拟机内部的操作系统
【发布时间】:2014-08-08 15:09:47
【问题描述】:

我的笔记本电脑上有 win 7 操作系统,vmware 中有 linux(debian 7)。我已将 debian 设置为与网络建立桥接连接。我是通过 wifi 连接的,如果 wifi 调制解调器正在重新启动,则 debian 的本地 IP 地址会发生变化,例如从192.168.0.106192.168.0.102。有没有办法设置本地IP地址,所以它总是保持不变?

谢谢

【问题讨论】:

    标签: windows-7 debian vmware vmware-workstation


    【解决方案1】:

    你必须改变你的/etc/network/interfaces,比如this

    然后记得使用

    重启你的服务

    sudo service networking restart

    【讨论】:

    • 谢谢大佬,刚刚找到答案,15秒后我发了:)
    【解决方案2】:

    好的,找到解决办法

    这里是源 http://www.cyberciti.biz/tips/howto-ubuntu-linux-convert-dhcp-network-configuration-to-static-ip-configuration.html

    基本上是debian

    1) vim /etc/network/interfaces
    2) comment/delete this line iface eth0 inet dhcp
    3) add this
    iface eth0 inet static
    address 192.168.1.106  # this is the ip address you want to assign  
    netmask 255.255.255.0
    network 192.168.1.0
    

    【讨论】:

      猜你喜欢
      • 2010-10-01
      • 2015-01-25
      • 2012-10-29
      • 2013-10-10
      • 2018-03-28
      • 2016-02-02
      • 2018-05-28
      • 2020-03-07
      • 1970-01-01
      相关资源
      最近更新 更多