9 Overview of the Zebra Protocol
10 ==============================
12 The Zebra protocol is used by protocol daemons to communicate with the
15 Each protocol daemon may request and send information to and from the **zebra**
16 daemon such as interface states, routing state, nexthop-validation, and so on.
17 Protocol daemons may also install routes with **zebra**. The **zebra** daemon
18 manages which routes are installed into the forwarding table with the kernel.
20 The Zebra protocol is a streaming protocol, with a common header. Version 0
21 lacks a version field and is implicitly versioned. Version 1 and all subsequent
22 versions have a version field. Version 0 can be distinguished from all other
23 versions by examining the 3rd byte of the header, which contains a marker value
24 of 255 (in Quagga) or 254 (in FRR) for all versions except version 0. The
25 marker byte corresponds to the command field in version 0, and the marker value
26 is a reserved command in version 0.
33 Used by all versions of GNU Zebra and all version of Quagga up to and
34 including Quagga 0.98. This version has no ``version`` field, and so is
35 implicitly versioned as version 0.
39 Added ``marker`` and ``version`` fields, increased ``command`` field to 16
40 bits. Used by Quagga versions 0.99.3 through 0.99.20.
44 Used by Quagga versions 0.99.21 through 0.99.23.
48 Added ``vrf_id`` field. Used by Quagga versions 0.99.23 until FRR fork.
52 Change marker value to 254 to prevent people mixing and matching Quagga and
53 FRR daemon binaries. Used by FRR versions 2.0 through 3.0.3.
57 Increased VRF identifier field from 16 to 32 bits. Used by FRR versions 4.0
62 Removed the following commands:
64 * ZEBRA_IPV4_ROUTE_ADD
65 * ZEBRA_IPV4_ROUTE_DELETE
66 * ZEBRA_IPV6_ROUTE_ADD
67 * ZEBRA_IPV6_ROUTE_DELETE
69 Used since FRR version 6.0.
72 Zebra Protocol Definition
73 =========================
75 Zebra Protocol Header Field Definitions
76 ---------------------------------------
79 Total packet length including this header.
82 Static marker. The marker value, when it exists, is 255 in all versions of
83 Quagga. It is 254 in all versions of FRR. This is to allow version 0 headers
84 (which do not include version explicitly) to be distinguished from versioned
88 Zebra protocol version number. Clients should not continue processing
89 messages past the version field for versions they do not recognise.
92 The Zebra protocol command.
103 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
104 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
105 | Length | Marker | Version |
106 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
108 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
110 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
121 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
122 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
124 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
131 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
132 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
133 | Length | Marker | Version |
134 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
136 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
144 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
145 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
146 | Length | Marker | Version |
147 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
149 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
152 Zebra Protocol Commands
153 -----------------------
155 +------------------------------------+-------+
157 +====================================+=======+
158 | ZEBRA_INTERFACE_ADD | 0 |
159 +------------------------------------+-------+
160 | ZEBRA_INTERFACE_DELETE | 1 |
161 +------------------------------------+-------+
162 | ZEBRA_INTERFACE_ADDRESS_ADD | 2 |
163 +------------------------------------+-------+
164 | ZEBRA_INTERFACE_ADDRESS_DELETE | 3 |
165 +------------------------------------+-------+
166 | ZEBRA_INTERFACE_UP | 4 |
167 +------------------------------------+-------+
168 | ZEBRA_INTERFACE_DOWN | 5 |
169 +------------------------------------+-------+
170 | ZEBRA_INTERFACE_SET_MASTER | 6 |
171 +------------------------------------+-------+
172 | ZEBRA_ROUTE_ADD | 7 |
173 +------------------------------------+-------+
174 | ZEBRA_ROUTE_DELETE | 8 |
175 +------------------------------------+-------+
176 | ZEBRA_ROUTE_NOTIFY_OWNER | 9 |
177 +------------------------------------+-------+
178 | ZEBRA_REDISTRIBUTE_ADD | 10 |
179 +------------------------------------+-------+
180 | ZEBRA_REDISTRIBUTE_DELETE | 11 |
181 +------------------------------------+-------+
182 | ZEBRA_REDISTRIBUTE_DEFAULT_ADD | 12 |
183 +------------------------------------+-------+
184 | ZEBRA_REDISTRIBUTE_DEFAULT_DELETE | 13 |
185 +------------------------------------+-------+
186 | ZEBRA_ROUTER_ID_ADD | 14 |
187 +------------------------------------+-------+
188 | ZEBRA_ROUTER_ID_DELETE | 15 |
189 +------------------------------------+-------+
190 | ZEBRA_ROUTER_ID_UPDATE | 16 |
191 +------------------------------------+-------+
193 +------------------------------------+-------+
194 | ZEBRA_CAPABILITIES | 18 |
195 +------------------------------------+-------+
196 | ZEBRA_NEXTHOP_REGISTER | 19 |
197 +------------------------------------+-------+
198 | ZEBRA_NEXTHOP_UNREGISTER | 20 |
199 +------------------------------------+-------+
200 | ZEBRA_NEXTHOP_UPDATE | 21 |
201 +------------------------------------+-------+
202 | ZEBRA_INTERFACE_NBR_ADDRESS_ADD | 22 |
203 +------------------------------------+-------+
204 | ZEBRA_INTERFACE_NBR_ADDRESS_DELETE | 23 |
205 +------------------------------------+-------+
206 | ZEBRA_INTERFACE_BFD_DEST_UPDATE | 24 |
207 +------------------------------------+-------+
208 | ZEBRA_IMPORT_ROUTE_REGISTER | 25 |
209 +------------------------------------+-------+
210 | ZEBRA_IMPORT_ROUTE_UNREGISTER | 26 |
211 +------------------------------------+-------+
212 | ZEBRA_IMPORT_CHECK_UPDATE | 27 |
213 +------------------------------------+-------+
214 | ZEBRA_BFD_DEST_REGISTER | 28 |
215 +------------------------------------+-------+
216 | ZEBRA_BFD_DEST_DEREGISTER | 29 |
217 +------------------------------------+-------+
218 | ZEBRA_BFD_DEST_UPDATE | 30 |
219 +------------------------------------+-------+
220 | ZEBRA_BFD_DEST_REPLAY | 31 |
221 +------------------------------------+-------+
222 | ZEBRA_REDISTRIBUTE_ROUTE_ADD | 32 |
223 +------------------------------------+-------+
224 | ZEBRA_REDISTRIBUTE_ROUTE_DEL | 33 |
225 +------------------------------------+-------+
226 | ZEBRA_VRF_UNREGISTER | 34 |
227 +------------------------------------+-------+
228 | ZEBRA_VRF_ADD | 35 |
229 +------------------------------------+-------+
230 | ZEBRA_VRF_DELETE | 36 |
231 +------------------------------------+-------+
232 | ZEBRA_VRF_LABEL | 37 |
233 +------------------------------------+-------+
234 | ZEBRA_INTERFACE_VRF_UPDATE | 38 |
235 +------------------------------------+-------+
236 | ZEBRA_BFD_CLIENT_REGISTER | 39 |
237 +------------------------------------+-------+
238 | ZEBRA_BFD_CLIENT_DEREGISTER | 40 |
239 +------------------------------------+-------+
240 | ZEBRA_INTERFACE_ENABLE_RADV | 41 |
241 +------------------------------------+-------+
242 | ZEBRA_INTERFACE_DISABLE_RADV | 42 |
243 +------------------------------------+-------+
244 | ZEBRA_IPV3_NEXTHOP_LOOKUP_MRIB | 44 |
245 +------------------------------------+-------+
246 | ZEBRA_INTERFACE_LINK_PARAMS | 44 |
247 +------------------------------------+-------+
248 | ZEBRA_MPLS_LABELS_ADD | 45 |
249 +------------------------------------+-------+
250 | ZEBRA_MPLS_LABELS_DELETE | 46 |
251 +------------------------------------+-------+
252 | ZEBRA_IPMR_ROUTE_STATS | 47 |
253 +------------------------------------+-------+
254 | ZEBRA_LABEL_MANAGER_CONNECT | 48 |
255 +------------------------------------+-------+
256 | ZEBRA_LABEL_MANAGER_CONNECT_ASYNC | 49 |
257 +------------------------------------+-------+
258 | ZEBRA_GET_LABEL_CHUNK | 50 |
259 +------------------------------------+-------+
260 | ZEBRA_RELEASE_LABEL_CHUNK | 51 |
261 +------------------------------------+-------+
262 | ZEBRA_FEC_REGISTER | 52 |
263 +------------------------------------+-------+
264 | ZEBRA_FEC_UNREGISTER | 53 |
265 +------------------------------------+-------+
266 | ZEBRA_FEC_UPDATE | 54 |
267 +------------------------------------+-------+
268 | ZEBRA_ADVERTISE_DEFAULT_GW | 55 |
269 +------------------------------------+-------+
270 | ZEBRA_ADVERTISE_SUBNET | 56 |
271 +------------------------------------+-------+
272 | ZEBRA_ADVERTISE_ALL_VNI | 57 |
273 +------------------------------------+-------+
274 | ZEBRA_LOCAL_ES_ADD | 58 |
275 +------------------------------------+-------+
276 | ZEBRA_LOCAL_ES_DEL | 59 |
277 +------------------------------------+-------+
278 | ZEBRA_VNI_ADD | 60 |
279 +------------------------------------+-------+
280 | ZEBRA_VNI_DEL | 61 |
281 +------------------------------------+-------+
282 | ZEBRA_L2VNI_ADD | 63 |
283 +------------------------------------+-------+
284 | ZEBRA_L2VNI_DEL | 64 |
285 +------------------------------------+-------+
286 | ZEBRA_REMOTE_VTEP_ADD | 64 |
287 +------------------------------------+-------+
288 | ZEBRA_REMOTE_VTEP_DEL | 65 |
289 +------------------------------------+-------+
290 | ZEBRA_MACIP_ADD | 66 |
291 +------------------------------------+-------+
292 | ZEBRA_MACIP_DEL | 67 |
293 +------------------------------------+-------+
294 | ZEBRA_IP_PREFIX_ROUTE_ADD | 68 |
295 +------------------------------------+-------+
296 | ZEBRA_IP_PREFIX_ROUTE_DEL | 69 |
297 +------------------------------------+-------+
298 | ZEBRA_REMOTE_MACIP_ADD | 70 |
299 +------------------------------------+-------+
300 | ZEBRA_REMOTE_MACIP_DEL | 71 |
301 +------------------------------------+-------+
302 | ZEBRA_PW_ADD | 72 |
303 +------------------------------------+-------+
304 | ZEBRA_PW_DELETE | 73 |
305 +------------------------------------+-------+
306 | ZEBRA_PW_SET | 74 |
307 +------------------------------------+-------+
308 | ZEBRA_PW_UNSET | 75 |
309 +------------------------------------+-------+
310 | ZEBRA_PW_STATUS_UPDATE | 76 |
311 +------------------------------------+-------+
312 | ZEBRA_RULE_ADD | 77 |
313 +------------------------------------+-------+
314 | ZEBRA_RULE_DELETE | 78 |
315 +------------------------------------+-------+
316 | ZEBRA_RULE_NOTIFY_OWNER | 79 |
317 +------------------------------------+-------+
318 | ZEBRA_TABLE_MANAGER_CONNECT | 80 |
319 +------------------------------------+-------+
320 | ZEBRA_GET_TABLE_CHUNK | 81 |
321 +------------------------------------+-------+
322 | ZEBRA_RELEASE_TABLE_CHUNK | 82 |
323 +------------------------------------+-------+
324 | ZEBRA_IPSET_CREATE | 83 |
325 +------------------------------------+-------+
326 | ZEBRA_IPSET_DESTROY | 84 |
327 +------------------------------------+-------+
328 | ZEBRA_IPSET_ENTRY_ADD | 85 |
329 +------------------------------------+-------+
330 | ZEBRA_IPSET_ENTRY_DELETE | 86 |
331 +------------------------------------+-------+
332 | ZEBRA_IPSET_NOTIFY_OWNER | 87 |
333 +------------------------------------+-------+
334 | ZEBRA_IPSET_ENTRY_NOTIFY_OWNER | 88 |
335 +------------------------------------+-------+
336 | ZEBRA_IPTABLE_ADD | 89 |
337 +------------------------------------+-------+
338 | ZEBRA_IPTABLE_DELETE | 90 |
339 +------------------------------------+-------+
340 | ZEBRA_IPTABLE_NOTIFY_OWNER | 91 |
341 +------------------------------------+-------+
342 | ZEBRA_VXLAN_FLOOD_CONTROL | 92 |
343 +------------------------------------+-------+