VMware 设置ubuntu12.04 桥接网络

来源:互联网 发布:mac pro桌面壁纸 高清 编辑:程序博客网 时间:2024/05/21 15:02

http://blog.sina.com.cn/s/blog_546ced060101c3zi.html


1、服务器版本

设置IP地址

ubuntu 12.04的网络设置文件是/etc/network/interfaces,打开文件,会看到

auto loiface lo inet loopback

这边的设置是本地回路。在后面加上

auto eth0iface eth0 inet staticaddress 192.168.1.230(ip地址)netmask 255.255.255.0(子网掩码)gateway 192.168.1.1(网关)

其中eth0就是电脑的网卡,如果电脑有多块网卡,比如还会有eth1,都可以在这里进行设置。iface eth0 inet 设置为dhcp是动态获取IP,设置为static则用自定义的IP。这边要自定义IP地址,所以选择static选项。

重新启动网络服务

sudo /etc/init.d/networking restart
0 0
原创粉丝点击