virtual box 配置虚拟机的网络

一、在你创建的 虚拟机中网络配置入下

Virtual box 网络配置

二、 /etc/resolv.conf  设置 DNS 服务器 

Virtual box 网络配置

nameserver 192.29.29.29

三、修改 /etc/sysconfig/network-scripts/ifcfg-eth0 配置

 

Virtual box 网络配置

DEVICE="eth0"      #网卡类型
TYPE='Ethernet'     #网卡接口名称
HWADDR="08:00:27:42:A9:D6" #网卡设备 MAC 地址
NM_CONTROLLED="no" #Network manger 服务 建议去掉
ONBOOT="yes"     #系统启动时是否自动加载
GATEWAY='192.168.44.44'
NETMASK='255.255.255.0' #网卡网络地址
BOOTPROTO='static'    #启用地址协议 --static:静态 IP --dhcp 自动获取
IPADDR='192.168.44.3      #网卡 IP 地址

四、测试一下结果吧 

ping 一下  192.168.44.3(网卡 IP 地址)

Virtual box 网络配置

ping不通的话 说明 配置 有问题哦! 或者就是配置未生效 

重启一下网络服务: service network restart 

Virtual box 网络配置

这样就可以了哦!说明配置成功!

 

 

相关文章:

  • 2021-04-04
  • 2022-12-23
  • 2021-09-21
  • 2021-09-01
  • 2021-11-20
  • 2021-07-08
  • 2021-11-11
猜你喜欢
  • 2021-07-05
  • 2022-12-23
  • 2021-10-17
  • 2021-05-04
  • 2021-08-08
  • 2022-01-16
相关资源
相似解决方案