{"id":516,"date":"2014-07-16T11:26:44","date_gmt":"2014-07-16T15:26:44","guid":{"rendered":"http:\/\/devolve.net\/blog\/?p=516"},"modified":"2014-10-23T13:40:01","modified_gmt":"2014-10-23T17:40:01","slug":"its-the-routing-table-stupid","status":"publish","type":"post","link":"https:\/\/www.devolve.local\/its-the-routing-table-stupid\/","title":{"rendered":"It’s the routing table, stupid!"},"content":{"rendered":"

It only took three years for the frustration to build up sufficiently. :-) Finally I went a little deeper to try to solve the mystery of the 30 second hang time before requests to my Linux guest VM would return. I love doing testing on a Linux guest VM via VirtualBox while working on my Mac, but the occasional slow down (with no load on the VM) drove me to the brink of madness.<\/p>\n

I had assumed for a while that it was some complicated (potentially Mac-related) DNS asshattery. No. It’s the routing table, stupid! I finally noticed that this wasn’t right at all.
\n
\n$ route -n
\nKernel IP routing table
\nDestination Gateway Genmask Flags Metric Ref Use Iface
\n0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth2
\n10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
\n169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth3
\n192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
\n192.168.56.0 192.168.56.1 255.255.255.0 UG 0 0 0 eth4
\n192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
\n<\/code>
\nSo after some fiddling, I added this to my \/etc\/rc.local:
\n
\nroute -v add -host 192.168.56.2 gw 192.168.56.1 eth4
\nroute -v del -net 192.168.56.0\/24 gw 0.0.0.0 eth4
\n<\/code>
\nIt is a host-only interface after all. Now the table looks far more sensible.
\n
\n$ route -n
\nKernel IP routing table
\nDestination Gateway Genmask Flags Metric Ref Use Iface
\n0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth2
\n10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
\n169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth3
\n192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
\n192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
\n192.168.56.2 192.168.56.1 255.255.255.255 UGH 0 0 0 eth4
\n<\/code>
\nHope that helps someone in the same boat.<\/p>\n","protected":false},"excerpt":{"rendered":"

It only took three years for the frustration to build up sufficiently. :-) Finally I went a little deeper to try to solve the mystery of the 30 second hang time before requests to my Linux guest VM would return. I love doing testing on a Linux guest VM via VirtualBox while working on my […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[34,31,26,32,19,33],"_links":{"self":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/516"}],"collection":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/comments?post=516"}],"version-history":[{"count":2,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/516\/revisions\/518"}],"wp:attachment":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/media?parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/categories?post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/tags?post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}