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