OK, this problem has been driving me nuts for days now. I'm typically a linux guy, so while I'm comfortable with the command line stuff. I have no idea where to look on OSX. And typical googling is of no help.
Here's my problem. When I setup the box, it was on one network, which was
10.x.x.x. That was fine. Now, when I bring it home, I bring up the network interface, connect to my home wireless and attempt to ping stuff:
$ ping google.com PING google.com (220.127.116.11): 56 data bytes Request timeout for icmp_seq 0 ^C --- google.com ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss colossus:~ eteran$ ping google.com PING google.com (18.104.22.168): 56 data bytes ping: sendto: No route to host Request timeout for icmp_seq 0 ping: sendto: No route to host Request timeout for icmp_seq 1
"No route to host", OK, so I check the routing tables...
$ netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.255.255.1 UGSc 11 5 en1 10.255.255.1/32 link#5 UCS 1 0 en1 10.255.255.1 link#5 UHRLWI 12 0 en1 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 19 2051 lo0 169.254 link#5 UCS 0 0 en1 192.168.10 link#5 UCS 4 0 en1 192.168.10.1 0:1f:90:23:7a:69 UHLWI 12 62 en1 1193 192.168.10.7 c0:cb:38:6c:3:33 UHLWI 2 164 en1 996 192.168.10.9 127.0.0.1 UHS 1 369 lo0 192.168.10.10 0:1a:a0:e6:ee:90 UHLWI 0 30 en1 903 192.168.10.255 link#5 UHLWbI 2 25 en1 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 fe80::1%lo0 Uc lo0 fe80::1%lo0 link#1 UHL lo0 fe80::%en1/64 link#5 UC en1 fe80::5ab0:35ff:fe7b:dcf3%en1 58:b0:35:7b:dc:f3 UHL lo0 ff01::/32 ::1 Um lo0 ff02::/32 ::1 UmC lo0 ff02::/32 link#5 UmC en1
Yup, there's the problem, the default route is set to
10.255.255.1. Which I assume was from the other network. I can manually adjust this with the
route command. But next reboot... it's back!
My home network's router is
192.168.10.1, so of course I want that to be the default route. And I looked, the DHCP request are definitely saying to use that as the default route. But OSX simply refuses to use it. It insists on using this default route the previous connection!
Where is this stored and how can I change it?