mrtg−ipv6 − IPv6 support in MRTG


MRTG and cfgmaker support SNMP over IPv6. IPv6 targets can be specified by hostname or IPv6 address, and if the required libraries are present (see below), queries will use IPv6.


Enabling IPv6
IPv6 is currently disabled by default and must be explicitly enabled. In MRTG this is done by turning on the EnableIPv6 global option in the configuration file. In cfgmaker, it is enabled with the −−enable−ipv6 command-line option.

If IPv6 is disabled, MRTG and cfgmaker should behave in exactly the same way as previous versions. So the addition of IPv6 support should have no effect on existing MRTG setups unless IPv6 is enabled.

IPv6 support requires the Socket6 and INET6 libraries (see below). If MRTG can’t find them, IPv6 is disabled.

Specifying IPv6 targets
IPv6 targets may be specified by name or IPv6 address. Numeric IPv6 addresses may be used with both cfgmaker and MRTG , but they must be enclosed in square brackets.

For example, a target could be specified as:


Hostnames work as expected: first an IPv6 name lookup is tried, then an IPv4 lookup.

Targets that do not support SNMP over IPv6
Many targets (this currently includes all Cisco routers) 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 the name maps to both the IPv6 address and the IPv4 address of the target: MRTG will only try IPv6, and will fail.

To query these targets, use the IPv4Only per-target option, which tells MRTG not to use SNMP over IPv6 for the target.

MRTG does not fall back to IPv4 for performance and correctness reasons. 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 figure out what is wrong.

cfgmaker 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. If the target answers, cfgmaker sets the IPv4Only option in the generated config file.


Libraries required
IPv6 support requires the Socket6 and INET6 Perl modules. Both can be downloaded from CPAN:

If you use Debian, you will 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 note that 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

and then:

 make install

If you have installed the libraries successfully, cfgmaker and mrtg should automatically detect them and allow IPv6 support to be enabled.


Lorenzo Colitti <lorenzo location>


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.