Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Useful Troubleshooter 2

Status
Not open for further replies.

gurner

Technical User
Feb 13, 2002
522
US
I work for a Database specialist, and in the course of a day 95% of the problems i come across are Network based (mainly just a poorly put together network)

We all know the adage, "there is no such thing as a perfect network"

Out of frustration and boredom I knocked up this batch file which has turned out to be invalueable (if you can't stump up for a protocol analyzer)

Ping SERVER > C:\ping.txt
Route print > c:\R1.txt
IPCONFIG /ALL > c:\r2.TXT
netstat -n > C:\r3.txt
netstat -s > C:\r4.txt
netstat -a > C:\r5.txt
tracert > c:\Trace.txt
ipconfig /displaydns > C:\DNS.txt
COPY c:\R1.TXT + c:\r2.TXT C:\tcp.TXT
copy C:\r3.txt + C:\r4.txt C:\ip.txt
copy C:\tcp.txt + C:\ip.txt C:\PIP.txt
copy C:\PIP.txt + C:\r5.txt C:\CPIP.txt
copy C:\CPIP.txt + C:\Trace.txt C:\P.txt
copy C:\P.txt + C:\DNS.txt C:\TCPI.txt
copy C:\Ping.txt + C:\TCPI.txt C:\TCPIP.txt
DEL c:\PIP.TXT
DEL c:\r5.TXT
DEL c:\R1.TXT
DEL c:\r2.TXT
DEL C:\r3.txt
DEL C:\tcp.txt
DEL C:\r4.txt
DEL C:\ip.txt
DEL C:\CPIP.txt
DEL C:\Trace.txt
DEL C:\P.txt
DEL C:\DNS.txt
DEL C:\Ping.txt
DEL C:\TCPI.txt

Cut and paste this text into notepad (changing SERVER to your servers name and changing WEBSITE to a site of your choice), give it a *.bat file extension, then run it.

browse to the root of your C:\ drive and check the log file it produces called TCPIP.txt

I have resolved so many Network communication problems with this simple file.
 
very nice GIRTH!!!
thanks for sharing,

-a5k
 
Great Script! Do you know what version of Windows first allowed the "ipconfig /displaydns" command? I'm running 98 and it's invalid.
 
Not to sure, probably win2000

i've managed to print out the entire DNS cache on a win2000 and XP machine. But Win98 as you say, doesn't do anything.

I got a smallish company to run this batch file on each machine, which i knew were poorly configured (just had to prove it to thier Network Consultants)

Their Network was small, with a router forwarding emails, but when not send/recieving they were told to turn thier router off as (apparently) it was not needed for Internal Network usage. But we had a real problem with this.

Multiple Helpdesk calls everyday, database really going doolally.

Checked the text files they sent me back, they had a WINS server (don't know if it was configured) but the Workstations wern't configured to query it. They were Resolving via DNS (fair enough you say!)

Thier DNS server was External! (probably an ISPs)

What were they doing with thier Router??
 
Sounds more like they were "wasting money" on their network consultants.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top