Zebra router software installation and configuration

Source: Internet
Author: User

The Zebra router software installation and configuration vro remote logon to ciscoterminalinterfaceZebra is an open source TCP/IP routing software, similar to the Cisco Internet Operating System (IOS. It is flexible and powerful, and can manage IPv4 and IPv6 routing tools. It supports BGP-4 protocol, BGP-4 + protocol, r00001 protocol, r00002 protocol, RIPng protocol, OSPFv2 protocol and OSPFv3 protocol. Install tar-zvxf zebra-0.93b.tar.gz cd zebra-0.93b./configure make install configuration script will search for installed IP stacks on the system and automatically set to support them. Currently, the IP stack may only refer to IPv4, but IPv6 users do not need to worry, because Zebra will also find and support it. In the decompressed folder, there is a file, SERVICES. The content of this file is as follows: # As long as this software is in alpha testing it is not yet stored ded # in/etc/services files. this means that you may need to add the following # lines into your/etc/services file on your hosts. # --- Please add this to your/etc/services --- # GNU Zebra services zebrasrv 2600/tcp zebra 2601/tcp ripd 2602/tcp ripng 2603/tcp ospfd 2604/tcp bgpd 2605/tcp ospf6d 2606/tcp from this file, we have to add the command line in/etc/services. The Zebra daemon runs under their own virtual terminal connection (VTY), so your system must be aware of these virtual terminal connections. Here are some of the connections you should add: zebrasrv 2600/tcp # zebra service zebra 2601/tcp # zebra vty ripd 2602/tcp # RIPd vty ripngd 2603/tcp # RIPngd vty ospfd 2604/ tcp # OSPFd vty bgpd 2605/tcp # BGPd vty ospf6d 2606/tcp # OSPF6d vty configure Zebra in the etc directory after installation, there is also a file zebra. conf. sample (and bgpd. conf. sample, ospfd. conf. smaple, ripd. conf. sample), OK, copy the file to zebra. conf, which contains the following lines: hostname Router password zebra enable password zebra hos Tname specifies the vro name when you enter the interactive configuration mode. It is actually an identifier. Password specifies the password required to log on to the interactive Zebra terminal. Enable password specifies the password required to access Zebra with a higher level of identity when you want to change the configuration. If your CISCO router is familiar with it, this will be nonsense. Now we can start zebra (I used to run the experiment directly. I don't know why the backend is running, so I have to open another console) run service zebra start to start or directly run zebra. Now let's telnet 127.0.0.1 2601 to see [root @ linux/etc telnet] #127.0.0.1 2601 Trying 127.0.0.1... connected to 127.0.0.1. escape character is '^]'. hello, this is zebra (version 0.93b ). copyright 1996-2002 Kunihiro Ishiguro. user Access Verification Password: zebra speedmetal> en Password: zebra Router #? Configure Configuration from vty interface copy Copy configuration debug Debugging functions (see also 'undebug') disable Turn off privileged mode command end End current mode and change to enable mode. exit Exit current mode and down to previous mode help Description of the interactive help system list Print command list no Negate a command or set its defaults quit Exit current mode and down to p Revious mode show running system information terminal Set terminal line parameters who Display who is on vty write Write running configuration to memory, network, or terminal Router # Doesn't it look like a CISCO Router, next, we can perform an experiment. Next, try rip. If you are familiar with Cisco IOS, you can master Zebra in a short time, because the two are extremely similar. Each daemon of Zebra uses a separate VTY, which can be dynamically configured through a remote logon session. Therefore, if you need to set OSPF, simply remotely log on to port 2604 on the Linux server. to modify the route table of the kernel or set the redistribution between routing protocols, you can remotely log on to port 2601. The Zebra daemon acts as the kernel manager to manage the communication between other daemon and the system itself. To start rip, A ripd is required. conf, as you expected, we only need to do one thing to generate a ripd. conf. Remember the zebra above. how does conf come from? Okay, generate a ripd in the same way. conf, the content of this file is also very simple, or you can write it yourself, the content is as follows: hostname ripd password zebra enable password zebra below we can start ripd, run service ripd start to start or directly run ripd. Then telnet 127.0.0.1 2602 (remember the words we added in services, port 2602 is for rip) [root @ linux/etc telnet] #127.0.0.1 2602 Trying 127.0.0.1... connected to 127.0.0.1. escape character is '^]'. hello, this is zebra (version 0.93b ). copyright 1996-2002 Kunihiro Ishiguro. User Access Verification Password: zebra ripd> en ripd # reply: Zebra router webbers posted a comment on 23:27:32 about Zebra installing Zebra you can download the latest Zebra source program from the Zebra.org website, it can also be obtained from Redhat and Debian, but not necessarily the latest version. Install software from the source code, and you will find that some common installation processes are used. The configuration script of./configuremakemake install searches for installed IP stacks on the system and automatically sets them to support them. Currently, the IP stack may only refer to IPv4, but IPv6 users do not need to worry, because Zebra will also find and support it. After the program is installed, you may have to add some command lines in/etc/services. The Zebra daemon runs under their own virtual terminal connection (VTY), so your system must be aware of these virtual terminal connections. Here are some of the connections you should add: zebrasrv 2600/tcp # zebra servicezebra 2601/tcp # zebra vtyripd 2602/tcp # RIPd vtyripngd 2603/tcp # RIPngd vtyospfd 2604/tcp # OSPFd vtybgpd 2605/tcp # BGPd vtyospf6d 2606/tcp # OSPF6d vty configure Zebra if you are familiar with Cisco IOS, then you can master Zebra in a short time, because you will find that the two are extremely similar. Each daemon of Zebra uses a separate VTY, which can be dynamically configured through a remote logon session. Therefore, if you need to set OSPF, simply remotely log on to port 2604 on the Linux server. to modify the route table of the kernel or set the redistribution between routing protocols, you can remotely log on to port 2601. The Zebra daemon acts as the kernel manager to manage the communication between other daemon and the system itself. This section describes how to create and run OSPF and BGP on a server. The Zebra daemon uses plain text files to store their configurations. For OSPF/BGP routers, three files are used: zebra. conf, ospfd. conf, and bgpd. conf. For example, the zebra. conf file may be like this :! Zebra configuration saved from vty! 01:46:12! Hostname LinuxRouter/* Host Name: LinuxRouter */password zebra/* password: zebra */enable password z3bRa/* password: z3bRa */log file/var/log/ zebra/zebra. log/* log file address */! Interface eth0/* Ethernet Interface eth0 */description interface to External Network/* Interface description */ip address 10.0.0.1/24/* interface IP address */! Interface eth1/* Ethernet Interface eth0 */description interface to Internal Network/* description of the Interface */ip address 192.168.66.1/24/* IP address of the interface */The exclamation point here acts annotation identifier or separator. Despite the existence of a large number of different network interface types (Ethernet, ISDN, etc.), Zebra can be used as long as it is a network interface type that can be identified by the Linux kernel. The subnet mask has the number of BITs (for example,/24). The default mask is not (for example, 255.255.255.0 ). Note that there are two passwords, one for user mode and the other for privileged mode. This is not only conducive to providing access permissions to non-Administrators, but also very important for creating routing servers or routing probes. All BGP administrators know that these probes are critical to route debugging because they allow you to view routes just like an external AS (AS represents an autonomous system. The AS number is used for BGP routing. The AS number is a registered number controlled by ARIN. The next step will start some necessary programs. Run the following command to start zebra:/usr/sbin/zebra-dk/usr/sbin/ospfd-d/usr/sbin/bgpd-d, the daemon is actually used to update the route table of the kernel. -Dk tells the program to run as a daemon (d) and it runs most of the time in the background. K is another option that tells Zebra to maintain all configured routes. It is used to ensure that the route table is not accidentally deleted when you test Zebra. Generally, you need to use the ifconfig and route commands to set routes and interfaces. Zebra can completely replace this routing management method, making it simpler to use. Now that OSPF is set, the basic service is ready. Now let's Telnet to port 2604 on the local machine and configure OSPF. To enter privileged mode, type enable (as in Cisco IOS), and then enter a privileged mode password. Next, use the configuration terminal command to switch to the configuration mode. It is worth mentioning that Zebra can also accept the abbreviated form of command, which is very similar to Cisco. For example, configuration terminal can be abbreviated as config t, which greatly shortens the input time and makes it easier to use. In addition, if you enter list and ?, It displays a list of currently available commands with some brief explanations. In addition, you can also enter a tab to automatically complete the command. That is to say, if you want to type the command clock, just type the first two letters cl and press the tab key, the machine will automatically "complete" the command, provided that the characters you typed are sufficient to uniquely identify the command. This is a good feature, especially when you are used to this usage. Next, we need to tell the daemon which networks and related areas will be broadcast through OSPF ). OSPF scalability allows it to support multiple domains. Type router ospf to start configuring OSPF, and then type network 192.168.66.0/24 area 0. This tells the router that we will use OSPF to broadcast a network with a subnet mask of 255.255.255.0 192.168.66.0. In this example, the eth0 interface is changed to a passive interface so that it cannot send route updates. This is very important for the experiment, because other routers in that direction may listen to the sent route update and change the interface into a passive interface, this effectively prevents network interruptions. To do this, type passive-interface eth0. This is unnecessary if you plan to use this router as a working router. Once you complete the modification, use the end command to exit from the configuration mode, and then use the write file command to save the modification. Here is a snapshot: labrat :~ # Telnet 0 2604/* Telnet to port 2604 of the Local Machine */Trying 0.0.0.0... connected to 0. escape character is '^]'. /* use '^]' to exit the session */Hello, this is zebra (version 0.84b) Copyright 1996-2000 Kunihiro IshiguroUser Access VerificationPassword:/* enter the password here, for example, zebra */ospfd> enable/* enters privileged mode */Password:/* enters the privileged mode Password, for example, z3bRa */ospfd # configure terminal/* configure the router from the terminal */ospfd (config) # router ospf/* configure OSPF */ospfd (config-router) # network 192. 168.66.0/24 area 0/* network 192.168.66.0 through OSPF Broadcast network,/24 indicates that the subnet mask is 24 bits, area 0 indicates the domain where the network is located */ospfd (config-router) # passive-interface eth0/* set the eth0 interface to a passive (passive) interface */ospfd (config-router) # end/* exit Configuration mode */ospfd # write file/* Save and modify */Configuration saved to/etc/zebra/ospfd. conf remember that in order to allow OSPF or BGP to work on an interface, the interface must be in the "running" status. To manually run an interface, log on to port 2601 and run the no shut command on the interface. The configuration of BGPBGP is roughly the same as that of OSPF. Start, open a remote login session to port 2605. Then execute configure terminal and enter router bgp <AS #_> to enter the BGP configuration mode. AS described above, BGP uses the AS number to establish a relationship between neighboring machines and route communication streams. In our test, we will use a private AS number ranging from 64512 to 65534 (in other words, this number is intended to be valid within the organization and not valid on the Internet ). Use the network command to set networks broadcast by BGP, such as network 192.168.66.0/24 .. Unlike OSPF, BGP peers must be specified statically. As follows: neighbor <neighbor IP> remote-AS <remote as #>. Here is an example: labrat :~ # Telnet 0 2605 Trying 0.0.0.0... connected to 0. escape character is '^]'. hello, this is zebra (version 0.84b) Copyright 1996-2000 Kunihiro IshiguroUser Access VerificationPassword: bgpd> enablePassword: bgpd # configure terminalbgpd (config) # router bgp 65530/* configure BGP, 65530 is the autonomous system number. That is, the system is configured as an external gateway on autonomous system 65530 */bgpd (config-router) # network 192.168.66.0/24/* networks broadcast by BGP */bgpd (config-router) # neighbor 10.0.0.5 remote-as 65531/* specify the vro with the IP address 10.0.0.5 on the autonomous system 65531 as the neighboring host */bgpd (config-router) # endbgpd # write fileConfiguration saved to/etc/zebra/bgpd. conf has many options available for OSPF and BGP, which cannot be described here. For each protocol, I suggest you study it before using it. For this reason, you can refer to the GNU Zebra documentation, which will provide you with a lot of help. In the network, there are several methods for routing communication streams. As far as vrouters are concerned, although a variety of hardware is available, the cost is high-people will naturally think of running a vro with rich functions built by Linux. The Zebra routing daemon has made all this a reality. Because it supports IPv4, IPv6, and various other protocols, Zebra can meet all our routing requirements. Another benefit is that Cisco IOS and Zabra are extremely similar. If you have previously worked in a Cisco IOS environment, you can easily transition to the Zebra system. At the same time, using Zebra also gives you a wealth of experience and knowledge similar to using Cisco IOS Routers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.