📄 cs427 components in zebra.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0049)http://wiki.cs.uiuc.edu/cs427/Components+in+Zebra -->
<HTML><HEAD><TITLE>cs427: Components in Zebra</TITLE>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY vLink=#000000 link=#0000ff bgColor=#ffffff><FONT color=#000000>
<TABLE cellSpacing=2 cellPadding=0 width="100%" bgColor=#ffffc0>
<TBODY>
<TR>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/EDIT/Components+in+Zebra">Edit</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/RENAME/Components+in+Zebra">Rename</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/DIFF/11/10/Components+in+Zebra">Changes</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/HISTORY/Components+in+Zebra">History</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/UPLOAD">Upload</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/DOWNLOAD/">Download</A></FONT></TD>
<TD><FONT face=Arial><A href="http://wiki.cs.uiuc.edu/cs427">Back to
Top</A></FONT></TD></TR></TBODY></TABLE>
<H2><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/SEARCH/Components+in+Zebra">Components in
Zebra</A></FONT></H2><!-- unformatted page contents --
--------
[NEXT > http://wiki.cs.uiuc.edu/cs427/Zebra+VTY] [HOME > http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra]
---------
<br>
<center>
[http://wiki.cs.uiuc.edu/cs427/DOWNLOAD/ZebraComponentDiagram.gif]
<br>
<i>Interaction between the components of Zebra</i>
</center>
<br>
<b>VTY</b>
The VTY provides the human-to-computer interface for Zebra. An operator can use the VTY terminal to input commands to change or view configuration. When a user starts a VTY shell, it connects the user to all the daemons running, after authenticating the user. This is done after it has initialized all the commands and command elements. The VTY shell uses the command mechanism provided in the Zebra library. Each process in zebra has a top-level command vector in which various command nodes are installed. Each command node in turn has various command elements installed, containing pointers to actual functions to be called in response to a command entered by the user on the shell. Whenever a user enters a command, VTY fetches the particular command element by using the functions provided in lib and executes the particular function.
<b>Zebra-Kernel Protocol</b>
Zebra supports ioctl, sysctl, proc filsystem, and netlink. Appendix A provides details for each protocol. Netlink makes asynchronous communication between kernel and Zebra possible. To begin communication with the kernel, the Zebra daemon calls kernel_init in which it calls netlink_socket to make a socket for Linux netlink interface. After netlink_socket has been set up, transfer of information between kernel and daemon only involves traditional socket function calls such as sento and receive. [[[FENG>Zebra References]]
<b>Zebra Library</b>
The Zebra library provides many important functions used by almost all the components in Zebra system. It provides the functionality for a client to connect to the zebra daemon. It also provides functions for VTY management and command registration. Implementation of data structures like Linked list, vectors and hashes is also provided in lib and many other things like thread management routine, routing table functions, routemap function, distribute list functions, command interpreter routine for vty, interface functions, zebra logging, buffering of input and output, creation of a daemon, memory management routine, keychain for authentication.
<b>Zebra Protocol </b>
Zebra daemon allows protocol daemons to interact with it by providing an interface that looks like this:
* ZEBRA_IPV4_ROUTE_ADD
* ZEBRA_IPV4_ROUTE_DELETE
* ZEBRA_IPV6_ROUTE_ADD
* ZEBRA_IPV6_ROUTE_DELETE
* ZEBRA_GET_ALL_INTERFACE
* ZEBRA_GET_ONE_INTERFACE
* ZEBRA_GET_HOSTINFO
It therefore makes it possible to add new daemons without having to stop the running system. All that the new daemon has to do is, implement this protocol and then wait to be called when such an event happens.
--------------
[NEXT > http://wiki.cs.uiuc.edu/cs427/Zebra+VTY] [HOME > http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra]
//-- unformatted page contents -->
<P>
<P>
<HR>
<P><A href="http://wiki.cs.uiuc.edu/cs427/Zebra+VTY">NEXT</A>
<A
href="http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra">HOME</A>
<P>
<HR>
<P><BR>
<P>
<P>
<P>
<P>
<CENTER><IMG src="cs427 Components in Zebra_files/ZebraComponentDiagram.gif"
border=0>
<P><BR>
<P><I>Interaction between the components of Zebra</I>
<P></CENTER>
<P><BR>
<P>
<P><B>VTY</B>
<P>The VTY provides the human-to-computer interface for Zebra. An operator can
use the VTY terminal to input commands to change or view configuration. When a
user starts a VTY shell, it connects the user to all the daemons running, after
authenticating the user. This is done after it has initialized all the commands
and command elements. The VTY shell uses the command mechanism provided in the
Zebra library. Each process in zebra has a top-level command vector in which
various command nodes are installed. Each command node in turn has various
command elements installed, containing pointers to actual functions to be called
in response to a command entered by the user on the shell. Whenever a user
enters a command, VTY fetches the particular command element by using the
functions provided in lib and executes the particular function.
<P>
<P><B>Zebra-Kernel Protocol</B>
<P>Zebra supports ioctl, sysctl, proc filsystem, and netlink. Appendix A
provides details for each protocol. Netlink makes asynchronous communication
between kernel and Zebra possible. To begin communication with the kernel, the
Zebra daemon calls kernel_init in which it calls netlink_socket to make a socket
for Linux netlink interface. After netlink_socket has been set up, transfer of
information between kernel and daemon only involves traditional socket function
calls such as sento and receive. [<A
href="http://wiki.cs.uiuc.edu/cs427/Zebra+References">FENG</A>]
<P>
<P><B>Zebra Library</B>
<P>The Zebra library provides many important functions used by almost all the
components in Zebra system. It provides the functionality for a client to
connect to the zebra daemon. It also provides functions for VTY management and
command registration. Implementation of data structures like Linked list,
vectors and hashes is also provided in lib and many other things like thread
management routine, routing table functions, routemap function, distribute list
functions, command interpreter routine for vty, interface functions, zebra
logging, buffering of input and output, creation of a daemon, memory management
routine, keychain for authentication.
<P>
<P><B>Zebra Protocol </B>
<P>Zebra daemon allows protocol daemons to interact with it by providing an
interface that looks like this:
<P>
<UL>
<LI>ZEBRA_IPV4_ROUTE_ADD
<LI>ZEBRA_IPV4_ROUTE_DELETE
<LI>ZEBRA_IPV6_ROUTE_ADD
<LI>ZEBRA_IPV6_ROUTE_DELETE
<LI>ZEBRA_GET_ALL_INTERFACE
<LI>ZEBRA_GET_ONE_INTERFACE
<LI>ZEBRA_GET_HOSTINFO </LI></UL>It therefore makes it possible to add new
daemons without having to stop the running system. All that the new daemon has
to do is, implement this protocol and then wait to be called when such an event
happens.
<P>
<P>
<P>
<HR>
<P><A href="http://wiki.cs.uiuc.edu/cs427/Zebra+VTY">NEXT</A>
<A
href="http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra">HOME</A>
<P>
<HR>
<FORM action=/cs427/SEARCH method=post><INPUT type=hidden value=SEARCH
name=COMMAND> <INPUT type=submit value=Find...> <INPUT size=40
name=SEARCHPATTERN> </FORM>
<TABLE cellSpacing=2 cellPadding=0 width="100%" bgColor=#ffffc0>
<TBODY>
<TR>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/EDIT/Components+in+Zebra">Edit</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/RENAME/Components+in+Zebra">Rename</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/DIFF/11/10/Components+in+Zebra">Changes</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/HISTORY/Components+in+Zebra">History</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/UPLOAD">Upload</A></FONT></TD>
<TD><FONT face=Arial><A
href="http://wiki.cs.uiuc.edu/cs427/DOWNLOAD/">Download</A></FONT></TD>
<TD><FONT face=Arial><A href="http://wiki.cs.uiuc.edu/cs427">Back to
Top</A></FONT></TD></TR></TBODY></TABLE></FONT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -