Networking Forums

Networking Forums > Network Hardware > Broadband Hardware > detecting WAN IP on MN-100, MN-500, or MN-700

Reply
Thread Tools Display Modes

detecting WAN IP on MN-100, MN-500, or MN-700

 
 
martin
Guest
Posts: n/a

 
      04-09-2004, 05:17 PM

Anyone know how to detect the WAN IP address of a MN-100,
MN-500, or MN-700 from the 192.168.2.x side of the router?

I need to come up with a way to interrogate and obtain the
address from a program.

Thanks.
Martin

 
Reply With Quote
 
 
 
 
Derek R. Flickinger
Guest
Posts: n/a

 
      04-09-2004, 05:49 PM
You should be able to take the following code and save it as a VBS and run
it. It should be enough to get you started:

========================================

Set deviceFinder = CreateObject( "UPnP.UPnPDeviceFinder" )
Dim devices
Set devices =
deviceFinder.FindByType("urn:schemas-upnp-org:device:InternetGatewayDevice:1",
0)
Call ShowDevices(devices, "")
Sub ShowDevices(inDevices, inPadding)
Dim device
For each device in inDevices
Call ShowStuff(device, inPadding)
If device.HasChildren Then
Call ShowDevices(device.Children, inPadding & "..")
End If
Next
End Sub
Sub ShowWanConn(inService)
Dim retVal, emptyArgs(0), outArgs(2)
retVal = inService.InvokeAction("GetConnectionTypeInfo", emptyArgs,
outArgs)
wscript.echo "*** ConnectionType = " & outArgs(0)
retVal = inService.InvokeAction("GetNATRSIPStatus", emptyArgs, outArgs)
wscript.echo "*** NATEnabled = " & outArgs(1)
ReDim outArgs(1)
retVal = inService.InvokeAction("GetExternalIPAddress", emptyArgs, outArgs)
wscript.echo "*** ExternalIPAddress = " & outArgs(0)
End Sub
Sub ShowStuff(inDevice, inMsg)
Dim service
wscript.echo inMsg & "FriendlyName = " & inDevice.FriendlyName
wscript.echo inMsg & "Type = " & inDevice.Type
For each service in inDevice.Services
wscript.echo inMsg & "Service = " & service.ServiceTypeIdentifier
If (service.ServiceTypeIdentifier =
"urn:schemas-upnp-org:service:WANIPConnection:1") Then
ShowWanConn(service)
End If
If (service.ServiceTypeIdentifier =
"urn:schemas-upnp-org:service:WANPPPConnection:1") Then
ShowWanConn(service)
End If
Next
End Sub

================================
Regards,

=D-

Derek R. Flickinger
Interactive Homes, Inc.


"martin" <(E-Mail Removed)> wrote in message
news:1a8d901c41e56$9a2f2c20$(E-Mail Removed)...
>
> Anyone know how to detect the WAN IP address of a MN-100,
> MN-500, or MN-700 from the 192.168.2.x side of the router?
>
> I need to come up with a way to interrogate and obtain the
> address from a program.
>
> Thanks.
> Martin
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting Connections Alfred Linux Networking 1 12-21-2006 04:24 AM
Detecting a wireless SSID dnguy19@gmail.com Wireless Internet 37 03-03-2005 10:34 PM
MN-500 detecting Josh Broadband Hardware 15 10-15-2004 03:44 AM
Detecting a Wireless LAN Jack Dee Wireless Internet 4 08-08-2004 06:04 PM
detecting router Rachel Forder Windows Networking 1 12-05-2003 08:49 PM



1 2 3 4 5 6 7 8 9 10 11