首页 > 系统服务 > 详细

ubuntu由静态IP变动态IP

时间:2016-04-10 12:52:15      阅读:266      评论:0      收藏:0      [点我收藏+]
修改/etc/network/interfacs
sudo vim /etc/network/interfaces

动态IP设置如下:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

 

静态IP设置如下:

auto eth0
iface eth0 inet static
address 192.168.195.2
netmask 255.255.255.0
gateway 192.168.195.1

 这是要注意 gateway网关的设置,要设置为 "VMware Network Adapter VMnet1" 的IP地址。

ubuntu由静态IP变动态IP

原文:http://www.cnblogs.com/jiangzhaowei/p/5373684.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!