1 Quagga 是一个路由软件套件, 提供 OSPFv2,OSPFv3,RIP v1 和 v2,RIPng 和 BGP-4 的实现.
2 web 登录安装
#或者ssh登录安装
opkg install quagga quagga-zebra quagga-bgpd quagga-watchquagga quagga-vtysh
#
reboot
3 ssh 登录
#重启服务
/etc/init.d/quagga restart
#查看
root@OpenWrt:~# netstat -antp|grep LISTEN
tcp 0 0 0.0.0.0:2605 0.0.0.0:* LISTEN 1749/bgpd
tcp 0 0 0.0.0.0:2604 0.0.0.0:* LISTEN 1720/ospfd
tcp 0 0 0.0.0.0:2606 0.0.0.0:* LISTEN 1735/ospf6d
tcp 0 0 0.0.0.0:2601 0.0.0.0:* LISTEN 1704/zebra
tcp 0 0 :::2604 :::* LISTEN 1720/ospfd
tcp 0 0 :::2606 :::* LISTEN 1735/ospf6d
tcp 0 0 :::2601 :::* LISTEN 1704/zebra
#配置BGP协议
vtysh
Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
OpenWrt# show version
Quagga 1.2.4 ().
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
--target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --disable-dependency-tracking --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --lib
execdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --localstatedir=/var/run/quagga --sysconfdir=/etc/quagga/ --enable-shared --disable-static --enable-user=network --enable-group=network --enable-multipath=8 --disable-ospfclient --disable-capabilities --disable-doc --disable-nhrpd --enable-zebra --enable-ospfd --enable-bgpd --enable-isisd --enable-ospf6d --enable-ripd --enable-ripngd --enable-vtysh
OpenWrt# config t
OpenWrt(config)# router bgp 65100
OpenWrt(config-router)# neighbor 192.168.50.11 remote-as 65108
OpenWrt(config-router)# neighbor 192.168.50.12 remote-as 65108
OpenWrt(config-router)# neighbor 192.168.50.13 remote-as 65108
OpenWrt# write
Building Configuration...
Configuration saved to /etc/quagga/zebra.conf
Configuration saved to /etc/quagga/ospfd.conf
Configuration saved to /etc/quagga/ospf6d.conf
Configuration saved to /etc/quagga/bgpd.conf
[OK]
#查看BGP状态
OpenWrt# show ip bgp summary
BGP router identifier 192.168.50.252, local AS number 65100
RIB entries 0, using 0 bytes of memory
Peers 3, using 27 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.50.11 4 65108 0 39 0 0 0 never Active
192.168.50.12 4 65108 0 31 0 0 0 never Active
192.168.50.13 4 65108 0 30 0 0 0 never Active
Total number of neighbors 3
Total num. Established sessions 0
Total num. of routes received 0