quagga环境搭建

 
  1. #./configure --enable-vtysh --enable-user=root --enable-group=root --enable-vty-group=root
  1. #make
  2. #make install
添加相关服务到/etc/services下面:
  1. vim /etc/services
添加以下内容:
  1. zebrasrv 2600/tcp # zebra service
  2. zebra 2601/tcp # zebra vty
  3. ripd 2602/tcp # RIPd vty
  4. ripngd 2603/tcp # RIPngd vty
  5. ospfd 2604/tcp # OSPFd vty
  6. bgpd 2605/tcp # BGPd vty
  7. ospf6d 2606/tcp # OSPF6d vty
配置zebra和ospf的配置文件:
  1. #cp /usr/local/etc/zebra.conf.sample /usr/local/etc/zebra.conf
  2. #cp /usr/local/etc/ripd.conf.sample /usr/local/etc/ripd.conf
起动zebra 
  1. zebra -d
如果出现以下错误
privs_init: could not lookup user quagga
那么就是没有添加用户和组:
  1. #groupadd quagga
  2. #useradd quagga -g quagga
  3. #chown quagga:quagga /var/run/
  4. #chmod 777 /var/run/
  5. #chown quagga:quagga /usr/local/etc/
  6. #chmod 777 /usr/local/etc/

基本配置路由命令:
  1. #zebra -d
  2. #telnet localhost 2601
  3.  
  4. Password:
这时候的密码是在:
  1. cat /usr/local/etc/zebra.conf
  2. !-*- zebra -*-
  3. !
  4. ! zebra sample configuration file
  5. !
  6. ! $Id: zebra.conf.sample,v 1.12002/12/1320:15:30 paul Exp $
  7. !
  8. hostname Router
  9. password zebra
  10. enable password zebra
  11. !
  12. !Interface's description.
  13. !
  14. !interface lo
  15. ! description test of desc.
  16. !
  17. !interface sit0
  18. ! multicast
  19. !
  20. !Staticdefault route sample.
  21. !
  22. !ip route 0.0.0.0/0203.181.89.241
  23. !
  24. !log file zebra.log
后面就可以通过命令来控制这些路由的配置了。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 





posted @ 2017-04-25 22:07  yml435  阅读(1310)  评论(0编辑  收藏  举报