DEV Community

Akkarapon Phikulsri
Akkarapon Phikulsri

Posted on Fully Autonomous

How to Keep Wi-Fi Internet Working When You Connect Ethernet on macOS

I connected an RJ45 cable to my Mac to access a device on a local network. Wi-Fi was still connected, but I could no longer use the internet. I wanted to keep both connections active, with Wi-Fi handling internet traffic and Ethernet handling the local device.

The first thing I checked was the network service order. macOS can have several active network connections, but it uses a priority order when choosing between them. If Ethernet has higher priority than Wi-Fi, connecting the cable can change how the Mac reaches the internet. This is especially worth checking when the Ethernet network is only for local communication.

Check the network service order

Open Terminal with both connections active and run:

networksetup -listnetworkserviceorder
Enter fullscreen mode Exit fullscreen mode

My Mac returned these services in this order:

(1) AX88179A
(Hardware Port: AX88179A, Device: en5)

(2) Linux for Tegra
(Hardware Port: Linux for Tegra, Device: en6)

(3) Thunderbolt Bridge
(Hardware Port: Thunderbolt Bridge, Device: bridge0)

(4) Wi-Fi
(Hardware Port: Wi-Fi, Device: en0)

(5) Tailscale
(6) ProtonVPN
Enter fullscreen mode Exit fullscreen mode

The RJ45 adapter appeared as AX88179A, not Ethernet. It was first in the list, while Wi-Fi was fourth. The output also identified the network interfaces: en5 for the adapter and en0 for Wi-Fi.

These names matter because networksetup expects network service names, not interface names.

Move Wi-Fi to the top

My first attempt was:

sudo networksetup -ordernetworkservices "Wi-Fi" "Ethernet"
Enter fullscreen mode Exit fullscreen mode

It failed with:

Wrong number of network services... No changes have been made.
Enter fullscreen mode Exit fullscreen mode

There were two problems. I had used Ethernet, which was not a service name on my Mac, and I had supplied only two of the six services. The command requires the complete list.

I used the following command to put Wi-Fi first and keep the other services in their original relative order:

sudo networksetup -ordernetworkservices \
  "Wi-Fi" \
  "AX88179A" \
  "Linux for Tegra" \
  "Thunderbolt Bridge" \
  "Tailscale" \
  "ProtonVPN"
Enter fullscreen mode Exit fullscreen mode

If you follow these steps on another Mac, build the command from your own service list. Your adapter name and number of services may be different. Save the original order before changing it so you can restore it later.

Changing the order does not turn off Ethernet or remove its IP configuration.

Verify which connection carries internet traffic

Check the service order again:

networksetup -listnetworkserviceorder
Enter fullscreen mode Exit fullscreen mode

Wi-Fi should now appear first. Next, inspect the route to a public IPv4 address:

route -n get 1.1.1.1
Enter fullscreen mode Exit fullscreen mode

On my Mac, I would expect the following line if internet traffic is going directly through Wi-Fi:

interface: en0
Enter fullscreen mode Exit fullscreen mode

Then test an actual HTTPS connection:

curl -I --connect-timeout 10 https://example.com
Enter fullscreen mode Exit fullscreen mode

An HTTP response confirms that the Mac can resolve that hostname and establish an HTTPS connection. It does not prove that every application or destination will work.

Check the local Ethernet connection

The internet test is only half of the check. I also need to confirm that the local device remains reachable through RJ45.

Replace DEVICE_IP with the device's actual address:

route -n get DEVICE_IP
ping -c 3 DEVICE_IP
Enter fullscreen mode Exit fullscreen mode

For my setup, the route should use en5. A failed ping alone does not prove the connection is broken because some devices do not respond to ICMP. Testing the device's actual service is more useful in that case.

If changing the order does not fix it

Service order is a preference, not a rule that sends all traffic through Wi-Fi. A more specific route can still select Ethernet, which is normally what I want for the local device. However, if Wi-Fi and Ethernet use overlapping IP subnets, macOS may select the wrong interface for some destinations.

VPNs are another important exception. macOS gives VPN connections priority over ordinary network services, so an active VPN may route internet traffic through a tunnel interface even when Wi-Fi is first. A VPN kill switch can also block traffic.

Before changing IP addresses, DNS settings or routes manually, collect the current state:

networksetup -listnetworkserviceorder
route -n get 1.1.1.1
netstat -rn -f inet
scutil --dns
Enter fullscreen mode Exit fullscreen mode

These commands help separate a routing problem from a DNS or VPN problem.

Conclusion

When connecting Ethernet appears to break Wi-Fi internet access on macOS, check the network service order before disabling either connection. In my case, the service list showed the RJ45 adapter above Wi-Fi, making priority a reasonable first fix to test. The important final step is to verify both paths: internet traffic through Wi-Fi and local traffic through Ethernet.

Top comments (0)