⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 draft-zebra-00.txt

📁 大名鼎鼎的路由器源码。程序分ZEBRA、OSPFRIP等3个包。程序框架采用一个路由协议一个进程的方式
💻 TXT
字号:
Network Working Group                                        K. IshiguroRequest for Comments: DRAFT                     Digital Magic Labs, Inc.                                                              March 1998                          Zebra Protocol DraftStatus of this Memo   This draft is very eary beta version.Introduction   The zebra protocol is a communication protocol between kernel routing   table manager and routing protocol daemon. It is built over TCP/IP   protocol suite.Request message formats   zebra is TCP-based protocol.   Below is request packet format.     0                   1                   2                   3     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     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |           Length (2)          |   Command (1) |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Length is total packet length.   Here is summary of command list.     1 - ZEBRA_IPV4_ROUTE_ADD     2 - ZEBRA_IPV4_ROUTE_DELETE     3 - ZEBRA_IPV6_ROUTE_ADD     4 - ZEBRA_IPV6_ROUTE_DELETE     5 - ZEBRA_GET_ONE_INTERFACE     6 - ZEBRA_GET_ALL_INTERFACE     7 - ZEBRA_GET_HOSTINFOIshiguro                                                FORMFEED[Page 1]RFC DRAFT                                                     March 1998IPv4 reply message formats     0                   1                   2                   3     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     +-+-+-+-+-+-+-+-+     |    Type (1)   |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                            Gateway (4)                        |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Type field specify route's origin type.     1 - ZEBRA_ROUTE_RESERVE     2 - ZEBRA_ROUTE_CONNECT     3 - ZEBRA_ROUTE_STATIC     4 - ZEBRA_ROUTE_RIP     5 - ZEBRA_ROUTE_RIPNG     6 - ZEBRA_ROUTE_BGP     7 - ZEBRA_ROUTE_RADIX   After above message there can be variale length IPv4 prefix data.   Each IPv4 prefix is encoded as a two tuple of the form <masklength,   prefix>     +----------------------+     |Subnet mask (1 octet) |     +----------------------+     |IPv4 prefix (variable)|     +----------------------+IPv6 reply message formatsIshiguro                                                FORMFEED[Page 2]RFC DRAFT                                                     March 1998     0                   1                   2                   3     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     +-+-+-+-+-+-+-+-+     |    Type (1)   |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                                                               |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                           Gateway (16)                        |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                                                               |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                                                               |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Type field specify route's origin type.     1 - ZEBRA_ROUTE_RESERVE     2 - ZEBRA_ROUTE_CONNECT     3 - ZEBRA_ROUTE_STATIC     4 - ZEBRA_ROUTE_RIP     5 - ZEBRA_ROUTE_RIPNG     6 - ZEBRA_ROUTE_BGP     7 - ZEBRA_ROUTE_RADIX     +----------------------+     |  ifindex   (4 octet) |     +----------------------+     |  prefixlen  (1 octet)|     +----------------------+     |IPv6 prefix (variable)|     +----------------------+   I am not sure but it seems some operation systems IPv6 implementation   may need interface index when add and delete linklocal routes.   I have added ifindex field to specify IPv6 routes interface index. If   this index is value zero, it will ignored.Interface information message format.Ishiguro                                                FORMFEED[Page 3]RFC DRAFT                                                     March 1998     0                   1                   2                   3     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     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                      Interface name (20)                      |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |   Index (1)   |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                       Inteface flag (4)                       |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                      Inteface metric (4)                      |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                        Inteface MTU (4)                       |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |                    Inteface Address count (4)                 |     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Address message format.Host inforamtion message format.     0                   1                   2                   3     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     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |IPv4 forwarding|IPv6 forwarding|     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Host information contain IPv4/IPv6 forwarding information.Ishiguro                                                FORMFEED[Page 4]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -