2 @appendix Zebra Protocol
3 @appendixsection Overview of the Zebra Protocol
5 Zebra Protocol is used by protocol daemons to communicate with the
8 Each protocol daemon may request and send information to and from the
9 zebra daemon such as interface states, routing state,
10 nexthop-validation, and so on. Protocol daemons may also install routes
11 with zebra. The zebra daemon manages which route is installed into the
12 forwarding table with the kernel.
14 Zebra Protocol is a streaming protocol, with a common header. Two
15 versions of the header are in use. Version 0 is implicitely versioned.
16 Version 1 has an explicit version field. Version 0 can be distinguished
17 from all other versions by examining the 3rd byte of the header, which
18 contains a marker value for all versions bar version 0. The marker byte
19 corresponds to the command field in version 0, and the marker value is
20 a reserved command in version 0.
22 We do not anticipate there will be further versions of the header for
23 the foreseeable future, as the command field in version 1 is wide
24 enough to allow for future extensions to done compatibly through
27 Version 0 is used by all versions of GNU Zebra as of this writing, and
28 versions of Quagga up to and including Quagga 0.98. Version 1 will be
29 used as of Quagga 1.0.
31 @appendixsection Zebra Protocol Definition
32 @appendixsubsec Zebra Protocol Header (version 0)
36 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
37 +-------------------------------+---------------+
38 | Length (2) | Command (1) |
39 +-------------------------------+---------------+
43 @appendixsubsec Zebra Protocol Common Header (version 1)
47 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
48 +-------------------------------+---------------+-------------+
49 | Length (2) | Marker (1) | Version (1) |
50 +-------------------------------+---------------+-------------+
52 +-------------------------------+
56 @appendixsubsec Zebra Protocol Header Field Definitions
59 Total packet length including this header. The minimum length is 3
60 bytes for version 0 messages and 6 bytes for version 1 messages.
63 Static marker with a value of 255 always. This is to allow version 0
64 Zserv headers (which do not include version explicitely) to be
65 distinguished from versioned headers. Not present in version 0
69 Version number of the Zserv message. Clients should not continue
70 processing messages past the version field for versions they do not
71 recognise. Not present in version 0 messages.
74 The Zebra Protocol command.
77 @appendixsubsec Zebra Protocol Commands
78 @multitable {ZEBRA_REDISTRIBUTE_DEFAULT_DELETE_WHATEVER} {99999}
79 @headitem Command @tab Value
80 @item ZEBRA_INTERFACE_ADD
82 @item ZEBRA_INTERFACE_DELETE
84 @item ZEBRA_INTERFACE_ADDRESS_ADD
86 @item ZEBRA_INTERFACE_ADDRESS_DELETE
88 @item ZEBRA_INTERFACE_UP
90 @item ZEBRA_INTERFACE_DOWN
92 @item ZEBRA_IPV4_ROUTE_ADD
94 @item ZEBRA_IPV4_ROUTE_DELETE
96 @item ZEBRA_IPV6_ROUTE_ADD
98 @item ZEBRA_IPV6_ROUTE_DELETE
100 @item ZEBRA_REDISTRIBUTE_ADD
102 @item ZEBRA_REDISTRIBUTE_DELETE
104 @item ZEBRA_REDISTRIBUTE_DEFAULT_ADD
106 @item ZEBRA_REDISTRIBUTE_DEFAULT_DELETE
108 @item ZEBRA_IPV4_NEXTHOP_LOOKUP
110 @item ZEBRA_IPV6_NEXTHOP_LOOKUP