- 论坛徽章:
- 0
|
域名域名设置
注意!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
域名设置这一步骤非常重要,如果设置不当,就会出现邮件发不出,收不到等等问题……
以中国万网的域名管理为例,下面是
[url=javascript:if(confirm('http://www.net.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.net.cn/']中国万网[/url]
的域名管理面板
![]()
Figure 1. Domain Name
A 记录
添加mail A记录,并解析到你服务器的IP
MX 邮件交换记录
添加mx 记录,并解析到你mail主机
保存设置
保存设置后,一般会在48小时后生效
注意事项
有一些域名提供商的mx 记录要在主机后加".",中国万网的不用,他们会自动给你加上。如果你的域名是在外国注册的。如美国,域名更新要4-7个工作日。
如果不想等48个小时,你可以修改你的系统DNS,设为你的域名提供商的DNS。这里以中国万网为例:
C:\>nslookup
Default Server: apngw.sz002.nfht
Address: 192.168.0.253
> set type=ns
> net.cn
Server: apngw.sz002.nfht
Address: 192.168.0.253
Non-authoritative answer:
net.cn nameserver = sld-ns2.cnnic.net.cn
net.cn nameserver = sld-ns3.cnnic.net.cn
net.cn nameserver = sld-ns4.cnnic.net.cn
net.cn nameserver = sld-ns5.cnnic.net.cn
net.cn nameserver = cns.cernet.net
net.cn nameserver = sld-ns1.cnnic.net.cn
sld-ns2.cnnic.net.cn internet address = 202.97.16.197
sld-ns3.cnnic.net.cn internet address = 210.52.214.85
sld-ns4.cnnic.net.cn internet address = 61.145.114.119
sld-ns5.cnnic.net.cn internet address = 61.139.76.54
cns.cernet.net internet address = 202.112.0.24
sld-ns1.cnnic.net.cn internet address = 159.226.1.3
> set querytype=ns
> www.net.cn
Server: apngw.sz002.nfht
Address: 192.168.0.253
Non-authoritative answer:
www.net.cn nameserver = dns2.hichina.com
www.net.cn nameserver = dns1.hichina.com
dns2.hichina.com internet address = 202.106.169.100
dns1.hichina.com internet address = 218.30.103.50
> dns1.hichina.com
Server: apngw.sz002.nfht
Address: 192.168.0.253
hichina.com
primary name server = dns1.hichina.com
responsible mail addr = hostmaster.hichina.com
serial = 2004040801
refresh = 21601 (6 hours 1 sec)
retry = 3600 (1 hour)
expire = 1728000 (20 days)
default TTL = 43200 (12 hours)
> dns2.hichina.com
Server: apngw.sz002.nfht
Address: 192.168.0.253
hichina.com
primary name server = dns1.hichina.com
responsible mail addr = hostmaster.hichina.com
serial = 2004040801
refresh = 21601 (6 hours 1 sec)
retry = 3600 (1 hour)
expire = 1728000 (20 days)
default TTL = 43200 (12 hours)
> set type=a
> dns1.hichina.com
Server: apngw.sz002.nfht
Address: 192.168.0.253
Non-authoritative answer:
Name: dns1.hichina.com
Address: 218.30.103.50
> dns2.hichina.com
Server: apngw.sz002.nfht
Address: 192.168.0.253
Non-authoritative answer:
Name: dns2.hichina.com
Address: 202.106.169.100
>
> exit
C:\>
首先,单击开始菜单->运行->输入cmd。进入CLI(命令行界面)然后运行nslookup程序,nslookup会显示">"命令提示符
set type=ns
设计查询类型,ns是查询dns服务器
net.cn
显示net.cn域名的上级dns,可以看得出net.cn上级是cnnic(
[url=javascript:if(confirm('http://www.cnnic.net.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.cnnic.net.cn/']中国互联网络信息中心[/url]
)
set querytype=ns
与set type=ns相同
www.net.cn
显示www.net.cn的dns服务器
dns2.hichina.com
dns1.hichina.com
这就是我们要的dns服务器,你可以使用ping命令得到dns的IP,也可以使用正向解析得到它的IP。
C:\>ping dns2.hichina.com
Pinging dns2.hichina.com [202.106.169.100] with 32 bytes of data:
Reply from 202.106.169.100: bytes=32 time=243ms TTL=241
Reply from 202.106.169.100: bytes=32 time=233ms TTL=241
Reply from 202.106.169.100: bytes=32 time=312ms TTL=241
Reply from 202.106.169.100: bytes=32 time=236ms TTL=241
Ping statistics for 202.106.169.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 233ms, Maximum = 312ms, Average = 256ms
C:\>
set type=a
dns1.hichina.com
通过正向解析得到dns1.hichina.com的IP
设置Internet 协议(TCP/IP)
![]()
Figure 2. Internet 协议(TCP/IP)属性
Linux
[root@linux root]# vi /etc/resolv.conf
nameserver 218.30.103.50
nameserver 202.106.169.100
测试你的域名
C:\>nslookup
Default Server: apngw.sz002.nfht
Address: 192.168.0.253
> 9812.net
Server: apngw.sz002.nfht
Address: 192.168.0.253
Name: 9812.net
Address: 202.103.190.130
> set type=ns
> 9812.net
Server: apngw.sz002.nfht
Address: 192.168.0.253
Non-authoritative answer:
9812.net nameserver = dns1.hichina.com
9812.net nameserver = dns2.hichina.com
dns1.hichina.com internet address = 218.30.103.50
dns2.hichina.com internet address = 202.106.169.100
> set type=mx
> 9812.net
Server: apngw.sz002.nfht
Address: 192.168.0.253
9812.net MX preference = 10, mail exchanger = mail.9812.net
9812.net nameserver = dns2.hichina.com
9812.net nameserver = dns1.hichina.com
mail.9812.net internet address = 202.103.190.130
dns2.hichina.com internet address = 202.106.169.100
dns1.hichina.com internet address = 218.30.103.50
>
Linux CLI
[root@linux root]# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> 9812.net
Server: 202.96.128.68
Address: 202.96.128.68#53
Non-authoritative answer:
Name: 9812.net
Address: 202.103.190.130
> set type=mx
> 9812.net
Server: 218.30.103.50
Address: 218.30.103.50#53
9812.net mail exchanger = 10 mail.9812.net.
> set type=ns
> 9812.net
Server: 202.96.128.68
Address: 202.96.128.68#53
Non-authoritative answer:
9812.net nameserver = dns1.hichina.com.
9812.net nameserver = dns2.hichina.com.
Authoritative answers can be found from:
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16907/showart_249782.html |
|