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

📄 cs427 zebra vty.htm

📁 zebra免费软件
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://wiki.cs.uiuc.edu/cs427/Zebra+VTY -->
<HTML><HEAD><TITLE>cs427: Zebra VTY</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/Zebra+VTY">Edit</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/RENAME/Zebra+VTY">Rename</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/DIFF/8/7/Zebra+VTY">Changes</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/HISTORY/Zebra+VTY">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/Zebra+VTY">Zebra VTY</A></FONT></H2><!-- unformatted page contents --


--------

[NEXT > http://wiki.cs.uiuc.edu/cs427/Zebra+Command+System] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [HOME > http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra]

--------


<br>


All daemons listen on a particular port and VTY allow a user to connect and interact with a daemon via the telnet protocol. When a user connects to a daemon, the VTY shell in turn tries to connect to all the daemons and open a socket with them. VTY shell also initializes all the command nodes and command elements. 

The VTY shell then accepts user commands and executes them. One interesting but irrelevant fact is that the VTY changes its prompt depending on the command given by the user. This is possible because each command node has its own command prompt initialized in its structure. 

VTY uses the command subsystem to execute the command inputted by the user. 

The View Mode in VTY is for read-only access to the CVI while the Enable Mode is for read-write access. VTY has other modes for other purposes like tftp etc.

After all the initialization and configuration, the main() method in the file vtysh_main.c loops over the user input on the VTY and continues passing each line read to the vtysh_execute() method in the file vtysh.c. This method converts the user command into a vector and calls the cmd_execute_command method in the file command.c.

After a few sanity checks, if the command is successful, the cmd variable gets set to the parsed value of the user command (called matched_element). If the daemon element of the matched_element struct exists, CMD_SUCCESS_DAEMON is returned as the status to the caller.  In case the daemon element is non-existent, this method executes the user command using all the gathered arguments. The 慶md?variable is later used to determine the further command sequence to be carried out, such as 慶onfigure terminal?




------------

[NEXT > http://wiki.cs.uiuc.edu/cs427/Zebra+Command+System] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [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+Command+System">NEXT</A> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A 
href="http://wiki.cs.uiuc.edu/cs427/Software+Architecture+of+Zebra">HOME</A> 
<P>
<HR>

<P>
<P><BR>
<P>
<P>All daemons listen on a particular port and VTY allow a user to connect and 
interact with a daemon via the telnet protocol. When a user connects to a 
daemon, the VTY shell in turn tries to connect to all the daemons and open a 
socket with them. VTY shell also initializes all the command nodes and command 
elements. 
<P>The VTY shell then accepts user commands and executes them. One interesting 
but irrelevant fact is that the VTY changes its prompt depending on the command 
given by the user. This is possible because each command node has its own 
command prompt initialized in its structure. 
<P>VTY uses the command subsystem to execute the command inputted by the user. 
<P>The View Mode in VTY is for read-only access to the CVI while the Enable Mode 
is for read-write access. VTY has other modes for other purposes like tftp etc. 
<P>After all the initialization and configuration, the main() method in the file 
vtysh_main.c loops over the user input on the VTY and continues passing each 
line read to the vtysh_execute() method in the file vtysh.c. This method 
converts the user command into a vector and calls the cmd_execute_command method 
in the file command.c. 
<P>After a few sanity checks, if the command is successful, the cmd variable 
gets set to the parsed value of the user command (called matched_element). If 
the daemon element of the matched_element struct exists, CMD_SUCCESS_DAEMON is 
returned as the status to the caller. In case the daemon element is 
non-existent, this method executes the user command using all the gathered 
arguments. The 慶md?variable is later used to determine the further command 
sequence to be carried out, such as 慶onfigure terminal? 
<P>
<P>
<P>
<P>
<HR>

<P><A href="http://wiki.cs.uiuc.edu/cs427/Zebra+Command+System">NEXT</A> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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/Zebra+VTY">Edit</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/RENAME/Zebra+VTY">Rename</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/DIFF/8/7/Zebra+VTY">Changes</A></FONT></TD>
    <TD><FONT face=Arial><A 
      href="http://wiki.cs.uiuc.edu/cs427/HISTORY/Zebra+VTY">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 + -