Establish a network router in Linux (1)

Source: Internet
Author: User
Article title: creating a network router in Linux (1 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
For network interconnection engineers, it is very important to establish an Internet dynamic route. This requires not only understanding the concept of routing, but also how to put it into practice. Currently, network devices are provided by large companies such as Cisco. Most independent routing developers are often restricted by the school or laboratory environment and cannot make full use of existing resources. Using Cisco technology equipment to build a network requires a lot of costs. To break this situation, we use a small experimental network, using the Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) technologies to demonstrate their different load balancing solutions.
  
One of the three routers we use is simulated using Linux technology. Initially, we tried to use traditional routes and select non-interactive backend programs to build a test network, but soon we found that this method is very complex and has limited functions. Finally, we decided to find a more advanced method to build a test network. Fortunately, we found Zebra.
  
What is Zebra?
  
Zebra is a TCP/IP routing software that supports BGP-4, BGP-4 +, OSPFv2, OSPFv3, r1_1, r1_2, and RIPng. It complies with the gnu gpl standard and can run on Linux and other Unix variant systems. Zebra is one of the most advanced routing software. The latest version can be downloaded from the GUN Zebra Web site.
  
The earliest Zebra kit was developed by Kunihiro Ishiguro and Yoshinari Yoshikawa in 1996. Currently, the Zebra suite is maintained by IP Infusion, and Ishiguro, one of the founders of the software, is the CTO of the company.
  
Zebra can use the module method to manage various protocols. this design is unique. It can activate or stop the protocol based on network requirements. So far, we have found that the most useful part of Zebra is that it is very similar to the Cisco IOS setting format. Although there are some differences between it and IOS, network engineers familiar with IOS will soon adapt to the Zebra network environment. Currently, Zebra 1.0 has not been released. The latest version is Zebra 0.93b, which is sufficient for a small network.
  
Installation of Zebra
  
We chose ThinkPad X20 with stable performance as Zebra's hardware testing platform, and Red Hat Linux 9 as its software testing platform. ThinkPad X20 has a built-in Ethernet interface. To enable it to act as a router, we have added a PCMCIA Ethernet card for it. Before installing Zebra, make sure that all NICs are recognized by the Linux system.
  
Red Hat 9 has integrated the RPM of Zebra 0.93b. You can also download the Zebra software from the Internet. For convenience, we decided to install Zebra 0.93b RPM. The installation process of Zebra RPM is basically the same as that of other software. The installed items include binary setting commands, small programs, configuration files, required project menus, instances, and documents.
  
Basic settings of Zebra
  
Zebra has no background interaction program, which is a real route management program. It controls other software modules and provides master ports for interaction with customers. The Zebra RPM kit contains a complete reference setting file. However, you only need to create a/etc/zebra. conf file that includes the following content to set Zebra.
  
The simplest Zebra setting file:
  
Hostname speedmetal
Password zebra
Enable password zebra
  
Whenever you enter the interactive setting mode, the Hostname command specifies the name of the vro. This name can be set at will, and may not match the host name. The Password command determines the logon Password of the interactive Zebra terminal.
  
After/etc/zebra. conf is created, run the following command to start the zebra non-background interaction program:
  
# Service zebra start
  
Now we can enter the Zebra interactive dialog mode by connecting to Port 2601 of the machine.
  
Zebra dialog mode instance:
  
[Root @ speedmetal zebra] # 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> enable
Password: zebra
Speedmetal #?
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 previous mode
Show Show running system information
Terminal Set terminal line parameters
Who Display who is on vty
Write Write running configuration to memory, network, or terminal
Speedmetal #
  
We can easily understand this, because we can click on the screen? Key to understand the meaning of a command at any time. If you have experience configuring a Cisco router, I believe this setting process is no stranger.
  
So far, we have only completed the setting and running of Zebra, and the setting of various protocols has not started yet. if you are ready, let's continue.
Related Article

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.