[Quagga] Install and Implement OSPF

Quagga is a routing software suite, providing implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. Quagga is a fork of GNU Zebra which was developed by Kunihiro Ishiguro. The Quagga tree aims to build a more involved community around Quagga than the current centralised model of GNU Zebra.

Quagga merupakan salah satu Opensource Routing Software kembangan dari Zebra, ada juga yang lain namanya Vyatta (yang ini belum saya coba). Quagga menyediakan beberapa routing service layaknya vendor network yang lain seperti Cisco, Mikrotik ataupun Juniper. Routing Protocol juga tersedia seperti halnya OSPFv2, OSPFv3, RIP v1 and v2, RIPng, dan BGP-4.

Platform yang didukung oleh Quagga

Linux 2.2.x and higher
FreeBSD 4.x and higher
NetBSD 1.6 and higher
OpenBSD 2.5 and higher
Solaris 2.6 and higher

Dalam Prakteknya untuk Quagga sendiri dari commandnya hampir mirip dengan Cisco, jadi yang sebelumnya sudah kenal Cisco anggap saja ini adiknya Cisco. 11 12 lah ūüėÄ

21

Oke kembali ke topik membahas mengenai cara Instalasi dan Konfigurasi. Disini saya menggunakan Debian versi 6.

1. Install Quagga
$ sudo apt-get install quagga
atau
#apt-get install quagga

2. Configure Daemons
root@randy:~# pico /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no

3. Configure Files
Untuk menjalankan Quagga sendiri perlu namanya default configuration, bisa pakai konfigurasi sendiri atau bisa pakai contoh konfigurasi yang sebelumnya sudah ada.
root@randy:~# cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
root@randy:~# cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/ospfd.conf

Kemudian kita perlu menambahkan user dan grup ownership kedalam direktori /etc/quagga
root@randy:~# chown randy.randy /etc/quagga/.conf
root@randy:~# chmod 640 /etc/quagga/
.conf
root@randy:~# /etc/init.d/quagga restart
Stopping Quagga daemons (prio:0): (waiting) .. ospfd zebra (bgpd) (ripd) (ripngd) (ospf6d) (isisd).
Removing all routes made by zebra.
Loading capability module if not yet done.
Starting Quagga daemons (prio:10): zebra ospfd.
root@randy:~#

4. Vtysh
Kita bisa mengakses ke masing-masing daemon dengan meremot telnet menggunakan nomor port, karena masing-masing daemon memiliki file konfigurasi masing-masing dan tampilan terminalnya.

zebra         2601/tcp          # zebra vty
ripd          2602/tcp          # RIPd vty
ripngd        2603/tcp          # RIPngd vty
ospfd         2604/tcp          # OSPFd vty
bgpd          2605/tcp          # BGPd vty
ospf6d        2606/tcp          # OSPF6d vty
ospfapi       2607/tcp          # ospfapi
isisd         2608/tcp          # ISISd vty

Contoh semisal saya mau akses ke daemon ospf, anda bisa telnet ke nomor portnya atau langsung ke servicenya.

22
atau
22

5. Test Login

root@randy:~# vtysh

Hello, this is Quagga (version 0.99.20.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

R1-Quagga# sh run
Building configuration…
Current configuration:
!
hostname R1-Quagga
!
service integrated-vtysh-config
!
password zebra
enable password zebra
!
interface eth0
ipv6 nd suppress-ra
!
interface eth1
ipv6 nd suppress-ra
!
interface eth2
ipv6 nd suppress-ra
!
interface lo
!
interface lo0
ip address 1.1.1.1/32
ipv6 nd suppress-ra
!
ip forwarding
!
line vty
!
end
R1-Quagga#

6. IP Forwarding
IP Forwarding dibutuhkan untuk mentransfer packet antar jaringan pada linux system.
R1-Quagga# conf t
R1-Quagga(config)# ip forwarding
R1-Quagga(config)# ex
R1-Quagga# wr

Verifikasi untuk melihat apakah IP Forwarding sudah aktif atau belum.
R1-Quagga# show ip forwarding
IP forwarding is on
R1-Quagga

7. Interface Configuration
R1-Quagga# sh interface  description
Interface       Status  Protocol  Description
eth0            up      unknown
eth1            up      unknown
eth2            up      unknown
lo              up      unknown
R1-Quagga#

Berikut contoh untuk konfigurasi ip address pada interface
R1-Quagga# conf t
R1-Quagga(config)# int eth2
R1-Quagga(config-if)# ip addr 12.12.12.1/24
R1-Quagga(config-if)# exit
R1-Quagga(config)# exit
R1-Quagga# write
Building Configuration…
Integrated configuration saved to /etc/quagga/Quagga.conf
[OK]
R1-Quagga#

8. Routing Configuration
Berikut contoh untuk konfigurasi ospf pada router Quagga
R1-Quagga# conf t
R1-Quagga(config)# router ospf
R1-Quagga(config-router)# network 12.12.12.0/24 area 0
R1-Quagga(config-router)# exi

Dengan beberapa command yang sudah tertulis diatas, gimana? hampir mirip-mirip cisco bukan? ūüėÄ
Oke berikut saya kasih contoh 3 router Quagga semua jalanin OSPF. 22R1-Quagga

R1-Quagga
interface eth2
ip address 12.12.12.1/24
!
interface lo
ip address 1.1.1.1/32
!
router ospf
network 1.1.1.1/32 area 0.0.0.0
network 12.12.12.0/24 area 0.0.0.0
!
ip forwarding

R2-Quagga
interface eth1
ip address 12.12.12.2/24
!
interface eth1
ip address 23.23.23.2/24
!
interface lo
ip address 2.2.2.2/32
!
router ospf
network 2.2.2.2/32 area 0.0.0.0
network 12.12.12.0/24 area 0.0.0.0
network 23.23.23.0/24 area 0.0.0.0
!
ip forwarding
!

R3-Quagga
interface eth0
ip address 23.23.23.3/24
!
interface lo
ip address 3.3.3.3/32
!
router ospf
network 3.3.3.3/32 area 0.0.0.0
network 23.23.23.0/24 area 0.0.0.0
!
ip forwarding

Verifikasi… Tapi pastikan IP Forwarding sudah diaktifkan di masing-masing router

    R1-Quagga# sh ip route
Codes: K – kernel route, C – connected, S – static, R – RIP, O – OSPF,
I – ISIS, B – BGP, > – selected route, * – FIB route

K>* 0.0.0.0/0 via 192.168.1.254, eth0
O   1.1.1.1/32 [110/10] is directly connected, lo, 00:00:22
C>* 1.1.1.1/32 is directly connected, lo
O>* 2.2.2.2/32 [110/20] via 12.12.12.2, eth2, 00:00:04
O>* 3.3.3.3/32 [110/30] via 12.12.12.2, eth2, 00:00:04
O   12.12.12.0/24 [110/10] is directly connected, eth2, 00:00:18
C>* 12.12.12.0/24 is directly connected, eth2
O>* 23.23.23.0/24 [110/20] via 12.12.12.2, eth2, 00:00:04
C>* 127.0.0.0/8 is directly connected, lo
C>* 192.168.1.0/24 is directly connected, eth0
C>* 192.168.60.0/24 is directly connected, eth1
R1-Quagga# ping 3.3.3.3
PING 3.3.3.3 (3.3.3.3) 56(84) bytes of data.
64 bytes from 3.3.3.3: icmp_req=1 ttl=63 time=8.03 ms
64 bytes from 3.3.3.3: icmp_req=2 ttl=63 time=1.68 ms
^C
— 3.3.3.3 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.689/4.860/8.032/3.172 ms
R1-Quagga#

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.