Posts Tagged ICT Unsri
Prinsip Redistribute Routing Protocol
Redistribute adalah cara untuk meredistribusikan kembali routing tabel yang dibentuk oleh suatu routing protocol untuk diteruskan ke routing protocol lain. Dengan redistribute kita bisa membentuk routing tabel yang lengkap dari suatu topologi walaupun menggunakan routing protocol yang berbeda. Pada prinsipnya router yang menjadi penghubung antara network dengan routing protocol yang berbeda akan menggunakan routing protocol sesuai dengan routing protocol yang dipergunakan oleh kedua network tersebut, misal interface F0/0 pada router tersebut berhubungan dengan network yang menggunakan RIP maka router tersebut harus menggunakan RIP dan pada F0/1 menggunakan OSPF maka router tersebut juga harus menggunakan OSPF sesuai dengan network tempat interface tersebut terhubung. Untuk membuat agar routing tabel yang dibentuk oleh RIP bisa diteruskan menuju ke OSPF maka dipergunakan redistribute RIP, dan sebaliknya agar routing tabel yang terbentuk pada OSPF bisa diteruskan menuju RIP maka dipergunakanlah redistribute OSPF.
Contoh dibawah ini adalah redistribute RIP dan OSPF
Instalasi Step by Step Routing Daemon Quagga pada Centos 5.2
Router adalah peralatan atau device yang melakukan fungsi routing, Routing adalah proses meneruskan paket data dari satu network menuju network lain, sehingga data mempunyai path dalam mencapai suatu destination atau tujuan, routing bisa terjadi karena adanya routing tabel, routing tabel bisa terbentuk dengan dua cara yaitu secara Static dan Dyamic. Quagga adalah Routing Daemon yang mendukung routing protokol static maupun routing protocol dynamic seperti RIP, OSPF maupun routing antar Autonomus System yaitu BGP. Dengan Quagga kita bisa menjadikan suatu PC menjadi router yang murah dan cukup handal. Pada tulisan kali ini akan dijelaskan proses step by step instalasi routing daemon Quagga pada Centos 5.2
PERSYARATAN SEBELUM INSTALASI QUAGGA PADA CENTOS 5.2
- Download iso CentOS 5.2 DVD atau CD atau versi yang terbaru pada mirror yang terdekat atau pada ftp://ftp.unsri.ac.id/linux/Centos/. Lakukan burning ke DVD atau CD
- Mempunyai koneksi internet
- IP address yang dipergunakan pada tutorial ini yaitu IP address 192.168.1.4/24 untuk eth0 dan IP address 192.168.2.1/24 untuk eth1
INSTALASI CENTOS
Masukkan DVD atau CD1 dari Centos, dan atur BIOS supaya melakukan booting dari DVD/CD
Lakukan Skip untuk menghemat waktu
Klik Next
Untuk pemilihan language pilih English, kecuali anda mengerti bahasa yang lain
Pilih keyboard dengan layout U.S. English
Klik Yes
Pilih Review and modify partitioning layout
Tidak pilihan lain (no where to run :-p ) klik yes
Pilih Reset dan klik yes
Klik New, Mount Point pilih /boot ketik size 100 dan klik Ok
Klik bagian partisi yang masih free, klik New, pada File System Type pilih Swap, dan masukkan nilai sebaiknya sebesar dua kali ukuran RAM pada komputer kita, misal ukuran RAM kita 512 maka masukkan nilai 1024, atau anda boleh memasukkan nilai lebih besar dari ukuran tersebut.
Klik Free partisi lagi, klik New, Mount Point / (root), pilih Fill to maximum allowable size, sehingga sisa seluruh partisi kan dijadikan partisi root, klik Ok
Klik Next
Klik Next
Untuk Network Device, klik Active on Boot, dan untuk pemberian IP address biarkan dahulu secara automatically via DHCP, sebab nanti kita akan melakukan setting IP address secara manual
Pilih Asia/Jakarta
Masukkan password root, sesuai dengan password yang anda kehendaki
Pilih server, Customize now, klik Next
Untuk pemilihan paket
- Pada Desktop Environment jangan melakukan pemilihan packet
- Applications pilihlah Editors, Text Based Internet
- Pada Developments, pilihlah Development Libraries, Development Tools
- Pada Servers pilihlah, DNS Name Servers, Network Server, Server Configuration Tools, klik Network Server dan pilihlah DHCP dan Quagga
- Untuk Base system, pilihlah Administration Tools, Base, System Tools
- Dan kosongkan untuk pilihan paket yang lain
Klik Next
Hardisk sedang di format
Proses Instalasi tengah berlangsung
Klik Reboot, proses instalasi selesai
DISABLE DAN FIREWALL AND SELINUX
Pilih Firewall configuration dan klik Run Tool
Pada Security Level dan SELinux pilih Disabled, klik OK
Pilih Exit dan Enter
Setelah masuk ke console masukkan username dan password anda, langkah berikutnya kita akan melakukan import GPG keys untuk paket software yang sudah kita instalasi
[root@localhost ~]# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Agar kita dapat menginstal maupun mengupdate paket yang tidak terdapat pada repository Centos 5.2 lakukan import GPG keys dari wieers.com
[root@localhost ~]# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
SETTING IP ADDRESS PADA INTERFACE ROUTER
[root@localhost network-scripts]# vi ifcfg-eth0
NAME=”"
GATEWAY=192.168.1.1
BOOTPROTO=static
HWADDR=00:0C:29:89:CF:E6
DEVICE=eth0
MTU=”1500″
NETMASK=”255.255.255.0″
BROADCAST=”192.168.1.255″
IPADDR=”192.168.1.4″
NETWORK=”192.168.1.0″
ONBOOT=yes
[root@localhost network-scripts]# vi ifcfg-eth1
NAME=”"
BOOTPROTO=static
HWADDR=00:0C:29:89:CF:F0
DEVICE=eth1
MTU=”1500″
NETMASK=”255.255.255.0″
BROADCAST=”192.168.2.255″
IPADDR=”192.168.2.1″
NETWORK=”192.168.2.0″
ONBOOT=yes
[root@localhost network-scripts]# service network restart
INSTALL DAN UPDATE MENGGUNAKAN YUM
Perintah Yum (Yellow dog Updater Modified) dapat kita gunakan untuk menginstal maupun mengupdate paket secara online dan otomatis akan mencari paket yang kita inginkan tersebut menuju site yang mempunyai repository Centos
INSTALASI QUAGGA
Perintah ini akan menginstalasi quagga jika kita lupa memilih paket Quagga pada saat proses instalasi, dan akan mendownload versi terbaru dari Quagga termasuk file-file dependencies-nya.
[root@localhost ~]# yum install quagga
Masuk ke direktori /etc/quagga/
[root@quagga ~]# cd /etc/quagga/
Melihat daftar file pada direktori tersebut
[root@quagga quagga]# ls
bgpd.conf.sample ospfd.conf.sample vtysh.conf zebra.conf.sample
bgpd.conf.sample2 ripd.conf.sample vtysh.conf.sample
ospf6d.conf.sample ripngd.conf.sample zebra.conf
Terlihat disitu terdapat file zebra.conf.sample yang merupakan file sample konfigurasi awal dari Quagga, dikarenakan file zebra.conf masih belum ada konfigurasinya ada baiknya kita me-rename atau meng-copy file tersebut dengan nama lain, disini kita akan mengubah nama zebra.conf menjadi zebra.conf.backup, gunakanlah perintah mv
[root@quagga quagga]# mv zebra.conf zebra.conf.backup
Copy zebra.conf.sample menjadi zebra.conf
[root@quagga quagga]# cp zebra.conf.sample zebra.conf
Pada contoh instalasi ini kita akan menggunakan routing protocol OSPF, karena itu ubah nama ospfd.conf.sample menjadi ospfd.conf, jika anda ingin menggunakan protocol yang lain seperti RIP dan BGP maka anda bisa melakukan hal yang sama.
[root@quagga quagga]# cp ospfd.conf.sample ospfd.conf
Lakukan perintah start pada Quagga dan OSPF, agar keduanya diaktifkan dan dijalankan
[root@quagga quagga]# service zebra start
[root@quagga quagga]# service ospfd start
Atur kedua aplikasi juga diaktifkan pada saat boot
[root@quagga quagga]# chkconfig zebra on
[root@quagga quagga]# chkconfig ospfd on
Quagga maupun routing protocol yang digunakan mempunyai file konfigurasi yang berbeda, jika kita terbiasa menggunakan router Cisco maupun Vyatta, kita tidak perlu melakukan konfigurasi secara terpisah, jadi antara Quagga dan routing protocol-nya pun mempunyai service tersendiri, memang agak sedikit ruwet tetapi bagi kita yang menyukai proses ketimbang semata-mata hasil, tentu hal ini merupakan suatu keasyikan tersendiri. Untuk melihat daftar port yang digunakan masing-masing service tersebut, kita bisa melihatnya dengan perintah vi /etc/services
[root@quagga quagga]# vi /etc/services
————————————————cut——————————————————–
# Ports numbered 2600 through 2606 are used by the zebra package without
# being registred. The primary names are the registered names, and the
# unregistered names used by zebra are listed as aliases.
hpstgmgr 2600/tcp zebrasrv # HPSTGMGR
hpstgmgr 2600/udp # HPSTGMGR
discp-client 2601/tcp zebra # discp client
discp-client 2601/udp # discp client
discp-server 2602/tcp ripd # discp server
discp-server 2602/udp # discp server
servicemeter 2603/tcp ripngd # Service Meter
servicemeter 2603/udp # Service Meter
nsc-ccs 2604/tcp ospfd # NSC CCS
————————————————cut——————————————————–
Terlihat disitu bahwa Quagga menggunakan port 2601 dan OSPF menggunakan port 2604, lakukan telnet untuk mengakses service tersebut dengan menggunakan IP loopback 127.o.o.1 dan port yang dipergunakan oleh masing-masing service, sehingga kita bisa melakukan konfigurasi. Bagi yang terbiasa melakukan konfigurasi pada router Cisco, tentu melakukan konfigurasi pada Quagga bukanlah kesulitan yang berarti sebab perintah yang dipergunakan mempunyai banyak kemiripan walau saya sendiri tidak bisa mengatakan berapa persen tingkat kesamaan perintah antara Quagga dan Cisco, silahkan anda cari di Google.
Disini kita akan coba memberikan IP address pada masing-masing interface, sebagai contoh untuk eth0 kita akan menggunakan IP address 192.168.1.4/24 dan untuk eth1 IP address 192.168.2.1/24, dan password yang pertama kali digunakan untuk login adalah zebra
KONFIGURASI PADA ZEBRA
[root@quagga quagga]# telnet 127.0.0.1 2601
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
Hello, this is Quagga (version 0.98.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
Masuk ke Privilege Mode, ketikkan perintah enable dan masukkan password zebra
Router> enable
Password:
Pada Privilige Mode ada baiknya kita memeriksa terlebih dahulu interface apa saja yang terdapat pada router kita, hal ini sangat membantu kita pada saat akan melakukan konfigurasi pada interface seperti pemberian IP Address maupun konfigurasi yang lain, lakukan dengan perintah show interface
Router# show interface
Setelah mengetahui interface yang terdapat router kita, masuk ke Global Configuration Mode, ketikkan perintah configure terminal atau anda bisa menyingkat dengan perintah config t
Router# configure terminal
Masuk ke Interface Mode, untuk memberikan IP address pada interface eth0 kita bisa masuk dengan perintah interface eth0
Router(config)# interface eth0
Memberikan IP address
Router(config-if)# ip address 192.168.1.4/24
Router(config-if)# no shutdown
Router(config-if)# exit
Masuk ke interface eth1 dan lakukan hal yang sama seperti pada eth0
Router(config)# interface eth1
Router(config-if)# ip address 192.168.2.1/24
Router(config-if)# no shutdown
Router(config-if)# exit
Dikarenakan kita akan menggunakan OSPF sebaiknya kita juga memberikan IP Address pada interface loopback yang berfungsi sebagai router-ID. Untuk mengerti interface loopback dan router-ID baca tulisan terlebih dahulu mengenai setting router dengan OSPF dan Vyatta pada jaringan inherent
Router(config)# interface lo
Router(config-if)# ip address 10.0.0.1/32
Router(config-if)# exit
Ubah nama hostname
Router(config)# hostname quagga-unsri
Ubah enable password, dimana password ini akan dipergunakan sebagai password untuk masuk ke privilege mode
quagga-unsri(config)# enable password kayarayaselamanya
Ubah password untuk telnet, yang berfungsi sebagai password pada saat kita mengakses Quagga melalui telnet
quagga-unsri(config)# password matimasuksurga
quagga-unsri(config)# exit
Melihat dan mem-verifikasi konfigurasi yang sudah dibuat, apakah sudah sesuai dengan konfigurasi yang kita inginkan lakukan dengan perintah show running-config
quagga-unsri# show running-config
Current configuration:
!
hostname quagga-unsri
password matimasuksurga
enable password kayarayaselamanya
!
interface eth0
ip address 192.168.1.4/24
ipv6 nd suppress-ra
!
interface eth1
ip address 192.168.2.1/24
ipv6 nd suppress-ra
!
interface lo
ip address 10.0.0.1/32
!
interface sit0
ipv6 nd suppress-ra
!
!
–More-
Untuk menyimpan hasil konfigurasi lakukan dengan perintah copy running-config startup-config
quagga-unsri# copy running-config startup-config
Maka konfigurasi akan disimpan pada file zebra.conf
Configuration saved to /etc/quagga/zebra.conf
Keluar dari Quagga
quagga-unsri# exit
Connection closed by foreign host.
KONFIGURASI PADA OSPF
[root@quagga quagga]# telnet 127.0.0.1 2604
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
Hello, this is Quagga (version 0.98.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
Masuk ke Privilege Mode
ospfd> enable
Masuk ke Global Configuration Mode
ospfd# configure terminal
Konfigurasi Protocol OSPF
ospfd(config)# router ospf
Masukkan alamat network yang sesuai dengan IP address pada masing-masing interface pada router kita, atau disebut dengan directly connected
ospfd(config-router)# network 192.168.1.0/24 area 0
ospfd(config-router)# network 192.168.2.0/24 area 0
ospfd(config-router)# network 10.0.0.1/32 area 0
Masukkan router-id
ospfd(config-router)# router-id 10.0.0.1
ospfd(config-router)# exit
Ubah hostname
ospfd(config)# hostname ospf-unsri
ospf-unsri(config)# enable password raffaragahdo
ospf-unsri(config)# password palembanglampungsetiapsabtu
ospf-unsri(config)# exit
Melihat hasil konfigurasi
ospf-unsri# show running-config
Current configuration:
!
hostname ospf-unsri
password palembanglampungsetiapsabtu
enable password raffaragahdo
log stdout
!
!
!
interface eth0
!
interface eth1
!
interface lo
!
interface sit0
!
router ospf
ospf router-id 10.0.0.1
network 10.0.0.1/32 area 0.0.0.0
network 192.168.1.0/24 area 0.0.0.0
network 192.168.2.0/24 area 0.0.0.0
!
line vty
!
end
Simpan hasil konfigurasi
ospf-unsri# copy run startup-config
Konfigurasi buat OSPF akan disimpan pada file ospfd.conf
Configuration saved to /etc/quagga/ospfd.conf
Ketik exit untuk keluar dari OSPF
ospf-unsri#exit
Connection closed by foreign host.
Sampai disini tutorial step by step mulai dari instalasi Centos 5.2 dan konfigurasi sederhana pada Quagga telah kita lakukan, router kita telah siap untuk menerima tugas selanjutnya, pada tulisan berikutnya kita akan coba untuk melakukan routing dengan beberapa router dengan OS yang berbeda dan dengan skenario yang lebih komplek , kita akan melihat bagaimana mereka melakukan tugasnya sebagai router dalam meneruskan paket dari suatu network menuju network lain.
Sebaik-baiknya manusia adalah manusia yang berguna bagi orang lain, mari saling berbagi dan menulislah, sebab ilmu laksana binatang liar, jinakkan mereka dengan cara menulis.
Download pdf
instalasi-step-by-step-routing-daemon-quagga-pada-centos-5e280a6
Routing antara Vyatta dan Quagga pada Centos 5.2 dengan Protocol OSPF
[root@quagga ~]# cd /etc/quagga/
[root@quagga quagga]# ls
bgpd.conf.sample ospfd.conf.sample vtysh.conf zebra.conf.sample
bgpd.conf.sample2 ripd.conf.sample vtysh.conf.sample
ospf6d.conf.sample ripngd.conf.sample zebra.conf
[root@quagga quagga]#
[root@quagga quagga]# mv zebra.conf zebra.conf.backup
[root@quagga quagga]# cp zebra.conf.sample zebra.conf
[root@quagga quagga]# cp ospfd.conf.sample ospfd.conf
[root@quagga quagga]#
[root@quagga quagga]# vi /etc/services
————————————————cut——————————————————–
# Ports numbered 2600 through 2606 are used by the zebra package without
# being registred. The primary names are the registered names, and the
# unregistered names used by zebra are listed as aliases.
hpstgmgr 2600/tcp zebrasrv # HPSTGMGR
hpstgmgr 2600/udp # HPSTGMGR
discp-client 2601/tcp zebra # discp client
discp-client 2601/udp # discp client
discp-server 2602/tcp ripd # discp server
discp-server 2602/udp # discp server
servicemeter 2603/tcp ripngd # Service Meter
servicemeter 2603/udp # Service Meter
nsc-ccs 2604/tcp ospfd # NSC CCS
————————————————cut——————————————————–
[root@quagga quagga]# telnet 127.0.0.1 2601
Trying 127.0.0.1…
Connected to quagga.ragahdo.net (127.0.0.1).
Escape character is ‘^]’.
Hello, this is Quagga (version 0.98.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
Router> enable
Password:
Router# configure t
Router# configure terminal
Router(config)# interface eth0
Router(config-if)# ip address 192.168.1.99/24
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface eth1
Router(config-if)# ip address 192.168.2.1/24
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface lo
Router(config-if)# ip address 10.0.0.1/32
Router(config-if)# exit
Router(config)# hostname quagga-unsri
quagga-unsri(config)# enable password kayarayaselamanya
quagga-unsri(config)# password matimasuksurga
quagga-unsri(config)# exit
quagga-unsri# show running-config
Current configuration:
!
hostname quagga-unsri
password matimasuksurga
enable password kayarayaselamanya
!
interface eth0
ip address 192.168.1.99/24
ipv6 nd suppress-ra
!
interface eth1
ip address 192.168.2.1/24
ipv6 nd suppress-ra
!
interface lo
ip address 10.0.0.1/32
!
interface sit0
ipv6 nd suppress-ra
!
!
–More-
quagga-unsri# copy running-config startup-config
Configuration saved to /etc/quagga/zebra.conf
quagga-unsri# exit
Connection closed by foreign host.
[root@quagga quagga]# telnet 127.0.0.1 2604
Trying 127.0.0.1…
Connected to quagga.ragahdo.net (127.0.0.1).
Escape character is ‘^]’.
Hello, this is Quagga (version 0.98.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
ospfd> enable
ospfd# configure terminal
ospfd(config)# router ospf
ospfd(config-router)# network 192.168.1.0/24 area 0
ospfd(config-router)# network 192.168.2.0/24 area 0
ospfd(config-router)# network 10.0.0.1/32 area 0
ospfd(config-router)# router-id 10.0.0.1
ospfd(config-router)# exit
ospfd(config)# hostname ospf-unsri
ospf-unsri(config)# enable password raffaragahdo
ospf-unsri(config)# password palembanglampungsetiapsabtu
ospf-unsri(config)# exit
ospf-unsri# show running-config
Current configuration:
!
hostname ospf-unsri
password palembanglampungsetiapsabtu
enable password raffaragahdo
log stdout
!
!
!
interface eth0
!
interface eth1
!
interface lo
!
interface sit0
!
router ospf
ospf router-id 10.0.0.1
network 10.0.0.1/32 area 0.0.0.0
network 192.168.1.0/24 area 0.0.0.0
network 192.168.2.0/24 area 0.0.0.0
!
line vty
!
end
ospf-unsri# copy run startup-config
Configuration saved to /etc/quagga/ospfd.conf
ospf-unsri#
Welcome to Vyatta.
This system is open-source software. The exact distribution terms for
each module comprising the full system are described in the individual
files in /usr/share/doc/*/copyright.
Last login: Thu Apr 29 22:42:44 2010
vyatta@vyatta:~$ configure
vyatta@vyatta# set interfaces ethernet eth0 address 192.168.2.2/24
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 192.168.3.1/24
[edit]
vyatta@vyatta# set interfaces loopback lo address 10.0.0.2/32
[edit]
vyatta@vyatta# set protocols ospf area 0 network 192.168.2.0/24
[edit]
vyatta@vyatta# set protocols ospf area 0 network 192.168.3.0/24
[edit]
vyatta@vyatta# set protocols ospf area 0 network 10.0.0.2/32
[edit]
vyatta@vyatta# set protocols ospf log-adjacency-changes
[edit]
vyatta@vyatta# set protocols ospf parameters router-id 10.0.0.2
[edit]
vyatta@vyatta# set system host-name vyatta-unsri
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
vyatta@vyatta# exit
exit
vyatta@vyatta:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
O>* 10.0.0.1/32 [110/20] via 192.168.2.1, eth0, 00:02:07
O 10.0.0.2/32 [110/10] is directly connected, lo, 00:02:20
C>* 10.0.0.2/32 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
O>* 192.168.1.0/24 [110/20] via 192.168.2.1, eth0, 00:02:07
O 192.168.2.0/24 [110/10] is directly connected, eth0, 00:02:26
C>* 192.168.2.0/24 is directly connected, eth0
O 192.168.3.0/24 [110/10] is directly connected, eth1, 00:02:20
C>* 192.168.3.0/24 is directly connected, eth1
vyatta@vyatta:~$ show ip ospf neighbor detail
Neighbor 10.0.0.1, interface address 192.168.2.1
In the area 0.0.0.0 via interface eth0
Neighbor priority is 1, State is Full, 6 state changes
Most recent state change statistics:
Progressive change 3m44s ago
DR is 192.168.2.1, BDR is 192.168.2.2
Options 2 *|-|-|-|-|-|E|*
Dead timer due in 29.211s
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmision off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on
vyatta@vyatta:~$
[root@quagga quagga]# telnet 127.0.0.1 2604
Trying 127.0.0.1…
Connected to quagga.ragahdo.net (127.0.0.1).
Escape character is ‘^]’.
Hello, this is Quagga (version 0.98.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password:
ospf-unsri> enable
Password:
ospf-unsri# show ip ospf neighbor detail
Neighbor 10.0.0.2, interface address 192.168.2.2
In the area 0.0.0.0 via interface eth1
Neighbor priority is 1, State is Full, 5 state changes
DR is 192.168.2.1, BDR is 192.168.2.2
Options 2 *|-|-|-|-|-|E|*
Dead timer due in 00:00:34
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmision off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on
ospf-unsri#
Integrasi Inherent dan Internet dengan memanfaatkan routing OSPF dan Default Routing dengan Vyatta (Case Study AMIK-STMIK Riau)

Pada Router Inherent Perguruan Tinggi
Login ke router
login as: vyatta
vyatta@167.205.148.26’s password:
Linux vyatta 2.6.26-1-486-vyatta #1 SMP Fri Feb 27 01:04:20 GMT 2009 i686
Welcome to Vyatta.
This system is open-source software. The exact distribution terms for
each module comprising the full system are described in the individual
files in /usr/share/doc/*/copyright.
Last login: Mon Dec 7 08:39:26 2009
Masuk ke Configuration Mode
vyatta@vyatta:~$ configure
[edit]
Beri nama hostname pada router
vyatta@vyatta# set system host-name router-inherent
[edit]
Set IP address pada tiap interface
vyatta@vyatta# set interfaces ethernet eth0 address 167.205.182.206/30
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 167.205.148.25/29
[edit]
vyatta@vyatta# set interfaces loopback lo address 118.98.240.208/32
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Set routing protocol OSPF
vyatta@vyatta# set protocols ospf area 69 network 167.205.182.204/30
[edit]
vyatta@vyatta# set protocols ospf area 69 network 167.205.148.24/29
[edit]
vyatta@vyatta# set protocols ospf area 69 network 118.98.240.208/32
[edit]
vyatta@vyatta# set protocols ospf log-adjacency-changes
[edit]
vyatta@vyatta# set protocols ospf parameters router-id 118.98.240.208
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Aktifkan ssh dan https
vyatta@vyatta# set service ssh allow-root false
[edit]
vyatta@vyatta# set service ssh port 22
[edit]
vyatta@vyatta# set service https
[edit]
vyatta@vyatta# commit
Generating a 1024 bit RSA private key
..++++++
……………………………..++++++
writing new private key to ‘/etc/lighttpd/server.pem’
—–
Stopping web server: lighttpd.
Starting web server: lighttpd.
Stopping PAGER server
Starting PAGER server
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Pada Router Inherent-Internet
Login pada router
login as: vyatta
vyatta@167.205.148.26’s password:
Linux vyatta 2.6.26-1-486-vyatta #1 SMP Fri Feb 27 01:04:20 GMT 2009 i686
Welcome to Vyatta.
This system is open-source software. The exact distribution terms for
each module comprising the full system are described in the individual
files in /usr/share/doc/*/copyright.
Last login: Mon Dec 7 08:39:26 2009
Masuk ke Configuration Mode
vyatta@vyatta:~$ configure
[edit]
Beri nama hostname pada router
vyatta@vyatta# set system host-name router-inherent-internet
[edit]
Set IP address pada tiap interface
vyatta@vyatta# set interfaces ethernet eth0 address 167.205.148.26/29
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 202.152.41.102/29
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Set routing protocol OSPF
vyatta@vyatta# set protocols ospf area 69 network 167.205.148.24/29
[edit]
vyatta@vyatta# set protocols ospf area 69 network 202.152.41.96/29
[edit]
vyatta@vyatta# set protocols ospf log-adjacency-changes
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Aktifkan ssh dan https
vyatta@vyatta# set service ssh allow-root false
[edit]
vyatta@vyatta# set service ssh port 22
[edit]
vyatta@vyatta# set service https
[edit]
vyatta@vyatta# commit
Generating a 1024 bit RSA private key
..++++++
……………………………..++++++
writing new private key to ‘/etc/lighttpd/server.pem’
—–
Stopping web server: lighttpd.
Starting web server: lighttpd.
Stopping PAGER server
Starting PAGER server
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Buat default routing menuju internet
vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 202.152.41.97
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
Buat NAT menuju ke Inherent dan ke internet
vyatta@vyatta# set service nat rule 1 description NAT-Inherent
[edit]
vyatta@vyatta# set service nat rule 1 outbound-interface eth0
[edit]
vyatta@vyatta# set service nat rule 1 type masquerade
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
vyatta@vyatta# set service nat rule 2 description NAT-to-Internet
[edit]
vyatta@vyatta# set service nat rule 2 outbound-interface eth1
[edit]
vyatta@vyatta# set service nat rule 2 type masquerade
[edit]
vyatta@vyatta# commit
[edit]
vyatta@vyatta# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
vyatta@vyatta#
Pada web server kita ubah gateway menuju ke IP 202.152.41.102/29 sehingga server kita tetap mempunyai satu gateway, adapun routing menuju ke internet akan di belokkan router kita menuju IP 202.152.41.97/29. Selamat mencoba :)..
Download pdf
integrasi-inherent-dan-internet-dengan-memanfaatkan-routing OSPF
CONFIGURATION REGISTER
Cisco mempunyai software register 16 bit yang ditulis pada nonvolatile memory. Configuration register diatur secara default untuk me-load Cisco IOS dari flash dan me-load startup-config dari NVRAM
Kita bisa mengubah configuration register untuk keperluan:
- Memaksa system untuk masuk bootstrap monitor
- Memilih sebuah boot source dan default boot filename
- Enable atau men-disable fungsi break
- Mengontrol alamat broadcast
- Mengatur baud rate terminal console
- Me-load software operating dari ROM
- Booting dari TFTP server
Konfigurasi default pada Cisco router adalah 0×2102
Nomor bit pada configuration register
|
16 bit |
||||||||||||||||
| Configuration register | 2 | 1 | 0 | 2 | ||||||||||||
| Bit Number | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Binary | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Prefix 0x pada alamat configuration register (0×2102) untuk menunjukkan bilangan yang digunakan adalah hexadecimal
Maksud dari Nomor Bit
| Bit No. | Hexadecimal | Deskripsi |
| 0-3 | 0×0000-0×000F | Boot field lihat tabel bootfield |
| 6 | 0×0040 | Abaikan isi NVRAM |
| 7 | 0×0080 | OEM bit enabled |
| 8 | 0×0100 | Break disabled |
| 10 | 0×0400 | IP Broadcast with all zero |
| 11-12 | 0×0800-0×1000 | Kecepatan line console |
| 13 | 0×2000 | Boot default ROM software if network boot fails |
| 14 | 0×4000 | IP broadcast do not have net number |
| 15 | 0×8000 | Enable diagnostic messages and ignore NVRAM contents |
Bit ke 6 digunakan untuk mengabaikan isi dari NVRAM
Boot field
| Boot field | Meaning |
| 00 | ROM Monitor Mode |
| 01 | Boot image from ROM |
| 02-F | Specifies a default netboot filename |
Untuk boot ke mode ROM Monitor atur configuration register ke 0×2100, kemudian reboot router. Pada router akan muncul rommon>
Untuk booting ke mini-IOS images pada ROM (dikenal sebagai RXBOOT), atur configuration register ke 0×2101. Maka akan tampil router(boot)> Jika ini jenis router lama, atau akan muncul rommon 1> jika router berbasiskan RISC terbaru dengan sebuah “smart ROM” pengganti dari mini IOS.
Nilai dari 0×2102 sampai 0×210F untuk memberi tahu pada router untuk menggunakan perintah boot yang spesifik di NVRAM. Semua nilai dalam bentuk hexadecimal, skemanya adalah 0-9 dan A-F. (A=10, B=11, C=12, D=13, E=14, dan F=15). Sehingga kita mengatur configuration register sampai 210(15), atau 1111 dalam bentuk binary.
MENGUBAH CONFIGURATION REGISTER
Sebelum mengubah configuration register, maka perlu mengetahui nilai configuration register yang sudah ada. Pada router ketikkan perintah:
Router>enable
Router#show version
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
System returned to ROM by power-on
System image file is “flash:c1841-advipservicesk9-mz.124-15.T1.bin”
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Processor board ID FTX0947Z18E
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)
Configuration register is 0×2102
Untuk mengubah configuration register
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#config-register 0×2101
Router(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#show version
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
System returned to ROM by power-on
System image file is “flash:c1841-advipservicesk9-mz.124-15.T1.bin”
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Processor board ID FTX0947Z18E
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)
Configuration register is 0×2102 (will be 0×2101 at next reload)
PASSWORD RECOVERY
Bit ke 6 pada configuration register merupakan bit yang digunakan untuk memberi tahu router apakah harus menggunakan isi dari NVRAM, atau malah sebaliknya untuk mengabaikan isi dari NVRAM.
Nilai default dari configuration register adalah 0×2102, dimana bit ke tersebut dinyatakan off, jika nilai ini off maka router akan mencari dan me-loading konfigurasi yang disimpan pada NVRAM (startup-config). Untuk melakukan recovery password, kita perlu memberi nilai pada bit ke 6 tersebut, sehingga router akan mengabaikan startup-config yang terdapat pada NVRAM, sedangkan konfigurasi mengenai password tersendiri disimpan pada startup-config tersebut, jika startup-config diabaikan maka router tidak akan membaca password yang sudah ada.
Untuk melakukan recovery password pada router, hubungkan router pada program hyperterminal. Setelah itu matikanlah router, kemudian pada keyboard computer tekan Control+break, dan nyalakan lagi router. Router akan masuk ke ROM monitor, pada ROM monitor ketik perintah confreg 0×2142
rommon 1 > confreg 0×2142
rommon 2 > reset
Setelah direset maka router akan masuk ke configuration dialog, ketik no
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Self decompressing the image :
########################################################################## [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
Image text-base: 0×60080608, data-base: 0×6270CD50
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Processor board ID FTX0947Z18E
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
— System Configuration Dialog —
Continue with configuration dialog? [yes/no]:
Masuk ke privileges mode
Router>enable
Kemudian masuk ke Global Configuration Mode
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Berikan password yang baru
Router(config)#enable secret candra
Kembalikan konfigurasi kenilai default
Router(config)#config-register 0×2102
Router(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Simpan ke startup config
Router#copy run startup-config
Destination filename [startup-config]?
Building configuration…
[OK]
Reload router
Router#reload
Proceed with reload? [confirm]
%SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Self decompressing the image :
########################################################################## [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
Image text-base: 0×60080608, data-base: 0×6270CD50
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Processor board ID FTX0947Z18E
M860 processor: part number 0, mask 49
2 FastEthernet/IEEE 802.3 interface(s)
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 04:52 by pt_team
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
%LINK-5-CHANGED: Interface Vlan1, changed state to administratively down
Press RETURN to get started!
Ketik enable dan masukkan password baru yang kita buat tadi
Router>enable
Password:
Router#
Jika interface pada router sudah ada konfigurasi mengenai IP address dan lain-lain, jangan lupa untuk masuk ke Interface mode karena seluruh interface kembali berada dalam kondisi down.






























