| | |
I need a command line help -- pinging gateway
![]() |
•
•
Join Date: Sep 2005
Posts: 14
Reputation:
Solved Threads: 0
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!
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!
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?
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
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
•
•
Join Date: Sep 2005
Posts: 14
Reputation:
Solved Threads: 0
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)
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)
LoL.. ok.. would pinging the localhost help you out any... my networking is rough..
But wouldn't that complete what you needed to know?
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
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
•
•
Join Date: Sep 2005
Posts: 14
Reputation:
Solved Threads: 0
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.
for instance, a bad ethernet cable going from modem to motherboard.
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
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
Ok.. Give me a few seconds
I'll see what I can do
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
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
![]() |
Similar Threads
- C command-line I/O question (C++)
- Help! How to make a csh receive argvs from command line? (*nix Software)
- Three New Command-Line Tools (Windows tips 'n' tweaks)
- command line (OS X)
Other Threads in the Windows NT / 2000 / XP Forum
- Previous Thread: Win2Kpro sys tray problem
- Next Thread: Windows Media Player v10 help Please.
| Thread Tools | Search this Thread |
.net 64bit 2007 2010 a.exe activedirectory address android apache appstore automatically black blue bsod bulletin canonical chinese chkdsk codeplex combofix cursor deployment deployments desktop dns drive eartlink error errors explorer fax features fontmanagers format framework freeze hardware home internet interoperability laptop laptops lcd linux login mac markshuttleworth memory microsoft monitor motionle1600 netbooks novell nvidia open opensource operatingsystems options oracle osinstallationproblem osx palm partition printer product program proxy reformat remotedesktop repair replacingraiddrive retail retrieve screen security sharepoint simplifiedchinese sitetositevpn slowperformance sp3 spyware studios technology ubuntu update upgrade videodrivers videogames virus vista visual vpn win win32/heur windows windows7 windowsxp windowsxpnotstartingup. xp xpde





