Network Diagnostics

ping

ping uses the ICMP protocol’s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (‘‘pings’’) have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of ‘‘pad’’ bytes used to fill out the packet.

traceroute

traceroute tracks the route packets take across an IP network on their way to a given host. It utilizes the IP protocol’s time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

mtr

mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

nslookup

Nslookup is a program to query Internet domain name servers. Nslookup has two modes: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain.

dig

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use, and clarity of output. Other lookup tools tend to have less functionality than dig.

ypwhich

ypwhich returns the name of the NIS server that supplies the NIS services to a NIS client, or which is the master for a map. If the hostname is specified, that machine is queried to find out which NIS master it is using.

ypcat

ypcat prints the values of all keys from the NIS database specified by mapname, which may be a map name or a map nickname.

ypmatch

ypmatch prints the values of one or more keys from the NIS database specified by mapname, which may be a map name or a map nickname.