Difference between revisions of "OpenWRT: quagga"

From OnnoWiki
Jump to navigation Jump to search
Line 2: Line 2:
  
  
1. QUAGGA DAEMONS:
+
==Quagga Daemon==
  
You have to activate the Quagga daemons matching the routing protocols you want to set on your router.
+
Restart Quagga service:
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
 
In the example below, the zebra and IPv4 OSPF daemon have been activated.
 
  
#vim /etc/quagga/daemons
+
/etc/init.d/quagga restart
zebra=yes
 
bgpd=no
 
ospfd=yes
 
ospf6d=no
 
ripd=no
 
ripngd=no
 
  
Restart the Quagga service:
+
Cek
  
#/etc/init.d/quagga restart
+
ps
Stopping Quagga daemons (prio:0): ospfd zebra (bgpd) (ripd) (ripngd) (ospf6d) (isisd).
 
Removing all routes made by zebra.
 
Nothing to flush.
 
Loading capability module if not yet done.
 
Starting Quagga daemons (prio:10): zebra ospfd.
 
  
You can check the Quagga daemons status:
 
  
#ps -ef | grep quagga
+
==Konfigurasi==
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
 
If a Quagga daemon doesn't stop properly, you can kill it manually and start the quagga service:
 
  
#kill -9 "UID number"
+
File /etc/quagga/zebra.conf:
#/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
 
To create the config files, copy the sample config files as follows:
 
In our example, as we activated the zebra and ospfd daemons; we need to create the zebra.conf and ospfd.conf files.
 
 
 
#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
 
Another way to do it is to create two empty files called /etc/quagga/ospfd.conf and /etc/quagga/zebra.conf. But in this case you cannot telnet a daemon, you need to configure the telnet permissions with vtsh (see below).
 
 
 
Finally, give user and group ownership to respectively quagga and quaggavty to the files inside the /etc/quagga directory:
 
 
 
#chown quagga.quaggavty /etc/quagga/*.conf
 
#chmod 640 /etc/quagga/*.conf
 
Restart the Quagga service:
 
 
 
#/etc/init.d/quagga restart
 
 
 
 
 
The sample configuration shown below is for the Jandakot node on the WAFreeNet. This node uses a WRT54G running OpenWrt as a router, and the WRT provides routing, dns, dhcp and firewalling services for the node.
 
Jandakot has an uplink to the ArmadaleAP node, and Willetton has a client link to Jandakot.
 
 
 
 
 
Install Components on OpenWrt
 
Install IPK Packages
 
Install the appropriate Quagga packages on OpenWrt:
 
 
 
ipkg install quagga quagga-bgpd
 
 
 
 
 
Note that this assumes your WRT has internet access, and is able to download the package list to determine where it needs to download the specified packages.
 
If your WRT doesn't have internet access, you'll need to use a browser to view the package list list, manually download the specified packages, and transfer them to your WRT and install them.
 
 
 
 
 
 
 
Create Configuration Files
 
Firstly, create a directory for all Quagga configuration files on the WRT:
 
 
 
  mkdir /etc/quagga
 
 
 
 
 
Create a configuration file for the Quagga zebra daemon, /etc/quagga/zebra.conf:
 
  
 
   hostname jandakot
 
   hostname jandakot
Line 119: Line 33:
 
   !
 
   !
 
   line vty
 
   line vty
 
 
The null route allows us to consolidate all routes for the /24 subnet that this router is responsible for, and will cause it to propagate a single route for the entire /24 subnet, rather than multiple routes for the smaller subnets inside 10.60.86.0/24.
 
 
  
  

Revision as of 09:48, 18 November 2018

sumber: https://openmaniak.com/quagga_tutorial.php


Quagga Daemon

Restart Quagga service:

/etc/init.d/quagga restart

Cek

ps


Konfigurasi

File /etc/quagga/zebra.conf:

 hostname jandakot
 ! define password for bgpd daemon (for connecting to daemon via telnet)
 password insertpasswordhere
 ! define enable password for bgpd daemon (for connecting to daemon via telnet)
 enable password insertpasswordhere
 !
 ! list interfaces
 interface eth1
 interface vlan0
 interface vlan1
 interface lo
 !
 ! null route to consolidate all subnets in this /24
 ip route 10.60.86.0/24 Null0 255
 !
 line vty


Referensi

Pranala Menarik