| 
 | 
 
问题名称:配置DNS后(可能没成功),无法上网  
问题提出者:bing65  
问题简叙:不但上不了网,甚至网卡选择自动分配IP 时 都无法激活  
问题目的:新手初学在LINUX下配置DNS,很想成功  
联系信息:[email protected]  
相关信息:  
1、操作系统:  
  1).详细版本信息:RedHatLinux9.0  
  2).详细安装过程:光盘安装  
  3).详细配置过程:后附个相关配置文件  
  4).详细运行记录:哦,忘了在LINUX 下保存过来了  
  5).详细附加信息:我的电脑并不是作为宿舍的主机,但是,我想让自己的电脑又做自己的主机又做客户端,就是想学配置DNS嘛.理论上是可以的吧.  
 
2、问题:  
  1).简短问题名称:不能上网啊,急  
  2).详细问题描述:之前也是配置一次DNS ,也是搞得上不了网,而且把配置文件搞得很乱,结果重装了系统,这次说什么也不靠重装了 .无论是否启动DNS都不能上网啊,郁闷并郁闷着  
  3).问题可能原因:连自动分配IP都不能激活网卡,实猜不到原因 (但是自己手动分配IP又可以激活网卡,可仍上不了网,更郁闷)  
  4).详细附加参考信息:这里填写对解决本问题有关的参考信息  
下面是相关的一些配置文件,不知道够了没有:  
host.conf  
代码:  
order hosts,bind  
 
host.allow  
代码:  
#hosts.allow   This file describes the names of the hosts which are  
#      allowed to use the local INET services, as decided  
#      by the '/usr/sbin/tcpd' server.  
 
host.deny  
代码:  
#hosts.deny   This file describes the names of the hosts which are  
#      *not* allowed to use the local INET services, as decided  
#      by the '/usr/sbin/tcpd' server.  
#  
# The portmap line is redundant, but it is left to remind you that  
# the new secure portmap uses hosts.deny and hosts.allow.  In particular  
# you should know that NFS uses portmap!  
 
hosts  
代码:  
#Do not remove the following line, or various programs  
# that require network functionality will fail.  
127.0.0.1   localhost.localdomain   localhost  
 
named.conf  
代码:  
key bing. {  
       algorithm hmac-md5;  
      secret "FuA/j4wFwm4l8jwZ7XaMrA==";  
};  
 
controls {  
       inet 127.0.0.1 port 953  
               allow { 127.0.0.1; } keys { bing.; };  
};  
acl our-inner-nets {127.0.0.1/32;192.168.1.1/8;};  
//内部网络地址范围  
options {  
        directory "/var/named";  
        allow-query {any;};  
        allow-recursion{our-inner-nets;};  
        notify yes;  
        pid-file "named.pid";  
};  
 
 
zone "." {  
        type hint;  
        file "named.root";  
};  
zone "localhost" {  
         type master;  
         file "named.localhost";  
};  
zone "0.0.127.in-addr.arpa" {  
        type master;  
        file "named.127.0.0";  
         
};  
 
zone "7u7.net" {  
        type master;  
        file "named.7u7.net";  
        notify no;  
        };  
 
zone "1.168.192.in-addr.arpa"{  
         type master;  
         file "named.192.168.1";  
};  
 
nsswitch.conf  
代码:  
#  
# /etc/nsswitch.conf  
#  
# An example Name Service Switch config file. This file should be  
# sorted with the most-used services at the beginning.  
#  
# The entry '[NOTFOUND=return]' means that the search for an  
# entry should stop if the search in the previous entry turned  
# up nothing. Note that if the search failed due to some other reason  
# (like no NIS server responding) then the search continues with the  
# next entry.  
#  
# Legal entries are:  
#  
#   nisplus or nis+      Use NIS+ (NIS version 3)  
#   nis or yp      Use NIS (NIS version 2), also called YP  
#   dns         Use DNS (Domain Name Service)  
#   files         Use the local files  
#   db         Use the local database (.db) files  
#   compat         Use NIS on compat mode  
#   hesiod         Use Hesiod for user lookups  
#   [NOTFOUND=return]   Stop searching if not found so far  
#  
 
# To use db, put the "db" in front of "files" for entries you want to be  
# looked up first in the databases  
#  
# Example:  
#passwd:    db files nisplus nis  
#shadow:    db files nisplus nis  
#group:     db files nisplus nis  
 
passwd:     files  
shadow:     files  
group:      files  
 
#hosts:     db files nisplus nis dns  
hosts:      files nisplus nis dns  
 
# Example - obey only what nisplus tells us...  
#services:   nisplus [NOTFOUND=return] files  
#networks:   nisplus [NOTFOUND=return] files  
#protocols:  nisplus [NOTFOUND=return] files  
#rpc:        nisplus [NOTFOUND=return] files  
#ethers:     nisplus [NOTFOUND=return] files  
#netmasks:   nisplus [NOTFOUND=return] files       
 
bootparams: nisplus [NOTFOUND=return] files  
 
ethers:     files  
netmasks:   files  
networks:   files  
protocols:  files  
rpc:        files  
services:   files  
 
netgroup:   files  
 
publickey:  nisplus  
 
automount:  files  
aliases:    files nisplus  
 
resolv.conf  
代码:  
; generated by /sbin/dhclient-script  
 
 
 
nameserver 202.96.128.68  
nameserver 61.144.56.11  
 
rndc.conf  
代码:  
/*  
* Copyright (C) 2000, 2001  Internet Software Consortium.  
*  
* Permission to use, copy, modify, and distribute this software for any  
* purpose with or without fee is hereby granted, provided that the above  
* copyright notice and this permission notice appear in all copies.  
*  
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM  
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL  
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,  
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING  
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,  
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
*/  
 
/* $Id: rndc.conf,v 1.7 2001/01/09 21:40:45 bwelling Exp $ */  
 
/*  
* Sample rndc configuration file.  
*/  
key bing. {  
        algorithm hmac-md5;  
        secret "FuA/j4wFwm4l8jwZ7XaMrA==";  
};  
 
options {  
        default-key bing.;  
        default-server  localhost;  
         
        default-port 953;  
};  
 
 
 
 
server localhost {  
        key     bing. ;  
};  
 
include "/etc/rndc.key";  
 
rndc.key  
代码:  
key bing. {  
        algorithm       hmac-md5;  
        secret "FuA/j4wFwm4l8jwZ7XaMrA==";  
};  
 
xinetd.conf  
代码:  
#  
# Simple configuration file for xinetd  
#  
# Some defaults, and include /etc/xinetd.d/  
 
defaults  
{  
   instances               = 60  
        log_type                = SYSLOG authpriv  
        log_on_success      = HOST PID  
        log_on_failure      = HOST  
   cps         = 25 30  
}  
 
includedir /etc/xinetd.d |   
 
 
 
 |