blob: 234766512c1e7f6fdd70716b1e78675344063ddf [file] [log] [blame]
paul76b89b42004-11-06 17:13:09 +00001@node Zebra Protocol
paul718e3742002-12-13 20:15:29 +00002@appendix Zebra Protocol
3
4Zebra Protocol is a protocol which is used between protocol daemon and
5zebra. Each protocol daemon sends selected routes to zebra daemon. Then
6zebra manages which route is installed into the forwarding table.
7
8Zebra Protocol is a TCP-based protocol. Below is common header of Zebra
9Protocol.
10
11@example
12@group
130 1 2 3
140 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
15+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16| Length (2) | Command (1) |
17+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18@end group
19@end example
20
21Length is total packet length including this header length. So minimum
22length is three. Command is Zebra Protocol command.
23
24@example
25ZEBRA_INTERFACE_ADD 1
26ZEBRA_INTERFACE_DELETE 2
27ZEBRA_INTERFACE_ADDRESS_ADD 3
28ZEBRA_INTERFACE_ADDRESS_DELETE 4
29ZEBRA_INTERFACE_UP 5
30ZEBRA_INTERFACE_DOWN 6
31ZEBRA_IPV4_ROUTE_ADD 7
32ZEBRA_IPV4_ROUTE_DELETE 8
33ZEBRA_IPV6_ROUTE_ADD 9
34ZEBRA_IPV6_ROUTE_DELETE 10
35ZEBRA_REDISTRIBUTE_ADD 11
36ZEBRA_REDISTRIBUTE_DELETE 12
37ZEBRA_REDISTRIBUTE_DEFAULT_ADD 13
38ZEBRA_REDISTRIBUTE_DEFAULT_DELETE 14
39ZEBRA_IPV4_NEXTHOP_LOOKUP 15
40ZEBRA_IPV6_NEXTHOP_LOOKUP 16
41@end example
42
43@example
44@group
450 1 2 3
460 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
47+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48| Type | Flags |
49+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
50@end group
51@end example