quagga 编译 Quagga-TE
Quagga Installing Quagga Add user and group quagga groupadd quagga useradd -g quagga -s /bin/false quagga Before installing quagga, it is necessary to prepare the quagga directories and files; and change ownership: mkdir /etc/quagga mkdir /var/state/quagga touch /var/log/zebra.log touch /var/log/ospfd.log touch /var/log/bgpd.log chown quagga:quagga /etc/quagga chown quagga:quagga /var/state/quagga Install quagga : ./configure --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga \ --prefix=/usr --sysconfdir=/etc/quagga -localstatedir=/var/state/quagga make make install ldconfig
/configure --enable-vtysh --enable-user=root --enable-group=root --enable
-vty-group=root
root@gobgp:~/sr-quagga# ./configure -h | grep vtysh --disable-vtysh do not build integrated vty shell for Quagga --with-libpam use libpam for PAM support in vtysh root@gobgp:~/sr-quagga# ./configure -h | grep user --bindir=DIR user executables [EPREFIX/bin] --enable-user=USER user to run Quagga suite as (default quagga) root@gobgp:~/sr-quagga# ./configure --enable-user=root --enable-group=root --enable -vty-group=root configure: error: unrecognized option: `--enable' Try `./configure --help' for more information root@gobgp:~/sr-quagga# ./configure -h | grep group --enable-group=GROUP group to run Quagga suite as (default quagga) --enable-vty-group=ARG set vty sockets to have specified group as owner root@gobgp:~/sr-quagga#
git clone https://github.com/segment-routing/sr-quagga.git
1、./configure --enable-user=root --enable-group=root --enable-vty-group=root --sysconfdir=/etc/quagga
加上/etc/quagga ,否则默认配置目录/usr/local/etc/
2、bootstrap.sh
3、 apt-get install autoconf automake libtool libc-ares-dev libreadline-dev -y
https://github.com/DavidFlamini/Quagga-TE
How to install in 30 seconds?
Four solutions are available
- Clone this repository
- Apply the am patches on top of a fresh quagga source from git:
cd quagga-master
git am TE-patches/*
How to compile it?
Traffic Engineering is enable by default (no more HAVE_OSPF_TE / HAVE_ISIS_TE .. configuration flag). Just perform:1
cd quagga-master1、
autoreconf -rif1、
./configure
make sudo make install
====================================================================================
1、 apt-get install autoconf automake libtool libc-ares-dev libreadline-dev -y
2、 bootstrap.sh
3、 ./configure --enable-user=root --enable-group=root --enable-vty-group=root --sysconfdir=/etc/quagga
加上/etc/quagga ,否则默认配置目录/usr/local/etc/
Updating ./version.texi MAKEINFO quagga.info /root/Quagga-TE/missing: line 81: makeinfo: command not found WARNING: 'makeinfo' is missing on your system. You should only need it if you modified a '.texi' file, or any other file indirectly affecting the aspect of the manual. You might want to install the Texinfo package: <http://www.gnu.org/software/texinfo/> The spurious makeinfo call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX), in which case you might want to install GNU make: <http://www.gnu.org/software/make/> Makefile:482: recipe for target 'quagga.info' failed make[3]: *** [quagga.info] Error 127 make[3]: Leaving directory '/root/Quagga-TE/doc' Makefile:439: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/root/Quagga-TE/doc' Makefile:462: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/root/Quagga-TE' Makefile:394: recipe for target 'all' failed make: *** [all] Error 2
cd doc # one of the following, depending on your info viewer preferences info quagga.info pinfo -r quagga.info emacs -eval '(info "quagga.info")' ----------不要执行这个命令
apt-get install texinfo
4、 apt-get install texinfo
root@gobgp:~/Quagga-TE# cd doc root@gobgp:~/Quagga-TE/doc# ls appendix.texi fig-rs-processing.png isisd.texi ospfd.texi snmp.texi basic.texi fig-rs-processing.txt kernel.texi ospf_fundamentals.texi snmptrap.texi bgpd.8 fig_topologies_full.dia main.texi overview.texi stamp-vti bgpd.texi fig_topologies_full.png Makefile pimd.8 texinfo.tex BGP-TypeCode fig_topologies_full.txt Makefile.am protocol.texi version.texi defines.texi fig_topologies_rs.dia Makefile.in quagga.texi vtysh.1 defines.texi.in fig_topologies_rs.png mdate-sh ripd.8 vtysh.texi draft-zebra-00.ms fig_topologies_rs.txt mpls ripd.texi watchquagga.8 fig-normal-processing.dia filter.texi ospf6d.8 ripngd.8 zebra.8 fig-normal-processing.png install.texi ospf6d.texi ripngd.texi fig-normal-processing.txt ipv6.texi ospfclient.8 routemap.texi fig-rs-processing.dia isisd.8 ospfd.8 routeserver.texi root@gobgp:~/Quagga-TE/doc# info quagga.info info: No menu item 'quagga.info' in node '(dir)Top' root@gobgp:~/Quagga-TE/doc# pinfo -r quagga.info Command 'pinfo' not found, but can be installed with: apt install pinfo root@gobgp:~/Quagga-TE/doc# root@gobgp:~/Quagga-TE/doc# apt install pinfo Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: mutt | mail-reader w3m | www-browser cups-bsd | lpr The following NEW packages will be installed: pinfo 0 upgraded, 1 newly installed, 0 to remove and 141 not upgraded. Need to get 67.0 kB of archives. After this operation, 240 kB of additional disk space will be used. Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/universe arm64 pinfo arm64 0.6.9-5.2 [67.0 kB] Fetched 67.0 kB in 1s (74.7 kB/s) Selecting previously unselected package pinfo. (Reading database ... 95159 files and directories currently installed.) Preparing to unpack .../pinfo_0.6.9-5.2_arm64.deb ... Unpacking pinfo (0.6.9-5.2) ... Processing triggers for install-info (6.5.0.dfsg.1-2) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up pinfo (0.6.9-5.2) ... root@gobgp:~/Quagga-TE/doc#
root@gobgp:~/Quagga-TE# ls /usr/local/sbin
bgpd isisd ospf6d ospfclient ospfd pimd ripd ripngd watchquagga zebra
root@gobgp:~/Quagga-TE# ls /usr/local/sbin
root@gobgp:~/Quagga-TE# vtysh vtysh: error while loading shared libraries: libzebra.so.0: cannot open shared object file: No such file or directory root@gobgp:~/Quagga-TE# ls /usr/local/lib libfpm_pb.a libospfapiclient.a libospf.so libquagga_pb.so.0 libzebra.so.0.0.0 libfpm_pb.la libospfapiclient.la libospf.so.0 libquagga_pb.so.0.0.0 libzebra.so.1 libfpm_pb.so libospfapiclient.so libospf.so.0.0.0 libzebra.a libzebra.so.1.0.0 libfpm_pb.so.0 libospfapiclient.so.0 libquagga_pb.a libzebra.la python3.6 libfpm_pb.so.0.0.0 libospfapiclient.so.0.0.0 libquagga_pb.la libzebra.so libospf.a libospf.la libquagga_pb.so libzebra.so.0
root@gobgp:~/Quagga-TE# cp /usr/local/lib/libzebra.* /lib root@gobgp:~/Quagga-TE# vtysh Exiting: failed to connect to any daemons. root@gobgp:~/Quagga-TE# ls /etc/quagga/ daemons zebra.conf root@gobgp:~/Quagga-TE#
ldconfig
oot@gobgp:~/Quagga-TE# zebra -d vty_read_config: failed to open configuration file /usr/local/etc/zebra.conf: No such file or directory can't open configuration file [/usr/local/etc/zebra.conf] root@gobgp:~/Quagga-TE#
root@gobgp:~/Quagga-TE# ldconfig --------------------- /sbin/ldconfig.real: /lib/libzebra.so.0 is not a symbolic link /sbin/ldconfig.real: /lib/libzebra.so.1 is not a symbolic link root@gobgp:~/Quagga-TE# zebra -d vty_read_config: failed to open configuration file /usr/local/etc/zebra.conf: No such file or directory can't open configuration file [/usr/local/etc/zebra.conf] root@gobgp:~/Quagga-TE# cp /etc/quagga/zebra.conf /usr/local/etc/ root@gobgp:~/Quagga-TE# zebra -d root@gobgp:~/Quagga-TE# vtysh Hello, this is Quagga (version 1.0.20160315). Copyright 1996-2005 Kunihiro Ishiguro, et al. gobgp#

root@gobgp:~/Quagga-TE# telnet localhost bgpd Trying ::1... Connected to localhost. Escape character is '^]'. Hello, this is Quagga (version 1.0.20160315). Copyright 1996-2005 Kunihiro Ishiguro, et al. User Access Verification Password: bgpd1> router bgp 100 % [BGP] Unknown command: router bgp 100 bgpd1> conf t % [BGP] Unknown command: conf t bgpd1> quit Connection closed by foreign host. root@gobgp:~/Quagga-TE# zebra root@gobgp:~/Quagga-TE# vtysh Hello, this is Quagga (version 1.0.20160315). Copyright 1996-2005 Kunihiro Ishiguro, et al. gobgp# conf t gobgp(config)# router bgp 100 gobgp(config-router)# address-family link-state link-state % Unknown command. gobgp(config-router)# address-family encap encapv6 ipv4 ipv6 vpnv4 vpnv6 gobgp(config-router)# address-family
浙公网安备 33010602011771号