WWW服务器,DNS服务器,DHCP服务器的关系

WWW服务器,DNS服务器,DHCP服务器的关系,第1张

etc/hosts 文件的具体内容如下: # Do not remove the following line, or various programs # that require network functionality will fail 127001 localhostlocaldomain localhost fc4 19216813 atestcom a 19216811 btestcn b /etc/hostconf 文件: order hosts,bind 表示先用hosts文件做解析,在用DNS解析 /etc/resolvconf 文件: ; generated by NetworkManager, do not edit! search testcom nameserver 127001 search testcn nameserver 19216811 nameserver 6114456100 /etc/namedconf 文件: // // namedconf for Red Hat caching-nameserver // options { directory "/var/named"; dump-file "/var/named/data/cache_dumpdb"; statistics-file "/var/named/data/named_statstxt"; / If there is a firewall between you and nameservers you want to talk to, you might need to uncomment the query-source directive below Previous versions of BIND always asked questions using port 53, but BIND 81 uses an unprivileged port by default / // query-source address port 53; }; // // a caching only nameserver config // controls { inet 127001 allow { localhost; } keys { rndckey; }; }; zone "" IN { type hint; file "namedca"; }; zone "testcom"IN { type master; file "testcom"; allow-update { none; }; }; zone "1168192in-addrarpa"IN { type master; file "1921681rev"; allow-update { none; }; }; zone "testcn"IN { type master; file "testcn"; allow-update { none; }; }; zone "0000000000000000000000000000000ip6arpa" IN { type master; file "namedip6local"; allow-update { none; }; }; zone "255in-addrarpa" IN { type master; file "namedbroadcast"; allow-update { none; }; }; zone "0in-addrarpa" IN { type master; file "namedzero"; allow-update { none; }; }; include "/etc/rndckey"; 在/var/name/testcom 文件下: $TTL 86400 @ IN SOA atestcom rootatestcom ( 42 ; serial (d adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS atestcom IN MX 10 mailtestcom a IN A 19216813 mail IN A 19216813 //其中rootatestcom的含义是管理员的邮箱 /var/name/testcn 文件下: $TTL 86400 @ IN SOA btestcn rootatestcom ( 42 ; serial (d adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS btestcn IN MX 10 mailtestcn b IN A 19216811 mail IN A 19216811 /var/name/1921681rev 文件下: $TTL 86400 @ IN SOA 1168192in-addrarpa roottestcom ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS atestcom IN NS btestcn IN MX 10 mailtestcom IN MX 10 mailtestcn 3 IN PTR atestcom 3 IN PTR mailtestcom 1 IN PTR btestcn 1 IN PTR mailtestcn 然后用/etc/initd/named restart重启DNS服务,在重启过程中,我曾经出现过好几次的错误,按照出错的提示,会提示是namedconf文件第几行出错的。或者提示在那些包含文件例如testcn这些文件里面的问题,然后一个一个排除。 最后还有一些nslookup的命令比较有用: set all用于显示使用nslookup工具这台机器上的DNS服务器的一些信息 set type=any会显示完整信息包括域中邮件服务器和主从DNS服务器的名字和IP地址 server 19216801更换查询的DNS服务器地址。


关于域名前面加>

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/13458674.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-08-11
下一篇 2023-08-11

发表评论

登录后才能评论

评论列表(0条)

保存