MRTG-IPV6(1)
π MRTG-IPV6 π
okay bestie, so this is the mrtg-ipv6 page from the mrtg manual set β it's literally all about how IPv6 works inside MRTG. pull up a chair, we're doing this π«Ά
β¨ NAME β¨
mrtg-ipv6 β IPv6 support in MRTG
π OVERVIEW π
so MRTG and cfgmaker both support SNMP over IPv6, which is iconic of them. you can point an IPv6 target at a hostname or an actual IPv6 address, and if the right libraries are chilling on your system (more on those below, don't worry), the queries will go out over IPv6. slay π
π USAGE π
πΈ Enabling IPv6 πΈ
heads up: IPv6 is currently disabled by default and you have to explicitly turn it on. no sneaky auto-enable, that's not the vibe.
- in MRTG, you flip it on by turning on the
EnableIPv6global option in the configuration file - in cfgmaker, you turn it on with the
--enable-ipv6command-line option
if IPv6 stays disabled, MRTG and cfgmaker should behave in exactly the same way as previous versions. so bestie, adding IPv6 support should have zero effect on your existing MRTG setups unless you go and enable IPv6 yourself. no cap.
also, IPv6 support requires the Socket6 and INET6 libraries (see below π). if MRTG can't find them, IPv6 is disabled. that's just how it is.
π¦ Specifying IPv6 targets π¦
IPv6 targets can be specified by name or by IPv6 address. numeric IPv6 addresses work with both cfgmaker and MRTG, but they must be enclosed in square brackets. this is not optional, it's giving mandatory.
for example, a target could be specified as:
public@[2001:760:4::]:161
hostnames work exactly as expected: first an IPv6 name lookup is tried, and then an IPv4 lookup. easy.
π Targets that do not support SNMP over IPv6 π
many targets β and yes, this currently includes all Cisco routers, sorry β do not yet support SNMP over IPv6 and must be monitored over IPv4.
this can cause problems if you specify a target through its DNS name and that name maps to both the IPv6 address and the IPv4 address of the target: MRTG will only try IPv6, and it will fail. π
to query these targets, use the IPv4Only per-target option, which tells MRTG not to use SNMP over IPv6 for that target.
MRTG does not fall back to IPv4, and that's on purpose β performance and correctness reasons, bestie:
- if there are many routers to query, a timeout for every router would make MRTG take too long to query them all
- and if, for some reason, IPv6 connectivity to the target is lost, MRTG's error messages can help you figure out what is actually wrong
cfgmaker, on the other hand, does fall back from IPv6 to IPv4. if IPv6 is enabled and cfgmaker is given a hostname that resolves to both an IPv6 and an IPv4 address, it first tries to query the target over IPv6. if it receives no answer, it tries again using IPv4. and if the target answers, cfgmaker sets the IPv4Only option in the generated config file. see? teamwork. π«Ά
π IPv6 LIBRARIES π
π Libraries required π
IPv6 support requires the Socket6 and INET6 Perl modules. both can be downloaded from CPAN:
if you're on Debian, you'll need the packages libsocket6-perl and libio-socket-inet6-perl, which are (or should soon be) in unstable.
so far, IPv6 support has been tested on Linux only, and only with Socket6 version 0.12. also, huge note: IPv6 won't work at all if you don't have INET6.pm version 2.00 or newer. π¨
π§ Installing the libraries π§
building and installing Socket6 and INET6 is very simple. for each module, just unpack the archive and then do:
perl Makefile.PL
make
and then:
su
make install
if you've installed the libraries successfully, cfgmaker and mrtg should automatically detect them and allow IPv6 support to be enabled. periodt. β¨
π AUTHOR π
Lorenzo Colitti <lorenzo location colitti.com>
and that's the whole page, bestie!! this was mrtg version 2.17.10, dated 2022-01-19, brought to you with love from the mrtg manual. go enable some IPv6, you main character ππβ¨
π¦ where this page comes from
- alpine 3.22: mrtg-doc 2.17.10-r1 Β· GPL-2.0-or-later
- alpine 3.23: mrtg-doc 2.17.10-r1 Β· GPL-2.0-or-later
- alpine 3.24: mrtg-doc 2.17.10-r2 Β· GPL-2.0-or-later
- centos-stream 10: mrtg 2.17.10-13.el10 Β· GPL-2.0-or-later
- debian bookworm: mrtg 2.17.10-5+deb12u2 Β· GPL-2.0-or-later
- debian trixie: mrtg 2.17.10-13+deb13u2 Β· GPL-2.0-or-later
- fedora 43: mrtg 2.17.10-12.fc43 Β· GPL-2.0-or-later
- fedora 43: mrtg 2.17.10-13.fc43 Β· GPL-2.0-or-later
- fedora 44: mrtg 2.17.10-13.fc44 Β· GPL-2.0-or-later
- fedora 44: mrtg 2.17.10-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mrtg 2.17.10
- nixpkgs unstable: mrtg 2.17.10
- ubuntu jammy: mrtg 2.17.10-3 Β· GPL-2.0-or-later
- ubuntu noble: mrtg 2.17.10-12 Β· GPL-2.0-or-later
- ubuntu questing: mrtg 2.17.10-13
- ubuntu resolute: mrtg 2.17.10-14 Β· GPL-2.0-or-later
- ubuntu stonking: mrtg 2.17.10-16 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms