Lesson 23

Troubleshoot Network Issues

This lesson builds on the network topics covered in Lesson 21, “Manage Basic Network Settings,” and Lesson 22, “Manage Advanced Network Settings.” This lesson covers general network troubleshooting and common network issues. Then, you’ll learn how to use the built-in macOS network troubleshooting tools, including Network Utility.

Reference 23.1 Troubleshoot General Network Issues

When you troubleshoot LAN and Internet connection network issues, consider possible points of failure. Isolate the cause of the problem before you attempt generic resolutions.

Image

To help isolate network issues, you can categorize them into three general areas:

Image Local issues—These are usually related to either improperly configured network settings or disconnected network connections.

Image Network issues—Many possible points of failure could be involved. Become familiar with the physical topology of your network. Start by checking the devices that provide network access closest to your Mac. Something as simple as a bad Ethernet port on a network switch can cause problems. Start your investigation using the network diagnostic utilities included with macOS.

Image Service issues—These issues are related to the network device or service you are trying to access. For example, the devices providing DHCP or DNS services could be temporarily down or improperly configured. You can often determine that the problem is with the service by testing other network services. If the other network services work, you’re probably not dealing with network or local issues. Use diagnostic tools for testing service availability. Troubleshooting network services is also covered in Lesson 24, “Manage Network Services.”

Use two main tools for diagnosing network issues in macOS: Network preferences and Network Utility.

Verify Network Preferences Status

One of the diagnostic tools you should check first is Network preferences. Network preferences features a dynamically updating list that shows you the current status of any network interface. If a network connection isn’t working, you first find out about it here.

Network status indicators are:

Image Green—The connection is active and configured with TCP/IP settings. This doesn’t guarantee that the service is using the proper TCP/IP settings.

Image Yellow—The connection is active but the TCP/IP settings aren’t properly configured. If you are experiencing problems with this service, double-check the network settings. If the settings appear sound, move on to the other diagnostic utilities.

Image Red—This status usually indicates either improperly configured network settings or disconnected network interfaces. If this is an always-on interface, check for proper physical connectivity. If this is a virtual or Point-to-Point Protocol connection, double-check the settings and attempt to reconnect.

Common Network Issues

A good starting point for resolving network issues is to check for some common causes before hunting down more complex ones. This includes verifying Ethernet connectivity, Wi-Fi connectivity, DHCP services, and DNS services.

Ethernet Connectivity Issues

If you use an Ethernet connection, verify the physical connection to the Mac, and if possible, verify the entire Ethernet run back to the switch. If that’s not possible, try swapping your local Ethernet cable or use a different Ethernet port. If you use an Ethernet adapter, try a different adapter.

Verify the Ethernet status from Network preferences. Also, keep an eye out for substandard Ethernet cabling or problematic switching hardware. A symptom of these issues would be a large number of packet errors, which you can verify with Network Utility, as covered later in this lesson.

You may also find that while the Ethernet switch registers a link, Network preferences still shows the link as down. This issue may be resolved by manually setting a slower speed in the advanced hardware settings of Network preferences, as covered in Lesson 22.

More Info Image

Built-in network hardware can sometimes become unresponsive and may benefit from resetting the Mac computer’s NVRAM or SMC. You can find out more about resetting these items from Apple Support article HT204063, “Reset NVRAM or PRAM on your Mac,” and article HT201295, “How to reset the System Management Controller (SMC) on your Mac.”

Wi-Fi Connectivity Issues

If you use Wi-Fi, start by verifying that you are connected to the correct SSID from the Wi-Fi status menu or Network preferences. Often, if the Mac detects a problem the Wi-Fi status menu shows an exclamation point (!) to indicate that there is a problem with the wireless network.

The Wi-Fi status menu can also serve as a diagnostic tool if you press and hold the Option key and then click the Wi-Fi status menu. This view shows connection statistics for the currently selected Wi-Fi network. Of particular note is the Tx Rate entry, which shows the current data rate for the selected Wi-Fi network. The Wi-Fi status menu is capable of other diagnostic tasks, including helping you quickly identify network issues and opening Wireless Diagnostics.

Image

When you open Wireless Diagnostics, you see an assistant interface. Wireless Diagnostics creates and saves a diagnostic report archive about the Mac computer’s wireless and network configuration. You must authenticate as an administrator user to create the report. The compressed archive is stored in /var/tmp.

Image

The Wireless Diagnostics archive contains relevant files that can you use to diagnose a connection issue. If the utility can’t diagnose the problem, consult an experienced Wi-Fi administrator.

Open the Window menu to see additional advanced wireless network utilities in Wireless Diagnostics.

Image

These utilities provide information that you can share with Wi-Fi vendors or support specialists to resolve Wi-Fi issues. For example, the Performance window provides a real-time view of the radio signal quality. With the Performance window open, you can physically move a Mac notebook computer around an area to identify wireless dead zones.

Image

You can find out more about Apple Wireless Diagnostics from Apple Support article HT202663, “Check for Wi-Fi issues using your Mac.”

DHCP Service Issues

If you configure your Mac to use DHCP, and the DHCP server runs out of available network addresses or doesn’t provide configuration information to your Mac, your Mac might be able to communicate with other devices on the LAN even though it doesn’t have access to WAN or Internet resources. This is covered in Lesson 21, “Manage Basic Network Settings.”.

DNS Service Issues

Most network services require DNS services. If you have DNS service issues, verify the DNS server configuration in Network preferences. In most cases, the top listed network service interface is primary, and macOS uses it for DNS resolution. The exception is if the primary network service lacks a router configuration, in which case DNS resolution falls to the next fully configured network service interface.

Reference 23.2 Use Network Utility to Troubleshoot Network Issues

Network Utility provides several network identification and diagnostic tools. Use Spotlight to open Network Utility (it’s in /System/Library/CoreServices/Applications).

Image

Use the following tools in Network Utility:

Image Ping—Test network connectivity and latency.

Image Lookup—Test DNS resolution.

Image Traceroute—Analyze how your network connections are routed to their destination.

Image Whois—Query the whois database servers and find the owner of a DNS domain name or IP address of registered hosts.

Image Finger—Gather information based on a user account name from a network service.

Image Port Scan—Check whether a network device has specific services available.

You can also open Network Utility when you start your Mac from macOS Recovery (as covered in Lesson 5, “Use macOS Recover.”) by choosing Utilities >Network Utility. In macOS Recovery you can access the Wi-Fi status menu to use a different Wi-Fi network.

Interface Information

When you open Network Utility, you first see the Info section. This section enables you to view the detailed status of any hardware network interface. Verify that the network interface is properly activated.

Click the menu and choose the interface you’re having issues with. The selections here don’t necessarily match the service names that macOS displays in Network preferences. Instead, this menu shows the interfaces using their interface type and UNIX-given names.

Image

After you select an interface, view general interface information on the left and transfer statistics on the right. The more useful pieces of information here are link status, link speed, and IP address(es). Only active hardware network interfaces appear, and the link speed indicates whether the interface is establishing a proper connection. A proper IP address is required to establish a TCP/IP connection to a destination on a different subnet. You can also identify the selected interface’s MAC address, which is used to identify this particular interface on the LAN.

As a final validation of the selected network interface, you can view recent transfer statistics. If you open some apps like Safari to cause some network traffic, you can verify that packets are being sent and received from this interface. If you see activity here but still experience problems, the issue is probably a network or service problem and not the network interface. Or, if this interface is experiencing transfer errors, a local network hardware connectivity issue may be the root of your problem.

To resolve hardware network interface issues, check the physical connection. With wired networks, try different network ports or cabling to rule out physical connection issues. With wireless networks, double-check the Wi-Fi settings and the configuration of any wireless base stations. If the Mac network hardware isn’t working, contact an Apple Authorized Service Provider.

Ping

If your network settings are properly configured and the hardware network interface appears to be working correctly but you still experience network issues, test network connectivity using the ping tool. The ping tool determines whether your Mac can successfully send and receive data to another network device. Your Mac sends a ping data packet to the destination IP address, and the other device returns the ping packet to indicate connectivity.

Image

To use ping, open Network Utility and click the Ping button. Enter an IP address to a device on the LAN that should always be accessible, like the network router. Using a domain name assumes that your Mac is properly communicating with a DNS server, which might not be the case if you’re troubleshooting connectivity issues.

Click the Ping button to start the ping process. If the ping is successful, it returns the amount of time it took for the ping to travel to the network device and back. This is typically within milliseconds.

Some network administrators configure their firewalls to block pings or set up their network devices not to respond to network pings.

After you establish successful pings to local devices, branch out to WAN or Internet addresses. Using ping, you may find that everything works except for the one service you were looking for that prompted you to start troubleshooting the network.

Lookup

If you are able to successfully ping other network devices by their IP address but you can’t connect to another device by its host name, you likely have issues related to DNS. The network lookup process enables you to test name resolution against your DNS server.

Image

To verify DNS, enter the host name of a device or service in your local domain. If you can resolve local host names but not Internet host names, your local DNS server is resolving local names but isn’t properly connecting to the worldwide DNS network. If you don’t have a local domain, use any Internet host name.

Click the Lookup button to start the network lookup process. A successful forward lookup returns the IP address of the host name you entered. A successful reverse lookup returns the host name of the IP address you entered. If you are unable to successfully return lookups, your Mac isn’t connecting to the DNS server. Use the ping tool to test for basic connectivity to the DNS server IP address.

Traceroute

If you are able to connect to some network resources but not others, use the network traceroute utility to determine where the connection fails. WAN and Internet connections often require the data to travel through many network routers to reach their destination. The traceroute tool examines every network hop between routers by sending packets with low time-to-live (TTL) fields to determine where connections fail or slow down.

Image

To verify a network TCP/IP route, open Network Utility and click the Traceroute button. Enter an IP address to a device on the LAN that should always be accessible, like the network router. Using a domain name assumes that your Mac is properly communicating with a DNS server, which might not be the case if you’re troubleshooting connectivity issues.

Click the Trace button to initiate the traceroute process. If traceroute is successful, it returns a list of routers required to complete the connection and the amount of time it took for the test packets to travel to each network router. It sends three probes at each distance, so three times are listed for each hop. The delay is typically measured in milliseconds; experiencing delay times of any longer than a full second is unusual. If traceroute doesn’t get a reply from a particular router at all, it shows an asterisk instead of listing the router address, but this could be because the network equipment is configured not to respond to network requests.

Once you’ve established successful routes to local devices, you can branch out to WAN or Internet addresses. Using the traceroute tool, you may find that a specific network router is the cause of the problem.

For more information about Network Utility, choose Help >Network Utility Help.

Exercise 23.1 Troubleshoot Network Connectivity

In this exercise, you intentionally misconfigure your network settings and use the macOS built-in troubleshooting tools to view symptoms and isolate the problem.

Break Your Network Settings

  1. Log in as Johnny Appleseed.

  2. Open Network preferences and authenticate as Local Administrator.

  3. Record the currently selected location so that you can return to it at the end of the exercise.

  4. From the Location menu, choose Edit Locations.

  5. Select the current location, and then choose Duplicate Location from the Action (gear icon) menu below the location list.

  6. Name the new location Broken DNS, and click Done.

  7. Switch to the Broken DNS location, if necessary.

  8. Click Apply.

  9. Select the primary network service (the one at the top of the left sidebar), and click Advanced.

  10. Click DNS.

  11. If there are entries in the DNS Servers list, record them so you can reenter them, and use the Remove (–) button to remove them.

  12. Click the Add (+) button under the DNS Servers list, and add the server address 127.0.0.55.

    No DNS server is available at this address. The 127.0.0 prefix (known as the local loopback addresses) is reserved for computers to talk to themselves. But macOS uses 127.0.0.1 for this purpose. As a result, 127.0.0.55 is an invalid address.

    Image
  13. Click TCP/IP.

  14. From the Configure IPv6 menu, choose “Link-local only.”

    Image

    This prevents IPv6 from being an alternate Internet connection.

  15. Click OK, and then click Apply.

Observe the Problem

  1. Open Safari.

  2. Enter www.apple.com in the address bar, and press Return.

    Safari attempts to load the webpage, but it doesn’t get far because it’s not able to reach anything. If you wait, it eventually gives up and displays an error. Don’t wait.

    Image
  3. Quit Safari.

Check the Network Status in Network Preferences

When you have a network problem, one of the first things you should check is the network service status in Network preferences. This enables you to spot simple problems without performing detailed diagnostics.

  1. Open Network preferences.

  2. Examine the status indicators and the network services order.

    If the network service you expect to be active isn’t showing a green status indicator, something is wrong with the connection (for example, a loose cable or your Mac isn’t joined to wireless network) or critical settings are missing (for example, no IP address).

    If the wrong service is at the top of the list, the service order was set incorrectly or unexpected services are active. In this case, the expected service has a green indicator and is at the top of the list, so you must do more troubleshooting.

Use Ping to Test Connectivity

In this section, you use the Network Utility ping tool. You can use ping to test network connectivity and DNS resolution.

  1. Press Command-Space bar to activate Spotlight.

  2. Enter network and click Network Utility in the search results.

    Network Utility might not be the first result.

    Image
  3. In Network Utility, click Ping.

  4. In the “Enter the network address to ping” field, type the domain name of the server you want to reach (www.apple.com).

  5. Enter 5 in the “Send only” field, and make sure it is selected.

  6. Click the Ping button.

    After about 30 seconds, you receive a message telling you that ping couldn’t resolve www.apple.com. The message indicates that the ping tool wasn’t able to use DNS to look up, or resolve, the name www.apple.com and match it to an IP address to send the ping to. In this case, you know that the name www.apple.com is valid because you have used it before, so this indicates that something is wrong with DNS.

    Image

    Although this gives you some information about the problem, it still doesn’t tell you where the problem is. It can be hard to differentiate between a DNS problem and a complete network failure. If DNS resolution is the only thing failing, it can mimic a complete failure because almost all network access starts with (and depends on) a DNS lookup. If the network is completely disconnected, most attempts to use the network fail at the DNS step, so the only symptoms are DNS errors.

    Try to reach a server by its numeric IP address to distinguish between a DNS-only problem and a complete network failure. This bypasses the usual DNS lookup and works even if DNS is broken.

  7. In the “Enter the network address to ping” field, enter the numeric IP address 8.8.8.8. This is an easy-to-remember address of a public server maintained by Google.

  8. Click Ping.

    This time, ping reaches its destination successfully and shows statistics for its five test pings. This tells you that your basic network connectivity is OK and probably only DNS isn’t working.

    Image

Use Lookup to Test DNS

Even though the ping error message “cannot resolve” indicates a DNS problem, try the lookup tool to see if it reveals a more specific error.

  1. In Network Utility, click Lookup.

  2. In the “Enter an Internet address to lookup” field, enter www.apple.com.

  3. Click Lookup.

    After about 30 seconds, you receive a message that the operation couldn’t be completed. This is essentially the same result you got with the ping tool.

    Image

Switch to Working Network Settings

  1. From the Apple menu, choose Locations and click the location you were using at the beginning of this exercise.

    Unlike the Broken DNS location, this one has valid settings, so your Internet connectivity should be back to normal.

  2. In Network Utility, click Lookup again.

    This time the Lookup tool reaches a DNS server and finds the IP address corresponding to the domain name www.apple.com.

    Image

    The address you see may be different from the one shown here because the Apple website is hosted by a number of servers throughout the Internet and uses DNS to direct you to a server near your network location for faster access.

    If you knew the address the name should resolve to, you could verify that, but the fact that it resolved to an IP address at all is a good indication that DNS is working.

  3. Open Safari, and try browsing a website.

    This time, Safari is able to load webpages from the Internet.

Monitor Network Traffic

Use the Network Utility Info pane to view low-level network interface settings and to monitor network throughput for each interface.

  1. Switch to Network Utility, and click Info.

  2. Select your Mac computer’s primary network interface from the menu.

    The left side of the pane shows information about the active network connection, and the right side shows statistics about the network packets sent and received through this interface.

    Image
  3. Arrange the Safari and Network Utility windows so that Safari is in front but not blocking the Transfer Statistics section of the Network Utility window.

  4. In Safari, press Command-R to reload the current page.

    The Sent Packets and Recv Packets entries increase while Safari reloads the current page.

  5. In Network Utility, select another network interface from the menu.

  6. Switch to Safari and reload the current page.

    The packet counts for this interface might increase slightly because of network chatter, but they shouldn’t respond noticeably when you refresh a page in Safari.

    You can use the Info pane of Network Utility to see which network interface your connections are running through.

  7. Quit Safari, Network Utility, and System Preferences.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.156.46