You are on page 1of 7

0 Quagga Routing Debian

Untuk menggunakan Quagga,yang diperlukan adalah install software-nya dengan : #apt-get update # jika belum update #apt-get install quagga Kemudian konfigurasi akan berada pada /etc/quagga, dan edit file debian.conf dan daemons.conf. 1. enable kan daemon zebra dulu dan buat file konfigurasi kosong: zebra=yes bgpd=no ospfd=no ospf6d=no ripd=no ripngd=no isisd=no buat file kosong dan memberikan password dengan perintah : #touch /etc/quagga/zebra.conf #echo "password password" > /etc/quagga/zebra.conf 2. restart quagga dengan /etc/init.d/quagga restart, cek proses dengan: ps ax pastikan deamon zebra ada. 3. lakukan konfigurasi interface eth0, lo sit dll dengan zebra : #telnet localhost zebra masukan password Perinta konfigurasi quagga mirip dengan perintah konfigurasi Cisco IOS kalau Anda sudah familiar dengan Cisco. Kebetulan saya dikantor ada beberapa Cisco Catalyst mulai dari 2950, 2960, 2970 dan Cisco router 3825 jadi udah biasa :) . sudah masuk ke quagga mari kita konfigurasi interface : 1. masuk ke terminal konfigurasi #ena (enable konfigurasi) #conf t # kalau lupa pake ? sebagai help-nya. #hostname aing (nama hostname) #password ena maneh (enable password) #int eth0 #link-detect (kalau jalan atau nggak koneksi) # ip addr 192.168.75.1/24 (set alamat ip)

#end #write #sh run (untuk melihat konfigurasi) Baik, Anda sudah bisa mengkonfigurasi interface dengan zebra, jadi mengganti konfigurasi dengan perintah #ifconfig eth0 192.168.75.1 netmask 255.255.255.0 2. Routing Statis #conf t #ip route 10.0.0.0/8 192.168.75.254 ( route ke 10.0.0.0/8 gateway 192.168.75.254 Oke ada bisa melakukan routing statik dengan zebra, mengganti perintah #route add -net 10.0.0.0/8 gw 192.168.75.254 Selanjutnya karena quagga merupakan routing daemon dengan OSPF, RIP, BGP dll maka saatnya melakukan routing dinamis. Contoh sederhana akan menggunakan OSPF untuk routing pada INHERENT kami. Kami mendapatkan IP address inherent 167.205.132.27/29 (lupa lagi prefik networknya) dan alamat IP publik kami adalah 222.124.204.192/27 (telkom astinet nih). Kemudian local node terdekat adalah ITB mengalokasikan kami pada OSPF area 10. Konfigurasinya : 1. Nyalakan daemon OSPF /etc/quagga/daemons.conf zebra=yes bgpd=no ospfd=yes ospf6d=no ripd=no ripngd=no isisd=no 2. konfigurasi ospf #telnet localhost ospf set password dan hostname, sama spt di atas #conf t #router ospf #network 167.205.132.0 area 10 (nanti di cek lagi perintahnya) #redistribute connected (lupa lagi perintahnya)

- To see the Quagga version available: # apt-cache policy quagga

quagga: Installed: (none) Candidate: 0.99.5-5etch3 Version table: 0.99.5-5etch3 0 500 http://kambing.ui.edu stable/main Packages 500 http://security.debian.org stable/updates/main Packages - To install Quagga: # apt-get install quagga - To see the Quagga dependencies: # apt-cache depends quagga quagga Depends: libc6 Depends: libcap1 Depends: libpam0g Depends: libreadline5 Depends: logrotate Depends: iproute |Depends: debconf Depends: <debconf-2.0> cdebconf debconf PreDepends: adduser Suggests: snmpd Conflicts: <zebra> Conflicts: <zebra-pj> Replaces: <zebra> Replaces: <zebra-pj> You have to activate the Quagga daemons matching the routing protocols you want to set on your router. zebra : Interface declaration and static routing bgpd : BGP routing protocol ospfd : OSPF routing protocol ospf6d : OSPF IPv6 routing protocol ripd : RIP v2 routing protocol ripngd : RIP IPv6 routing protocol In the example below, the zebra and IPv4 OSPF daemon have been activated. # vim /etc/quagga/daemons zebra=yes bgpd=no ospfd=yes ospf6d=no

ripd=no ripngd=no - 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 : zebra.conf bgpd : bgpd.conf ospfd : ospfd.conf ospf6d : ospf6d.conf ripd : ripd.conf ripngd : 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 - You can access the daemons by telnetting their port number because each daemon has its own configuration file and terminal interface. zebra : 2601 ripd : 2602 ripngd : 2603 ospfd : 2604 bgpd : 2605 ospf6d : 2606 By instance, to access the zebra daemon: # telnet localhost 2601 - To use vtysh, you must first create its configuration file as follows: # cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf /etc/quagga/vtysh.conf ! ! Sample ! ! service integrated-vtysh-config hostname quagga-router username root nopassword ! - Then its useful to add the VTYSH_PAGER=more setting in your /etc/environment file, otherwise you will see an unfriendly (END) blinking in the left-down corner of the screen each time your enter a command and will need to press the q key to continue. # echo VTYSH_PAGER=more > /etc/environnement

- 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 - By instance, to access the zebra daemon: # telnet localhost 2601 Or # vtysh If you want to run a Quagga command from the Linux shell: # vtysh -c command

Growth Up with Open Source


Home Article About

Install Quagga As Linux Router


Because the curious how to make Router in Linux, I was browsing to search for how to install Linux on the router using the quagga. After finding several blogs and the web of quagga load . finally I make a summaryand conclusions of how to install the router quagga. This posting only as a reminder, because my type of people forgetful. In this post I use the Ubuntu Linux distribution, because it is more practical and effective. Lets see at the following description. enjoy 1. Install source #apt-get install quagga quagga-doc 2. Edit file daemons #mcedit /etc/quagga/daemons 3. Change status no / yes on suitable routing protocol zebra=yes //Compulsory yes bgp=no //Border gateway protocol ospf=no //OSPF with IPV4 ospf6d=no //OSPF with IPv6 ripd=yes //RIP versi 2 ripngd=no //RIP with IPV6

4. Make file configuration zebra.conf and ripd.conf, by copy from sample file configuration #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 5. Set password [optional] #echo password password > /etc/quagga/zebra.conf 6. Change ownership user and group from files configuration in /etc/quagga, and change access permission #chown quagga.quaggavty /etc/quagga/*.conf #chmod 640 /etc/quagga/*.conf 7. Start daemons #/etc/init.d/quagga 8. Connect quagga #telnet localhost zebra 9. Connect routing protocol #telnet localhost [ ospf | bgp | rip | eigrp] =============OPTIONAL=============== By default quagga can only remoted from localhost [127.0.0.1], if we want to quagga can be accessed from other places, then: 1. Create file /etc/quagga/debian.conf #mcedit /etc/quagga/debian.conf - Examples of the contents of the file, according to the needs of # If this option is set the /etc/init.d/quagga script automatically loads # the config via vtysh -b when the servers are started. # Check /etc/pam.d/quagga if you intend to use vtysh! # vtysh_enable=yes //router di setting via VTYSH zebra_options= daemon -A // daemon -A , berarti dapat di access dari berbagai IP bgpd_options= daemon -A ospfd_options= daemon -A 127.0.0.1 192.168.1.104 //dapat di access dari localhost dan 192.168.1.104 ospf6d_options=daemon -A ripd_options= daemon -A ripngd_options=daemon -A isisd_options= daemon -A

============Setting VTYSH=========== 1. Create file configuration vtysh #touch /etc/quagga/vtysh.conf - Examples of the contents of the file, according to the needs of /etc/quagga/vtysh.conf ! ! Sample ! ! service integrated-vtysh-config ! Jika di disable maka file penyimpanan konfigurasi akan terpisah (misal ; zebra.conf dan ospfd.conf), jika di enable akan jadi satu pada Quagga.conf hostname quagga-router username root nopassword ! Note : As we see in the configuration file, the options service integrated-vtysh-config is disable, so that the files will be separate storage configuration (eg; zebra.conf and ospfd.conf), if so will enable the one on Quagga.conf

2.That does not happen in the blink when the remote with vtysh, do not forget to do the following #echo VTYSH_PAGER=more > /etc/environnement

You might also like