blob: 4736adeb07ca4cfaa766dd96a8fc585c2541ea1a (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
!
{% if mpls_ldp -%}
mpls ldp
{% if old_router_id -%}
no router-id {{ old_router_id }}
{% endif -%}
{% if router_id -%}
router-id {{ router_id }}
{% endif -%}
{% for neighbor_id in old_ldp.neighbors -%}
no neighbor {{neighbor_id}} password {{old_ldp.neighbors[neighbor_id].password}}
{% if 'ttl_security' is defined -%}
{% if 'disable' in old_ldp.neighbors[neighbor_id].ttl_security %}
no neighbor {{neighbor_id}} ttl-security disable
{% else -%}
no neighbor {{neighbor_id}} ttl-security hops {{old_ldp.neighbors[neighbor_id].ttl_security}}
{% endif -%}
{% endif -%}
{% if 'session_holdtime' is defined -%}
no neighbor {{neighbor_id}} session holdtime {{old_ldp.neighbors[neighbor_id].session_holdtime}}
{% endif -%}
{% endfor -%}
{% for neighbor_id in ldp.neighbors -%}
neighbor {{neighbor_id}} password {{ldp.neighbors[neighbor_id].password}}
{% if 'ttl_security' is defined -%}
{% if 'disable' in ldp.neighbors[neighbor_id].ttl_security %}
neighbor {{neighbor_id}} ttl-security disable
{% else -%}
neighbor {{neighbor_id}} ttl-security hops {{ldp.neighbors[neighbor_id].ttl_security}}
{% endif -%}
{% endif -%}
{% if 'session_holdtime' is defined -%}
neighbor {{neighbor_id}} session holdtime {{ldp.neighbors[neighbor_id].session_holdtime}}
{% endif -%}
{% endfor -%}
!
address-family ipv4
label local allocate host-routes
{% if old_ldp.export_ipv4_exp -%}
no label local advertise explicit-null
{% endif -%}
{% if ldp.export_ipv4_exp -%}
label local advertise explicit-null
{% endif -%}
{% if old_ldp.d_transp_ipv4 -%}
no discovery transport-address {{ old_ldp.d_transp_ipv4 }}
{% endif -%}
{% if ldp.d_transp_ipv4 -%}
discovery transport-address {{ ldp.d_transp_ipv4 }}
{% endif -%}
{% if old_ldp.hello_ipv4_holdtime -%}
no discovery hello holdtime {{ old_ldp.hello_ipv4_holdtime }}
{% endif -%}
{% if ldp.hello_ipv4_holdtime -%}
discovery hello holdtime {{ ldp.hello_ipv4_holdtime }}
{% endif -%}
{% if old_ldp.hello_ipv4_interval -%}
no discovery hello interval {{ old_ldp.hello_ipv4_interval }}
{% endif -%}
{% if ldp.hello_ipv4_interval -%}
discovery hello interval {{ ldp.hello_ipv4_interval }}
{% endif -%}
{% if old_ldp.ses_ipv4_hold -%}
no session holdtime {{ old_ldp.ses_ipv4_hold }}
{% endif -%}
{% if ldp.ses_ipv4_hold -%}
session holdtime {{ ldp.ses_ipv4_hold }}
{% endif -%}
{% for interface in old_ldp.interfaces -%}
no interface {{interface}}
{% endfor -%}
{% for interface in ldp.interfaces -%}
interface {{interface}}
{% endfor -%}
!
!
exit-address-family
!
{% if ldp.d_transp_ipv6 -%}
address-family ipv6
label local allocate host-routes
{% if old_ldp.export_ipv6_exp -%}
no label local advertise explicit-null
{% endif -%}
{% if ldp.export_ipv6_exp -%}
label local advertise explicit-null
{% endif -%}
{% if old_ldp.ses_ipv6_hold -%}
no session holdtime {{ old_ldp.ses_ipv6_hold }}
{% endif -%}
{% if ldp.ses_ipv6_hold -%}
session holdtime {{ ldp.ses_ipv6_hold }}
{% endif -%}
{% if old_ldp.d_transp_ipv6 -%}
no discovery transport-address {{ old_ldp.d_transp_ipv6 }}
{% endif -%}
{% if ldp.d_transp_ipv6 -%}
discovery transport-address {{ ldp.d_transp_ipv6 }}
{% endif -%}
{% if old_ldp.hello_ipv6_holdtime -%}
no discovery hello holdtime {{ old_ldp.hello_ipv6_holdtime }}
{% endif -%}
{% if ldp.hello_ipv6_holdtime -%}
discovery hello holdtime {{ ldp.hello_ipv6_holdtime }}
{% endif -%}
{% if old_ldp.hello_ipv6_interval -%}
no discovery hello interval {{ old_ldp.hello_ipv6_interval }}
{% endif -%}
{% if ldp.hello_ipv6_interval -%}
discovery hello interval {{ ldp.hello_ipv6_interval }}
{% endif -%}
{% for interface in old_ldp.interfaces -%}
no interface {{interface}}
{% endfor -%}
{% for interface in ldp.interfaces -%}
interface {{interface}}
{% endfor -%}
!
exit-address-family
{% else -%}
no address-family ipv6
{% endif -%}
!
{% else -%}
no mpls ldp
{% endif -%}
!
|