Network tooks
ping - uses an ICMP packet to determine if a target is live and
responding.
ping {name|IP number}
See : https://en.wikipedia.org/wiki/Ping_(networking_utility)
See : http://www.thegeekstuff.com/2009/11/ping-tutorial-13-effective-ping-command-examples/
ping does repeated pings. When successful, it reports back :
- the name.
- the IP.
- ping try.
- ttl count (how many routing nodes traversed).
- time taken to respond.
If you issue a [ctrl]c, you will get a summery of results, including count
of sent, received, and lost packets.
Some errors :
- TTL Expired in Transit - exceeded defined number of hops.
-i will allow you to increase up to 255.
- Destination Host Unreachable - host not responding, possibly down.
- Unknown Host - host does not exist, not valid name.
- Request Timed Out - did not get a reply.
Some systems won't resond to ping.
Heavy network traffic delayed pat TTL
Router errors
Use -w option to prevent extended hangs.
Some other option :
-c # - count, set a specific number pings to do.
-i # - interval. Default 1/sec. Only super user can do quicker.
-q - print only summary of pings, used with -c
-n - don't bother with printing DNS name.
-R - show route of ping.
-w - sets maximum time to run ping.
arp - lists mac# of recently contacted interfaces on the local
network.
Lists IP or DNS id
HWtype. e.g ether
HWaddress, i.e mac#
Flags
Iface, some systems may have more than one interface.
Some options :
- -v - verbose.
- -n - list IP even if DNS name available.
- -i - pick secondary interface.
- -d - delete entry from lookup table (super user).
- -s - add entry to lookup table (super user).
- dig
- nslookup - queries name server for IP. Do a DNS resolution at
the prompt.
nslookup eval.cs.niu.edu
nslookup - interactive mode.
Some command line options :
- -debug - returns ID of DNS server resolving, IP, and names.
- -type=soa domain - source of authority. Useful with more generic name.
- -type=ns domain - source of authority. Useful with more generic name.
- -type=any domain - available info. Useful with more generic name.
nslookup -query=any niu.edu
- ifconfig - list systems network configuration.
Provides :
- card interface ID
- HWaddr - mac@
- IPv4 address
- Broadcast address
- IPv6 address
- Count of packets sent and received and success/failure counts.
This will list at least one valid network interface and lo, loopback. If
multiple network cards exist, they will be listed. If you are running a
virtual system enviroment, this will also have an 'interface' id.
Some command line options :
- -a - list all interfaces, even those down.
- -s - short list. Lists interface ID and traffic count.
- -v - verbose. Fill out some error reporting.
whois
netstat - network statistics. Lists connections (sockets), routing tables,
network interface info, and protocol statistics.
Useful for trouble shooting.
nmap