quagga routing debian

Upload: uma-wifi

Post on 06-Apr-2018

245 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/2/2019 Quagga Routing Debian

    1/7

    0Quagga 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.confdan daemons.conf.

    1. enable kan daemon zebra dulu dan buat file konfigurasi kosong:

    zebra=yesbgpd=noospfd=noospf6d=noripd=noripngd=noisisd=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 axpastikan deamon zebra ada.

    3. lakukan konfigurasi interface eth0, lo sit dll dengan zebra :

    #telnet localhost zebramasukan password

    Perinta konfigurasi quagga mirip dengan perintah konfigurasi Cisco IOS kalauAnda sudah familiar dengan Cisco. Kebetulan saya dikantor ada beberapa CiscoCatalyst 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)

    http://blanov.blogspot.com/2008/11/quagga-routing-debian.html#commentshttp://blanov.blogspot.com/2008/11/quagga-routing-debian.htmlhttp://blanov.blogspot.com/2008/11/quagga-routing-debian.htmlhttp://blanov.blogspot.com/2008/11/quagga-routing-debian.html#commentshttp://blanov.blogspot.com/2008/11/quagga-routing-debian.html
  • 8/2/2019 Quagga Routing Debian

    2/7

    #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 gateway192.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, BGPdll maka saatnya melakukan routing dinamis. Contoh sederhana akanmenggunakan OSPF untuk routing pada INHERENT kami. Kami mendapatkanIP address inherent 167.205.132.27/29 (lupa lagi prefik networknya) dan alamatIP publik kami adalah 222.124.204.192/27 (telkom astinet nih). Kemudian localnode terdekat adalah ITB mengalokasikan kami pada OSPF area 10.

    Konfigurasinya :1. Nyalakan daemon OSPF /etc/quagga/daemons.conf

    zebra=yes

    bgpd=noospfd=yesospf6d=noripd=noripngd=noisisd=no

    2. konfigurasi ospf#telnet localhost ospfset 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

  • 8/2/2019 Quagga Routing Debian

    3/7

    quagga:

    Installed: (none)

    Candidate: 0.99.5-5etch3Version table:

    0.99.5-5etch3 0

    500 http://kambing.ui.edu stable/main Packages500 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: libpam0gDepends: libreadline5

    Depends: logrotateDepends: iproute

    |Depends: debconf

    Depends: cdebconf

    debconf

    PreDepends: adduser

    Suggests: snmpdConflicts:

    Conflicts: Replaces: Replaces:

    You have to activate the Quagga daemons matching the routing protocols you want to set

    on your router.

    zebra : Interface declaration and static routingbgpd : BGP routing protocol

    ospfd : OSPF routing protocol

    ospf6d : OSPF IPv6 routing protocolripd : 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/daemonszebra=yes

    bgpd=no

    ospfd=yesospf6d=no

    http://www.zulfanruri.com/install-quagga.htmhttp://www.zulfanruri.com/install-quagga.htm
  • 8/2/2019 Quagga Routing Debian

    4/7

    ripd=no

    ripngd=no

    - CONFIGURATION FILES: (/etc/quagga/*.conf files). You must create a configurationfile (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.confospfd : ospfd.conf

    ospf6d : ospf6d.conf

    ripd : ripd.confripngd : 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 thezebra.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 itsown configuration file and terminal interface.

    zebra : 2601

    ripd : 2602ripngd : 2603

    ospfd : 2604

    bgpd : 2605

    ospf6d : 2606By 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 thescreen each time your enter a command and will need to press the q key to continue.

    # echo VTYSH_PAGER=more > /etc/environnement

  • 8/2/2019 Quagga Routing Debian

    5/7

    - 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

    # vtyshIf 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 toinstall 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 IPV4ospf6d=no //OSPF with IPv6

    ripd=yes //RIP versi 2

    ripngd=no //RIP with IPV6

    http://opensourcecentre.wordpress.com/http://opensourcecentre.wordpress.com/http://opensourcecentre.wordpress.com/article/http://opensourcecentre.wordpress.com/about/http://opensourcecentre.wordpress.com/http://opensourcecentre.wordpress.com/http://opensourcecentre.wordpress.com/article/http://opensourcecentre.wordpress.com/about/
  • 8/2/2019 Quagga Routing Debian

    6/7

    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 canbe 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 dan192.168.1.104

    ospf6d_options=daemon -A ripd_options= daemon -A

    ripngd_options=daemon -A

    isisd_options= daemon -A

  • 8/2/2019 Quagga Routing Debian

    7/7

    ============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 danospfd.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.confand 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