summaryrefslogtreecommitdiff
path: root/data/templates/nhrp/opennhrp.conf.tmpl
blob: e9e9f692ac5188ecbffa5887d620d5459e256bd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Created by VyOS - manual changes will be overwritten

{% if tunnel is defined and tunnel is not none %}
{%   for name, tunnel_conf in tunnel.items() %}
{%     set type = 'spoke' if tunnel_conf.map is defined or tunnel_conf.dynamic_map is defined else 'hub' %}
{%     set profile_name = profile_map[name] if profile_map is defined and name in profile_map else '' %}
interface {{ name }} #{{ type }} {{ profile_name }}
{%     if tunnel_conf.map is defined and tunnel_conf.map is not none %}
{%       for map, map_conf in tunnel_conf.map.items() %}
{%         set cisco = ' cisco' if map_conf.cisco is defined else '' %}
{%         set register = ' register' if map_conf.register is defined else '' %}
    map {{ map }} {{ map_conf.nbma_address }}{{ register }}{{ cisco }}
{%       endfor %}
{%     endif %}
{%     if tunnel_conf.dynamic_map is defined and tunnel_conf.dynamic_map is not none %}
{%       for map, map_conf in tunnel_conf.dynamic_map.items() %}
    dynamic-map {{ map }} {{ map_conf.nbma_domain_name }}
{%       endfor %}
{%     endif %}
{%     if tunnel_conf.cisco_authentication is defined and tunnel_conf.cisco_authentication is not none %}
    cisco-authentication {{ tunnel_conf.cisco_authentication }}
{%     endif %}
{%     if tunnel_conf.holding_time is defined and tunnel_conf.holding_time is not none %}
    holding-time {{ tunnel_conf.holding_time }}
{%     endif %}
{%     if tunnel_conf.multicast is defined and tunnel_conf.multicast is not none %}
    multicast {{ tunnel_conf.multicast }}
{%     endif %}
{%     for key in ['non_caching', 'redirect', 'shortcut', 'shortcut_destination'] %}
{%       if key in tunnel_conf %}
    {{ key | replace("_", "-") }}
{%       endif %}
{%     endfor %}
{%     if tunnel_conf.shortcut_target is defined and tunnel_conf.shortcut_target is not none %}
{%       for target, shortcut_conf in tunnel_conf.shortcut_target.items() %}
    shortcut-target {{ target }}{{ ' holding-time ' + shortcut_conf.holding_time if shortcut_conf.holding_time is defined }}
{%       endfor %}
{%     endif %}

{%   endfor %}
{% endif %}