Here I'm going to start small tutorial Quagga Linux router, JunOS and
Cisco Router in GNS3 lab. Quagga and JunOS will run under virtualbox
and add to GNS3 lab later. I'll run BGP, OSPF in between those router.
Part
one, we'll install Quagga router under ubuntu server on Virtualbox.
Here is the process to follow to configuration of quagga router
Part ONE: Installation of Quagga in Ubuntu
1. Install Quagga:
- Update package lists: Before installing Quagga, it's crucial to update the package lists:
Bash
sudo apt update
- Install Quagga:
This command installs the Quagga routing suite and its documentation.Bash
sudo apt install quagga quagga-doc
2. Configure Quagga Daemons:
-
Copy sample configuration files:
Bashsudo cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf sudo cp /usr/share/doc/quagga/examples/bgpd.conf.sample /etc/quagga/bgpd.conf
This creates configuration files for Zebra (the routing engine) and BGPd (the Border Gateway Protocol daemon) in the
/etc/quagga/
directory. -
Edit
daemon
file:
Bashsudo vim /etc/quagga/daemons
- Uncomment the lines for the daemons you want to enable (in this case,
zebra
andbgpd
):zebra=yes bgpd=yes
- Comment out or disable other daemons (e.g.,
ospfd
,ripd
) if you don't need them. - Save and exit the file.
- Uncomment the lines for the daemons you want to enable (in this case,
3. Start Quagga Services:
- Restart Quagga service:
This restarts the Quagga service and applies the new configuration.Bash
sudo systemctl restart quagga
4. Verify Quagga Status:
- Check Zebra status: You should see Zebra listening on port 2601 (ZAPI).
- Check BGPd status:
You should see BGPd listening on ports 179 and 2605.Bash
sudo netstat -nlptu | grep bgpd
5. Configure BGPd:
- Edit the BGPd configuration file:
Bash
sudo vim /etc/quagga/bgpd.conf
- Define your Autonomous System Number (ASN).
- Configure neighbors (IP addresses of other BGP routers).
- Configure BGP parameters (e.g., timers, next-hop self).
Important Notes:
- Refer to the Quagga documentation: For detailed information on configuration options and best practices, refer to the official Quagga documentation.
- Security: Always follow security best practices when configuring routing protocols, such as enabling authentication and limiting access to the Quagga configuration files.
This enhanced guide provides a more comprehensive and step-by-step approach to installing and configuring Quagga on Ubuntu.
#telnet localhost 2605
First of all you must create its configuration file as follows:
#sudo cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
!service interegrated-vtysh-config
!hostname quagga-router
username root nopassword
Change your desire name in my case
hostname quagga
username root nopassword
For changing the permission and restart the quagga
#sudo chown quagga.quaggavty /etc/quagga/*.conf
#sudo chmod 640 /etc/quagga/*.conf
#sudo service quagga restart
Now enter into the quagga router
#vtysh
You need to add "VTYSH_PAGER=more" setting in your /etc/enviroment file, otherwise you enconter "(END)" blinking in the left-down corner of the screen every time you enter vtysh command and you have to "q" key to continue.
#su -s
#echo VTYSH_PAGER=more > /etc/enviroment
IP Forwarding is transfering packet between network card and linux system use following command
#sudo -s
#echo "1" > /proc/sys/net/ipv4/ip_forward
#show ip forwarding
IP forwarding is activated.