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

📄 draft-zebra-00.ms

📁 大名鼎鼎的路由器源码。程序分ZEBRA、OSPFRIP等3个包。程序框架采用一个路由协议一个进程的方式
💻 MS
字号:
.pl 10.0i.po 0.ll 7.2i.lt 7.2i.nr LL 7.2i.nr LT 7.2i.ds LF Ishiguro.ds RF FORMFEED[Page %].ds CF.ds LH RFC DRAFT.ds RH March 1998.ds CH.hy 0.ad lNetwork Working Group                                        K. IshiguroRequest for Comments: DRAFT                     Digital Magic Labs, Inc.                                                              March 1998.sp 2.ceZebra Protocol Draft.sp 2.fi.ne 4Status of this Memo.sp.in 3This draft is very eary beta version..sp.in 0.ne 4Introduction.sp.in 3The zebra protocol is a communication protocol between kernelrouting table manager and routing protocol daemon. It is built overTCP/IP protocol suite..sp.in 0.ne 4Request message formats.sp.in 3zebra is TCP-based protocol..spBelow is request packet format..sp.in 0.DS0                   1                   2                   30 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) |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.DE.sp.in 3Length is total packet length..spHere is summary of command list..sp.in 0.DS1 - ZEBRA_IPV4_ROUTE_ADD2 - ZEBRA_IPV4_ROUTE_DELETE3 - ZEBRA_IPV6_ROUTE_ADD4 - ZEBRA_IPV6_ROUTE_DELETE5 - ZEBRA_GET_ONE_INTERFACE6 - ZEBRA_GET_ALL_INTERFACE7 - ZEBRA_GET_HOSTINFO.DE.sp.in 0.ne 4IPv4 reply message formats.sp.in 0.DS0                   1                   2                   30 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)                        |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.DE.sp.in 3Type field specify route's origin type..sp.in 0.DS1 - ZEBRA_ROUTE_RESERVE2 - ZEBRA_ROUTE_CONNECT3 - ZEBRA_ROUTE_STATIC4 - ZEBRA_ROUTE_RIP5 - ZEBRA_ROUTE_RIPNG6 - ZEBRA_ROUTE_BGP7 - ZEBRA_ROUTE_RADIX.DE.sp.in 3After above message there can be variale length IPv4 prefix data.Each IPv4 prefix is encoded as a two tuple of the form <masklength,prefix>.sp.in 0.DS+----------------------+|Subnet mask (1 octet) |+----------------------+|IPv4 prefix (variable)|+----------------------+.DE.sp.in 0.ne 4IPv6 reply message formats.sp.in 0.DS0                   1                   2                   30 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)                        |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|                                                               |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|                                                               |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.DE.sp.in 3Type field specify route's origin type..sp.in 0.DS1 - ZEBRA_ROUTE_RESERVE2 - ZEBRA_ROUTE_CONNECT3 - ZEBRA_ROUTE_STATIC4 - ZEBRA_ROUTE_RIP5 - ZEBRA_ROUTE_RIPNG6 - ZEBRA_ROUTE_BGP7 - ZEBRA_ROUTE_RADIX.DE.sp.in 0.DS+----------------------+|  ifindex   (4 octet) |+----------------------+|  prefixlen  (1 octet)|+----------------------+|IPv6 prefix (variable)|+----------------------+.DE.sp.in 3I am not sure but it seems some operation systems IPv6implementation may need interface index when add and deletelinklocal routes..spI have added ifindex field to specify IPv6 routes interfaceindex. If this index is value zero, it will ignored..sp.in 0.ne 4Interface information message format..sp.in 0.DS0                   1                   2                   30 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)                 |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.DE.sp.in 3Address message format..sp.in 0.ne 4Host inforamtion message format..sp.in 0.DS0                   1                   2                   30 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|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.DE.sp.in 3Host information contain IPv4/IPv6 forwarding information.

⌨️ 快捷键说明

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