Default route breaks with concurrent Wifi and Ethernet

Platform is MBP with Sierra 10.12.5. MBP is connected to an infrastructure Wifi AP. If I connect an Ethernet cable between the MBP and an external device, the Wifi network becomes inaccessible, even though the Wifi dropdown menu shows an active association with the AP, and netstat shows all the routes bound to that interface. A new default route to the Ethernet network has been inserted ahead of the default route for the wifi interface. Using the IP address, I can still ping the Wifi AP, so the Wifi IP network is still established. I can't ping any network that should be reachable via the Wifi gateway - "ping 8.8.8.8" fails, for example. Deleting the Ethernet default network does NOT fix the routing issue. What am I doing wrong? Detaching the ethernet cable restores full Wifi service (routes work).


In the following netstat dump, 192.168.23.1 is the Wifi AP, 192.168.1.1 is the remote Ethernet endpoint. These are separate subnets, but to avoid confusion I've reproduced the problem using the 10.0.1.0 net. I've reproduced it on my home network and with a coffee shop hotspot. The Ethernet network works perfectly, and the Wifi network becomes fully functional again when I unplug the cable. Is this some sort of auto-join issue?


ifconfig

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384

options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>

inet 127.0.0.1 netmask 0xff000000

inet6 ::1 prefixlen 128

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1

nd6 options=201<PERFORMNUD,DAD>

gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280

stf0: flags=0<> mtu 1280

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether --:--:--:--:--:--

inet6 fe80::9d:15b3:d6b0:2bc1%en0 prefixlen 64 secured scopeid 0x4

inet 192.168.23.127 netmask 0xffffff00 broadcast 192.168.23.255

nd6 options=201<PERFORMNUD,DAD>

media: autoselect

status: active

en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500

options=60<TSO4,TSO6>

ether --:--:--:--:--:--

media: autoselect <full-duplex>

status: inactive

en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500

options=60<TSO4,TSO6>

ether --:--:--:--:--:--

media: autoselect <full-duplex>

status: inactive

p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304

ether --:--:--:--:--:--

media: autoselect

status: inactive

awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484

ether --:--:--:--:--:--

inet6 fe80::5805:56ff:fea5:7101%awdl0 prefixlen 64 scopeid 0x8

nd6 options=201<PERFORMNUD,DAD>

media: autoselect

status: active

bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

options=63<RXCSUM,TXCSUM,TSO4,TSO6>

ether --:--:--:--:--:--

Configuration:

id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0

maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200

root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0

ipfilter disabled flags 0x2

member: en1 flags=3<LEARNING,DISCOVER>

ifmaxaddr 0 port 5 priority 0 path cost 0

member: en2 flags=3<LEARNING,DISCOVER>

ifmaxaddr 0 port 6 priority 0 path cost 0

nd6 options=201<PERFORMNUD,DAD>

media: <unknown type>

status: inactive

utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000

inet6 fe80::8e00:3e41:ba55:c8d2%utun0 prefixlen 64 scopeid 0xa

nd6 options=201<PERFORMNUD,DAD>

vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether --:--:--:--:--:--

inet 192.168.187.1 netmask 0xffffff00 broadcast 192.168.187.255

vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether --:--:--:--:--:--

inet 192.168.27.1 netmask 0xffffff00 broadcast 192.168.27.255

en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>

ether --:--:--:--:--:--

inet6 fe80::ed:c7fb:e2be:e04a%en4 prefixlen 64 secured scopeid 0xd

inet 192.168.1.19 netmask 0xffffff00 broadcast 192.168.1.255

nd6 options=201<PERFORMNUD,DAD>

media: autoselect (100baseTX <full-duplex,flow-control>)

status: active

--------------------------------------------------------------------------

netstat -nr -f inet

Routing tables

Internet:

Destination Gateway Flags Refs Use Netif Expire

default 192.168.1.1 UGSc 3 0 en4

default 192.168.23.1 UGScI 2 0 en0

127 127.0.0.1 UCS 0 0 lo0

127.0.0.1 127.0.0.1 UH 10 2016445 lo0

169.254 link#13 UCS 0 0 en4

169.254 link#4 UCSI 0 0 en0

192.168.1 link#13 UCS 1 0 en4

192.168.1.1/32 link#13 UCS 1 0 en4

192.168.1.1 --:--:--:--:--:-- UHLWIir 9 105 en4 1184

192.168.1.19/32 link#13 UCS 0 0 en4

192.168.1.255 --:--:--:--:--:-- UHLWbI 0 22 en4

192.168.23 link#4 UCS 4 0 en0

192.168.23.1/32 link#4 UCS 1 0 en0

192.168.23.1 --:--:--:--:--:-- UHLWIir 4 16 en0 1194

192.168.23.105 --:--:--:--:--:-- UHLWIi 2 27 en0 1177

192.168.23.126 --:--:--:--:--:-- UHLWIi 1 43 en0 1158

192.168.23.127/32 link#4 UCS 0 0 en0

192.168.23.255 --:--:--:--:--:-- UHLWbI 0 27 en0

192.168.27 link#12 UC 3 0 vmnet8

192.168.27.1 -:--:--:--:-:8 UHLWI 0 168 lo0

192.168.27.255 --:--:--:--:--:-- UHLWbI 0 31 vmnet8

192.168.187 link#11 UC 2 0 vmnet1

192.168.187.1 -:--:--:--:-:- UHLWIi 1 5 lo0

192.168.187.255 --:--:--:--:--:-- UHLWbI 0 31 vmnet1

224.0.0/4 link#13 UmCS 1 0 en4

224.0.0/4 link#4 UmCSI 0 0 en0

224.0.0.251 -:-:--:-:-:-- UHmLWI 0 32 en4

255.255.255.255/32 link#13 UCS 0 0 en4

255.255.255.255/32 link#4 UCSI 0 0 en0

Answered by catalunya in 243431022

I figured out that I had to use Network Preferences to change the service order of wifi and ethernet (put wifi back on top). This of course changes the order of the two default routes, so the default via wifi appears first now.


I still do not understand why removing the default route via Ethernet using the "route" command - leaving only the original default route via wifi - did NOT fix the problem.

Accepted Answer

I figured out that I had to use Network Preferences to change the service order of wifi and ethernet (put wifi back on top). This of course changes the order of the two default routes, so the default via wifi appears first now.


I still do not understand why removing the default route via Ethernet using the "route" command - leaving only the original default route via wifi - did NOT fix the problem.

I came across this in 2024 on Sonoma 14.4. I learned that the way to re-arrange the service order of networks was not intuitive so I'm adding a comment here.

Go to System Settings -> Network then click on the ... on the bottom right and select Set Service Order and then move the interfaces around as you like.

The other way to do this is via the command line.

First, use networksetup -listnetworkserviceorder to list the interfaces names.

Then use networksetup -ordernetworkservices <service1> <service2> etc command to select the order you want.

Default route breaks with concurrent Wifi and Ethernet
 
 
Q