Show the routing tables on Mac / Linux

In a project we at vBridge are working on, we rely on a Virtual Private Network to link our connected devices, certain servers, and our webapp together. I had an issue where a specific server in the 10.55/24 range was nog being reachable.

While debugging the issue — going deeper into the rabbit hole called the 5 Whys — I eventually needed to verify if the proper routing tables from the VPN connection had been set up or not. To do so, I used netstat:

$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags        Netif Expire
default            192.168.83.1       UGSc           en0       
default            link#19            UCSI        utun10    
10.77/16           10.77.0.5          UGSc        utun10       
10.77.0.5          10.77.0.5          UH          utun10       
127                127.0.0.1          UCS            lo0       
127.0.0.1          127.0.0.1          UH             lo0       
169.254            link#5             UCS            en0      !
192.168.83         link#5             UCS            en0      !
192.168.83.1/32    link#5             UCS            en0      !
…
255.255.255.255    ff:ff:ff:ff:ff:ff  UHLWbI         en0      !
255.255.255.255/32 link#19            UCSI        utun10      

…

As you can see, the 10.55/24 route indeed wasn’t registered indeed, explaining why the host wasn’t reachable.

Did this help you out? Like what you see?
Thank me with a coffee.

I don't do this for profit but a small one-time donation would surely put a smile on my face. Thanks!

☕️ Buy me a Coffee (€3)

To stay in the loop you can follow @bramus or follow @bramusblog on Twitter.

Open Source Routing Machine (OSRM)

osrm

The Open Source Routing Machine (OSRM) is a C++ implementation of a high-performance routing engine for shortest paths in road networks. It combines sophisticated routing algorithms with the open and free road network data of the OpenStreetMap (OSM) project. OSRM is able to compute and output a shortest path between any origin and destination within a few miliseconds.

Open Source Routing Machine (OSRM) →
Open Source Routing Machine (OSRM) Demo →