How Do You DiagnOSe OSX Internet Connection

Understanding the Functionality of Internet Addressing When connecting to the Internet, you will be assigned either a Public IPv4 address, such as 5.73.94.74, or an IPv6 address, like 2000:5b18:c543:bd16:7706:7ef4:fa82:e062. You can verify this information at https://test-ipv6.com/. However, sharing and communicating these address details, and even referencing MAC addresses like 15:93:9a:4c:6d:d4, can be prone to errors and can become complex very quickly. Understanding the Functionality of Internet Addressing When connecting to the Internet, you will be assigned either a Public IPv4 address, such as 5.73.94.74, or an IPv6 address, like 2000:5b18:c543:bd16:7706:7ef4:fa82:e062. You can verify this information at https://test-ipv6.com/. However, sharing and communicating these address details, and even referencing MAC addresses like 15:93:9a:4c:6d:d4, can be prone to errors and can become complex very quickly.

Understanding the Functionality of Internet Addressing

When connecting to the Internet, you will be assigned either a Public IPv4 address, such as 5.73.94.74, or an IPv6 address, like 2000:5b18:c543:bd16:7706:7ef4:fa82:e062. You can verify this information at https://test-ipv6.com/. However, sharing and communicating these address details, and even referencing MAC addresses like 15:93:9a:4c:6d:d4, can be prone to errors and can become complex very quickly. It also lacks historical data, especially when encountering past issues.

The Process of Accessing the Internet

To access a website such as https://moore.net, the first step is to contact a DNS server to convert the host portion (moore) along with the Top Level Domain (net) of the URL into an IP address, for example, 115.176.5.105. When making web requests, your computer and browser also sends its type, such as:

Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0

Significance of Default Gateways

The default gateway is typically an address that is automatically configured through DHCP. It usually takes the form of an address like 192.168.69.73 (often ending in .1 or .254 depending on the scope size), and it is where your computer sends all its traffic to be further routed. For IPv6, a comprehensive guide on how to address connectivity issues is available at how-to-fix-ipv6-connectivity/. On Mac or Linux systems, the default gateway can be checked with:

<br>
### IPv4 Routes and the Host IPv4 Route Table (inc. VPN)
```netstat -rn -f inet | egrep -i "default|0/1|128.0/1"```

<pre>
0/1      172.18.12.193  UGScg  utun3
default  192.168.69.73    UGScg  en0
128.0/1  172.18.12.193  UGSc   utun3</pre>

**Note:** We are not just looking for the default but also for any VPN that overrides the public v4 address space.

### IPv6 Routes and the Host IPv6 Route Table (inc. VPN)
```netstat -rn -f inet6 | egrep -i "default|2000::/3"```

If you have IPv6 active the above should return at least one route (as per below) via a known interface such as "_en0_ " on a Mac. 

<pre>
default   fe80:fd19:710e:5594:4524%en0  UGcg   en0
default   fe80::%utun0                   UGcIg  utun0
default   fe80::%utun1                   UGcIg  utun1
default   fe80::%utun2                   UGcIg  utun2
2000::/3  utun3                          USc    utun3</pre>

**Note:** We are not just looking for the default but also for any VPN that overrides the public v6 address space.
<br>

## Debugging DHCP for both IPv4 and IPv6

To get a look at the low level DHCP configuration (Mac/Linux): 

```ipconfig getpacket en0```

<pre>
...
domain_name_server (ip_mult): {253.104.124.72, 208.80.237.252}
end (none):
...</pre>

So, in the above we are not getting IPv6 DNS servers from the DHCPv4 reply but...

```ipconfig getv6packet en0```

<pre>
DHCPv6 REPLY (7) Transaction ID 0x80940b Length 76
Options[4] = {
  CLIENTID (1) Length 14: DUID LLT HW 1 Time 668691856 Addr 15:93:9a:4c:6d:d4
  DNS_SERVERS (23) Length 32: 2606:4700:4700::1111, 2001:4860:4860::8844
  DOMAIN_LIST (24) Length 0:  Invalid
  SERVERID (2) Length 10: DUID LL HW 1 Addr 7d:67:6c:bc:94:a7
}</pre>




## Solution for Resolving Wired and Wireless Issues
When it comes to the physical and data layer, the use of either a wired or wireless (Wi-Fi) medium is a common method for transmitting data to the router.
### How to Address Problems on Apple macOS / OSX
Regardless of the version of OSX/macOS being used, whether it's ```10.11.3```, ```11.2.9```, or ```12.1.9```, there are various tools available for troubleshooting. However, these manual actions and scripts do not provide a set of correlated values over time. This is where automated remote troubleshooting becomes more beneficial, especially for teams that have embraced remote work and the concept of Work From Anywhere (WFA).
#### In-Built Scripts That Offer Assistance
One extremely useful tool on OSX/macOS is ```sudo wdutil info```, which provides a dump of current wireless settings to the CLI, and can also be configured to generate specific logs for troubleshooting. Additionally, a more comprehensive tool, ```sysdiagnose```, can be used to generate a wide range of logs (although much of it is specific to a point in time in relation to wireless, similar to wdutil).

Running ```sudo nohup /usr/bin/sysdiagnose -u &``` in the background will write logs to ```/var/tmp/<blah>.tar.gz```. If you want to run it *interactively* (although there isn't much interaction), you can run<br>```sudo /usr/bin/sysdiagnose```, and it will display a privacy warning. When not run in the background, it should open Finder in the correct location, or you can navigate to ```/var/tmp```, or use Finder with Cmd+Shift+G to direct Finder to the path. Just be aware of the file sizes, which are approximately 300MB, more or less.

<br><br>
## Possibly Helpful Videos

<link href="/plugins/lity/css/lity.min.css" rel="stylesheet">
<script src="/plugins/lity/js/lity.min.js"></script>
<div class="table1-start"></div>

|Video | Title | Channel |
| :---: | :---: | :---: |
|<a href="https://www.youtube.com/watch?v=7KdhJimuhNw" data-lity><img src="https://i.ytimg.com/vi/7KdhJimuhNw/default.jpg" class="img-fluid"></a>|<a href="https://www.youtube.com/watch?v=7KdhJimuhNw" data-lity>Securing macOS Big Sur</a>|<a target="_blank" href="https://www.youtube.com/channel/UCg43DP8MdHVcl4rFK_delBg" >Hands-On Mac</a>|
|<a href="https://www.youtube.com/watch?v=RslZ4W1EPqk" data-lity><img src="https://i.ytimg.com/vi/RslZ4W1EPqk/default.jpg" class="img-fluid"></a>|<a href="https://www.youtube.com/watch?v=RslZ4W1EPqk" data-lity>Spotlight on Spotlight - Hands-On Mac 7</a>|<a target="_blank" href="https://www.youtube.com/channel/UCg43DP8MdHVcl4rFK_delBg" >Hands-On Mac</a>|
|<a href="https://www.youtube.com/watch?v=HEbK-Tignuc" data-lity><img src="https://i.ytimg.com/vi/HEbK-Tignuc/default.jpg" class="img-fluid"></a>|<a href="https://www.youtube.com/watch?v=HEbK-Tignuc" data-lity>On the Road to Big Sur 2 - Compatibility</a>|<a target="_blank" href="https://www.youtube.com/channel/UCg43DP8MdHVcl4rFK_delBg" >Hands-On Mac</a>|
|<a href="https://www.youtube.com/watch?v=VwNYWAxHCgM" data-lity><img src="https://i.ytimg.com/vi/VwNYWAxHCgM/default.jpg" class="img-fluid"></a>|<a href="https://www.youtube.com/watch?v=VwNYWAxHCgM" data-lity>Secret Mac Boot Commands - Mac Boot Key Combinations</a>|<a target="_blank" href="https://www.youtube.com/channel/UCg43DP8MdHVcl4rFK_delBg" >Hands-On Mac</a>|
|<a href="https://www.youtube.com/watch?v=TWzWd_DiaJ0" data-lity><img src="https://i.ytimg.com/vi/TWzWd_DiaJ0/default.jpg" class="img-fluid"></a>|<a href="https://www.youtube.com/watch?v=TWzWd_DiaJ0" data-lity>Mac Activity Monitor - How to Troubleshoot Your Mac</a>|<a target="_blank" href="https://www.youtube.com/channel/UCg43DP8MdHVcl4rFK_delBg" >Hands-On Mac</a>|

<center><small>Table 1.0 - Video Help</small></center>
 <br>
<div class="table1-end"></div>
<script type="text/javascript">
(function() {
    $('div.table1-start').nextUntil('div.table1-end', 'table').addClass('table thead-dark table-striped table-responsive rounded').attr('id', 't1');
    $('#t1').find('thead').addClass('thead-dark');
})();
</script>


P.S. Tips For Remote Network and Client Support

Digital work requires reliable connectivity. Whether for low latency or regular data streams, Wi-Fi, DNS, and network issues cause teams to lose time and productivity. Even worse is when support teams waste time trying to recreate and isolate issues! See how PanSift saves time, money, and frustration on all sides with instant remote troubleshooting 🏠🏝🛰.

Design Benefits + 2 Free Agents


Install on any mobile or stationary Mac for immediate visibility.

Click for a frictionless and instant live demo

2x free agents for problem machines and upgrade for more!

Click for a frictionless and instant live demo

Install as remote sensors at any site or location!

Rapid Digital Experience Monitoring for teams, clients, and sites!

Instant Agent

2 x free macOS agents

Live Demo

No registration, immediate live demo!