Friday, April 20, 2007

Basic Networking Commands you should know!

This would be mostly (*)nix based command set - Here we go...

  1. ping {hostname}
    Lets you check whether your internet connection is alive or lost
    Example : ping

  2. 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

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

  4. nslookup {hostname}
    Find out the dns name resolves to a IP - a way to test your dns server
    Example: nslookup

  5. dig {hostname}
    Does the same as above and provides other dns related information
    Example: dig

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

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

  8. 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 80

Ofcourse, there are many other options within each of these commands which you can find out through the manual pages by typing man {command}

Some of the commands might be in /sbin or /usr/sbin paths and might not be in default PATH. So go and execute it from there! For Example: /sbin/ifconfig

No comments: