Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2045374
  • 博文数量: 354
  • 博客积分: 4955
  • 博客等级: 上校
  • 技术积分: 4579
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-21 11:46
文章分类

全部博文(354)

文章存档

2015年(1)

2013年(4)

2012年(86)

2011年(115)

2010年(67)

2009年(81)

我的朋友

分类:

2011-03-28 13:55:39

一、配置ip
     ubuntu的网络配置信息放在 /etc/network/interfaces 中,
    
     如果配置动态获取ip,则在上述文件中加入以下内容:
     auto eth0
     iface eth0 inet dhcp
 
     如果配置静态ip,则添加如下内容:
     auto eth0
     iface eth0 inet static
     address 192.168.33.201
     netmask 255.255.255.0
     gateway 192.168.33.1
 
     要是配置生效,需要重启网卡:
     ifconfig eth0 down
     ifconfig eth0 up
    
     若还有没有配置成功,则需重启下网络服务
             /etc/init.d/networking restart
 
二、配置dns服务器
         ubuntu 的dns服务器信息,放在 /etc/resolv.conf中,
         添加dns服务器地址,如202.112.125.53,则在上述文件中加入
             nameserver  202.112.125.53

阅读(811) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~