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!

BuymeaCoffee (€3)

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

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Unless noted otherwise, the contents of this post are licensed under the Creative Commons Attribution 4.0 License and code samples are licensed under the MIT License

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.