]>
Commit | Line | Data |
---|---|---|
21a22f4c QY |
1 | module frr-vrrpd { |
2 | yang-version 1.1; | |
3 | namespace "http://frrouting.org/yang/vrrpd"; | |
4 | prefix frr-vrrpd; | |
5 | ||
6 | import ietf-inet-types { | |
7 | prefix inet; | |
8 | } | |
9 | ||
10 | import frr-interface { | |
11 | prefix frr-interface; | |
12 | } | |
13 | ||
14 | revision 2019-09-09 { | |
15 | description | |
16 | "Initial revision."; | |
17 | } | |
18 | ||
19 | grouping ip-vrrp-ipv6-config { | |
20 | description | |
21 | "IPv6-specific configuration data for VRRP on IPv6 | |
22 | interfaces"; | |
23 | leaf virtual-link-local { | |
24 | type inet:ip-address; | |
25 | description | |
26 | "For VRRP on IPv6 interfaces, sets the virtual link local | |
27 | address"; | |
28 | } | |
29 | } | |
30 | ||
31 | grouping ip-vrrp-ipv6-state { | |
32 | description | |
33 | "IPv6-specific operational state for VRRP on IPv6 interfaces"; | |
34 | uses ip-vrrp-ipv6-config; | |
35 | } | |
36 | ||
37 | grouping ip-vrrp-tracking-config { | |
38 | description | |
39 | "Configuration data for tracking interfaces | |
40 | in a VRRP group"; | |
41 | leaf-list track-interface { | |
42 | type frr-interface:interface-ref; | |
43 | description | |
44 | "Sets a list of one or more interfaces that should | |
45 | be tracked for up/down events to dynamically change the | |
46 | priority state of the VRRP group, and potentially | |
47 | change the mastership if the tracked interface going | |
48 | down lowers the priority sufficiently. Any of the tracked | |
49 | interfaces going down will cause the priority to be lowered. | |
50 | Some implementations may only support a single | |
51 | tracked interface."; | |
52 | } | |
53 | ||
54 | leaf priority-decrement { | |
55 | type uint8 { | |
56 | range "0..254"; | |
57 | } | |
58 | default "0"; | |
59 | description | |
60 | "Set the value to subtract from priority when | |
61 | the tracked interface goes down"; | |
62 | } | |
63 | } | |
64 | ||
65 | grouping ip-vrrp-tracking-state { | |
66 | description | |
67 | "Operational state data for tracking interfaces in a VRRP | |
68 | group"; | |
69 | } | |
70 | ||
71 | grouping ip-vrrp-tracking-top { | |
72 | description | |
73 | "Top-level grouping for VRRP interface tracking"; | |
74 | container interface-tracking { | |
75 | description | |
76 | "Top-level container for VRRP interface tracking"; | |
77 | container config { | |
78 | description | |
79 | "Configuration data for VRRP interface tracking"; | |
80 | uses ip-vrrp-tracking-config; | |
81 | } | |
82 | ||
83 | container state { | |
84 | config false; | |
85 | description | |
86 | "Operational state data for VRRP interface tracking"; | |
87 | uses ip-vrrp-tracking-config; | |
88 | ||
89 | uses ip-vrrp-tracking-state; | |
90 | } | |
91 | } | |
92 | } | |
93 | ||
94 | grouping ip-vrrp-config { | |
95 | description | |
96 | "Configuration data for VRRP on IP interfaces"; | |
97 | leaf virtual-router-id { | |
98 | type uint8 { | |
99 | range "1..255"; | |
100 | } | |
101 | description | |
102 | "Set the virtual router id for use by the VRRP group. This | |
103 | usually also determines the virtual MAC address that is | |
104 | generated for the VRRP group"; | |
105 | } | |
106 | ||
107 | leaf-list virtual-address { | |
108 | type inet:ip-address; | |
109 | description | |
110 | "Configure one or more virtual addresses for the | |
111 | VRRP group"; | |
112 | } | |
113 | ||
114 | leaf priority { | |
115 | type uint8 { | |
116 | range "1..254"; | |
117 | } | |
118 | default "100"; | |
119 | description | |
120 | "Specifies the sending VRRP interface's priority | |
121 | for the virtual router. Higher values equal higher | |
122 | priority"; | |
123 | } | |
124 | ||
125 | leaf preempt { | |
126 | type boolean; | |
127 | default "true"; | |
128 | description | |
129 | "When set to true, enables preemption by a higher | |
130 | priority backup router of a lower priority master router"; | |
131 | } | |
132 | ||
133 | leaf accept-mode { | |
134 | type boolean; | |
135 | default "true"; | |
136 | description | |
137 | "Configure whether packets destined for | |
138 | virtual addresses are accepted even when the virtual | |
139 | address is not owned by the router interface"; | |
140 | } | |
141 | ||
142 | leaf advertisement-interval { | |
143 | type uint16 { | |
144 | range "1..4095"; | |
145 | } | |
146 | units "centiseconds"; | |
147 | default "100"; | |
148 | description | |
149 | "Sets the interval between successive VRRP | |
150 | advertisements -- RFC 5798 defines this as a 12-bit | |
151 | value expressed as 0.1 seconds, with default 100, i.e., | |
152 | 1 second. Several implementation express this in units of | |
153 | seconds"; | |
154 | } | |
155 | } | |
156 | ||
157 | grouping ip-vrrp-state { | |
158 | description | |
159 | "Operational state data for VRRP on IP interfaces"; | |
160 | leaf current-priority { | |
161 | type uint8; | |
2ea09c73 | 162 | config false; |
21a22f4c QY |
163 | description |
164 | "Operational value of the priority for the | |
165 | interface in the VRRP group"; | |
166 | } | |
167 | } | |
168 | ||
169 | grouping ip-vrrp-top { | |
170 | description | |
171 | "Top-level grouping for Virtual Router Redundancy Protocol"; | |
172 | container vrrp { | |
173 | description | |
174 | "Enclosing container for VRRP groups handled by this | |
175 | IP interface"; | |
176 | reference | |
177 | "RFC 5798 - Virtual Router Redundancy Protocol | |
178 | (VRRP) Version 3 for IPv4 and IPv6"; | |
179 | list vrrp-group { | |
180 | key "virtual-router-id"; | |
181 | description | |
182 | "List of VRRP groups, keyed by virtual router id"; | |
2ea09c73 QY |
183 | |
184 | uses ip-vrrp-config; | |
185 | uses ip-vrrp-state; | |
21a22f4c QY |
186 | } |
187 | } | |
188 | } | |
189 | ||
190 | augment "/frr-interface:lib/frr-interface:interface" { | |
191 | uses ip-vrrp-top; | |
192 | } | |
193 | } |