CentOS7下无论是NAT还是Bridge都没成功。改为CentOS5.11,很简单。
centos下vmware 桥接设置静态ip例子
www.111cn.net 编辑:kp12345 来源:转载
VMWare 虚拟机可以使你在一台机器上同时运行二个或更多Windows、DOS、LINUX 系统下面我们来看看centos下vmware 桥接设置静态ip例子
width="300" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" id="aswift_0" name="aswift_0" style="left: 0px; position: absolute; top: 0px;">
id="cproIframe_u1339684_1" width="300" height="250" src="http://pos.baidu.com/acom?adn=3&at=134&aurl=&cad=1&ccd=24&cec=GBK&cfv=15&ch=0&col=zh-CN&conOP=0&cpa=1&dai=1&dis=0&layout_filter=rank%2Ctabcloud<r=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3Db8y1_10_mxyYY0xqBG5HUrfKiO7ZQi-K9xOJC84xdp_kEr_kHtoLSm-GuJ-UxisSpXBFcJmgB494tHX05guld_%26wd%3D%26eqid%3D911dc331000071820000000255920702<u=http%3A%2F%2Fwww.111cn.net%2Fsys%2FCentOS%2F81114.htm&lunum=6&n=mailangel123_cpr&pcs=1289x643&pis=10000x10000&ps=434x495&psr=1440x900&pss=1289x725&qn=e3490636653019ed&rad=&rsi0=300&rsi1=250&rsi5=4&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%230000FF&rss3=%23444444&rss4=%23008000&rss5=&rss6=%23e10900&rss7=&scale=&skin=&td_id=1339684&tn=text_default_300_250&tpr=1435633506354&ts=1&version=2.0&xuanting=0&dtm=BAIDU_DUP2_SETJSONADSLOT&dc=2&di=u1339684&ti=centos%E4%B8%8Bvmware%20%E6%A1%A5%E6%8E%A5%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81ip%E4%BE%8B%E5%AD%90-CentOS-%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F-%E5%A3%B9%E8%81%9A%E6%95%99%E7%A8%8B%E7%BD%91&tt=1435633506215.143.235.237" align="center,center" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true">
使用bridge模式
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213635543.png)
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213649751.png)
桥接的时候选择桥接的网卡
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213656283.png)
设置centos静态ip
涉及到二个配置文件,分别是:/etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth1
首先修改/etc/sysconfig/network如下:添加GATEWAY=192.168.0.1。指定网关地址
网关地址查看主机cmd ipconfig /all
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213700703.png)
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213708341.png)
然后修改/etc/sysconfig/network-scripts/ifcfg-eth1:
vim /etc/sysconfig/network-scripts/ifcfg-eth1
#放如下内容
DEVICE="eth1"
BOOTPROTO="static"
IPADDR=192.168.0.229
BROADCAST=192.168.0.255
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT="yes"
TYPE="Ethernet"
DNS1=8.8.8.8
配置完成重启网络查看
![centos下vmware 桥接设置静态ip例子](http://www.111cn.net/get_pic/2015/03/20/20150320213711766.png)
重启网络:service network restart