*NIX Networking Tools

Ref : wikipedia, essential-snmp-second-edition
These commands are just an overview, see man pages for more options.

traceroute
to determine the route taken by packets across an IP network
#traceroute www.elitecore.com

nslookup/dig
to get IP address information on a host, and vice versa. dig stands for Domain Internet Groper, nslookup is now deprecated, dig –x is used to get reverse lookup
# nslookup www.google.com
#dig -x ip address
gets u reverse name lookup

whois
to obtain domain name registrar information
#whois www.elitecore.com

Ethereal
Besides GUI tool, we can use the same as command line utility also. It is used to capture network traffic e.g, to get network traffic on some port say 161 (SNMP Port) :
#tethereal -i lo -V -F libpcap -f "port 161"

ifconfig
To get machine's network configuration
#ifconfig


arp
Address Resolution Protocol - method for finding a host's hardware address when only its network layer address is known
#arp –a

ping
for network troubleshooting – uses ICMP packets
#ping google.com
Unknown Host - DNS Problem
network unreachable - networking problems
Timeout - May be the remote machine is not turned on

*If you want to find out Mac address of any machine, just ping to that machine and see the arp table using arp –a command

arping
use when ping doesnt work, sometimes firewall settings disable ICMP packets, to verify the reachability
we can use arping also
#arping ip-address
(ref. - http://www.linux.com/feature/50596)

netstat
Obtains NETwork STATistics from kernel, can be used to find problems in the network and determine the amount of traffic on the network. It displays network connections, routing tables and network interface statistics
#netstat –rn
(-rn for seeing routing table)
to see all connections and listening ports, use
#netstat –a
(see man page for more info)


No comments:

Books I like

  • Inside C++ Object Model
  • Unix Network Programming - Stevens
  • Professional-c++-programmer-to-programmer - wrox
  • Beautiful-code-leading-programmers-explain-how-they-think-theory-in-practice