Zebra Introduction and Installation
Speaking of routing software, my first impression was the Cisco IOS. This is a Cisco independent development of the closed-source router software; when it comes to open source routing software, it is interesting to note that the two difficult brothers software: Zebra (Zebra) and Quagga (spotted Donkey). People who have done firewalls, switches, or routers should understand what the CLI is, and what the command-line interface means. Through the command line interface, the operator sends the device configuration (ACL, etc.), status query (traffic statistics, etc.) to the device in order to configure its working status (such as isolating port, filtering data stream, suppressing storm, preventing various attacks, etc.). These interfaces are presented in the form of the CLI, and the colloquial configuration makes the complex configuration easier.
Zebra, described earlier, stopped updating after the release of ZEBRA-0.95A in 2005. Later modified version will zebra as daemon, release new version renamed Quagga, maintained by savannah.gnu.org this organization.
And my earliest contact with Zebra was the year of graduation, in April 2011, when the first company made a network analyzer based on MIPS and Intel XScale (dedicated to the network security Department, which integrates monitoring, collection and analysis as one of the intelligent Network monitoring devices). And because I did a Cisco product-based network architecture project on the Cisco emulator: Cisco Packet Tracer. So when I learned that there was a routing software that was comparable to Cisco iOS, and that the code was open, I was very excited and hurried to learn. The company is using zebra, version I forgot, unfortunately did not write Bo's habit, so that the learning source design of various auxiliary understanding of the diagram, are lost. Now only according to their own understanding, coupled with the source of the temperature slowly recalled.
So far, zebra and quagga with Cisco IOS command architecture, configuration format is very similar, while their open-source, a powerful block of closed-end Cisco IOS to the entire routing software market monopoly. While there are some differences between it and iOS, network engineers who are familiar with iOS will quickly adapt to zebra and Quagga's network environment. Zebra and quagga can manage a variety of protocols using the modular approach, a design that is unique. It can activate or stop the protocol depending on the needs of the network. And I'm excited to have a host with this routing software that can become a routing device with proper configuration. Currently, Zebra has discontinued its release and Quagga launched quagga-0.99.21 this May. But for domestic equipment development, this open source software is enough.
Cut the crap and get to the chase.
Environment: Ubuntu 12.04;
I've only looked at Quagga's source code, and the framework is similar to zebra, so here's just a look at Zebra's installation and use, as well as problems that may arise during installation and compilation. But Quagga source, I am here to give a connection, I hope the studious can learn. After I try to use, there are problems solved together.
Quagga Source: http://download.savannah.gnu.org/releases/quagga/
Zebra Installation
Download Zebra Source
Address: Https://www.mangob2b.com/en/zebra/download-zebra
Extract
1 tar-xvf zebra-0.95a.tar.gz
2
3 CD zebra-0.95a/
Modify Zebra.h
Vi./lib/zebra.h +103
Increase:
1 #ifdef gnu_linux
2
3 #define __use_gnu
4
5 #endif
It was compiled with the GNU Standard and was added to Zebra's support for IPV6. A struct is defined in the in.h of the system header file: struct In6_pktinfo, which is referenced in zebra, so it is added to define macros to support IPv6.
Configuration
./configure
Compiling and installing
Make;make Install "sudo if permission is required"
If the individual library files are not installed during the compilation process, please install the dependent library files, and you may be required to install Quagga support when configuring Vtysh later, and the
service will be installed by default under/usr/local/sbin, with: BGPD ospf6d OSPFD RIPD ripngd Zebra Six service programs.
Configure the Zebra runtime environment
Configure Zebra
Build a Zebra profile. Because there are simple examples in the system, we use the existing configuration file, configure the login and enter the privileged mode password, host name and so on.
sudo cp zebra.conf.sample/usr/local/etc/zebra.conf
Configure Vtysh
sudo cp vtysh.conf.sample/usr/local/etc/vtysh.conf
Launch the Zebra demo program
./zebra–d
Remote Login
Telnet 127.0.0.1 2601//If you are logged in within the LAN, change IPAddress to a specific host address
2601 is the Zebra Demo service port number, the other protocol's port number to find the relevant files on their own to learn.
If you need to launch additional services provided by zebra, generate a profile for a specific service under/usr/local/etc/. For example, if you want to start the RIP protocol service, copy the RIP-related configuration file to/usr/local/etc/as in the previous example, run: ripd–d on the console, and then PS to see that RIPD is already running in the background.
Finally, you can modify this project, add their own implementation, the project also has a lot of beautiful code, such as log management, memory management, etc., is a rare learning code.