7 Network Working Group                                        K. Ishiguro
 
   8 Request for Comments: DRAFT                     Digital Magic Labs, Inc.
 
  17    This draft is very eary beta version.
 
  21    The zebra protocol is a communication protocol between kernel routing
 
  22    table manager and routing protocol daemon. It is built over TCP/IP
 
  25 Request message formats
 
  27    zebra is TCP-based protocol.
 
  29    Below is request packet format.
 
  33      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
 
  34      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  35      |           Length (2)          |   Command (1) |
 
  36      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  39    Length is total packet length.
 
  41    Here is summary of command list.
 
  44      1 - ZEBRA_IPV4_ROUTE_ADD
 
  45      2 - ZEBRA_IPV4_ROUTE_DELETE
 
  46      3 - ZEBRA_IPV6_ROUTE_ADD
 
  47      4 - ZEBRA_IPV6_ROUTE_DELETE
 
  48      5 - ZEBRA_GET_ONE_INTERFACE
 
  49      6 - ZEBRA_GET_ALL_INTERFACE
 
  50      7 - ZEBRA_GET_HOSTINFO
 
  58 Ishiguro                                                FORMFEED[Page 1]
 
  67 IPv4 reply message formats
 
  71      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
 
  74      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  76      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  79    Type field specify route's origin type.
 
  82      1 - ZEBRA_ROUTE_RESERVE
 
  83      2 - ZEBRA_ROUTE_CONNECT
 
  84      3 - ZEBRA_ROUTE_STATIC
 
  91    After above message there can be variale length IPv4 prefix data.
 
  92    Each IPv4 prefix is encoded as a two tuple of the form <masklength,
 
  96      +----------------------+
 
  97      |Subnet mask (1 octet) |
 
  98      +----------------------+
 
  99      |IPv4 prefix (variable)|
 
 100      +----------------------+
 
 103 IPv6 reply message formats
 
 118 Ishiguro                                                FORMFEED[Page 2]
 
 128      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
 
 131      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 133      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 135      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 137      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 139      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 142    Type field specify route's origin type.
 
 145      1 - ZEBRA_ROUTE_RESERVE
 
 146      2 - ZEBRA_ROUTE_CONNECT
 
 147      3 - ZEBRA_ROUTE_STATIC
 
 149      5 - ZEBRA_ROUTE_RIPNG
 
 151      7 - ZEBRA_ROUTE_RADIX
 
 155      +----------------------+
 
 156      |  ifindex   (4 octet) |
 
 157      +----------------------+
 
 158      |  prefixlen  (1 octet)|
 
 159      +----------------------+
 
 160      |IPv6 prefix (variable)|
 
 161      +----------------------+
 
 164    I am not sure but it seems some operation systems IPv6 implementation
 
 165    may need interface index when add and delete linklocal routes.
 
 167    I have added ifindex field to specify IPv6 routes interface index. If
 
 168    this index is value zero, it will ignored.
 
 170 Interface information message format.
 
 178 Ishiguro                                                FORMFEED[Page 3]
 
 188      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
 
 189      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 190      |                      Interface name (20)                      |
 
 191      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 193      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 194      |                       Inteface flag (4)                       |
 
 195      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 196      |                      Inteface metric (4)                      |
 
 197      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 199      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 200      |                    Inteface Address count (4)                 |
 
 201      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 204    Address message format.
 
 206 Host inforamtion message format.
 
 210      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
 
 211      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 212      |IPv4 forwarding|IPv6 forwarding|
 
 213      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 216    Host information contain IPv4/IPv6 forwarding information.
 
 238 Ishiguro                                                FORMFEED[Page 4]