What does this bogus route (0&0x68 c8.c8.c8.c8...) mean in my routing table?

This is fresh after a reboot, on a wireless network which is known to be a little flaky. The first line is unlike anything I've seen before:

$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
0&0x68             c8.c8.c8.c8.c8.c8.c8.c8.c8.8.0.0.8.ff.ff.ff.0.0.0.68.80.0.5.14.4.0.f.1e.3.8.1.0.7.0.0.0.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.7f.ff.ff.ff.0.0.0.0.a8.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.10.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.10.2.0.0.ac.13.80.1.4.0.0.0.0.0.0.0.0.0.0.0.80.0.5.14.4.0.f.1e.5.0.6.5.3.0.0.0.0.0.0.0.1.8.1.0.0.0.0.0.4.0.0.0.7f.ff.ff.ff.0.0.0.0.a8.5.0.0.0.0.0.0.20.7.10.51 USc             9        0     en0
default            172.19.128.1       UGSc           11        0     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              4      155     lo0
172.19.128/20      link#4             UCS             2        0     en0
172.19.128.1       0:b:86:61:f2:70    UHLWIir        12       14     en0   1177
172.19.129.189     127.0.0.1          UHS             0        0     lo0
172.19.143.255     ff:ff:ff:ff:ff:ff  UHLWbI          0        6     en0

The first entry is very sticky; even taking down the network interface doesn't kill it. It isn't recognized by route delete. I need to restart the OS to get rid of it. It makes the system entirely unusable, since it causes network connections to fail:

$ telnet www.google.com 80
Trying 74.125.141.104...
telnet: connect to address 74.125.141.104: Cannot allocate memory
telnet: Unable to connect to remote host

What's going on here, and how can I fix it when it happens without a reboot?


Although I couldn't reproduce it on my MacBook Pro (OS X 10.8.2), some users have reported a similar behavior, including the creation of a bogus route:

Destination        Gateway            Flags        Refs      Use   Netif Expire
(...)
128.0&0x8600  ff.ff.ff.ff.0.0.0.0.0.0.0.0.5.ff.ff.ff.86.0.0.0.88.0.5.14.5.0.68.c.1.9.0.0.7.0. 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.7f.ff.ff.ff.0.0.0.0.dc.5.0.0.0.0.0.0.8d.c.5a .4f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.10.2.0.0.a9.fe.0.0.0.0.0.0.0.0.0.0.14.12.5.0.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .6.ff.ff.ff.ff.ff.0.0.7c.0.5.14.1.0.68.c.7.8.0.0.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 .0.0.0.0.7f.ff.ff.ff.0.0.0.0.0.40.0.0.0.0.0.0.0.0.0.0.0.c0.0.0.0.c0.0.0.0.0.0.0. 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.10.2.0.0.ac.1c.84 USc             0        4     en0

when putting the computer to sleep while using a VPN connection over WiFi. This doesn't seem to be your case, as you see such a route right after starting your Mac.

I can't tell you what's going wrong here, but there is a post in the link above that mentions that it could be fixed without a reboot like this:

Turning off tcp/ip and turning it back on worked like a charm.

If you want to give it a try, open System Preferences, select the Network pane and, if necessary, click the lock icon to make changes:

enter image description here

Select your open connection from the list on the left hand side (Ethernet or WiFi), press the button Advanced..., select the TCP/IP tab, set Configure IPv4 to Off:

enter image description here

and confirm by pressing OK. Set TCP/IP back to its original setting.

Hope it helps.


To fix the issue from the command line, or remotely:

interfacetofix=`netstat -r -f inet | grep "0&" | awk '{print $NF}'`
interfacenametofix=`networksetup -listnetworkserviceorder | grep "$interfacetofix" -B1 | tail -2 | head -1 | cut -d " " -f 2-10`
networksetup -setv4off "$interfacenametofix"; networksetup -setdhcp "$interfacenametofix"

This disables IPv4 on the interface with the bad route and re-enables DHCP. For manually entered IP addresses:

interfacetofix=`netstat -r -f inet | grep "0&" | awk '{print $NF}'`
interfacenametofix=`networksetup -listnetworkserviceorder | grep "$interfacetofix" -B1 | tail -2 | head -1 | cut -d " " -f 2-10`
interfaceIP=`networksetup -getinfo "$interfacenametofix" | grep "^IP address:" | awk '{print $NF}'`
interfaceSubnet=`networksetup -getinfo "$interfacenametofix" | grep "Subnet mask:" | awk '{print $NF}'`
interfaceRouter=`networksetup -getinfo "$interfacenametofix" | grep "^Router:" | awk '{print $NF}'`
networksetup -setv4off "$interfacenametofix"; networksetup -setmanual "$interfacenametofix" "$interfaceIP" "$interfaceSubnet" "$interfaceRouter"

For full details on what does what and why I use this specific code: http://briancanfixit.blogspot.com/2014/05/fix-juniper-network-connect-on-mac-bad.html