今天开始学习FRR,完成如下几个目标:
- 配置,编译,安装FRR
- 启动
解决依赖问题
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install libsysfs-dev
sudo apt-cache search libjson-c-dev
sudo apt-get install libjson-c-dev
sudo apt-get install libpython-dev
sudo apt-get install python-pkgconfig
sudo apt-get install libreadline-dev
sudo apt-get install libc-ares-dev
sudo apt-cache search libyang
sudo apt-get install libyang-dev
sudo apt-get install libbison-dev
配置
#在frr源码目录下
./bootstrap.sh
./configure
添加用户和组
sudo groupadd frr
sudo useradd frr
sudo useradd frr -g frr
chown frr:frr /var/run/
sudo 777 /var/run/
sudo chmod 777 /var/run/
sudo chmod 777 /usr/local/etc/
chown frr:frr /usr/local/etc/
编译安装
#解决依赖命令
sudo apt-get install libfl-dev
#make
make
#install
make install
启动
cp /usr/local/etc/bgpd.conf.sample /usr/local/etc/bgpd.conf
cp /usr/local/etc/zebra.conf.sample /usr/local/etc/zebra.conf
cp /usr/local/etc/vtysh.conf.sample /usr/local/etc/vtysh.conf
sudo cp /usr/local/lib/libfrr.so.0 /lib/
sudo zebra -d
sudo bgpd -d
ubuntu@ubuntu:~$ sudo vtysh
Hello, this is FRRouting (version 7.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
ubuntu#