码迷,mamicode.com
首页 > 其他好文 > 详细

虚拟机上网

时间:2015-09-05 17:49:17      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

host-only模式

1、主机设置网络共享

 

 

 

2、虚拟机网络设置

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# ls
ifcfg-enp0s3  ifdown-ppp       ifup-ib      ifup-Team
ifcfg-lo      ifdown-routes    ifup-ippp    ifup-TeamPort
ifdown        ifdown-sit       ifup-ipv6    ifup-tunnel
ifdown-bnep   ifdown-Team      ifup-isdn    ifup-wireless
ifdown-eth    ifdown-TeamPort  ifup-plip    init.ipv6-global
ifdown-ib     ifdown-tunnel    ifup-plusb   network-functions
ifdown-ippp   ifup             ifup-post    network-functions-ipv6
ifdown-ipv6   ifup-aliases     ifup-ppp
ifdown-isdn   ifup-bnep        ifup-routes
ifdown-post   ifup-eth         ifup-sit
[root@localhost network-scripts]# cat ifcfg-enp0s3 
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=e5148472-bd96-4da0-97ca-3040fb54a102
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.137.105
PREFIX=32
GATEWAY=192.168.137.1
DNS1=192.168.9.19
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no

 

虚拟机上网

标签:

原文地址:http://www.cnblogs.com/huanhuanang/p/4783428.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!