Using Network Utility
If you have trouble accessing the network, it is important to double-check that all the information you entered earlier in the Network pane is correct. Verify that you have a valid IP address and subnet mask and that the DNS entry is correct. An IP address that starts with 169.254 is self-assigned by Bonjour, which may not be what you wanted.Network Utility (/Applications/Utilities) is a very valuable tool for testing network connectivity. You can use it to view network information and test network connectivity using commands such as Ping, Lookup, and Traceroute. The Info pane of Network Utility shows a quick interface overview. The left side has details about the interface itself, such as its MAC address, the assigned IP address, and its link speed. The right side shows packet transmission statistics.


Networking is enabled when booted from the Mac OS X Install DVD. By choosing Network Utility or Terminal from the Utilities menu, you can use the disc to troubleshoot network problems that may be a result of how your system is configured.The rest of this lesson will consider the troubleshooting commands Ping, Lookup, Traceroute, and Port Scan. Network Utility has four other tools that are not necessarily concerned with troubleshooting:
- Netstat
An advanced command that system administrators use to monitor the network activity of their machines and the network. - AppleTalk
Provides details and statistics for local and network AppleTalk configurations. - Whois
Used to find out the registrant of a particular domain name. - Finger
Used to get information about users on UNIX-based machines.
Ping
Ping, one of the tools in Network Utility, sends signals (packets) to a network interface to see if the computer responds, or echoes. If all the signals time out, the computer might be disconnected from the network, set to ignore ping packets, or unreachable from your computer.



If you are unable to ping the server, try pinging another computer that is nearby on the network to isolate if the problem is with your local network or router settings. If this works, check to make sure your Router entry in Network preferences is set correctly. See if another computer is able to ping the server.Keep in mind that ping tests very basic network connectivity. Even if you can ping a server, its services may be blocked by a firewall, or the service may be turned off or misconfigured on the server.
Ping has started ...
PING 10.1.0.1 (10.1.0.1): 56 data bytes
64 bytes from 10.1.0.1: icmp_seq=0 ttl=64 time=0.410 ms
64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=0.323 ms
64 bytes from 10.1.0.1: icmp_seq=2 ttl=64 time=0.363 ms
Ping has started ...
PING mainserver.pretendco.com (10.1.0.1): 56 data bytes
64 bytes from 10.1.0.1: icmp_seq=0 ttl=64 time=0.637 ms
64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=0.314 ms
64 bytes from 10.1.0.1: icmp_seq=2 ttl=64 time=0.366 ms
Determining System Accessibility on an IP Network
This exercise walks you through the steps required to determine whether a machine is reachable on a given IP network. It assumes that your computer is properly configured for Internet access.
Looking Up Internet Addresses
A frequent problem is that a particular server could not be found. This could be caused by DNS problems: either the computer is configured with invalid DNS addresses, or the DNS server is not functioning correctly.


Lookup has started ...
; <<> DiG 9.2.2 <<> mainserver.pretendco.com
;; global options: printcmd
;; Got answer:
;; ->HEADER<<- opcode: QUERY, status: NOERROR, id: 50843
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;mainserver.pretendco.com.INA
;; ANSWER SECTION:
mainserver.pretendco.com. 3600INA10.1.0.1
;; AUTHORITY SECTION:
pretendco.com.3600INNSmainserver.pretendco.com.
;; Query time: 4 msec
;; SERVER: 10.1.0.1#53(10.1.0.1)
;; WHEN: Thu Mar 31 15:05:56 2005
;; MSG SIZE rcvd: 72
Using Lookup to Verify DNS Is Set Properly
Here you will use the Lookup tool in Network Utility to compare known IP addresses to their domain names.
1. | In Network Utility, click the Lookup button. |
2. | Enter Apple's domain:www.apple.com |
3. | Click Lookup.You should see the IP address for Apple in the lower window.DNS also keeps track of mail records and aliases. You can get this information by choosing the different types of options from the "Select the information to lookup" pop-up menu. |
Tracing Routes
The Traceroute command in Network Utility traces the route through an IP network from your computer to the destination computer and shows the hop count, or the number of trips a packet took from one router or network device to another, needed to make the journey. This information is useful in determining where network delays are occurring.



Each line represents a network hop on the way to the destination. The numbers at the beginning of the line indicate the order in which the hops were traversed. The time in milliseconds indicates the time it took for the network device to respond.NOTE
traceroute to www.apple.com (17.254.0.91), 64 hops max, 40 byte packets
1 17.197.12.1 (17.197.12.1) 20.271 ms 0.864 ms 1.170 ms
2 il1-reagan-jfk (17.200.33.97) 0.660 ms 0.626 ms 0.525 ms
3 mondale-11 (17.200.26.7) 1.728 ms 1.869 ms 0.451 ms
Not all routers display the comprehensive network route demonstrated here, as this is optional information for the router to return to a client requesting a traceroute. It is common to see certain portions of the trace turn up with no data, because some administrators configure their routers not to pass this data back to the client.
Scanning Ports
Port Scan displays a list of open IP ports on a targeted computer. Port Scan is mainly used for security reasons. However, it can also be useful in troubleshooting. For example, if you are trying to connect to a web server without success, you can scan the open ports on the web server and ensure that the machine is running, and more importantly, that port 80, the HTTP port, is open. You can also do this with the FTP ports when trying to connect to an FTP server, or the NFS port, and so on.


If Port Scan recognizes the use of the port, it will tell you what the port is being used for. The example above shows that port 21 is being used for FTP.NOTEPort Scan may look like a port attack to a system administrator. Do not use it to probe other computers without first notifying the system administrator. Otherwise, you may find yourself the recipient of a visit from your company security department or a flustered system administrator, even though you were only using the command for troubleshooting purposes.
Port Scanning host: 192.168.5.30
Open Port: 21 ftp
Open Port: 139 netbios-ssn
Open Port: 427 svrloc
Open Port: 515 printer, spooler
Open Port: 548 afpovertcp
Open Port: 660
Determining the Open Ports on a System Connected to the Network
In this exercise, you will use Port Scan to determine the open ports on a computer. You will need two Macintosh computers on the same local network.