DDNS3322 Protocol Introduction (Design)

DDNS is a service that maps Internet domain names  to IP addresses dynamically. An IP Registry provides  a public central database where information such as  hostnames, IPs etc. can be stored and retrieved.

Unlike DNS that only works with static IP addresses, DDNS works with dynamic IP addresses, such as  those assigned by an ISP or other DHCP server.
DDNS is popular with home network, who typically receive dynamic, frequently-changing IP addresses from their service provider.

 

HTTP GET Request

 

GET /dyndns/update? system= dyndns
&hostname= yourhost.ourdomain.ext
&myip= ipaddress
&wildcard= OFF
&mx= mail.exchanger.ext
&backmx= NO
&offline= NO
HTTP/1.1
Host: members.3322.org
Authorization: Basic username:pass  
User-Agent: myclient/1.0 me@null.net

 

Return Code
 (1) “badauth”
 The username or password specified are incorrect.
 (2) “badsys”
 The system parameter given is not valid. Valid system parameters are dyndns, statdns.
 (3) “notfqdn”
 The hostname specified is not a fully-qualified domain name (not in the form hostname.3322.org or domain.com).
 (4) “!donator”
 The offline setting was set, when the user is not a donator.
 (5) “nohost”
 The hostname specified does not exist (or is not in the  service specified in the system parameter)
 (6) ”!yours”
 The hostname specified exists, but not under the  username specified.
 (7) “good”
 The update was successful, and the hostname is now   updated.
 (8) “nochg”
 No change. It is same as the last update.

 

Wildcard
 Enabling the wildcard feature for your host causes *.yourhost.3322.org to be aliased to the same IP address as yourhost.3322.org. This feature is useful if you want to be able to use, for example,   www.yourhost.3322.org and still reach your hostname.
 
Offline
 This option is available when Custom is selected in the  DDNS Type field. Check with your Dynamic DNS service provider to have traffic redirected to a URL (that  you can specify) while you are off line.

 

Difference between DynamicDNS and StaticDNS

DynamicDNS
 (1)User host that use dynamic IP
 (2)Short TTL
 (3)Support Offline
 (4)DNS record will not be removed after 28 days
StaticDNS
 (1)User host that use static IP
 (2)Long TTL
 (3)DNS record will not be removed even user do not update the host record for a long time.

 

Mail Exchanger and Backup Mail Exchanger
  (1) MX is one part of DNS record
  (2) When an e-mail message is sent through the Internet, the sending mail transfer agent makes a DNS query  requesting the MX records for each recipient's domain name. The sending agent then attempts to establish an SMTP connection to one of these servers, starting with the one with the smallest preference number, delivering the message to the first server with which a connection can be made. If no MX records were present, the server falls back to A, that is to say, it makes a request for the A record of the same domain.  
  (3)Backup Mail Exchanger: One of Backup MX server

 

DDNS3322 protocol from Official website

 

Client的请求应该使用HTTP/1.0以上协议,Server的相应一定为HTTP/1.0

支持HTTP和基于SSLHTTPS协议

需要事务处理,Client发送完整的请求,并且解析服务器端的相应,保证域名更新的成功

1.
通过URL认证 (所有的在一行)
http://username:password@members.3322.org/dyndns/update?system=dyndns&hostname=yourhost.ourdomain.ext&myip=ipaddress&wildcard=OFF
&mx=mail.exchanger.ext&backmx=NO&offline=NO


2. HTTP GET
请求
1) dyndns, statdns
GET /dyndns/update?system=statdns&hostname=yourhost.ourdomain.ext
&myip=ipaddress&wildcard=OFF&mx=mail.exchanger.ext&backmx=NO
&offline=NO HTTP/1.1
Host: members.3322.org
Authorization: Basic username:pass 
(note: username:pass must be encoded in base64)
User-Agent: myclient/1.0 me@null.net

2) webhop
GET /dyndns/update?system=webhop&hostname=yourhost.ourdomain.ext&url=dest_url
&title=cloak_title&cloak=cloak HTTP/1.1
Host: members.3322.org
Authorization: Basic username:pass 
(note: username:pass must be encoded in base64)
User-Agent: myclient/1.0 me@null.net

3) subdom
GET /dyndns/update?system=subdom&hostname=yourhost.ourdomain.ext&ip1=address1&ip2=address2 HTTP/1.1
Host: members.3322.org
Authorization: Basic username:pass 
(note: username:pass must be encoded in base64)
User-Agent: myclient/1.0 me@null.net


username:password System:All Optional: No
用户名和密码用来登录

system=dyndns|statdns|webhop|subdom System:All Optional: Yes
只能使用二者之一,否则出错。如果没有这个参数,缺省是dyndns
(webhop, subdomain
只能使用web更新,而用户自己的域名(3322.orgcustom方式)
可以归并到现有的四种方式)

hostname=host.3322.org System:All Optional: No
需要更新的域名

myip=ipaddr System:All Optional: Yes
域名对应的IP。如果不指定,则服务器将选择最佳的IP(一些Proxy会传递客户端的IP,
这会被服务器检测到)。如果传递的地址格式错误,则忽略这个参数,而用服务器检测
到的IP

wildcard=ON|OFF System:DynDNS, StatDNS Optional: Yes
是否支持通配符,缺省为OFFON意为着 *.host.3322.org等同于host.3322.org

mx=mailexchanger System:DynDNS, StatDNS Optional: Yes
指明Mail eXchanger。必须能够解析到一个IP,否则被忽略。如果不提供该参数或者
不能解析到一个IPmx记录会被删除。

backmx=YES|NO System:DynDNS, StatDNS Optional: Yes
指明前面的mx参数会被设置成备份邮件服务器,即邮件会首先发送到你的机器上,如果
不成功,才会发送到备份邮件服务器上。

offline=YES|NO System:DynDNS Optional: Yes
使域名暂时失效。

url=dest_url System:WebHop Optional: No
webhop
指向的URL地址

cloak=YES|NO System:WebHop Optional: Yes
指明webhop时是否使用frame,将转向的url包装起来。缺省是YES

title=cloak_title System:WebHop Optional: Yes
cloak
时,frame的标题。缺省是 "Bentium DynDns System"

ip1=address1 System:SubDom Optional: YES
第一个域名服务器的IP地址,必须是正确的IP。如果不指定,则服务器将选择最佳的IP
(
一些Proxy会传递客户端的IP, 这会被服务器检测到)。如果传递的地址格式错误,
则忽略这个参数,而用服务器检测到的IP

ip2=address2 System:SubDom Optional: YES
第二个域名服务器的IP地址,必须是正确的IP

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值