Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Script to identify Static/Dynamic IP?  (Read 2801 times)

0 Members and 1 Guest are viewing this topic.

Xeratul

    Topic Starter
  • 100,000th poster


  • Hopeful
  • Experience: Familiar
  • OS: Windows 7
Script to identify Static/Dynamic IP?
« on: July 06, 2006, 09:50:24 PM »
Is it possible to have a VB script or something similar determine whether the machine on which it is ran has its connection to the internet through a dynamic or static IP address, and echo the result into a text file or something?

I don't have a problem or anything. I'm just curious. ;)
« Last Edit: July 06, 2006, 09:50:51 PM by Wraith112 »

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Script to identify Static/Dynamic IP?
« Reply #1 on: July 07, 2006, 03:35:58 AM »
I suppose so, but it would be hard to cover all cases.

Case 1: PC connected to the internet through modem.  Check DHCP lease information to determine whether IP is dynamic or static.

Case 2: PC connected to to internet via router.  Can determine is PC has dynamic IP on LAN, but would need to query router (or some external server) to determine if the LAN itself had a dynamic or static IP...

Case 3: More complicated network configuration; LAN segments connected by bridges, IP tunnels, etc.

Could be tricky.
« Last Edit: July 07, 2006, 03:36:46 AM by robpomeroy »
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos