Проект

Общее

Профиль

Frr

Add frr group and user

pw groupadd frr -g 101
pw groupadd frrvty -g 102
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
   -d /usr/local/etc/frr -s /usr/sbin/nologin

Create empty FRR configuration files

mkdir /usr/local/etc/frr

For integrated config file:

touch /usr/local/etc/frr/frr.conf

For individual config files:

touch /usr/local/etc/frr/babeld.conf
touch /usr/local/etc/frr/bfdd.conf
touch /usr/local/etc/frr/bgpd.conf
touch /usr/local/etc/frr/eigrpd.conf
touch /usr/local/etc/frr/isisd.conf
touch /usr/local/etc/frr/ldpd.conf
touch /usr/local/etc/frr/nhrpd.conf
touch /usr/local/etc/frr/ospf6d.conf
touch /usr/local/etc/frr/ospfd.conf
touch /usr/local/etc/frr/pbrd.conf
touch /usr/local/etc/frr/pimd.conf
touch /usr/local/etc/frr/ripd.conf
touch /usr/local/etc/frr/ripngd.conf
touch /usr/local/etc/frr/staticd.conf
touch /usr/local/etc/frr/zebra.conf
chown -R frr:frr /usr/local/etc/frr/
touch /usr/local/etc/frr/vtysh.conf
chown frr:frrvty /usr/local/etc/frr/vtysh.conf
chmod 640 /usr/local/etc/frr/*.conf
# Routing: We need to forward packets
net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1

# FRR's OSPF daemons tries to allocate big socket buffer, so generate warning
# messages like:
# "setsockopt_so_sendbuf: fd 6: SO_SNDBUF set to 1048576 (requested 8388608)"
# To prevent such message kern.ipc.maxsockbuf can be increased:
kern.ipc.maxsockbuf=16777216

rc.conf

frr_enable="YES"
frr_daemons="zebra staticd ospfd"
zebra_flags="-P0"
ospfd_flags="-P0"
bgpd_flags="-P0"