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

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 www.baidu.com -c4




吕星昊
2016.4.14


请使用浏览器的分享功能分享到微信等