Skip to main content

Raymii.org Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Traceroute IPv6 to Smokeping Target config

Published: 05-03-2017 | Author: Remy van Elst | Text only version of this article


Table of Contents


This little one-liner converts the output of traceroute for IPv6 to SmokepingTarget output. This way you can build your smokeping config faster.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Do note you have to setup your IPv6 probe as described here. Later in thisarticle I'll describe the inheritance by example.

I had only setup my smokepings for IPv4. Recently we had an issue were networkconfig was borked and the whole IPv4 network was not announced via BGP anymore.I was at home troubleshooting, but finding nothing since I have native IPv6 andthat part still worked. My Smokeping did show loss, and that explicitly usesIPv4. That helped with the debugging a lot. I have a IPv4 version of thisarticle as well.

You can see smokeping in action here at serverius. More info aboutSmokeping here on the website.

Traceroute one liner

This is the command to get the Smokeping config:

traceroute -6 -w 3 revspace.nl | grep -v "*" | sed -e 's/(//g' -e 's/)//g' | awk '{ gsub(/\./,"_",$2); gsub(/\:/,"_",$2); print "++ "$2"\nmenu = "$2" - "$3"\ntitle = "$2" - "$3"\nhost = "$3"\n"}'

The "*" are grepped out, the () are removed from the IP address and we alsoreplace . and : in the hostname, the Smokeping config doesn't allow that.

Example

This will give you something like this (for tweakers.net:

++ lo0_dr11_d12_xs4all_netmenu = lo0_dr11_d12_xs4all_net - 2001:888:1:1001::1title = lo0_dr11_d12_xs4all_net - 2001:888:1:1001::1host = 2001:888:1:1001::1++ 0_ae21_xr3_3d12_xs4all_netmenu = 0_ae21_xr3_3d12_xs4all_net - 2001:888:1:4024::1title = 0_ae21_xr3_3d12_xs4all_net - 2001:888:1:4024::1host = 2001:888:1:4024::1++ 0_ge-0-2-0_xr1_sara_xs4all_netmenu = 0_ge-0-2-0_xr1_sara_xs4all_net - 2001:888:1:4006::1title = 0_ge-0-2-0_xr1_sara_xs4all_net - 2001:888:1:4006::1host = 2001:888:1:4006::1++ 10ge12-12_core1_ams1_he_netmenu = 10ge12-12_core1_ams1_he_net - 2001:470:0:e8::1title = 10ge12-12_core1_ams1_he_net - 2001:470:0:e8::1host = 2001:470:0:e8::1++ amsix_true_nlmenu = amsix_true_nl - 2001:7f8:1::a501:5703:1title = amsix_true_nl - 2001:7f8:1::a501:5703:1host = 2001:7f8:1::a501:5703:1++ 2001_990_0_1378__1amenu = 2001_990_0_1378__1a - 2001:990:0:1378::1atitle = 2001_990_0_1378__1a - 2001:990:0:1378::1ahost = 2001:990:0:1378::1a++ tweakers_netmenu = tweakers_net - 2001:9a8:0:e:1337:0:80:1title = tweakers_net - 2001:9a8:0:e:1337:0:80:1host = 2001:9a8:0:e:1337:0:80:1

This can be pasted right in to Smokeping's config.

Probe config

On Debian, add the FPing6 probe to /etc/smokeping/config.d/Probes:

*** Probes ***+ FPingbinary = /usr/bin/fping+ FPing6binary = /usr/bin/fping6

The documentation has a bigger example.

The inherentance in the Targets configuration bit me a bit. If your defaultprobe is FPing, you cannot add the probe = FPing6 to a specific check. Youneed to make a seperate section. So instead of this:

+ cloudvpsmenu = cloudvpstitle = CloudVPS++ rt-eu01_cloudvps_nlmenu = rt-eu01_cloudvps_nl - 80.246.207.201title = rt-eu01_cloudvps_nl - 80.246.207.201host = 80.246.207.201++ rt-eq01_cloudvps_nlmenu = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0atitle = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0ahost = 2001:4cb8:40b:1::1d0a

You need to seperate the IPv6 hosts out to a new section:

+ cloudvpsv6menu = cloudvpsv6title = CloudVPS IPv6probe = FPing6++ rt-eq01_cloudvps_nlmenu = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0atitle = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0ahost = 2001:4cb8:40b:1::1d0a

No IPv6?

If a service doesn't have IPv6 setup, it will fail:

reddit.com: Name or service not knownCannot handle "host" cmdline arg `reddit.com' on position 1 (argc 4)

I use the following version of Traceroute:

$ traceroute -VModern traceroute for Linux, version 2.1.0Copyright (c) 2016  Dmitry Butskoy,   License: GPL v2 or any later
Tags: ipv6, network, smokeping, snippets, traceroute