"Alex Fraser" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Dave J" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there any way to use SNMP to acquire the external IP address of a
> > NAT router?
>
> Yes. snmpwalk starting at 1.3.6.1.2.1.4.20.1.1 lists all IP addresses on
> my router.
>
> See http://www.ibr.cs.tu-bs.de/cgi-bin/sbrowser.cgi
To expand a little, OIDs under the above should have corresponding ones with
the interface index under 1.3.6.1.2.1.4.20.1.2. AIUI it's permissable for an
interface index to change when the system is reinitialised, but IME that
doesn't happen unless the hardware is changed, and that won't happen in a
router. So, as a one-off, you can manually find the interface index for the
router's WAN port. Then (in your DNS update client) you can poll (walking
....1 and ...2) to find the address associated with that interface.
That said, it's undoubtedly easier and probably satisfactory just to walk
the address entries looking for a routable address.
Alex