944,184 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Nov 9th, 2005
0

I need a command line help -- pinging gateway

Expand Post »
i want to design a program that can be used on any machine to ping their gateway.
basically, what i was thinking i could do is create a batch file that first ran ipconfig. then it would run the ping command. to get the gateway, i was thinking using some sort of a command that could use information in another designated line.
***
EXAMPLE:
ipconfig
(default gateway..........169.132.3.1)

ping (line 2 characters 27-37)
***
I was thinking along the lines of using something like the goto or call commands, but i don't know how to use them, or if it is even possible to extract characters from a previous command line. Any suggestions on how i can make this .bat would be greatly appreciated!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

why does no one even look at my post?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

Ahh batch files.

Ok well.. you only have one question to ask yourself... when you can just click

Start --> run --> cmd --> ipconfig /all --> ping (default gateway address)

why would you want to make is a batch file.. or program... ?

Why do you want to ping your default gateway?
Reputation Points: 35
Solved Threads: 9
Posting Whiz in Training
Lightninghawk is offline Offline
288 posts
since Jun 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

because this isnt necessarily for me.

i fix comptuers. i am net + certified. i am checking internet connections on a daily basis. if i could just double click on an icon that would run a gateway ping, it could save me oodles of time (i cant belive i just said oodles.) (again.).

also, there are people who are so incompident that they refuse to learn how to use a simple command like pinging the gateway. if their internet is malfunctioning, i will tell them to run the file i left on their computer. ill have them read back to me what they see. then i dont have to deal with this:
"ok type in ping, space, then the gateway number you just read to me"
"ok 70.113.4.5. ......... It said it didnt couldnt find the host"
"are you sure you didnt type in your IP address and not your gateway?"
"hold on................ im gonna try to put a magnet to the harddrive maybe that will fix it"
"no dont do that!!"
(of course their on their merry little way to their refrigerator by now, getting a magnet, and demagging their hard drive. I end up getting charged for it because i didn't "explain things good enough." This is a TRUE story)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

LoL.. ok.. would pinging the localhost help you out any... my networking is rough..

But wouldn't that complete what you needed to know?
Reputation Points: 35
Solved Threads: 9
Posting Whiz in Training
Lightninghawk is offline Offline
288 posts
since Jun 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

no. i need to ping the gateway to troubleshoot to see if the problem is between the modem/router and the computer. Pinging the gateway sends 4 packets to the modem/router (the gateway) and those packets are bounced back. if the computer recieves the packets, i know the problem is between the modem/router and the wall+the rest of the internet.
for instance, a bad ethernet cable going from modem to motherboard.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

Ok soo.. Are you working on the same network which would enable all of the batch files to be needing the same default gateway address?
Reputation Points: 35
Solved Threads: 9
Posting Whiz in Training
Lightninghawk is offline Offline
288 posts
since Jun 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

no i need this thing to be able to figure out the default gateway depending on whatever machine its on. like being able to auto-detect it and input it as a switch after the ping command line
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

Ok.. Give me a few seconds

I'll see what I can do
Reputation Points: 35
Solved Threads: 9
Posting Whiz in Training
Lightninghawk is offline Offline
288 posts
since Jun 2005
Nov 9th, 2005
0

Re: I need a command line help -- pinging gateway

lightning do you have MSN or AIM? that would be easier than this.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rember911 is offline Offline
14 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Windows NT / 2000 / XP Forum Timeline: Win2Kpro sys tray problem
Next Thread in Windows NT / 2000 / XP Forum Timeline: Windows Media Player v10 help Please.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC