Quagga
How to use Quagga
Last Change : Jul 05 2010
Tool
Install
Ergonomy
Forum
Details
What is Quagga?
Prerequisites & Installation
How to use Quagga
Routers functionnalities comparison
Case Study 1 - Static routes
Case Study 2 - OSPF simple
Case Study 3 - OSPF advanced
Case Study 4 - BGP
⚠️⚠️⚠️
Please check our website about
attractions in Western Switzerland !! (Please use english translation).
⚠️⚠️⚠️
Merci de consulter notre site sur les
activités à faire en Suisse romande !!
1. DAEMONS | 2. CONF FILES | 3. DEBIAN.CONF | 4. VTYSH | 5. IP FORWARDING | 6. SPEED/DUPLEX |
1. QUAGGA DAEMONS:
You have to activate the Quagga daemons matching the routing protocols you want to
set on your router.
zebra: bgpd: ospfd: ospf6d: ripd: ripngd: |
Interface declaration
and static routing BGP routing protocol OSPF routing protocol OSPF IPv6 routing protocol RIP v2 routing protocol RIP Ipv6 routing protocol |
#vim /etc/quagga/daemons |
#/etc/init.d/quagga restart |
#ps -ef | grep quagga |
UID | PID | PPID | C | STIME | TTY | TIME | CMD |
quagga | 4632 | 1 | 0 | 22:25 | ? | 00:00:00 | /usr/lib/quagga/ospfd --daemon |
quagga | 4636 | 1 | 0 | 22:25 | ? | 00:00:00 | /usr/lib/quagga/zebra --daemon |
#kill -9 "UID number" |
#/etc/init.d/quagga start |
2. CONFIGURATION FILES: (/etc/quagga/*.conf files)
You must create a configuration file (even if it is empty) each time you activate a Quagga daemon.
Each daemon is associated with a specific file name:
zebra: bgpd: ospfd: ospf6d: ripd: ripngd: |
zebra.conf bgpd.conf ospfd.conf ospf6d.conf ripd.conf ripngd.conf |
#cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf #cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf |
#chown quagga.quaggavty /etc/quagga/*.conf #chmod 640 /etc/quagga/*.conf |
#/etc/init.d/quagga restart |
3. DEBIAN.CONF FILE
By default, the Quagga daemons are listening only to the loopback interface
127.0.0.1. It means that you can telnet a daemon only on its loopback address
127.0.0.1 and thus cannot access it remotely.
If you want to telnet a Quagga daemon remotely you can, in the /etc/quagga/debian.conf file. Either indicate one or several
IP addresses or remove the -A option meaning that you can telnet a daemon on
any of its IP addresses.
Here are two examples:
The ospfd daemon is listening to the 127.0.0.1 and 192.168.1.104 IP addresses.
ospfd_options=" --daemon -A 127.0.0.1 192.168.1.104"
The zebra daemon is listening to all the Linux interfaces IP addresses. We recommend
using this setting. If you want to filter who can access to your router, configure
access lists on the router software.
zebra_options=" --daemon "
Here is the recommended debian.conf file:
#vim /etc/quagga/debian.conf |
#/etc/init.d/quagga restart |
4. VTYSH
As indicated in the Quagga introduction,
you can access the daemons by telnetting their port number because
each daemon has its own configuration file and terminal interface.
zebra: ripd: ripng: ospfd: bgpd: ospf6d: |
2601 2602 2603 2604 2605 2606 |
#telnet localhost 2604 |
#cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf |
#chown quagga.quaggavty /etc/quagga/*.conf #chmod 640 /etc/quagga/*.conf |
#/etc/init.d/quagga restart |
#vtysh |
quagga-router#write |
#vtysh |
quagga-router#write |
#echo VTYSH_PAGER=more > /etc/environment |
#vtysh |
#vtysh -c "command" |
#apt-get install traceroute |
5. IP FORWARDING:
IP forwarding is required to transfer packets between the network interfaces of a Linux system.
See a picture of the Linux kernel routing.
#echo "1" > /proc/sys/net/ipv4/ip_forward |
#echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf |
#show ip forwarding |
6. SPEED/DUPLEX:
It is not possible to set the duplex and speed settings on the Quagga plateform.
You have to configure them at the Linux level.
Use the interface configuration tutorial for assistance.
Top of the page.