Quagga

Differences between revisions 28 and 47 (spanning 19 versions)
Revision 28 as of 2017-07-30 08:02:54
Size: 5357
Comment: Jonathan Ferguson
Revision 47 as of 2019-12-09 03:33:15
Size: 4646
Comment: Jonathan Ferguson
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
<<BR>>`sudo apt-get install quagga` <<BR>>`sudo apt-get install quagga && sudo mkdir -p /var/log/quagga && sudo chown quagga:quagga /var/log/quagga`
Line 4: Line 4:
<<BR>>Enable IPv4 and IPv6 Forwarding: <<BR>>Enable IPv4 and IPv6 Unicast Forwarding:
Line 11: Line 11:
<<BR>>Enable IPv4 Multicast Forwarding:
<<BR>>`echo "net.ipv4.conf.all.mc_forwarding=1" | sudo tee -a /etc/sysctl.conf`
<<BR>>`echo "net.ipv4.conf.default.mc_forwarding=1" | sudo tee -a /etc/sysctl.conf`
<<BR>>`sudo sysctl -p`
<<BR>>
Line 12: Line 17:
<<BR>>`sudo nano `[[attachment:babeld.conf|/etc/quagga/babeld.conf]]
Line 24: Line 28:
<<BR>>`sudo chown quagga:quagga /etc/quagga/babeld.conf && sudo chmod 640 /etc/quagga/babeld.conf`
Line 35: Line 38:
<<BR>>Edit which routing protocols are to run:
<<BR>>`sudo nano /etc/quagga/daemons`
<<BR>>zebra=''yes''
<<BR>>bgpd=''yes''
<<BR>>ospfd=''yes''
<<BR>>ospf6d=''yes''
<<BR>>ripd=''yes''
<<BR>>ripngd=''yes''
<<BR>>isisd=''yes''
<<BR>>babeld=''yes''
<<BR>>How to prevent a daemon from running since Quagga version 1.1.1
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/bgpd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/isisd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/ospf6d.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/ospfd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/pimd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/ripd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/ripngd.service`
<<BR>>`sudo unlink /etc/systemd/system/network.target.wants/zebra.service`
<<BR>>How to reinstate a daemon to run since Quagga version 1.1.1
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/bgpd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/isisd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/ospf6d.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/ospfd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/pimd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/ripd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/ripngd.service`
<<BR>>`sudo ln -st /etc/systemd/system/network.target.wants /lib/systemd/system/zebra.service`
<<BR>>Prevent a daemon from running:
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/bgpd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/isisd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/ospf6d.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/ospfd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/pimd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/ripd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/ripngd.service`
<<BR>>`sudo unlink /etc/systemd/system/multi-user.target.wants/zebra.service`
Line 64: Line 48:
<<BR>>Edit telnet access and the retaining of routes over restarts — necessary for Quagga versions prior to 1.1.1:
<<BR>>`sudo nano /etc/quagga/debian.conf`
<<BR>>vtysh_enable=yes
<<BR>>zebra_options=" --daemon -A 127.0.0.1 ''-P 2601'' ''-u quagga'' ''-g quagga''"
<<BR>>bgpd_options=" --daemon -A 127.0.0.1 ''-P 2605'' ''-u quagga'' ''-g quagga'' ''--retain'' ''-p 179''"
<<BR>>ospfd_options=" --daemon -A 127.0.0.1 ''-P 2604'' ''-u quagga'' ''-g quagga''"
<<BR>>ospf6d_options=" --daemon -A ::1 ''-P 2606'' ''-u quagga'' ''-g quagga''"
<<BR>>ripd_options=" --daemon -A 127.0.0.1 ''-P 2602'' ''-u quagga'' ''-g quagga''"
<<BR>>ripngd_options=" --daemon -A ::1 ''-P 2603'' ''-u quagga'' ''-g quagga''"
<<BR>>isisd_options=" --daemon -A 127.0.0.1 ''-P 2608'' ''-u quagga'' ''-g quagga''"
<<BR>>babeld_options=" --daemon -A 127.0.0.1 ''-P 2609'' ''-u quagga'' ''-g quagga''"
<<BR>>Reinstate a daemon to run:
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/bgpd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/isisd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ospf6d.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ospfd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/pimd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ripd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ripngd.service`
<<BR>>`sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/zebra.service`
Line 76: Line 58:
<<BR>>Restart the daemon:
<<BR>>`sudo /etc/init.d/quagga restart || sudo systemctl restart zebra`
<<BR>>Restart the daemons:
<<BR>>`sudo systemctl restart zebra.service`
<<BR>>`sudo systemctl restart bgpd.service`
<<BR>>`sudo systemctl restart pimd.service`
<<BR>>`sudo systemctl restart ripd.service`
<<BR>>`sudo systemctl restart ripngd.service`
<<BR>>`sudo systemctl restart ospf6d.service`
<<BR>>`sudo systemctl restart isisd.service`
<<BR>>`sudo systemctl restart ospfd.service`


Install the Quagga routing daemon:
sudo apt-get install quagga && sudo mkdir -p /var/log/quagga && sudo chown quagga:quagga /var/log/quagga

Enable IPv4 and IPv6 Unicast Forwarding:
echo "net.ipv4.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
sed 's/#net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf | sudo tee /etc/sysctl.conf
echo "net.ipv6.conf.default.forwarding=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Enable IPv4 Multicast Forwarding:
echo "net.ipv4.conf.all.mc_forwarding=1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.conf.default.mc_forwarding=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Create the configuration files:
sudo nano /etc/quagga/bgpd.conf
sudo nano /etc/quagga/isisd.conf
sudo nano /etc/quagga/ospf6d.conf
sudo nano /etc/quagga/ospfd.conf
sudo nano /etc/quagga/pimd.conf
sudo nano /etc/quagga/ripd.conf
sudo nano /etc/quagga/ripngd.conf
sudo nano /etc/quagga/vtysh.conf
sudo nano /etc/quagga/zebra.conf

Change the owner and the mode of the configuration files:
sudo chown quagga:quagga /etc/quagga/bgpd.conf && sudo chmod 640 /etc/quagga/bgpd.conf
sudo chown quagga:quagga /etc/quagga/isisd.conf && sudo chmod 640 /etc/quagga/isisd.conf
sudo chown quagga:quagga /etc/quagga/ospf6d.conf && sudo chmod 640 /etc/quagga/ospf6d.conf
sudo chown quagga:quagga /etc/quagga/ospfd.conf && sudo chmod 640 /etc/quagga/ospfd.conf
sudo chown quagga:quagga /etc/quagga/pimd.conf && sudo chmod 640 /etc/quagga/pimd.conf
sudo chown quagga:quagga /etc/quagga/ripd.conf && sudo chmod 640 /etc/quagga/ripd.conf
sudo chown quagga:quagga /etc/quagga/ripngd.conf && sudo chmod 640 /etc/quagga/ripngd.conf
sudo chown quagga:quaggavty /etc/quagga/vtysh.conf && sudo chmod 660 /etc/quagga/vtysh.conf
sudo chown quagga:quagga /etc/quagga/zebra.conf && sudo chmod 640 /etc/quagga/zebra.conf

Prevent a daemon from running:
sudo unlink /etc/systemd/system/multi-user.target.wants/bgpd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/isisd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/ospf6d.service
sudo unlink /etc/systemd/system/multi-user.target.wants/ospfd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/pimd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/ripd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/ripngd.service
sudo unlink /etc/systemd/system/multi-user.target.wants/zebra.service

Reinstate a daemon to run:
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/bgpd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/isisd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ospf6d.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ospfd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/pimd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ripd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/ripngd.service
sudo ln -st /etc/systemd/system/multi-user.target.wants /lib/systemd/system/zebra.service

Restart the daemons:
sudo systemctl restart zebra.service
sudo systemctl restart bgpd.service
sudo systemctl restart pimd.service
sudo systemctl restart ripd.service
sudo systemctl restart ripngd.service
sudo systemctl restart ospf6d.service
sudo systemctl restart isisd.service
sudo systemctl restart ospfd.service


Jonathan Ferguson, Ubuntu Wiki, Quagga Routing Daemon, https://wiki.edubuntu.org/JonathanFerguson/Quagga


JonathanFerguson/Quagga (last edited 2019-12-09 03:33:15 by jonathan-ferguson)