]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/protocol.rst
doc: cleanup multiple
[mirror_frr.git] / doc / user / protocol.rst
CommitLineData
42fc5d26
QY
1.. _Zebra_Protocol
2
3**************
4Zebra Protocol
5**************
6
7Overview of the Zebra Protocol
8==============================
718e3744 9
ab2416a0
PJ
10Zebra Protocol is used by protocol daemons to communicate with the
11zebra daemon.
718e3744 12
ab2416a0
PJ
13Each protocol daemon may request and send information to and from the
14zebra daemon such as interface states, routing state,
15nexthop-validation, and so on. Protocol daemons may also install routes
16with zebra. The zebra daemon manages which route is installed into the
17forwarding table with the kernel.
718e3744 18
ab2416a0
PJ
19Zebra Protocol is a streaming protocol, with a common header. Two
20versions of the header are in use. Version 0 is implicitely versioned.
21Version 1 has an explicit version field. Version 0 can be distinguished
22from all other versions by examining the 3rd byte of the header, which
23contains a marker value for all versions bar version 0. The marker byte
24corresponds to the command field in version 0, and the marker value is
25a reserved command in version 0.
26
27We do not anticipate there will be further versions of the header for
28the foreseeable future, as the command field in version 1 is wide
29enough to allow for future extensions to done compatibly through
30seperate commands.
31
32Version 0 is used by all versions of GNU Zebra as of this writing, and
80e71dcd
DS
33versions of Quagga up to and including Quagga 0.98. Version 2 was created
34for 0.99.21 of Quagga. Version 3 designates VRF compatibility and was
dc1046f7 35released in 1.0. Version 4 will be used as of FRR 2.0 to indicate that
80e71dcd
DS
36we are a different Routing Suite now and to hopefully prevent accidental
37Quagga <-> FRR issues.
ab2416a0 38
42fc5d26
QY
39Zebra Protocol Definition
40=========================
41
42Zebra Protocol Header (version 0)
43----------------------------------
44
45::
46
47 0 1 2 3
48 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
49 +-------------------------------+---------------+
50 | Length (2) | Command (1) |
51 +-------------------------------+---------------+
52
53
54Zebra Protocol Common Header (version 1)
55----------------------------------------
56
57::
58
59 0 1 2 3
60 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
61 +-------------------------------+---------------+-------------+
62 | Length (2) | Marker (1) | Version (1) |
63 +-------------------------------+---------------+-------------+
64 | Command (2) |
65 +-------------------------------+
66
67
68Zebra Protocol Header Field Definitions
69---------------------------------------
70
ab2416a0
PJ
71@table @samp
72@item Length
73Total packet length including this header. The minimum length is 3
74bytes for version 0 messages and 6 bytes for version 1 messages.
75
76@item Marker
77Static marker with a value of 255 always. This is to allow version 0
78Zserv headers (which do not include version explicitely) to be
79distinguished from versioned headers. Not present in version 0
80messages.
81
82@item Version
83Version number of the Zserv message. Clients should not continue
84processing messages past the version field for versions they do not
85recognise. Not present in version 0 messages.
86
87@item Command
88The Zebra Protocol command.
89@end table
90
42fc5d26
QY
91Zebra Protocol Commands
92-----------------------
93
ab2416a0
PJ
94@multitable {ZEBRA_REDISTRIBUTE_DEFAULT_DELETE_WHATEVER} {99999}
95@headitem Command @tab Value
a8c90e15 96@item ZEBRA_INTERFACE_ADD
ab2416a0
PJ
97@tab 1
98@item ZEBRA_INTERFACE_DELETE
99@tab 2
100@item ZEBRA_INTERFACE_ADDRESS_ADD
101@tab 3
102@item ZEBRA_INTERFACE_ADDRESS_DELETE
103@tab 4
104@item ZEBRA_INTERFACE_UP
105@tab 5
106@item ZEBRA_INTERFACE_DOWN
107@tab 6
108@item ZEBRA_IPV4_ROUTE_ADD
109@tab 7
110@item ZEBRA_IPV4_ROUTE_DELETE
111@tab 8
112@item ZEBRA_IPV6_ROUTE_ADD
113@tab 9
114@item ZEBRA_IPV6_ROUTE_DELETE
115@tab 10
116@item ZEBRA_REDISTRIBUTE_ADD
117@tab 11
118@item ZEBRA_REDISTRIBUTE_DELETE
119@tab 12
120@item ZEBRA_REDISTRIBUTE_DEFAULT_ADD
121@tab 13
122@item ZEBRA_REDISTRIBUTE_DEFAULT_DELETE
123@tab 14
124@item ZEBRA_IPV4_NEXTHOP_LOOKUP
125@tab 15
126@item ZEBRA_IPV6_NEXTHOP_LOOKUP
127@tab 16
128@end multitable