Quagga是一个开源的基于Zebra实现了RIP, OSPF, BGP的动态路由软件。它提供的CLI命令和Cisco IOS类似。1 安装 再下载源码,解压后执行下列命令:sudo yum install readline-devel #打开vty功能需要readline包./configure --enable-vtysh --enable-user=root --enable-group=root –enable-vty-group=root --sysconfdir=/etc/quagga –libdir=/libmake && sudo make install 如果不是用root用户,如使用quagga用户,则还需要:sudo useradd -r -d /usr/local/sbin -s /sbin/nologin quaggasudo mkdir /var/run/quaggasudo chown quagga /var/run/quaggasudo chgrp quagga /var/run/quagga 它有下列进程,根据需要启动:zebra: 路由接口声明和静态路由bgpd: 支持BGPospfd: 支持OSPFospf6d: 支持IPv6 OSPFripd: 支持RIP v2ripngd: 支持RIP IPv62 配置并启动Zemba软路由 创建配置文件: sudo mv /etc/guagga/zebra.conf.sample /etc/guagga/zebra.conf 在/etc/hosts文件中添加一条记录:192.168.99.100 Router 运行命令sudo zemba -d启动zemba服务. 上面sudo zemba -d命令只是将我们的“路由器”(软路由)运行起来了(也就是转发那块),但是它还无法正常工作,现在还要给它配置路由表。路由表可以手工配置,也可以运行动态路由协议,vk rip, ospf实现自动配置。 我们先看看如何手工配置路由,即运行“telnet localhost 2601”命令进行类似ciso IOS的配置路由配置界面。Router> en #进入特权模式Password: Router# config tRouter(config)# access-list Add an access list entry banner Set banner string debug Debugging functions (see also 'undebug') enable Modify enable password parameters 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 hostname Set system's network name interface Select an interface to configure ip IP information ipv6 IPv6 information line Configure a terminal line list Print command list log Logging control no Negate a command or set its defaults password Assign the terminal connection password quit Exit current mode and down to previous mode route-map Create route-map or enter route-map command mode router-id Manually set the router-id service Set up miscellaneous service show Show running system information table Configure target kernel routing table write Write running configuration to memory, network, or terminal