概述
在CentOS配置网卡开机自动获取IP地址:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
将 ONBOOT="no" 改为 ONBOOT="yes"
保存后: service network restart
查看IP:ifconfig eth0
然后利用 Oracle VM VirtualBox 的端口转发功能(port forwarding),通过虚拟机的虚拟网卡实现主机与客户机的通信。
打开virtualbox 的设置窗口 -> 网络 ->网卡1 启用网络连接-> 连接方式:NAT ->接入网线->端口转发 , 设置如下

然后配置虚拟网卡IP地址与客户机IP映射: 端口为22,图中客户机主机端口设置为2200

接下来通过putty客户端工具就能连接上虚拟机上的系统了,注意 Port设置为2200

最后
以上就是落寞草莓为你收集整理的Oracle VM Virtual中CentOS自动获取IP地址设置方法的全部内容,希望文章能够帮你解决Oracle VM Virtual中CentOS自动获取IP地址设置方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复