Forge Home

iproute2

Puppet module to manage /etc/iproute2/ configurations

15,699 downloads

10,528 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.4 (latest)
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Sep 21st 2016
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'kernel23-iproute2', '0.1.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add kernel23-iproute2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install kernel23-iproute2 --version 0.1.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

kernel23/iproute2 — version 0.1.4 Sep 21st 2016

#puppet-iproute2

Work in progress.

####Table of Contents

  1. Overview
  2. Usage
  3. Operating Systems Support
  4. Development

##Overview

This module configures iproute2.

##Usage

You have different possibile approaches in the usage of this module.

  • Use iproute2::rt_tables defines directly:

      iproute2::rt_tables {
        '223' => 'isp1',
        '224' => 'isp2',
      }
    
  • Use the main iproute2 class and the iproute2_hash to configure all :

      class { 'iproute2':
        rt_tables_hash => {
        '223' => 'isp1',
        '224' => 'isp2',
          }
      }
    
  • In Hiera, use it like this :

      iproute2::rt_tables" : {
        "223" : "isp1",
        "224" : "isp2"
      }
    

###Route and Rule Configuration

For routes and rules there are two methods of invocation of the module due to differences in how RedHat and Debian store the configurations on disk. RedHat uses a per device configuration while Debian has a unified configuration.

###Debian

  • Add routes :

       routes_hash => [
        {'network' => '1.2.3.0/24', 'gateway' => '10.0.0.1', 'table' => 'isp1'},
        {'network' => '1.2.4.0/24', 'gateway' => '10.0.0.2', 'table' => 'isp2'}
       ]
    
  • Add rules :

      rules_hash => [{'from' => '1.2.3.4', 'to' => '0.0.0.0/0', 'table' => 'isp1', 'priority' => '1000' }],
    

###RedHat

You need to specify the interface/dev as a top level key in the hash

  • add routes :

       routes_hash => [
        'eth0' => [ {'network' => '1.2.3.0/24', 'gateway' => '10.0.0.1', 'table' => 'isp1'},
                    {'network' => '1.2.4.0/24', 'gateway' => '10.0.0.2', 'table' => 'isp2'}
                  ],
        'eth1' => [ {'network' => '1.2.3.0/24', 'gateway' => '10.0.0.1', 'table' => 'isp1'},
                    {'network' => '1.2.4.0/24', 'gateway' => '10.0.0.2', 'table' => 'isp2'}
                  ]
        ]
    
  • Add rules :

      rules_hash => [
        'eth0' => [{'from' => '1.2.3.4', 'to' => '0.0.0.0/0', 'table' => 'isp1', 'priority' => '1000' } ]
      ]
    

##Operating Systems Support

This is tested on these OS:

  • Debian 7, Scientific Linux

##Development

Pull requests (PR) and bug reports via GitHub are welcomed.