Network Information: ping, finger, traceroute, and host

 < Day Day Up > 



You can use the ping, finger, traceroute, and host commands to find out status information about systems and users on your network. ping is used to check if a remote system is up and running. You use finger to find out information about other users on your network, seeing if they are logged in or if they have received mail. host displays address information about a system on your network, giving you a system's IP and domain name addresses. traceroute can be used to track the sequence of computer networks and systems your message passed through on its way to you. Table 15-1 lists various network information tools.

Though not included with Red Hat, for the GNOME desktop, the GNOME Workstation Command Center utility provides a GNOME interface for entering the ping, traceroute, and host commands, among other features. On the K Desktop, you can use the KDE network utilities (knu) to issue ping, finger, traceroute, and host commands.

ping

The ping command detects whether a system is up and running. ping takes as its argument the name of the system you want to check. If the system you want to check is down, ping issues a timeout message indicating a connection could not be made. The next example checks to see if www.redhat.com is up and connected to the network:

$ ping www.redhat.com PING www.portal.redhat.com (206.132.41.231): 56 data bytes 64 bytes from 206.132.41.231: icmp_seq=0 ttl=248 time=24.0 ms 64 bytes from 206.132.41.231: icmp_seq=1 ttl=248 time=124.5 ms 64 bytes from 206.132.41.231: icmp_seq=2 ttl=248 time=77.9 ms 64 bytes from 206.132.41.231: icmp_seq=3 ttl=248 time=220.1 ms 64 bytes from 206.132.41.231: icmp_seq=4 ttl=248 time=14.9 ms     --- www.portal.redhat.com ping statistics --- 6 packets transmitted, 5 packets received, 16% packet loss round-trip min/avg/max = 14.9/92.2/220.1 ms

You can also use ping with an IP address instead of a domain name. With an IP address, ping can try to detect the remote system directly without having to go through a domain name server to translate the domain name to an IP address. This can be helpful for situations where your network's domain name server may be temporarily down and you want to check if a particular remote host on your network is connected. In the next example, the user checks the Red Hat site using its IP address:

$ ping 206.132.41.231 PING 206.132.41.231 (206.132.41.231): 56 data bytes 64 bytes from 206.132.41.231: icmp_seq=0 ttl=248 time=16.6 ms 64 bytes from 206.132.41.231: icmp_seq=1 ttl=248 time=65.1 ms 64 bytes from 206.132.41.231: icmp_seq=2 ttl=248 time=70.1 ms 64 bytes from 206.132.41.231: icmp_seq=3 ttl=248 time=336.6 ms 64 bytes from 206.132.41.231: icmp_seq=4 ttl=248 time=53.6 ms 64 bytes from 206.132.41.231: icmp_seq=5 ttl=248 time=42.1 ms     --- 206.132.41.231 ping statistics --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max = 16.6/97.3/336.6 ms

Note 

ping operation could also fail if ping access is denied by a network's firewall. See Chapter 19 for more details.

finger and who

You can use the finger command to obtain information about other users on your network and the who command to see what users are currently online on your system. The who and w commands list all users currently connected along with when, how long, and where they logged in. The w command provides more detailed information. It has several options for specifying the level of detail. who is meant to operate on a local system or network. finger can operate on large networks, including the Internet, though most systems block it for security reasons.

Note 

Ethereal is a protocol analyzer that can capture network packets and display detailed information about them. You can detect what kind of information is being transmitted on your network as well as its source and destination. Ethereal is used primarily for network and server administration. Ethereal is discussed in detail in Chapter 38.

host

With the host command, you can find network address information about a remote system connected to your network. This information usually consists of a system's IP address, domain name address, domain name nicknames, and mail server. This information is obtained from your network's domain name server. For the Internet, this includes all systems you can connect to over the Internet.

The host command is an effective way to determine a remote site's IP address or URL. If you have only the IP address of a site, you can use host to find out its domain name. For network administration, an IP address can be helpful for making your own domain name entries in your /etc/host file. That way, you needn't rely on a remote domain name server (DNS) for locating a site.

$ host www.gnome.org www.gnome.org is a nickname for gnome.labs.redhat.com gnome.labs.redhat.com has address 199.183.24.235 gnome.labs.redhat.com mail is handled (pri=10) by mail.redhat.com     $ host 199.183.24.235 235.24.183.199.IN-ADDR.ARPA domain name pointer gnome.labs.redhat.com

The Gwhois program is a GNOME-based client that displays information about hosts obtained from NIC network services. Gwhois provides an X Window System interface with a list of NIC servers from which to choose. gHostLookup is a simple GNOME application that returns a machine's IP address when you give it the hostname.

traceroute

Internet connections are made through various routes, traveling through a series of interconnected gateway hosts. The path from one system to another could take different routes, some of which may be faster than others. For a slow connection, you can use traceroute to check the route through which you are connected to a host, monitoring the speed and the number of intervening gateway connections a route takes. The traceroute command takes as its argument the hostname or IP addresses for the system whose route you want to check. Options are available for specifying parameters like the type of service (-t) or the source host (-s). The traceroute command will return a list of hosts the route traverses, along with the times for three probes sent to each gateway. Times greater than five seconds are displayed with an asterisk, *.

traceroute rabbit.mytrek.com

You can also use the mtr or xmtr tools to perform both ping and traces (Traceroute on System Tools menu). Red Hat also includes Xtraceroute (More System Tools menu).

Table 15-1: Network Tools

Network Information Tools

Description

ping

Detects whether a system is connected to the network.

finger

Obtains information about users on the network.

who

Checks what users are currently online.

host

Obtains network address information about a remote host.

traceroute

Tracks the sequence of computer networks and hosts your message passes through.

ethereal

Protocol analyzer to examine network traffic.

mtr and xmtr

My traceroute combines both ping and traceroute operations (Traceroute on System Tools menu).

GNOME Workstation
Command Center

The GNOME interface featuring ping, traceroute, and
host operations.

gHostLookup

GNOME utility to find IP addresses for hostnames.

Gwhois

Obtains information about networks, hosts, and users.



 < Day Day Up > 



Red Hat(c) The Complete Reference
Red Hat Enterprise Linux & Fedora Edition (DVD): The Complete Reference
ISBN: 0072230754
EAN: 2147483647
Year: 2004
Pages: 328

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net