DEBOPS.RADVD(5)

NAME
debops.radvd - Manage Router Advertisement Daemon using Ansible

SYNOPSIS

debops service/radvd [--limit group,host,...] [--diff] [--check] [--tags tag1,tag2,...] [--skip-tags tag1,tag2,...] [<ansible-playbook options>] ...

DESCRIPTION

The radvd <https://en.wikipedia.org/wiki/Radvd>, Router Advertisement Daemon, is used to publish IPv6 subnets, routes, DNS configuration to other hosts on the local network. It's required for the hosts to use SLAAC autoconfiguration.

The debops.radvd Ansible role can be used to install and configure the radvd service. It will detect and automatically configure any network bridges with IPv6 networking enabled.

GETTING STARTED

  Initial configuration

The default radvd installation does not set up any configuration file, and the service does not start correctly without proper configuration in place.

The debops.radvd role will try and autogenerate a radvd configuration based on the host environment. Any bridge interfaces with global IPv6 addresses will be enabled by default and included in the configuration. If you don't have any valid bridges with IPv6 addresses, the role execution will fail because the role will try and restart radvd service on configuration changes.

To avoid the issues with initial configuration, you should ensure that hosts on which you install radvd have proper network configuration. You can use the debops.ifupdown role to create a virtual network bridge or, alternatively, create radvd configuration for any existing interfaces. For example, to offer Router Advertisements on a private, internal network, you can add this configuration to your Ansible inventory:

radvd__interfaces:
  - name: 'eth1'
    options:
      - 'AdvSendAdvert': True
      - 'IgnoreIfMissing': True
    prefixes:
      - name: '::/64'
        options:
          - 'AdvOnLink': True
          - 'AdvAutonomous': True

See radvd__interfaces for information about interface configuration.

  Example inventory

To enable radvd configuration on a host, it needs to be added to the [debops_service_radvd] Ansible inventory group:

[debops_service_radvd]
hostname

  Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses debops.radvd role:

---
- name: Configure Router Advertisement Daemon
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_radvd' ]
  become: True
  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'
  roles:
    - role: radvd
      tags: [ 'role::radvd', 'skip::radvd' ]

DEFAULT VARIABLE DETAILS

Some of debops.radvd default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

  radvd__interfaces

The radvd__*_interfaces variables contain the radvd interface configuration. Each entry represents one interface in the form of a YAML dictionary with specific parameters:

name
    Required. The name of the network interface to configure. This parameter is used to merge multiple interface configurations with the same name together.

comment
    Optional. String or a YAML text block with comments about a particular interface.

state
    Optional. If not specified or present, the interface configuration will ge included in the /etc/radvd.conf configuration file. If absent, the configuration will be removed from the configuration file.

    If init, a given entry will be prepared but not actually included in the finished configuration, this can be used to prepare interface configuration and activate it conditionally.

    If ignore, a given entry will not be taken into account during configuration file generation.

options
    Optional. List with radvd.conf(5) <https://manpages.debian.org/radvd.conf(5)> interface specific options. Each list entry is a YAML dictionary. You can use a simple form, where a dictionary key is an option name, and the dictionary value is its value (use YAML booleans as on/off values):

    radvd__interfaces:
      - name: 'eth1'
        options:
          - 'AdvSendAdvert': True
          - 'IgnoreIfMissing': True

    You can also use an extended form of configuration options with parameters:

name
    The name of a given option.

value
    The value of a given option.

state
    If not specified or present, the option will be included in the configuration file; if absent, the option will be removed from the configuration file.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        options:
          - name: 'AdvSendAdvert'
            value: True
          - name: 'IgnoreIfMissing'
            value: True

    The options parameters from multiple configuration entries with the same name are merged together.

prefix or prefixes
    Optional. List of IPv6 subnets to advertise on this interface. You can specify either a simple string, or a YAML dictionary with specific options:

name
    The prefix to manage on this network interface.

state
    If not specified or present, the prefix will be included in the configuration. If absent, prefix will be removed from the configuration.

options
    Custom radvd.conf options for a given prefix. The format is the same as the options parameter of the interface configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        prefixes:
          - '2001:db8:aaa::/64'
          - name: '2001:db8:bbb::/64'
            options:
              - 'AdvOnLink': True
              - 'AdvAutonomous': True

    The prefix or prefixes parameters from multiple configuration entries with the same name are NOT merged together.

client or clients
    Optional. List of client IPv6 link-local addresses which will be sent advertisements (if not specified, advertisements are sent to all hosts on the local network). You can specify either strings of IPv6 addresses, or use YAML dictionary with specific parameters:

name
    The IPv6 link-local address of the client.

state
    If not specified or present, the client will be included in the configuration. If absent, the client will be removed from the configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        clients:
          - 'fe80::21f:16ff:fe06:3aab'
          - name: 'fe80::21d:72ff:fe96:aaff'
            state: 'present'

    The client or clients parameters from multiple configuration entries with the same name are NOT merged together.

route or routes
    Optional. List of IPv6 routes to advertise on this interface. You can specify either a simple string, or a YAML dictionary with specific options:

name
    The route to manage on this network interface.

state
    If not specified or present, the route will be included in the configuration. If absent, route will be removed from the configuration.

options
    Custom radvd.conf options for a given route. The format is the same as the options parameter of the interface configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        routes:
          - '2001:db8:ccc::/64'
          - name: '2001:db8:ddd::/64'
            options:
              - 'AdvRoutePreference': 'low'
              - 'RemoveRoute': True

    The route or routes parameters from multiple configuration entries with the same name are NOT merged together.

rdnss
    Optional. List of IPv6 nameservers to advertise to the clients. You can specify the addresses as simple strings or use a YAML dictionary with specific parameters:

name
    The IPv6 address of the nameserver.

state
    If not specified or present, the nameserver will be included in the configuration. If absent, nameserver will be removed from the configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        rdnss:
          - '2001:db8::53'
          - name: '2001:db8::5353'
            state: 'present'

    The rdnss parameters from multiple configuration entries with the same name are NOT merged together.

rdnss_options
    Optional. Specify custom RDNSS options. The format is the same as the options parameter of the interface configuration. The rdnss_options parameters from multiple configuration entries with the same name are NOT merged together.

dnssl
    Optional. List of DNS search domains to advertise to the clients. You can specify the search domains as simple strings or use a YAML dictionary with specific parameters:

name
    The DNS search domain to manage.

state
    If not specified or present, the search domain will be included in the configuration. If absent, search domain will be removed from the configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        dnssl:
          - 'example.org'
          - name: 'other.example.org'
            state: 'present'

    The dnssl parameters from multiple configuration entries with the same name are NOT merged together.

dnssl_options
    Optional. Specify custom DNSSL options. The format is the same as the options parameter of the interface configuration. The dnssl_options parameters from multiple configuration entries with the same name are NOT merged together.

abro
    Optional. List of Authoritative Border Router Option definitions. You can specify either a simple string, or a YAML dictionary with specific options:

name
    The IPv6 address of the router to manage.

state
    If not specified or present, the given ABRO options will be included in the configuration. If absent, the ABRO options will be removed from the configuration.

options
    Custom radvd.conf options for a given ABRO configuration. The format is the same as the options parameter of the interface configuration.

    Example:

    radvd__interfaces:
      - name: 'eth1'
        abro:
          - 'fe80::a200:0:0:1'
          - name: 'fe80::a200:0:0:2'
            options:
              - 'AdvVersionLow': '10'
              - 'AdvVersionHigh': '2'
              - 'AdvValidLifetime': '2'

    The abro parameters from multiple configuration entries with the same name are NOT merged together.

AUTHOR
Maciej Delmanowski

COPYRIGHT
2014-2022, Maciej Delmanowski, Nick Janetakis, Robin Schneider and others