Difference between revisions of "TCP/IP: Quagga Bagaimana cara menggunakan"

From OnnoWiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
1. QUAGGA DAEMONS:
+
==Daemon di Quagga==
  
You have to activate the Quagga daemons matching the routing protocols you want to set on your router.
+
Kita harus mengaktifkan daemon di quagga sesuai dengan routing protokol yang kita inginkan di router kita.
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
+
zebra:    Interface declaration and static routing
zebra=yes
+
bgpd:    BGP routing protocol
bgpd=no
+
ospfd:    OSPF routing protocol
ospfd=yes
+
ospf6d:  OSPF IPv6 routing protocol
ospf6d=no
+
ripd:    RIP v2 routing protocol
ripd=no
+
ripngd:  RIP Ipv6 routing protocol
ripngd=no
 
  
Restart the Quagga service:
+
Contoh di bawah, zebra dan IPv4 OSPF di aktifkan
  
#/etc/init.d/quagga restart
+
vi /etc/quagga/daemons
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:
+
zebra=yes
 +
bgpd=no
 +
ospfd=yes
 +
ospf6d=no
 +
ripd=no
 +
ripngd=no
 +
isisd=no
 +
babeld=no
  
#ps -ef | grep quagga
+
Restart layanan Quagga:
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"
+
# /etc/init.d/quagga restart
#/etc/init.d/quagga start
 
  
 +
Stopping Quagga monitor daemon: (waiting) .. watchquagga.
 +
Stopping Quagga daemons (prio:0): (ospfd) (zebra) (bgpd) (ripd) (ripngd) (ospf6d) (isisd) (babeld).
 +
Removing all routes made by zebra.
 +
Loading capability module if not yet done.
 +
Starting Quagga daemons (prio:10): zebra ospfd.
 +
Starting Quagga monitor daemon: watchquagga.
  
2. CONFIGURATION FILES: (/etc/quagga/*.conf files)
+
Kita dapat mencek status daemon Quagga menggunakan perintah:
  
You must create a configuration file (even if it is empty) each time you activate a Quagga daemon.
+
sudo su
Each daemon is associated with a specific file name:
+
ps -ef | grep quagga
  
zebra:
+
quagga    4407    1  0 14:32 ?        00:00:00 /usr/lib/quagga/zebra --daemon -A 192.168.1.255 -A 224.0.0.9
bgpd:
+
quagga    4411    1  0 14:32 ?        00:00:00 /usr/lib/quagga/ospfd --daemon -A 192.168.1.255 -A 224.0.0.9
ospfd:
+
root      4415    1  0 14:32 ?        00:00:00 /usr/lib/quagga/watchquagga --daemon zebra 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:
+
Jika Quagga daemon tidak stop secara benar, kita dapat meng-kill secara manual dan men-start layanan Quagga:
  
#chown quagga.quaggavty /etc/quagga/*.conf
+
sudo su
#chmod 640 /etc/quagga/*.conf
+
kill -9 "UID number"
Restart the Quagga service:
+
/etc/init.d/quagga start
  
#/etc/init.d/quagga restart
+
==File Konfigurasi (file /etc/quagga/*.conf)==
Top of the page
 
  
 +
Kita harus membuat file konfigurasi (walaupun itu kosong) setiap kali kita akan mengaktifkan daemon Quagga.
 +
Setiap daemon akan membaca file tertentu:
  
3. DEBIAN.CONF FILE
+
vtysh:    vtysh.conf
 +
zebra:    zebra.conf
 +
bgpd:      bgpd.conf
 +
ospfd:    ospfd.conf
 +
ospf6d:    ospf6d.conf
 +
ripd:      ripd.conf
 +
ripngd:    ripngd.conf
 +
isisd:    isisd.conf
 +
babeld:    babeld.conf
  
By default, the Quagga daemons are listening only to the loopback interface 127.0.0.1. It means that you can telnet a daemon only on its loopback address 127.0.0.1 and thus cannot access it remotely.
+
Untuk membuat file konfigurasi, yang paling sederhana adalah mengcopy file dari /usr/share/doc/quagga/examples/ sebagai berikut:
  
If you want to telnet a Quagga daemon remotely you can, in the /etc/quagga/debian.conf file. Either indicate one or several IP addresses or remove the -A option meaning that you can telnet a daemon on any of its IP addresses.
+
cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
 +
cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
 +
cp /usr/share/doc/quagga/examples/bgpd.conf.sample /etc/quagga/bgpd.conf
 +
cp /usr/share/doc/quagga/examples/ripd.conf.sample /etc/quagga/ripd.conf
 +
cp /usr/share/doc/quagga/examples/ripngd.conf.sample /etc/quagga/ripngd.conf
 +
cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf
 +
cp /usr/share/doc/quagga/examples/ospf6d.conf.sample  /etc/quagga/ospf6d.conf
 +
cp /usr/share/doc/quagga/examples/isisd.conf.sample /etc/quagga/isisd.conf
 +
cp /usr/share/doc/quagga/examples/babeld.conf.sample /etc/quagga/babeld.conf
  
Here are two examples:
+
Sebetulnya kita dapat saja membuat file .conf kosong.
 +
Jika ini dilakukan, maka kita tidak dapat telnet ke daemon,
 +
kita perlu mengkonfigurasi ijin telnet dengan vtsh.
  
The ospfd daemon is listening to the 127.0.0.1 and 192.168.1.104 IP addresses.
+
Selanjutnya, kita perlu memperbaiki user dan group agar sesuai dengan quagga dan quaggavty
ospfd_options=" --daemon -A 127.0.0.1 192.168.1.104"
+
kepada file yang ada di dalam folder /etc/quagga:
  
The zebra daemon is listening to all the Linux interfaces IP addresses. We recommend using this setting. If you want to filter who can access to your router, configure access lists on the router software.
+
chown quagga.quaggavty /etc/quagga/*.conf
zebra_options=" --daemon "
+
chmod 640 /etc/quagga/*.conf
  
Here is the recommended debian.conf file:
+
Restart layanan Quagga :
  
#vim /etc/quagga/debian.conf
+
# /etc/init.d/quagga restart
  
# 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
 
zebra_options=" --daemon -A "
 
bgpd_options=" --daemon -A "
 
ospfd_options=" --daemon -A "
 
ospf6d_options="--daemon -A "
 
ripd_options=" --daemon -A "
 
ripngd_options="--daemon -A "
 
isisd_options=" --daemon -A "
 
  
The "vtysh_enable=yes" setting is required to access the Quaggga router via vtysh. (see vtysh section).
+
==DEBIAN.CONF FILE==
  
Restart the Quagga service
+
Default dari Quagga daemon akan mendengarkan interface loopback di 127.0.0.1. Artinya kita hanya bisa telnet di address 127.0.0.1 dan tidak bisa di akses secara remore.
  
#/etc/init.d/quagga restart
+
Jika kita ingin telnet ke Quagga daemon dari remote, kita dapat mengedit file /etc/quagga/debian.conf.  
Top of the page
+
Kita dapat memasukan IP address yang di di telnet atau membuang semua opsi -A.
  
 +
Contoh:
  
4. VTYSH
+
* daemon ospfd mendengarkan pada IP address 127.0.0.1 dan 192.168.1.104.
  
As indicated in the Quagga introduction, you can access the daemons by telnetting their port number because each daemon has its own configuration file and terminal interface.
+
ospfd_options=" --daemon -A 127.0.0.1 192.168.1.104"
  
zebra:
+
* daemon zebra mendengarkan semua IP address di interface Linux. Lebih di rekomendasikan untuk memfilter siapa yang dapat mengakses router.
ripd:
 
ripng:
 
ospfd:
 
bgpd:
 
ospf6d: 2601
 
2602
 
2603
 
2604
 
2605
 
2606
 
By instance, to access the ospfd daemon:
 
  
#telnet localhost 2604
+
zebra_options=" --daemon "
As it's not very practical to configure your router by telnetting its daemons separately, vtysh has been created to configure everything in one single interface.
 
  
To use vtysh, you must first create its configuration file as follows:
+
Berikut adalah rekomendasi file debian.conf:
  
#cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
+
#vim /etc/quagga/debian.conf
  
/etc/quagga/vtysh.conf
+
# If this option is set the /etc/init.d/quagga script automatically loads
!
+
# the config via "vtysh -b" when the servers are started.
! Sample
+
# Check /etc/pam.d/quagga if you intend to use "vtysh"!
!
+
#
! service integrated-vtysh-config
+
vtysh_enable=yes
hostname quagga-router
+
zebra_options=" --daemon -A 127.0.01"
username root nopassword
+
bgpd_options="  --daemon -A 127.0.01"
!
+
ospfd_options=" --daemon -A 127.0.01"
 +
ospf6d_options="--daemon -A ::1"
 +
ripd_options="  --daemon -A 127.0.01"
 +
ripngd_options="--daemon -A ::1"
 +
isisd_options=" --daemon -A 127.0.01"
 +
babeld_options=" --daemon -A 127.0.01"
  
Apply correct permissions and restart Quagga:
+
Konfigurasi "vtysh_enable=yes" dibutuhkan untuk mengakses router Quagga menggunakan vtysh.
 +
 
 +
Restart layanan Quagga
 +
 
 +
#/etc/init.d/quagga restart
 +
 
 +
==VTYSH==
 +
 
 +
Kita bisa mengakses daemon di Quagga dengan cara telnet ke port masing-masing daemon. Port tersebut adalah:
 +
 
 +
 
 +
zebra          2601/tcp                        # zebra vty
 +
ripd            2602/tcp                        # ripd vty (zebra)
 +
ripngd          2603/tcp                        # ripngd vty (zebra)
 +
ospfd          2604/tcp                        # ospfd vty (zebra)
 +
bgpd            2605/tcp                        # bgpd vty (zebra)
 +
ospf6d          2606/tcp                        # ospf6d vty (zebra)
 +
ospfapi        2607/tcp                        # OSPF-API
 +
isisd          2608/tcp                        # ISISd vty (zebra)
 +
 
 +
 
 +
Sebagai contoh, untuk akses ke daemon ospfd:
 +
 
 +
telnet localhost 2604
 +
 
 +
atau
 +
 
 +
telnet localhost ospfd
 +
 
 +
Akan sangat tidak praktis untuk mengkonfigurasi router dengan cara telnet ke masing-masing daemon secara terpisah,
 +
oleh karenanya dibuatlah vtysh untuk mengkonfigurasi segala sesuatu di satu interface.
 +
 
 +
Untuk mmenggunakan vtysh, kita pertama-tama perlu membuat file konfigurasi sebagai berikut:
 +
 
 +
cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
 +
 
 +
Isinya /etc/quagga/vtysh.conf
 +
 
 +
!
 +
! Sample
 +
!
 +
! service integrated-vtysh-config
 +
hostname quagga-router
 +
username root nopassword
 +
!
 +
 
 +
Betulkan ijin dan restart Quagga:
 +
 
 +
chown quagga.quaggavty /etc/quagga/*.conf
 +
chmod 640 /etc/quagga/*.conf
 +
/etc/init.d/quagga restart
  
#chown quagga.quaggavty /etc/quagga/*.conf
 
#chmod 640 /etc/quagga/*.conf
 
#/etc/init.d/quagga restart
 
 
In the example above the "service integrated-vtysh-config" setting has been disabled (recommended). In this case, when you save the config under vtysh, it will be stored in separate files depending on the protocols you activated.
 
In the example above the "service integrated-vtysh-config" setting has been disabled (recommended). In this case, when you save the config under vtysh, it will be stored in separate files depending on the protocols you activated.
 
Below, an example where the Quagga configuration is saved under vtysh. (The zebra and ospfd daemons have been enabled.)
 
Below, an example where the Quagga configuration is saved under vtysh. (The zebra and ospfd daemons have been enabled.)
  
#vtysh
+
#vtysh
quagga-router#write
+
quagga-router#write
Configuration saved to /etc/quagga/zebra.conf
+
Configuration saved to /etc/quagga/zebra.conf
Configuration saved to /etc/quagga/ospfd.conf
+
Configuration saved to /etc/quagga/ospfd.conf
  
 
If you activate "service integrated-vtysh-config", the configuration under vtysh will be saved in one file called Quagga.conf in the /etc/quagga/ directory.
 
If you activate "service integrated-vtysh-config", the configuration under vtysh will be saved in one file called Quagga.conf in the /etc/quagga/ directory.
 
With this setting, when you access a daemon via telnet, the daemon will look first to the Quagga.conf file before looking for its own file. This means that, when you telnet a device, there can be a difference between what you see after the "show run" command and the content of the associated file, for example zebra.conf.
 
With this setting, when you access a daemon via telnet, the daemon will look first to the Quagga.conf file before looking for its own file. This means that, when you telnet a device, there can be a difference between what you see after the "show run" command and the content of the associated file, for example zebra.conf.
  
#vtysh
+
#vtysh
quagga-router#write
+
quagga-router#write
Configuration saved to /etc/quagga/Quagga.conf
+
Configuration saved to /etc/quagga/Quagga.conf
  
 
It is recommended to disable "service integrated-vtysh-config" because if this setting is enabled and in case of a syntax error in the Quagga.conf file, this can lead to all your daemons being unable to start up. This will not be case when "service integrated-vtysh-config" is disabled because the configurations are stored in separate files.
 
It is recommended to disable "service integrated-vtysh-config" because if this setting is enabled and in case of a syntax error in the Quagga.conf file, this can lead to all your daemons being unable to start up. This will not be case when "service integrated-vtysh-config" is disabled because the configurations are stored in separate files.
Line 175: Line 200:
 
Then it's 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.
 
Then it's 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/environment
+
#echo VTYSH_PAGER=more > /etc/environment
 +
 
 
Log off and log on to enable the environment setting. You can now access the Quagga router with the vtysh command:
 
Log off and log on to enable the environment setting. You can now access the Quagga router with the vtysh command:
  
#vtysh
+
# vtysh
Hello, this is Quagga (version 0.99.6).
 
Copyright 1996-2005 Kunihiro Ishiguro, et al.
 
  
quagga-router#
+
Hello, this is Quagga (version 0.99.22).
 +
Copyright 1996-2005 Kunihiro Ishiguro, et al.
 +
 +
ubuntu#  
  
If you want to run a Quagga command from the Linux shell:
+
Jika kita ingin menjalankan perintah Quagga dari Shell Linux, lakukan:
  
#vtysh -c "command"
+
vtysh -c "command"
For instance, vtysh -c "show ip route" will display the Quagga routing table.
+
 
 +
Contoh:
 +
 
 +
vtysh -c "show ip route"
 +
 
 +
akan menampilkan tabel routing.
  
 
You can use Ping and traceroute to perform connectivity checks from the vtysh prompt. Of course, these two programs need to be installed on the Linux machine. Ping is generally installed by default but traceroute often not.
 
You can use Ping and traceroute to perform connectivity checks from the vtysh prompt. Of course, these two programs need to be installed on the Linux machine. Ping is generally installed by default but traceroute often not.
 
To install traceroute:
 
To install traceroute:
  
#apt-get install traceroute
+
#apt-get install traceroute
Top of the page
+
 
 +
==IP FORWARDING==
  
 +
IP forwarding dibutuhkan untuk mentransfer paket antar interface di sebuah sistem Linux.
  
5. IP FORWARDING:
+
echo "1" > /proc/sys/net/ipv4/ip_forward
  
IP forwarding is required to transfer packets between the network interfaces of a Linux system.
+
Perintah di atas akan menambahkan nilai "1" dalam file /proc/sys/net/ipv4/ip_forward dan mengaktifkan IP forwarding.
See a picture of the Linux kernel routing.
+
jika kita menginginkan agar IP forwarding tetap ada saat Linux reboot, lakukan
  
#echo "1" > /proc/sys/net/ipv4/ip_forward
+
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
The command above will add the "1" value inside the /proc/sys/net/ipv4/ip_forward file and thus activate the IP forwarding.
 
If you want to keep the IP forwarding after a Linux reboot:
 
  
#echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
+
Jika juga dapat mencek status ip_forwarding di router Quagga,
It is possible to check the ip_forwarding status under the Quagga router:
+
menggunakan perintah:
  
#show ip forwarding
+
show ip forwarding
IP forwarding is on
 
  
In this case the IP forwarding is activated.
+
Akan keluar
  
Top of the page.
+
IP forwarding is on
  
 +
Jika IP forwarding di aktifkan.
  
6. SPEED/DUPLEX:
+
==SPEED/DUPLEX==
  
 
It is not possible to set the duplex and speed settings on the Quagga plateform. You have to configure them at the Linux level.
 
It is not possible to set the duplex and speed settings on the Quagga plateform. You have to configure them at the Linux level.
 
Use the interface configuration tutorial for assistance.
 
Use the interface configuration tutorial for assistance.
 
Top of the page.
 
 
 
  
 
==Pranala Menarik==
 
==Pranala Menarik==

Latest revision as of 11:04, 13 November 2013

Daemon di Quagga

Kita harus mengaktifkan daemon di quagga sesuai dengan routing protokol yang kita inginkan di router kita.

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

Contoh di bawah, zebra dan IPv4 OSPF di aktifkan

vi /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no 
isisd=no
babeld=no

Restart layanan Quagga:

# /etc/init.d/quagga restart
Stopping Quagga monitor daemon: (waiting) .. watchquagga.
Stopping Quagga daemons (prio:0): (ospfd) (zebra) (bgpd) (ripd) (ripngd) (ospf6d) (isisd) (babeld).
Removing all routes made by zebra.
Loading capability module if not yet done.
Starting Quagga daemons (prio:10): zebra ospfd.
Starting Quagga monitor daemon: watchquagga.

Kita dapat mencek status daemon Quagga menggunakan perintah:

sudo su
ps -ef | grep quagga
quagga    4407     1  0 14:32 ?        00:00:00 /usr/lib/quagga/zebra --daemon -A 192.168.1.255 -A 224.0.0.9
quagga    4411     1  0 14:32 ?        00:00:00 /usr/lib/quagga/ospfd --daemon -A 192.168.1.255 -A 224.0.0.9
root      4415     1  0 14:32 ?        00:00:00 /usr/lib/quagga/watchquagga --daemon zebra ospfd


Jika Quagga daemon tidak stop secara benar, kita dapat meng-kill secara manual dan men-start layanan Quagga:

sudo su
kill -9 "UID number"
/etc/init.d/quagga start

File Konfigurasi (file /etc/quagga/*.conf)

Kita harus membuat file konfigurasi (walaupun itu kosong) setiap kali kita akan mengaktifkan daemon Quagga. Setiap daemon akan membaca file tertentu:

vtysh:     vtysh.conf
zebra:     zebra.conf
bgpd:      bgpd.conf
ospfd:     ospfd.conf
ospf6d:    ospf6d.conf
ripd:      ripd.conf
ripngd:    ripngd.conf
isisd:     isisd.conf
babeld:    babeld.conf

Untuk membuat file konfigurasi, yang paling sederhana adalah mengcopy file dari /usr/share/doc/quagga/examples/ sebagai berikut:

cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
cp /usr/share/doc/quagga/examples/bgpd.conf.sample /etc/quagga/bgpd.conf
cp /usr/share/doc/quagga/examples/ripd.conf.sample /etc/quagga/ripd.conf
cp /usr/share/doc/quagga/examples/ripngd.conf.sample /etc/quagga/ripngd.conf
cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf
cp /usr/share/doc/quagga/examples/ospf6d.conf.sample  /etc/quagga/ospf6d.conf
cp /usr/share/doc/quagga/examples/isisd.conf.sample /etc/quagga/isisd.conf
cp /usr/share/doc/quagga/examples/babeld.conf.sample /etc/quagga/babeld.conf

Sebetulnya kita dapat saja membuat file .conf kosong. Jika ini dilakukan, maka kita tidak dapat telnet ke daemon, kita perlu mengkonfigurasi ijin telnet dengan vtsh.

Selanjutnya, kita perlu memperbaiki user dan group agar sesuai dengan quagga dan quaggavty kepada file yang ada di dalam folder /etc/quagga:

chown quagga.quaggavty /etc/quagga/*.conf
chmod 640 /etc/quagga/*.conf

Restart layanan Quagga :

# /etc/init.d/quagga restart


DEBIAN.CONF FILE

Default dari Quagga daemon akan mendengarkan interface loopback di 127.0.0.1. Artinya kita hanya bisa telnet di address 127.0.0.1 dan tidak bisa di akses secara remore.

Jika kita ingin telnet ke Quagga daemon dari remote, kita dapat mengedit file /etc/quagga/debian.conf. Kita dapat memasukan IP address yang di di telnet atau membuang semua opsi -A.

Contoh:

  • daemon ospfd mendengarkan pada IP address 127.0.0.1 dan 192.168.1.104.
ospfd_options=" --daemon -A 127.0.0.1 192.168.1.104"
  • daemon zebra mendengarkan semua IP address di interface Linux. Lebih di rekomendasikan untuk memfilter siapa yang dapat mengakses router.
zebra_options=" --daemon "

Berikut adalah rekomendasi file debian.conf:

#vim /etc/quagga/debian.conf
# 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
zebra_options=" --daemon -A 127.0.01"
bgpd_options="  --daemon -A 127.0.01"
ospfd_options=" --daemon -A 127.0.01"
ospf6d_options="--daemon -A ::1"
ripd_options="  --daemon -A 127.0.01"
ripngd_options="--daemon -A ::1"
isisd_options=" --daemon -A 127.0.01"
babeld_options=" --daemon -A 127.0.01"

Konfigurasi "vtysh_enable=yes" dibutuhkan untuk mengakses router Quagga menggunakan vtysh.

Restart layanan Quagga

#/etc/init.d/quagga restart

VTYSH

Kita bisa mengakses daemon di Quagga dengan cara telnet ke port masing-masing daemon. Port tersebut adalah:


zebra           2601/tcp                        # zebra vty
ripd            2602/tcp                        # ripd vty (zebra)
ripngd          2603/tcp                        # ripngd vty (zebra)
ospfd           2604/tcp                        # ospfd vty (zebra)
bgpd            2605/tcp                        # bgpd vty (zebra)
ospf6d          2606/tcp                        # ospf6d vty (zebra)
ospfapi         2607/tcp                        # OSPF-API
isisd           2608/tcp                        # ISISd vty (zebra)


Sebagai contoh, untuk akses ke daemon ospfd:

telnet localhost 2604

atau

telnet localhost ospfd

Akan sangat tidak praktis untuk mengkonfigurasi router dengan cara telnet ke masing-masing daemon secara terpisah, oleh karenanya dibuatlah vtysh untuk mengkonfigurasi segala sesuatu di satu interface.

Untuk mmenggunakan vtysh, kita pertama-tama perlu membuat file konfigurasi sebagai berikut:

cp /usr/share/doc/quagga/examples/vtysh.conf.sample /etc/quagga/vtysh.conf

Isinya /etc/quagga/vtysh.conf

!
! Sample
!
! service integrated-vtysh-config
hostname quagga-router
username root nopassword
!

Betulkan ijin dan restart Quagga:

chown quagga.quaggavty /etc/quagga/*.conf
chmod 640 /etc/quagga/*.conf
/etc/init.d/quagga restart

In the example above the "service integrated-vtysh-config" setting has been disabled (recommended). In this case, when you save the config under vtysh, it will be stored in separate files depending on the protocols you activated. Below, an example where the Quagga configuration is saved under vtysh. (The zebra and ospfd daemons have been enabled.)

#vtysh
quagga-router#write
Configuration saved to /etc/quagga/zebra.conf
Configuration saved to /etc/quagga/ospfd.conf

If you activate "service integrated-vtysh-config", the configuration under vtysh will be saved in one file called Quagga.conf in the /etc/quagga/ directory. With this setting, when you access a daemon via telnet, the daemon will look first to the Quagga.conf file before looking for its own file. This means that, when you telnet a device, there can be a difference between what you see after the "show run" command and the content of the associated file, for example zebra.conf.

#vtysh
quagga-router#write
Configuration saved to /etc/quagga/Quagga.conf

It is recommended to disable "service integrated-vtysh-config" because if this setting is enabled and in case of a syntax error in the Quagga.conf file, this can lead to all your daemons being unable to start up. This will not be case when "service integrated-vtysh-config" is disabled because the configurations are stored in separate files.

Check that the default "vtysh_enable=yes" setting are configured in your /etc/quagga/debian.conf file. You can read the previous paragraph about the debian.conf file to get more information.

Then it's 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/environment

Log off and log on to enable the environment setting. You can now access the Quagga router with the vtysh command:

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

ubuntu# 

Jika kita ingin menjalankan perintah Quagga dari Shell Linux, lakukan:

vtysh -c "command"

Contoh:

vtysh -c "show ip route"

akan menampilkan tabel routing.

You can use Ping and traceroute to perform connectivity checks from the vtysh prompt. Of course, these two programs need to be installed on the Linux machine. Ping is generally installed by default but traceroute often not. To install traceroute:

#apt-get install traceroute

IP FORWARDING

IP forwarding dibutuhkan untuk mentransfer paket antar interface di sebuah sistem Linux.

echo "1" > /proc/sys/net/ipv4/ip_forward

Perintah di atas akan menambahkan nilai "1" dalam file /proc/sys/net/ipv4/ip_forward dan mengaktifkan IP forwarding. jika kita menginginkan agar IP forwarding tetap ada saat Linux reboot, lakukan

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf

Jika juga dapat mencek status ip_forwarding di router Quagga, menggunakan perintah:

show ip forwarding

Akan keluar

IP forwarding is on

Jika IP forwarding di aktifkan.

SPEED/DUPLEX

It is not possible to set the duplex and speed settings on the Quagga plateform. You have to configure them at the Linux level. Use the interface configuration tutorial for assistance.

Pranala Menarik