RIP V2 Ubuntu Dynamic Routing dengan Quagga - Komputer Bukan Manusia

Komputer Bukan Manusia

".....yang aku takutkan bukan ketika komputer mampu berfikir seperti manusia, tetapi ketika manusia mulai berfikir seperti komputer"

Sponsor

Sponsor

Breaking

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Thursday, October 30, 2014

RIP V2 Ubuntu Dynamic Routing dengan Quagga


Selain dengan router sebenarnya (misal Cisco) kita dapat juga melakukan routing dinamic (misal dengan protocol RIP V2) pada Linux. Requirementnya adalah:
  1. OS Linux (Quagga)
  2. 2 PC dengan 2 NIC.
  3. Kabel cross.
Lihat topologi dibawah ini:


Cara konfigurasi:
Pada Server 1 yang konek ke ISP:
1.install quagga–>popi@ubuntuserver:~$ sudo apt-get install quagga
2.aktifkan daemon untuk zebra dan ripd
popi@ubuntuserver:~$ sudo vi /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=no
ospf6d=no
ripd=yes
ripngd=no
3.restart–>popi@ubuntuserver:~$ sudo /etc/init.d/quagga restart
4.cek daemonnya sudah ada belum –>popi@ubuntuserver:~$ ps -ef | grep quagga
5.buat config file.copy file zebra (untuk interface) dan ripd (untuk routing RIP)
popi@ubuntuserver:~$ sudo cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
popi@ubuntuserver:~$ sudo cp /usr/share/doc/quagga/examples/ripd.conf.sample /etc/quagga/ripd.conf
6.berikan user dan group ownership pada quagga and quaggavty
popi@ubuntuserver:~$ sudo chown quagga.quaggavty /etc/quagga/*.conf
popi@ubuntuserver:~$ sudo chmod 640 /etc/quagga/*.conf
7.restart
popi@ubuntuserver:~$ sudo /etc/init.d/quagga restart
8.configurasi file zebra.conf untuk config interface (password =zebra)
popi@ubuntuserver:~$ telnet localhost 2601
9.buat configurasi seperti ini di global config:
interface eth0
ip address 11.0.0.1/8
ipv6 nd suppress-ra
!
interface eth1
ip address 202.93.236.85/26
10.jangan lupa untuk menyimpan kedalam memory (perintah write)
11.configurasi file ripd.conf untuk routing (password = zebra)
popi@ubuntuserver:~$ telnet localhost 2602
12.buat configurasi seperti ini di global config:
router rip
version 2
network 11.0.0.0/8
network 202.93.236.0/26
13.restart
popi@ubuntuserver2:~$ sudo /etc/init.d/quagga restart
Pada Server 2 yang konek ke LAN:
1.Install quagga–>popi@ubuntuserver2:~$ sudo apt-get install quagga
2.aktifkan daemon untuk zebra dan ripd
popi@ubuntuserver2:~$ sudo vi /etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=no
ospf6d=no
ripd=yes
ripngd=no
3.restart–>popi@ubuntuserver2:~$ sudo /etc/init.d/quagga restart
cek daemonnya sudah ada belum –>popi@ubuntuserver2:~$ ps -ef | grep quagga
4.buat config file.copy file zebra (untuk interface) dan ripd (untuk routing RIP)
popi@ubuntuserver2:~$ sudo /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
popi@ubuntuserver2:~$ sudo /usr/share/doc/quagga/examples/ripd.conf.sample /etc/quagga/ripd.conf
5.berikan user dan group ownership pada quagga and quaggavty
popi@ubuntuserver2:~$ sudo chown quagga.quaggavty /etc/quagga/*.conf
popi@ubuntuserver2:~$ sudo chmod 640 /etc/quagga/*.conf
6.restart
popi@ubuntuserver2:~$ sudo /etc/init.d/quagga restart
7.configurasi file zebra.conf untuk config interface (password =zebra)
popi@popi@ubuntuserver2:~$ telnet localhost 2601
8.buat configurasi seperti ini di global config:
interface eth0
ip address 11.0.0.10/8
ipv6 nd suppress-ra
!
interface eth1
ip address 12.0.0.1/8
9.jangan lupa untuk menyimpan kedalam memory (perintah write)
10.configurasi file ripd.conf untuk routing (password = zebra)
popi@popi@ubuntuserver2:~$ telnet localhost 2602
11.buat configurasi seperti ini di global config:
router rip
version 2
network 11.0.0.0/8
network 12.0.0.0/8
12.restart
popi@ubuntuserver2:~$ sudo /etc/init.d/quagga restart
Cara mengecek RIP nya sudah jalan (jalankan perintah sh ip route pada router zebra):
popi@popi@ubuntuserver2:~$ telnet localhost 2601
Router# sh ip ro
Router# 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 202.93.236.65, eth1
C>* 11.0.0.0/8 is directly connected, eth0
R>* 12.0.0.0/8 [120/2] via 11.0.0.10, eth0, 00:35:30
C>* 127.0.0.0/8 is directly connected, lo
C>* 202.93.236.64/26 is directly connected, eth1
Hasil ping dari Server1 ke Interface dibelakang Server 2 (ip 11.0.0.10 dan 12.0.0.1)
popi@ubuntuserver:~$ ping 11.0.0.10
PING 11.0.0.10 (11.0.0.10) 56(84) bytes of data.
64 bytes from 11.0.0.10: icmp_seq=1 ttl=64 time=0.139 ms
64 bytes from 11.0.0.10: icmp_seq=2 ttl=64 time=0.138 ms
64 bytes from 11.0.0.10: icmp_seq=3 ttl=64 time=0.146 ms
64 bytes from 11.0.0.10: icmp_seq=4 ttl=64 time=0.151 ms
64 bytes from 11.0.0.10: icmp_seq=5 ttl=64 time=0.150 ms
^C
— 11.0.0.10 ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.138/0.144/0.151/0.016 ms
popi@ubuntuserver:~$ ping 12.0.0.1
PING 12.0.0.1 (12.0.0.1) 56(84) bytes of data.
64 bytes from 12.0.0.1: icmp_seq=1 ttl=64 time=0.155 ms
64 bytes from 12.0.0.1: icmp_seq=2 ttl=64 time=0.124 ms
64 bytes from 12.0.0.1: icmp_seq=3 ttl=64 time=0.145 ms

No comments:

Post a Comment

Post Top Ad

Responsive Ads Here