📄 dyndns -- developers -- detect ip changes.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0052)http://www.dyndns.com/developers/specs/detectip.html -->
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>DynDNS -- Developers -- Detect IP Changes</TITLE>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META
content="Dynamic Network Services, Inc. provides world-class DNS hosting and management services, domain registration, mail services, network monitoring, and web redirection. These services support static IP addresses, dynamic IP address and enhance Internet connections using dial-up modems, cable modems, DSL, and LANs. We have the most reliable, rock-solid DNS network and have a technical support department that is one of the best in the industry."
name=description>
<META
content="dynamic dns, dynamic, dns, dyndns, dns service, managed dns, network monitoring, monitoring, monitor, support, reliable, ddns, webhop, web redirection, url, cloaking, domain registration, custom, secondary, mywebhop, webhop, open source, b2b, p2p, file sharing, remote management, web server, mail, email, e-mail, mx, mailhop, email relay, email redirection, redirection, guaranteed dns uptime, recursive dns, dns sla, dns hosting, aaaa, loc, ptr, a, cname, srv, txt, dyndns.org"
name=keywords><LINK title=Web
href="DynDNS -- Developers -- Detect IP Changes.files/dyndns.css" type=text/css
rel=stylesheet><LINK title=Print
href="DynDNS -- Developers -- Detect IP Changes.files/dyndns-print.css"
type=text/css rel="alternate stylesheet"><LINK href="/favicon.ico"
type=image/x-icon rel=icon><LINK href="/favicon.ico" type=image/x-icon
rel="shortcut icon">
<SCRIPT src="DynDNS -- Developers -- Detect IP Changes.files/urchin.js"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>_uacct = "UA-210032-4";urchinTracker();</SCRIPT>
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY id=dyndnsbody>
<DIV id=everything>
<DIV id=header><A href="http://www.dyndns.com/"><IMG
alt="DynDNS: Keep Connected"
src="DynDNS -- Developers -- Detect IP Changes.files/dyndns.gif"></A> <!--htdig_noindex-->
<H1><A href="http://www.dyndns.com/">DynDNS</A></H1>
<DIV id=toplogin>
<FORM action=https://www.dyndns.com/developers/specs/detectip.html
method=post><INPUT type=hidden value=1 name=__login> <LABEL
for=top_username>User: <INPUT id=top_username size=14 name=username>
</LABEL><LABEL for=top_password>Pass: <INPUT id=top_password type=password
size=14 name=password> </LABEL><INPUT type=submit value=Login> </FORM>
<DIV id=toplogin-actions><A
href="https://www.dyndns.com/account/resetpass/">Lost Password?</A> - <A
href="https://www.dyndns.com/account/create.html">Create Account</A>
</DIV></DIV></DIV>
<DIV id=navcontainer>
<UL id=navlist>
<LI><A href="http://www.dyndns.com/about/">About</A>
<LI><A href="http://www.dyndns.com/services/">Services</A>
<LI><A href="http://www.dyndns.com/account/">Account</A>
<LI><A href="http://www.dyndns.com/support/">Support</A>
<LI><A href="http://www.dyndns.com/news/">News</A>
<LI class=last> </LI></UL></DIV><!--/htdig_noindex-->
<DIV id=secondaryNav>
<DIV id=sidenav>
<UL>
<LI class=title><A href="http://www.dyndns.com/developers/">Developers'
Connection</A>
<LI class=first><A href="http://www.dyndns.com/developers/specs/">DNS Update
API</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/flowdiagram.html">Flow
Diagram</A>
<LI class=second id=currentnav><A
href="http://www.dyndns.com/developers/specs/detectip.html">Detect IP
Change</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/syntax.html">Perform Update</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/return.html">Process Return</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/policies.html">Policies</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/guidelines.html">Guidelines &
Notes</A>
<LI class=second><A
href="http://www.dyndns.com/developers/specs/blocks.html">Client Blocks</A>
<LI class=first><A href="http://www.dyndns.com/developers/certified/">DynDNS
Certified</A>
<LI class=first><A
href="http://www.dyndns.com/developers/privatelabel/">DynDNS Private Label</A>
<LI class=first><A href="http://www.dyndns.com/developers/listings/">My Client
Listings</A> </LI></UL></DIV>
<DIV id=searchBox>
<FORM action=/search/ method=post><INPUT type=hidden value=1 name=started>
<INPUT type=hidden value=1 name=page>
<H4>Search DynDNS</H4><INPUT size=15 name=words> <INPUT type=submit value=Search name=action> </FORM></DIV></DIV>
<DIV id=sidenav-content>
<H2>Detect IP Changes</H2>
<P>To determine whether a client should update, it must have a reliable method
to determine what its current IP address is so it can compare the current
address to last updated address. There are two methods.</P>
<H3>Directly Connected</H3>
<P>A client may determine, automatically or through the input of the user, that
it is directly connected to the Internet. The device would have a publicly
addressable IP address. In this case, the optimal method is to use API methods
from the parent operating system's network stack.</P>
<H3>Web IP Detection (CheckIP)</H3>
<P>A client may determine, automatically or through the input of the user, that
it is not directly connected to the Internet. The client is on a machine with a
private IP, usually on <A href="http://rfc.net/rfc1918.html">RFC 1918</A> space
(10/8, 172.16/12, 192.168/16). In this case, the optimal method is to use web IP
detection.</P>
<P>DynDNS operates a <A
href="http://www.dyndns.com/developers/checkip.html">CheckIP service</A> which
may be used with clients that work with DynDNS.</P>
<H3>Complications</H3>
<H4>Initialization</H4>
<P>When a client starts for the first time, it is expected that it will perform
an update when it is first enabled. This may result in a <CODE>"nochg"</CODE>
return code which increments an abuse counter. Great care should be taken to
prevent initialization unless it is necessary.</P>
<P>It is expected that the IP address will be stored in a non-volatile manner.
This is especially true for hardware based devices.</P>
<H4>Multiple Interfaces</H4>
<P>Some clients can be installed on devices with multiple network interfaces,
such as a gateway or router. If this is the case, the developer needs to base a
basic assumption or the user needs to be given the option as to which interface
to use for IP detection.</P></DIV><BR clear=all><!--htdig_noindex-->
<DIV id=footer>Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -