ubuntu 下配置静态IP

首先打开ubuntu的网络配置文件

sudo vi /etc/network/interfaces

添加下面的内容:

auto lo
iface lo inet loopback
auto eth0

iface eth0 inet static
address 192.168.100.198
netmask 225.225.225.0
gateway 192.168.100.1  

配置DNS:

vi /etc/resolv.conf
nameserver 192.168.100.1

 

 

 

posted @ 2013-04-24 14:27  onlycxue  阅读(211)  评论(0编辑  收藏  举报