Script to log the current IP address

ckr97

Regular
Regulars
Messages
490
Location
Bangalore
Whenever the Modem starts/reboots, you are assigned a WAN IP. This IP is not shown in the IPCONFIG output.

you can see your WAN IP from Modem Admin page - Device Info - WAN (first row 0/35 - last column will show you the IP)

You can also see your WAN IP, when you access myIPaddress.com: What is my IP address? How do I find my IP address?

i want some script or networking command, which can retrieve this IP for me.
 

amish

Star gazer
Regulars
Messages
24,789
Location
Mumbai
In windows or linux?u can use cURL and grep combination in Linux.same is possible in windows as well but u need to download those softwares.
 

meetdilip

Computer Addict
Regulars
Messages
4,309
Would be easier if you mention the purpose. Do mention if OS is not Windows.
 


ckr97

Regular
Regulars
Messages
490
Location
Bangalore
Sorry I forgot to mention that its on Windows OS. But if its simple on Linux, then I can run a Ubuntu virtual machine to try the necessary script.

----------

@meetdilip - its the old problem. my modem keeps resetting automatically(i feel between every 1-2 hours). whenever this event happens my active session/chats/vpn gets interrupted. this is causing big problem when i am doing some important work. otherwise for downloads i can manage with download managers.

I want to find out the pattern and see how many times it happens in a day... create a detailed report of 1 week and then speak with a manager at my Exchange. i recollect this problem started after i changed my plan a year back and my IP changed from 59.x.x.x to 117.x.x.x

----------

Here is my current modem stats:

http://imageshack.us/photo/my-images/832/bsnldataonemodemstat201.png/

Uploaded with http://imageshack.us
 

amish

Star gazer
Regulars
Messages
24,789
Location
Mumbai
You can find pattern by checking ur onlines session logs on BSNL portal.Otherwise switch to bridgemode and let ur windows control the connection/disconnection.
 


ckr97

Regular
Regulars
Messages
490
Location
Bangalore
@essbebe - thats manually visiting a website and checking. I want to achieve this through some program, which will be running on my computer.
 

pk_

Regular
Regulars
Messages
137
i told you a simple one line code to get it.what is your problem now?

Simple download wget for windows and give this command

wget -q -O - http://www.fibernet.in/utils/ip.php


on linux it is as simple as giving this command because wget is already installed
 

essbebe

MODERATOR
Regulars
Messages
9,802
this problem started after i changed my plan a year back and my IP changed from 59.x.x.x to 117.x.x.x


While "googling" for a solution to your requirement came across this website
and gave the link for future use. can be "SAFELY IGNORED!"
Para two:
(a)
Mention your modem model/make/number. A Fw upgrade can be tried.)
(b)

iF you uncheck ADSL2 + box and recheck your stats, may be the frequency of
disconnections will be reduced.. Dynamic IP address allotted by BSNL is like a Hotel say "BSNL"
allotting different rooms to you on each visit.. But overall if the service is POOR , how
record of changes of dynamic IP will help the Management ???

(c).
You can also try changing DNS to google 8.8.8.8 and Open dns 208.67.220.220
Or if interested select the best DNS for your connection . ( application "Namebench")
BSNL Other DNS
218.248.240.24

218.248.240.135
218.248.240.139

218.248.240.180
218.248.240.181
218.248.240.208

218.248.255.147
218.248.255.162
All Delhi NIB.

61.1.96.69
61.1.96.71
Calcutta NIB.

d)
You can also try tcp/ip optimizer from speedguide.net

Feedback on (a) (c) and (d) please.
 

Similar threads


Top