MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
September
Sun Mon Tue Wed Thu Fri Sat
           
11
           
2012
Months
Sep


Tue, Sep 11, 2012 5:17 pm

Bad Route to Host

After switching from a wireless connection to a wired connection on a MacBook Pro laptop running Mac OS X 10.6.8, I was no longer able to access a website I needed to access to establish a VPN connection to a remote network.I had a VPN connection established before switching from the wireless to the wired network. When I plugged the network cable into the laptop for a wired connection I also changed the network settings under System Preferences on the system by selecting "Turn AirPort Off" to ensure the wireless connection would not be used. Afterwards, when I tried pinging the destination system using the wired connection, I saw the following:
$ ping vpn.example.com
PING vpn.example.com (10.0.56.76): 56 data bytes
ping: sendto: Network is down
ping: sendto: Network is down
Request timeout for icmp_seq 0
ping: sendto: Network is down
Request timeout for icmp_seq 1
ping: sendto: Network is down
Request timeout for icmp_seq 2
ping: sendto: Network is down
Request timeout for icmp_seq 3
cping: sendto: Network is down
Request timeout for icmp_seq 4
ping: sendto: Network is down
Request timeout for icmp_seq 5
ping: sendto: Network is down
Request timeout for icmp_seq 6
cping: sendto: Network is down
Request timeout for icmp_seq 7
ping: sendto: Network is down
Request timeout for icmp_seq 8
ping: sendto: Network is down
Request timeout for icmp_seq 9
^C
--- vpn.example.com ping statistics ---
11 packets transmitted, 0 packets received, 100.0% packet loss

To determine why I was getting the "Network is down" message, I checked the route for the IP address associated with the destination system.

$ route get 10.0.56.76
   route to: vpn.example.com
destination: vpn.example.com
    gateway: 192.168.1.1
  interface: en1
      flags: <UP,GATEWAY,HOST,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0      3411        67        67         0      1500         0

I noticed the gateway, i.e., router address, was pointing to the wireless router's IP address, 192.168.1.1, rather than the IP address for router for the wired connection, 192.168.0.1. But when I checked the default route, I saw it was correct.

$ route get default
   route to: default
destination: default
       mask: default
    gateway: 192.168.0.1
  interface: en0
      flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

I flushed the routing table. Note: you must put the sudo command before the route flush command, if you are not logged in as root, but the account you are using is allowed to administer the computer, and then supply your password in order to execute the route flush command as you must be root to alter the routing table.

$ route flush
route: must be root to alter routing table
$ sudo route flush
default              192.168.2.1          done
route: write to routing socket: No such process
got only -1 for rlen

After then disconnecting the network cable from the laptop and then reconnecting it, I then saw the correct route for the webserver through the wired router, which had IP address 192.168.0.1, and was able to ping it.

$ route get 10.0.56.76
   route to: vpn.example.com
destination: default
       mask: default
    gateway: 192.168.0.1
  interface: en0
      flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0 
$ ping 10.0.56.76
PING 10.0.56.76 (10.0.56.76): 56 data bytes
64 bytes from 10.0.56.76: icmp_seq=0 ttl=57 time=19.955 ms
64 bytes from 10.0.56.76: icmp_seq=1 ttl=57 time=21.017 ms
^C
--- 10.0.56.76 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 19.955/20.486/21.017/0.531 ms

I was then also able to access the website using Safari. I had not been able to do so when I previously had tried just disconnecting and reconnecting the network cable without flushing the routing table.

[/os/os-x] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo