本文主要是介绍Zebra安装及配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Zebra - 是一个开放源代码的路由软件。Zebra开源工程开始于1996,名叫 Kunihiro Ishiguro的日本人最先有了开发Zebra的想法。在此同时他又结识了另一个Zebra开发的主要人物 Yoshinari Yoshikawa,并与他共享了开发第一个遵从GNU General Public License路由器软件的想法。到现在为止,Zebra已经成为开放源代码领域的成功代表之一。在Zebra不断完善的过程中许多人都为Zebra的成长做出了重大贡献,我想Zebra的成长过程也是路由器软件发展过程的见证,很多新元素也在不断加入其中。很长一段时间因为一些原因Zebra没有发布新的版本,同时使用Zebra的人也提出了很多的,很多致力开放源代码的人士对Zebra的开放性和持续发展表示了忧虑,并在2003年从Zebra派生了一个分支——Quagga,并开始维护和修正bug。这样的做法引起了Kunihiro Ishiguro的不满,并引发了一些讨论,讨论细节可以在Zebra的邮件列表上找得到。我不能对此评论些什么,但我感谢Kunihiro Ishiguro和Yoshinari Yoshikawa两位先生为开放源代码领域作出的贡献,同时也尊重那些为了Zebra 不断发展、完善而做出贡献的人们。关于Zebra和Quagga的历史细节,可以参照她们各自的网站:
www.zebra.org
www.quagga.net
在学习路由协议的过程中,参照Zebra的源代码会对协议本身及其实现有更深刻的理解,所以我开始了对Zebra源代码的研究。在这里我会以日志的方式记录我的研究学习过程,也算是个学习笔记吧。
- 如何安装、配置和运行Zebra
目前最新的版本是0.94版,这是在Quagga发布第一个修正版后最新的Zebra版本。我的编译及运行环境是Redhat Linux 7.3,内核是2.4.20-8。可以从Zebra的主页上下载最新的版本(www.zebra.org)。安装过程如下:
- 解压:
# tar zxvf zebra-0.94.tar.gz
- 进入解压目录开始编译、安装:
# ./configure
# make
# make install
- make install成功以后可执行文件存放在/usr/local/sbin/路径下,样本配置文件存放在/usr/local/etc路径下:
# ls /usr/local/sbin/
bgpd ospf6d ospfd ripd ripngd zebra
# ll /usr/local/etc
bgpd ospf6d ospfd ripd ripngd zebra
# ll /usr/local/etc
-rw------- 1 root root 572 Jun 14 12:07 bgpd.conf.sample
-rw------- 1 root root 2801 Jun 14 12:07 bgpd.conf.sample2
-rw------- 1 root root 1170 Jun 14 12:07 ospf6d.conf.sample
-rw------- 1 root root 180 Jun 14 12:07 ospfd.conf.sample
-rw------- 1 root root 412 Jun 14 12:07 ripd.conf.sample
-rw------- 1 root root 396 Jun 14 12:07 ripngd.conf.sample
-rw------- 1 root root 375 Jun 14 12:06 zebra.conf.sample
-rw------- 1 root root 2801 Jun 14 12:07 bgpd.conf.sample2
-rw------- 1 root root 1170 Jun 14 12:07 ospf6d.conf.sample
-rw------- 1 root root 180 Jun 14 12:07 ospfd.conf.sample
-rw------- 1 root root 412 Jun 14 12:07 ripd.conf.sample
-rw------- 1 root root 396 Jun 14 12:07 ripngd.conf.sample
-rw------- 1 root root 375 Jun 14 12:06 zebra.conf.sample
- 直接使用zebra提供的配置文件
# mkdir sample
# mv *.sample ./sample/
# cp sample/zebra.conf.sample ./zebra.conf
# cp sample/ripd.conf.sample ./ripd.conf
# cp sample/ripngd.conf.sample ./ripngd.conf
# cp sample/ospfd.conf.sample ./ospfd.conf
# cp sample/ospf6d.conf.sample ./ospf6d.conf
# cp sample/bgpd.conf.sample ./bgpd.conf
#
# cp sample/zebra.conf.sample ./zebra.conf
# cp sample/ripd.conf.sample ./ripd.conf
# cp sample/ripngd.conf.sample ./ripngd.conf
# cp sample/ospfd.conf.sample ./ospfd.conf
# cp sample/ospf6d.conf.sample ./ospf6d.conf
# cp sample/bgpd.conf.sample ./bgpd.conf
#
- 启动zebra程序,以守护进程方式运行
# zebra -d
- 使用密码zebra登录zebra,进入用户模式,使用enable命令和密码zebra
# telnet localhost 2601
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connected to localhost.
Escape character is '^]'.
Hello, this is zebra (version 0.94).
Copyright 1996-2002 Kunihiro Ishiguro.
Copyright 1996-2002 Kunihiro Ishiguro.
User Access Verification
Password:
Router>
Router>
Router> enable
Password:
Router#
Router#
- 在特权模式下,通过命令'?'来查看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 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
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 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
Router#
- 如何进入/退出全局模式?
Router# config terminal
Router(config)#
Router(config)#
Router(config)# exit
Router#
说明:
1 浅绿色字体文字为用户输入的命令或者参数,黑色字体文字为系统的反馈信息和提示符。
2 这是基本的安装、配置和启动说明。
引用自:
http://www.worldlink.com.cn/forum_topic.asp?TOPIC_ID=47&FORUM_ID=4&CAT_ID=1&Forum_Title=%C6%E4%CB%FB%BF%AA%D4%B4%CF%EE%C4%BF&Topic_Title=Zebra+%B0%B2%D7%B0%BA%CD%C5%E4%D6%C3(1)
这篇关于Zebra安装及配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!