Sunday, March 6, 2011

Tip 4: Display IP rather than hostname

When dealing with networking issues, it often helps to be able to use only IP addresses rather than
hostnames. Why? For 2 reasons. First, the name server might not always be available if routing is being
changed. And most important, you may not have the time to wait for all the IP resolving to be done.
Fortunately, many networking utilities in Linux share a common option flag. The -n flag. It will allow you to
make the utility display IP addresses rather than hostnames. Here are a few examples:
netstat -an
traceroute 1.2.3.4 -n
arp -n -a -i eth0 -a proxy
These commands were all given the -n flag and will display only IP addresses.

No comments:

Post a Comment