益友网(http://www.1uu2.com) 做linux用户的良师益友、linux操作系统命令教程

新手配置ubuntu网络最快捷方式

发表于 2008-08-05 19:29 浏览次数:751 次

     本小区上网是静态192.168.0.0/24网段上网的,链路提供商为广州电信,DNS为61.144.56.100。

    1.打开终端配置接口(也即网口)地址并保存!
    root@ns:/etc/network# vi /etc/network/interfaces
    iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1

    #如果是动态DHCP获得更快,只需设置如下
    #auto eth0

    2.设置DNS服务器并保存!
    root@ns:/etc/network# vi /etc/resolv.conf
    nameserver 61.144.56.100

    3.重启网络,如下:
    root@ns:/etc/network# /etc/init.d/networking restart
    * Reconfiguring network interfaces… There is already a pid file /var/run/dhclient.eth1.pid with pid 5444
    killed old client process, removed PID file
    Internet Systems Consortium DHCP Client V3.0.6
    Copyright 2004-2007 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/

    4.上网测试!成功。

 来源:chinaitlab

关键字: | 分类: linux入门 | 评论数: 0 | 阅读全文

返回首页 | 关于我们 | 联系我们 | 广告合作 | 网站地图 | 友情链接 | 版权声明 |