fortios_router_multicast – Configure router multicast in Fortinet’s FortiOS and FortiGate.

New in version 2.8.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify router feature and multicast category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
  • router_multicast - Configure router multicast. type: dict
    • interface - PIM interfaces. type: list
      • bfd - Enable/disable Protocol Independent Multicast (PIM) Bidirectional Forwarding Detection (BFD). type: str choices: enable, disable
      • cisco_exclude_genid - Exclude GenID from hello packets (compatibility with old Cisco IOS). type: str choices: enable, disable
      • dr_priority - DR election priority. type: int
      • hello_holdtime - Time before old neighbor information expires (0 - 65535 sec). type: int
      • hello_interval - Interval between sending PIM hello messages (0 - 65535 sec). type: int
      • igmp - IGMP configuration options. type: dict
        • access_group - Groups IGMP hosts are allowed to join. Source router.access-list.name. type: str
        • immediate_leave_group - Groups to drop membership for immediately after receiving IGMPv2 leave. Source router.access-list.name. type: str
        • last_member_query_count - Number of group specific queries before removing group (2 - 7). type: int
        • last_member_query_interval - Timeout between IGMPv2 leave and removing group (1 - 65535 msec). type: int
        • query_interval - Interval between queries to IGMP hosts (1 - 65535 sec). type: int
        • query_max_response_time - Maximum time to wait for a IGMP query response (1 - 25 sec). type: int
        • query_timeout - Timeout between queries before becoming querier for network (60 - 900). type: int
        • router_alert_check - Enable/disable require IGMP packets contain router alert option. type: str choices: enable, disable
        • version - Maximum version of IGMP to support. type: str choices: 3, 2, 1
      • join_group - Join multicast groups. type: list
        • address - Multicast group IP address. type: str required: True
      • multicast_flow - Acceptable source for multicast group. Source router.multicast-flow.name. type: str
      • name - Interface name. Source system.interface.name. type: str required: True
      • neighbour_filter - Routers acknowledged as neighbor routers. Source router.access-list.name. type: str
      • passive - Enable/disable listening to IGMP but not participating in PIM. type: str choices: enable, disable
      • pim_mode - PIM operation mode. type: str choices: sparse-mode, dense-mode
      • propagation_delay - Delay flooding packets on this interface (100 - 5000 msec). type: int
      • rp_candidate - Enable/disable compete to become RP in elections. type: str choices: enable, disable
      • rp_candidate_group - Multicast groups managed by this RP. Source router.access-list.name. type: str
      • rp_candidate_interval - RP candidate advertisement interval (1 - 16383 sec). type: int
      • rp_candidate_priority - Router"s priority as RP. type: int
      • state_refresh_interval - Interval between sending state-refresh packets (1 - 100 sec). type: int
      • static_group - Statically set multicast groups to forward out. Source router.multicast-flow.name. type: str
      • ttl_threshold - Minimum TTL of multicast packets that will be forwarded (applied only to new multicast routes) (1 - 255). type: int
    • multicast_routing - Enable/disable IP multicast routing. type: str choices: enable, disable
    • pim_sm_global - PIM sparse-mode global settings. type: dict
      • accept_register_list - Sources allowed to register packets with this Rendezvous Point (RP). Source router.access-list.name. type: str
      • accept_source_list - Sources allowed to send multicast traffic. Source router.access-list.name. type: str
      • bsr_allow_quick_refresh - Enable/disable accept BSR quick refresh packets from neighbors. type: str choices: enable, disable
      • bsr_candidate - Enable/disable allowing this router to become a bootstrap router (BSR). type: str choices: enable, disable
      • bsr_hash - BSR hash length (0 - 32). type: int
      • bsr_interface - Interface to advertise as candidate BSR. Source system.interface.name. type: str
      • bsr_priority - BSR priority (0 - 255). type: int
      • cisco_crp_prefix - Enable/disable making candidate RP compatible with old Cisco IOS. type: str choices: enable, disable
      • cisco_ignore_rp_set_priority - Use only hash for RP selection (compatibility with old Cisco IOS). type: str choices: enable, disable
      • cisco_register_checksum - Checksum entire register packet(for old Cisco IOS compatibility). type: str choices: enable, disable
      • cisco_register_checksum_group - Cisco register checksum only these groups. Source router.access-list.name. type: str
      • join_prune_holdtime - Join/prune holdtime (1 - 65535). type: int
      • message_interval - Period of time between sending periodic PIM join/prune messages in seconds (1 - 65535). type: int
      • null_register_retries - Maximum retries of null register (1 - 20). type: int
      • register_rate_limit - Limit of packets/sec per source registered through this RP (0 - 65535). type: int
      • register_rp_reachability - Enable/disable check RP is reachable before registering packets. type: str choices: enable, disable
      • register_source - Override source address in register packets. type: str choices: disable, interface, ip-address
      • register_source_interface - Override with primary interface address. Source system.interface.name. type: str
      • register_source_ip - Override with local IP address. type: str
      • register_supression - Period of time to honor register-stop message (1 - 65535 sec). type: int
      • rp_address - Statically configure RP addresses. type: list
        • group - Groups to use this RP. Source router.access-list.name. type: str
        • id - ID. type: int required: True
        • ip_address - RP router address. type: str
      • rp_register_keepalive - Timeout for RP receiving data on (S,G) tree (1 - 65535 sec). type: int
      • spt_threshold - Enable/disable switching to source specific trees. type: str choices: enable, disable
      • spt_threshold_group - Groups allowed to switch to source tree. Source router.access-list.name. type: str
      • ssm - Enable/disable source specific multicast. type: str choices: enable, disable
      • ssm_range - Groups allowed to source specific multicast. Source router.access-list.name. type: str
    • route_limit - Maximum number of multicast routes. type: int
    • route_threshold - Generate warnings when the number of multicast routes exceeds this number, must not be greater than route-limit. type: int

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure router multicast.
    fortios_router_multicast:
      vdom:  "{{ vdom }}"
      router_multicast:
        interface:
         -
            bfd: "enable"
            cisco_exclude_genid: "enable"
            dr_priority: "6"
            hello_holdtime: "7"
            hello_interval: "8"
            igmp:
                access_group: "<your_own_value> (source router.access-list.name)"
                immediate_leave_group: "<your_own_value> (source router.access-list.name)"
                last_member_query_count: "12"
                last_member_query_interval: "13"
                query_interval: "14"
                query_max_response_time: "15"
                query_timeout: "16"
                router_alert_check: "enable"
                version: "3"
            join_group:
             -
                address: "<your_own_value>"
            multicast_flow: "<your_own_value> (source router.multicast-flow.name)"
            name: "default_name_22 (source system.interface.name)"
            neighbour_filter: "<your_own_value> (source router.access-list.name)"
            passive: "enable"
            pim_mode: "sparse-mode"
            propagation_delay: "26"
            rp_candidate: "enable"
            rp_candidate_group: "<your_own_value> (source router.access-list.name)"
            rp_candidate_interval: "29"
            rp_candidate_priority: "30"
            state_refresh_interval: "31"
            static_group: "<your_own_value> (source router.multicast-flow.name)"
            ttl_threshold: "33"
        multicast_routing: "enable"
        pim_sm_global:
            accept_register_list: "<your_own_value> (source router.access-list.name)"
            accept_source_list: "<your_own_value> (source router.access-list.name)"
            bsr_allow_quick_refresh: "enable"
            bsr_candidate: "enable"
            bsr_hash: "40"
            bsr_interface: "<your_own_value> (source system.interface.name)"
            bsr_priority: "42"
            cisco_crp_prefix: "enable"
            cisco_ignore_rp_set_priority: "enable"
            cisco_register_checksum: "enable"
            cisco_register_checksum_group: "<your_own_value> (source router.access-list.name)"
            join_prune_holdtime: "47"
            message_interval: "48"
            null_register_retries: "49"
            register_rate_limit: "50"
            register_rp_reachability: "enable"
            register_source: "disable"
            register_source_interface: "<your_own_value> (source system.interface.name)"
            register_source_ip: "<your_own_value>"
            register_supression: "55"
            rp_address:
             -
                group: "<your_own_value> (source router.access-list.name)"
                id:  "58"
                ip_address: "<your_own_value>"
            rp_register_keepalive: "60"
            spt_threshold: "enable"
            spt_threshold_group: "<your_own_value> (source router.access-list.name)"
            ssm: "enable"
            ssm_range: "<your_own_value> (source router.access-list.name)"
        route_limit: "65"
        route_threshold: "66"

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.