ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【Linux】Linux网络配置基础5 RHEL6 操作系统使用virtualbox NAT网络

【Linux】Linux网络配置基础5 RHEL6 操作系统使用virtualbox NAT网络

Linux操作系统 作者:royevictory 时间:2016-05-03 15:20:45 0 删除 编辑
Linux网络配置基础5
RHEL6 操作系统使用virtualbox NAT网络

宿主机win7当前能够访问互联网
Virtualbox软件 管理-全局设定-网络中 添加NAT网络
linux虚拟机添加网卡使用NAT网络访问外网

1 全局设定中 添加nat网络



设置nat网络dhcp地址池,即虚拟机将获得的ip地址


2 虚拟机添加网卡,使用自定义的NAT网络




3 启动虚拟机,手动编辑配置网卡配置文件

查看当前网卡信息,此处eth2是新添加的nat网络
[root@rhel64 ~]# ifconfig -a


编写网卡配置文件

[root@rhel64 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=dhcp
ONBOOT=yes


[root@rhel64 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2


[root@rhel64 ~]# ifup eth2
[root@rhel64 ~]# ifconfig eth2



4 访问外网测试
[root@rhel64 ~]# ping -c4




吕星昊
2016.4.14


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29302187/viewspace-2092743/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-06

  • 博文量
    195
  • 访问量
    558543