1. Knowledge about the zebra Function
Zebra provides a hierarchical multi-user Command Parsing engine-vty (virtual terminal) for Cisco command lines ). It is a virtual terminal interface similar to Linux Shell and is responsible for security authentication, data buffering, Command Parsing, mode switching, and command calling for access.
Each time you access a vtysh interface, a corresponding vty is initiated. Vty initializes and mounts the command node of the command set based on the user's priority. The command node contains the commands that the user can access and use in the form of a linked list.
You can access vty through various interfaces. vty parses each of your commands and finds and executes the corresponding command function through the command set linked list. In this way, you can access vty to implement command set-based management.
2. Zebra Architecture
Zebra adopts a modular architecture. The entire program consists of a series of daemon processes. Each routing protocol has its own route processing process. At the same time, it provides a zebra daemon for managing kernel route tables. The routing handler manages the kernel route table through the zebra daemon.
The figure shows that in zebra, there are a total of five routing daemon and a management process. These routing processes and management processes can be distributed on different machines. Each process can listen to vty connections from different ports.
3. Compile zebra for my use
Common routing products can be used with zebra with slight changes. If you only need the vty connection function and use interfaces to add, modify, and delete commands, Zebra supports module deletion and blocking.
For example, if you only need vty, you can add the following parameters during congfigure compilation.
...
CD .. /ZEBRA-vtysh & (test-e config. status | (touch config. status &&. /configure -- disable-ipv6 -- disable-bgpd -- disable-ripngd -- disable-ospf6d -- disable-BGP-announce -- enable-vtysh -- disable-ospfd -- disable-ripd -- disable-Zebra
-- Prefix =/-- With-cflags = "-O2-wall" -- Build = i386 -- Host = MIPS-Linux -- target = MIPS ))&&
...
(Config. Status indicates the configure status record for future use)
In this way, after compiling zebra, you can run vtysh and view its various modes (as described in the next article) to start your happy journey.
Reference: http://www.zebra.org