Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading provider-assigned dynamic IP programmatically

Status
Not open for further replies.

stevewauk

Programmer
Nov 13, 2001
5
0
0
US
I am trying to determine to read the IP address assigned on the WAN side of a router by my provider under program control from a PC on the LAN. The LAN is on the other side of the router, which does NAT translation and DHCP assignment. I want the address assigned on the WAN side of the router. I can read this on the router configuration display, but need to acquire it automatically under program control.

The router is a D-Link DI-713P.
 
Try to enable SNMP on the router. I know little about Dlink router. Maybe it has already got SNMP enabled.

Find some SNMP client lib or tools for your PC. Then you can poll whatever addresss under your program control.

Hope it will help.

Jerry.
 
Thanks for the advice, Jerry.

I found a way to discover my router's external address under program control by putting an ASP page on an externally hosted site that has a Javascript timer built into it. when I leave that page loaded on a browser on one of the PCs inside my network, it periodically reloads itself and reports the IP address read on the external server.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top