Script to log the current IP address

  • Thread starter Thread starter ckr97
  • Start date Start date
  • Replies Replies 10
  • Views Views 2,460

ckr97

Regular
Messages
491
Location
Bangalore
ISP
ACT Blaze 30 Mbps (Post 50GB, 512Kbps)
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.
 
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.
 
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
 
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.
 


@essbebe - thats manually visiting a website and checking. I want to achieve this through some program, which will be running on my computer.
 
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
 
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.
 
Recording IPs won't do any good I think. You can simply take a screen shot of your usage details in portal to show that there is frequent disconnection.

Try my sticky guide on disconnection on top of this section. You can get better results if you can manage a personal visit to SDE of your exchange. Or you can use the link below and wait for someone from BSNL to respond

http://mis.bsnl.co.in/pgs/internet/pgwebregn.asp
 

Top