#./configure --enable-vtysh
--enable-user=root --enable-group=root --enable-vty-group=root
#make
- #make install
添加相关服务到/etc/services下面:
vim /etc/services
添加以下内容:
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
配置zebra和ospf的配置文件:
#cp /usr/local/etc/zebra.conf.sample /usr/local/etc/zebra.conf
- #cp /usr/local/etc/ripd.conf.sample /usr/local/etc/ripd.conf
起动zebra
zebra -d
如果出现以下错误
privs_init: could not lookup user quagga
那么就是没有添加用户和组:
#groupadd quagga
#useradd quagga -g quagga
#chown quagga:quagga /var/run/
#chmod 777 /var/run/
#chown quagga:quagga /usr/local/etc/
#chmod 777 /usr/local/etc/
基本配置路由命令:
#zebra -d
#telnet localhost 2601
- Password:
这时候的密码是在:
cat /usr/local/etc/zebra.conf
!-*- zebra -*-
!
! zebra sample configuration file
!
! $Id: zebra.conf.sample,v 1.12002/12/1320:15:30 paul Exp $
!
hostname Router
password zebra
enable password zebra
!
!Interface's description.
!
!interface lo
! description test of desc.
!
!interface sit0
! multicast
!
!Staticdefault route sample.
!
!ip route 0.0.0.0/0203.181.89.241
!
!log file zebra.log
后面就可以通过命令来控制这些路由的配置了。