PDA

View Full Version : Usefull network commands Win/Unix


rudedog
01-04-2007, 07:32 AM
Windows commands

ping {hostname}
Lets you check whether your internet connection is alive or lost
Example : ping www.yourserver.com (http://www.yourserver.com/)

* Rudedog's tip - use the -a parameters to resolve known IP address to host name. Useful for finding out a clients ISP name.
Example: ping -a 66.135.39.39


tracert {hostname}
Lets you trace packets and find if your connection is broken beyond your ip address. Also can be used to track the number of hops to get to the hostname
Example: tracert www.yourservername.com (http://www.yourservername.com/)



ipconfig
Find out your ip address, your network interfaces, transferred and received data information
Example : ipconfig



nslookup {hostname}
Find out the dns name resolves to a IP - a way to test your dns server
Example: nslookup www.your_server_name.com (http://www.your_server_name.com/)



netstat -a
Find out all the open ports on your machine
Example: netstat -a



netstat -nt
Display all the tcp based established connections on your machine
Example: netstat -nt



telnet {hostname} {port}
Telnet or connect to a machine at the specified port to find out whether that machine/server is working right
Example: www.your_server_name.com (http://www.your_server_name.com/) 80

Unix/Linux commands

ping {hostname}
Lets you check whether your internet connection is alive or lost
Example : ping www.your_server_name.com (http://www.your_server_name.com)

* Rudedog's tip - use the -a parameters to resolve known IP address to host name. Useful for finding out a clients ISP name.
Example: ping -a 66.135.39.39

traceroute {hostname}
Lets you trace packets and find if your connection is broken beyond your ip address. Also can be used to track the number of hops to get to the hostname
Example: traceroute www.your_server_name.com (http://www.your_server_name.com)



ifconfig
Find out your ip address, your network interfaces, transferred and received data information
Example : ifconfig



nslookup {hostname}
Find out the dns name resolves to a IP - a way to test your dns server
Example: nslookup www.your_server_name.com (http://www.your_server_name.com)



netstat -a
Find out all the open ports on your machine
Example: netstat -a



netstat -nt
Display all the tcp based established connections on your machine
Example: netstat -nt



telnet {hostname} {port}
Telnet or connect to a machine at the specified port to find out whether that machine/server is working right
Example: telnet www.your_server_name.com (http://www.your_server_name.com) 80