Skip to content

Instantly share code, notes, and snippets.

@cobusbernard
Created July 8, 2016 08:57
Show Gist options
  • Save cobusbernard/a11274241738d4dc7b8df02fff487cf7 to your computer and use it in GitHub Desktop.
Save cobusbernard/a11274241738d4dc7b8df02fff487cf7 to your computer and use it in GitHub Desktop.
1) if you’re on (most modern distributions of) linux, forget that `route(1)` even exists (and throw `ifconfig` out in the same go) because it’s just absolutely frustrating. for probably 98% of what you need, `ip(1)` is the cool you care about
generally speaking, these will cover you: `ip route`, `ip address`, `ip link`
2) when dealing with routing problems (​*even if just two hosts next to each other*​), `mtr` > `traceroute` > `ping` is an order that’s useful for a lot of what you need
mtr is nice because you can just let it keep running. press `d` in its display to get a running history breakdown of packets. fantastic for intermittent issues!
traceroute is generally known already, but depending on the complexity of your networks in question you may want `traceroute-nanog` or similar other ones. some of these are ASN-aware, which is useful.
in the same breath as traceroute, something else that’s useful to know about is `tracepath`
it’s a little bit nicer on finding asymm paths
lastly, `ping` ​*is*​ still useful in this, but if you need to start forcing specific kind of pings (pinning a specific source address, forcing a specific source interface, etc), sometimes `fping` can be slightly easier, so do be aware of it as well
oh and re tcpdump, a small gotcha to also be aware of: if you do something like `tcpdump -nvi any -s 0 ….[filters here]…`, you can get weird MAC stuff because of it capturing in promiscuous mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment