I need a command line help -- pinging gateway

Reply

Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

I need a command line help -- pinging gateway

 
0
  #1
Nov 9th, 2005
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!
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

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

 
0
  #2
Nov 9th, 2005
why does no one even look at my post?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 238
Reputation: Lightninghawk is an unknown quantity at this point 
Solved Threads: 6
Lightninghawk's Avatar
Lightninghawk Lightninghawk is offline Offline
Posting Whiz in Training

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

 
0
  #3
Nov 9th, 2005
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?
+_-¤ ŦĦễ £ﺄiĢĦŧňĨňĢĦǻщk ¤-_+
South Georgia Computers - Home and Office IT Solutions - Owner/Tech
Need the BEST software for Virus/Spyware Removal? Download - AVG Free -

Computer Problems? Forget the GeeK Squad use something better: DaniWeb
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

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

 
0
  #4
Nov 9th, 2005
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)
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 238
Reputation: Lightninghawk is an unknown quantity at this point 
Solved Threads: 6
Lightninghawk's Avatar
Lightninghawk Lightninghawk is offline Offline
Posting Whiz in Training

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

 
0
  #5
Nov 9th, 2005
LoL.. ok.. would pinging the localhost help you out any... my networking is rough..

But wouldn't that complete what you needed to know?
+_-¤ ŦĦễ £ﺄiĢĦŧňĨňĢĦǻщk ¤-_+
South Georgia Computers - Home and Office IT Solutions - Owner/Tech
Need the BEST software for Virus/Spyware Removal? Download - AVG Free -

Computer Problems? Forget the GeeK Squad use something better: DaniWeb
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

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

 
0
  #6
Nov 9th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 238
Reputation: Lightninghawk is an unknown quantity at this point 
Solved Threads: 6
Lightninghawk's Avatar
Lightninghawk Lightninghawk is offline Offline
Posting Whiz in Training

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

 
0
  #7
Nov 9th, 2005
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?
+_-¤ ŦĦễ £ﺄiĢĦŧňĨňĢĦǻщk ¤-_+
South Georgia Computers - Home and Office IT Solutions - Owner/Tech
Need the BEST software for Virus/Spyware Removal? Download - AVG Free -

Computer Problems? Forget the GeeK Squad use something better: DaniWeb
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

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

 
0
  #8
Nov 9th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 238
Reputation: Lightninghawk is an unknown quantity at this point 
Solved Threads: 6
Lightninghawk's Avatar
Lightninghawk Lightninghawk is offline Offline
Posting Whiz in Training

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

 
0
  #9
Nov 9th, 2005
Ok.. Give me a few seconds

I'll see what I can do
+_-¤ ŦĦễ £ﺄiĢĦŧňĨňĢĦǻщk ¤-_+
South Georgia Computers - Home and Office IT Solutions - Owner/Tech
Need the BEST software for Virus/Spyware Removal? Download - AVG Free -

Computer Problems? Forget the GeeK Squad use something better: DaniWeb
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 14
Reputation: rember911 is an unknown quantity at this point 
Solved Threads: 0
rember911 rember911 is offline Offline
Newbie Poster

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

 
0
  #10
Nov 9th, 2005
lightning do you have MSN or AIM? that would be easier than this.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC