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