• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

how to get the cable modems DHCP IP address

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I have a method that obtains the users local IP address. See code below. Which is fine. But more importantly, if the users computer is behind a cable modem and router, I want to be able to get the IP address that has been assigned to the modem by the service provider (AT&T, or whoever). I know that if an IP address starts with 192.168.#.#, that its really just the address assigned by the router to one of the computers inside the network. That's not what I'm really after. Does someone know how to correctly identify and obtain the DHCP IP address that was assigned to the modem?

Alan

 
Marshal
Posts: 27367
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I usually use one of the web sites like this one: http://whatismyipaddress.com/.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Alan Shiers wrote:I know that if an IP address starts with 192.168.#.#, that its really just the address assigned by the router...


There are others too. Google "RFC 1918".

That's not what I'm really after. Does someone know how to correctly identify and obtain the DHCP IP address that was assigned to the modem?


I guess the first question would be: Why? In general, you don't need to know, so if it's for something nefarious, don't expect any help here. If it's for some sort of geographical pinpointing, there are already services for that, and companies that have forgotten more than you or I will ever know about that sort of stuff.

Winston
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic