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.

, , , , , , , , , , , , , , , ,

18 Comments

Membuat VLAN dengan menggunakan Vyatta dan Hub

PC low-end dan Hub adalah dua device yang dianggap sebagai legacy equipment dalam pengertian device yang dianggap ketinggalan, yang dianggap tidak mampu untuk membuat suatu network yang handal dan komplek, sebenarnya kedua peralatan ini dapat kita jadikan sistem yang cukup baik dan powerful, dengan konsep yang sebenarnya sangat sederhana dan mudah dimengerti serta bisa dilakukan oleh para pemula maupun para expert di network.

Memang diantara peralatan yang dihubungkan oleh hub masih tetap terjadi broadcast dikarenakan hub tidak bisa mengenali frame dan sifatnya hanya sebagai penerus sinyal elektrik atau sebagai repeater dengan multiport, dikarenakan hub beroperasi pada layer 1 atau physical dari OSI layer sehingga seluruh frame akan di broadcast ke seluruh port, berbeda dengan switch yang mampu membagi collision domain per port karena switch mempunyai kemampuan mengenali frame dan mengetahui MAC address dari peralatan yang terhubung dengannya dan menyimpan MAC address tiap device tersebut pada MAC address tabel, sehingga switch hanya akan meneruskan frame menuju port dimana terdapat MAC address dari peralatan yang menjadi tujuan dan tidak menuju port lain. Dan jika menggunakan Managable Switch seperti Cisco, 3COM, Allied Tellesyns atau vendor lain, switch seperti ini tidak hanya mampu memecah collision domain tetapi juga langsung memecah broadcast domain dikarenakan kemampuannya melakukan grouping port dan melakukan VLAN tagging terhadap frame yang masuk melalui port tersebut.

Bagaimana kalau VLAN tagging dilakukan oleh device pengirim sebelum dikirim menuju hub dan antar device yang saling berhubungan masing ethernet card-nya dibuat sub interface sehingga frame yang keluar langsung di enkapsulasi berdasarkan encapsulation dot1Q sesuai dengan VLAN ID yang dibuat, jadi sub interface yang di tag dengan VLAN ID yang samalah yang bisa berkomunikasi secara langsung, walaupun broadcast tetap terjadi dikarenakan device yang digunakan adalah hub tetapi hubungan antara peralatan harus melalui fungsi routing.

Penyebab broadcast di network antara lain disebabkan karena kerja protocol, antara lain protocol ARP yang mencari MAC dalam upaya membentuk frame di layer 2, routing protocol untuk membentuk rouitng tabel, maupun sebabkan oleh virus.

Sehingga bagaimana agar agar broadcast dari routing protocol tidak di-advertise ke LAN yang ada dibawah router, ini kita bisa lakukan dengan menjadikan interface router yang berhubungan ke LAN sebagai passive interface

Terdapat banyak routing protocol antara lain RIP, RIPv2, IGRP, EIGRP, OSPF. RIP dan OPSF adalah routing protocol bersifat open standard dalam artian bebas dipergunakan diperalatan mana saja dan didukung oleh banyak platform, seperti Linux, UNIX, Cisco, Junifer dan lain-lain. Sedangkan IGRP dan EIGRP adalah dua routing protocol yang merupakan proprietary dari Cisco dan hanya didukung oleh peralatan buatan Cisco, tentu dikarenakan kita menggunakan open source maka kita akan menggunakan routing protocol open standard yaitu antara RIP dan OSPF.

Untuk RIP, routing protocol ini akan mengirimkan update seluruh routing tabelnya setiap 30 detik dengan cara di-broadcast (255.255.255.255), walaupun tidak terjadi perubahan topologi.

Sedangkan OSPF hanya akan mengirimkan update routing tabel jika terjadi perubahan topologi, dan untuk memelihara hubungan antar router yang saling bersebelahan OSPF menggunakan hello packet yang secara default dikirim setiap 10 detik, walaupun paket hello ini dikirim setiap 10 detik pada segmen multiaccess dan point to point. Tetapi tidak sebesar ukuran tabel routing yang dikirimkan oleh RIP. Keuntungan lain dari OSPF adalah konvergensi yang cepat dan skalabilitas untuk implementasi jaringan yang lebih besar.

Untuk lebih jelasnya mari kita lihat contoh topologi dibawah ini

vlan-using-hub1

R1 adalah Router yang berhubungan dengan internet atau merupakan router backbone dari jaringan kita dalam menuju internet, router ini mempunyai 2 interface satu yang menuju internet dan satu lagi yang menuju jaringan lokal, pada interface yang berhubungan dengan internet kita langsung berikan IP address dan pada Interface yang berhubungan dengan jaringan lokal akan kita buat sub interface (vif) dan langsung di enkapsulasi dengan encapsulation dot1Q

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 address 222.124.194.2/27

vyatta@vyatta# set interfaces ethernet eth1 vif 2 address 192.168.2.1/30

vyatta@vyatta# set interfaces ethernet eth1 vif 3 address 192.168.2.5/30

vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 222.124.194.1

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.0/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.4/30

vyatta@vyatta# set protocols ospf log-adjacency-changes

vyatta@vyatta# set protocols ospf default-information originate

vyatta@vyatta# set service nat rule 1 outbound-interface eth0

vyatta@vyatta# set service nat rule 1 type masquerade

vyatta@vyatta# show

Pada Router R2 berhubungan dengan R1 melalui sub interface pada eth0 dengan vif 2, sedangkan pada eth1 kita buat 3 sub interface yaitu vif 2 untuk berhubungan dengan R4, vif 3 untuk berhubungan dengan R5 dan vif 4 untuk berhubungan dengan R6.

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.2/30

vyatta@vyatta# set interfaces ethernet eth1 vif 2 address 192.168.2.9/30

vyatta@vyatta# set interfaces ethernet eth1 vif 3 address 192.168.2.13/30

vyatta@vyatta# set interfaces ethernet eth1 vif 4 address 192.168.2.17/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.0/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.8/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.12/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.16/30

vyatta@vyatta#

Router R3 berhubungan dengan R1 melalui sub interface pada eth0 dengan vif 3, sedangkan pada eth1 kita buat 3 sub interface yaitu vif 2 untuk berhubungan dengan R7, vif 3 untuk berhubungan dengan R8 dan vif 4 untuk berhubungan dengan R9.

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 3 address 192.168.2.6/30

vyatta@vyatta# set interfaces ethernet eth1 vif 2 address 192.168.2.21/30

vyatta@vyatta# set interfaces ethernet eth1 vif 3 address 192.168.2.25/30

vyatta@vyatta# set interfaces ethernet eth1 vif 4 address 192.168.2.29/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.4/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.20/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.24/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.28/30

vyatta@vyatta#

Pada Router 4

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.10/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.3.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.8/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.3.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Pada Router 5

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 3 address 192.168.2.14/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.4.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.12/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.4.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Pada Router 6

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.18/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.5.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.16/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.5.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Pada Router 7

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.22/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.6.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.20/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.6.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Pada Router 8

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.26/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.7.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.24/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.7.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Pada Router 8

vyatta@vyatta:~$ configure

vyatta@vyatta# set interfaces ethernet eth0 vif 2 address 192.168.2.30/30

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.8.1/24

vyatta@vyatta# set protocols ospf area 0 network 192.168.2.28/30

vyatta@vyatta# set protocols ospf area 0 network 192.168.8.0/24

vyatta@vyatta# set protocols ospf passive-interface eth1

[edit]

vyatta@vyatta#

Setelah semua selesai pada user mode tiap router coba ketikkan perintah show ip route dan lihat apakah telah terbentuk routing tabel keseluruh network, lakukan perintah traceroute ke masing-masing alamat network yang ada sehingga kita mengetahui path yang digunakan dalam mencapai tujuan/destination, dan pada PC yang terdapat pada LAN coba lakukan instalasi protocol analyzer wireshark www.wireshark.org untuk mengetahui apakah ada routing protocol yang di broadcast ke local area network. Thanks to vyatta http://vyatta.org great and powerful

Download pdf

membangun-vlan-dengan-pc-butut-dan-hub

poweredbyvyatta_blue

, , , , , , , , , , , , , , , , , , , , , , ,

No Comments

KONFIGURASI VLAN, ROUTING STATIC, DHCP DAN NAT PADA LAYER 3 SWITCH CISCO 3560

Layer 3 switch atau Multilayer Switch adalah switch yang bekerja pada layer 2 dan juga bekerja pada layer 3 yang mempunyai fungsi routing, kemampuan routing pada layer 3 switch antara lain routing antar VLAN berdasarkan encapsulation dot 1Q maupun routing protocol static dan routing protocol dinamis lain seperti Border Gateway Protocol (BGP), Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), dan Routing Information Protocol (RIP). Pada contoh ini akan diperlihatkan langkah melakukan konfigurasi VLAN pada Catalyst 3560 serta routing antar VLAN, Routing Static, DHCP dan juga NAT.

Skenario

VLAN ID Nama VLAN Alamat Subnet
2 Guest 192.168.0.0/24
3 Student 192.168.1.0/24
4 Lecture 192.168.2.0/24
Interface IP address
Interface vlan 2 192.168.0.1/24
Interface vlan 3 192.168.1.1/24
Interface vlan 4 192.168.2.1/24
Interface gigabitEthernet 0/1 222.124.194.2/27

Topologi

layer-3-switch

Buat Database VLAN pada Switch.

Switch>enable

Switch#vlan

Switch#vlan database

Switch(vlan)#vlan 2 name guest

VLAN 2 added:

Name: guest

Switch(vlan)#vlan 3 name student

VLAN 3 added:

Name: student

Switch(vlan)#vlan 4 name lecture

VLAN 4 added:

Name: lecture

Switch(vlan)#exit

APPLY completed.

Exiting….

Switch#

Masuk ke Global Configuration Mode dan lakukan Grouping Port.

Switch#configure terminal

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/3

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 3

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/4

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 3

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/5

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 4

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/6

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 4

Switch(config-if)#

Buat Interface VLAN yang berfungsi sebagai gateway tiap-tiap VLAN, Nomor Interface VLAN yang dibuat harus sama VLAN ID yang akan dilewatkan, misalnya interface VLAN 2 itu berfungsi sebagai gateway untuk VLAN 2, begitu juga dengan VLAN yang lain.

Switch(config)#interface vlan 2

Switch(config-if)#ip address 192.168.0.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface vlan 3

Switch(config-if)#ip address 192.168.1.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface vlan 4

Switch(config-if)#ip address 192.168.2.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#

Untuk memudahan pemberian IP address pada host tiap-tiap VLAN ada baiknya kita membuat DHCP server, dan pada contoh ini kita akan menggunakan IP 222.124.194.11 sebagai DNS server

Switch(config)#ip dhcp pool vlan2

Switch(dhcp-config)#default-router 192.168.0.1

Switch(dhcp-config)#dns-server 222.124.194.11

Switch(dhcp-config)#network 192.168.0.0 255.255.255.0

Switch(dhcp-config)#exit

Switch(config)#ip dhcp pool vlan3

Switch(dhcp-config)#default-router 192.168.1.1

Switch(dhcp-config)#dns-server 222.124.194.11

Switch(dhcp-config)#network 192.168.1.0 255.255.255.0

Switch(dhcp-config)#exit

Switch(config)#ip dhcp pool vlan4

Switch(dhcp-config)#default-router 192.168.2.1

Switch(dhcp-config)#dns-server 222.124.194.11

Switch(dhcp-config)#network 192.168.2.0 255.255.255.0

Switch(dhcp-config)#exit

Switch(config)#

Berikan IP address pada Interface gigabitEthernet 0/1 (anda bisa mengguakan interface lain jika tidak menggunakan interface ini), perhatikan perintah no switchport , perintah ini digunakan agar interface tersebut itu bisa diberi IP address seperti halnya pada router atau interface layer 3, tanpa perintah ini maka interface pada switch hanya sebagai interface layer 2.

Switch(config)#interface gigabitEthernet 0/1

Switch(config-if)#no switchport

Switch(config-if)#ip address 222.124.194.2 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Buat default routing yang berfungsi sebagai “the last resort” terhadap tujuan packet dalam menuju alamat yang tidak terdapat pada routing tabel, sehingga packet tidak di-dischard atau dibuang dari network.

Switch(config)#ip route 0.0.0.0 0.0.0.0 222.124.194.1

Buat NAT sehingga IP private yang berada pada VLAN bisa ditranlasi menuju IP Public, masuk ke interface gigabitEthernet 0/1 dan setting sebgai NAT Outside, kemudian masuk ke tiap-tiap Interface VLAN yang sudah kita buat dan set sebagai NAT Inside.

Switch(config)#interface gigabitEthernet 0/1

Switch(config-if)#ip nat outside

Switch(config-if)#exit

Switch(config)#interface vlan 2

Switch(config-if)#ip nat inside

Switch(config-if)#exit

Switch(config)#interface vlan 3

Switch(config-if)#ip nat inside

Switch(config-if)#exit

Switch(config)#interface vlan 4

Switch(config-if)#ip nat inside

Switch(config-if)#exit

Switch(config)#

Kemudian buat aturan NAT dan jangan lupa untuk mengatur access-list agar mengizinkan packet untuk lewat, perhatikan juga nomor aturan NAT dan access-list keduanya harus mempunya nomor yang sama, jadi kalau aturan NAT-nya menggunakan nomor 1 maka pada access-list juga harus menggunakan nomor 1.

Switch(config)#ip nat inside source list 1 interface gigabitEthernet 0/1 overload

Switch(config)#access-list 1 permit any

Switch(config)#

Kembali ke Privilege Mode dan simpan hasil konfigurasian

Switch(config)#exit

Switch#copy running-config startup-config

Switch#

Download pdf

konfigurasi-layer-3-switch-cisco-3560

, , , , , , , , , , , , , , , , , , , ,

No Comments

Memisahkan gateway hotspot dengan VLAN

Dimisalkan kita berlangganan dua ISP, ISP1 untuk kepentingan user yang bersifat stationery dan ISP2 untuk kepentingan user yang menggunakan hotspot

TOPOLOGI

memisahkan-gateway-hotspot-dengan-vlan1

Pada contoh topologi ini peralatan yang digunakan adalah switch Cisco dan router Cisco

No Vlan Name Network First Host Last Host Broadcast

1

Management 192.168.1.0/28 192.168.1.1/28 192.168.1.14/28 192.168.1.15/28

2

Lecture 192.168.1.16/28 192.168.1.17/28 192.168.1.30/28 192.168.1.31/28

3

Staff 192.168.1.32/28 192.168.1.33/28 192.168.1.46/28 192.168.1.47/28

4

Guest 192.168.1.48/28 192.168.1.49/28 192.168.1.62/28 192.168.1.63/28

5

Student 192.168.1.64/28 192.168.1.65/28 192.168.1.78/28 192.168.1.79/28

6

Hotspot 192.168.1.80/28 192.168.1.81/28 192.168.1.94/28 192.168.1.95/28

SWITCH 1

Switch>enable
Switch#conf t
Switch(config)#hostname vtp-server

vtp-server(config)#interface vlan 1
vtp-server(config-if)#ip address 192.168.1.3 255.255.255.240
vtp-server(config-if)#no shutdown
vtp-server(config-if)#exit

vtp-server(config)#ip default-gateway 192.168.1.1

vtp-server(config)#vtp mode server
vtp-server(config)#vtp domain unsri
vtp-server(config)#vtp password unsri

vtp-server(config)#vlan 2
vtp-server(config-vlan)#name lecture
vtp-server(config-vlan)#exit

vtp-server(config)#vlan 3
vtp-server(config-vlan)#name staff
vtp-server(config-vlan)#exit

vtp-server(config)#vlan 4
vtp-server(config-vlan)#name guest
vtp-server(config-vlan)#exit

vtp-server(config)#vlan 5
vtp-server(config-vlan)#name student
vtp-server(config-vlan)#exit

vtp-server(config)#vlan 6
vtp-server(config-vlan)#name hotspot
vtp-server(config-vlan)#exit

vtp-server(config)#interface fastEthernet 0/1
vtp-server(config-if)#switchport mode trunk
vtp-server(config-if)#switchport trunk native vlan 1
vtp-server(config-if)#exit

vtp-server(config)#interface fastEthernet 0/2
vtp-server(config-if)#switchport mode trunk
vtp-server(config-if)#switchport trunk native vlan 1
vtp-server(config-if)#exit

vtp-server(config)#interface fastEthernet 0/4
vtp-server(config-if)#switchport mode trunk
vtp-server(config-if)#switchport trunk native vlan 1
vtp-server(config-if)#exit

vtp-server(config)#interface fastEthernet 0/3
vtp-server(config-if)#switchport mode trunk
vtp-server(config-if)#switchport trunk native vlan 1
vtp-server(config-if)#exit

vtp-server(config)#line vty 0 4
vtp-server(config-line)#password candraganteng
vtp-server(config-line)#login
vtp-server(config-line)#exit
vtp-server(config)#enable secret candragantengtenan
vtp-server(config)#exit
vtp-server#copy running-config startup-config
vtp-server#

SWITCH 2
Switch>enable
Switch#conf t
Switch(config)#hostname vtp-client1
vtp-client1(config)#vtp mode client
vtp-client1(config)#interface vlan 1
vtp-client1(config-if)#ip address 192.168.1.4 255.255.255.240
vtp-client1(config-if)#no shutdown
vtp-client1(config-if)#exit
vtp-client1(config)#ip default-gateway 192.168.1.1

vtp-client1(config)#line vty 0 4
vtp-client1(config-line)#password candraganteng
vtp-client1(config-line)#login
vtp-client1(config-line)#exit
vtp-client1(config)#enable secret candragantengtenan
vtp-client1(config)#exit

vtp-client1(config)#vtp domain unsri
vtp-client1(config)#vtp password unsri

vtp-client1(config)#interface fastEthernet 0/1
vtp-client1(config-if)#switchport mode trunk
vtp-client1(config-if)#switchport trunk native vlan 1
vtp-client1(config-if)#exit
vtp-client1(config)#exit

vtp-client1#show vtp status
VTP Version                     : 2
Configuration Revision          : 11
Maximum VLANs supported locally : 255
Number of existing VLANs        : 10
VTP Operating Mode              : Client
VTP Domain Name                 : unsri
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0×71 0×4B 0×63 0×34 0×6A 0xC2 0xEB 0×11
Configuration last modified by 192.168.1.2 at 3-1-93 00:21:42
vtp-client1#sh
vtp-client1#show vl
vtp-client1#show vlan

VLAN Name                             Status    Ports
—- ——————————– ——— ——————————-
1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
2    lecture                          active
3    staff                            active
4    guest                            active
5    student                          active
6    hotspot                          active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1    enet  100001     1500  -      -      -        -    -        0      0
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
4    enet  100004     1500  -      -      -        -    -        0      0
5    enet  100005     1500  -      -      -        -    -        0      0
6    enet  100006     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
——————————————————————————

Primary Secondary Type              Ports
——- ——— —————– ——————————————

vtp-client1#conf t
vtp-client1(config)#interface fastEthernet 0/2
vtp-client1(config-if)#switchport mode access
vtp-client1(config-if)#switchport access vlan 6
vtp-client1(config-if)#exit
vtp-client1(config)#interface fastEthernet 0/3
vtp-client1(config-if)#switchport mode access
vtp-client1(config-if)#switchport access vlan 2
vtp-client1(config-if)#exit
vtp-client1(config)#interface fastEthernet 0/4
vtp-client1(config-if)#switchport mode access
vtp-client1(config-if)#switchport access vlan 3
vtp-client1(config-if)#exit
vtp-client1(config)#interface fastEthernet 0/5
vtp-client1(config-if)#switchport mode access
vtp-client1(config-if)#switchport access vlan 4
vtp-client1(config-if)#exit
vtp-client1(config)#interface fastEthernet 0/6
vtp-client1(config-if)#switchport mode access
vtp-client1(config-if)#switchport access vlan 5
vtp-client1(config-if)#exit
vtp-client1(config)#exit
vtp-client1#show vlan

VLAN Name                             Status    Ports
—- ——————————– ——— ——————————-
1    default                          active    Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
2    lecture                          active    Fa0/3
3    staff                            active    Fa0/4
4    guest                            active    Fa0/5
5    student                          active    Fa0/6
6    hotspot                          active    Fa0/2
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1    enet  100001     1500  -      -      -        -    -        0      0
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
4    enet  100004     1500  -      -      -        -    -        0      0
5    enet  100005     1500  -      -      -        -    -        0      0
6    enet  100006     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
——————————————————————————

Primary Secondary Type              Ports
——- ——— —————– ——————————————

vtp-client1#copy run startup-config
Destination filename [startup-config]?
Building configuration…
[OK]
vtp-client1#
vtp-client1#

SWITCH 3
Switch>enable
Switch#conf t
Switch(config)#hostname vtp-client2
vtp-client2(config)#vtp mode client
vtp-client2(config)#vtp domain unsri
vtp-client2(config)#vtp password unsri
vtp-client2(config)#interface fastEthernet 0/1
vtp-client2(config-if)#switchport mode trunk
vtp-client2(config-if)#switchport trunk native vlan 1
vtp-client2(config)#interface vlan 1
vtp-client2(config-if)#ip address 192.168.1.5 255.255.255.240
vtp-client2(config-if)#no shutdown
vtp-client2(config-if)#exit
vtp-client2(config)#ip default-gateway 192.168.1.1
vtp-client2(config)#line vty 0 4
vtp-client2(config-line)#password candraganteng
vtp-client2(config-line)#login
vtp-client2(config-line)#exit
vtp-client2(config)#enable secret candragantengtenan
vtp-client2(config)#exit

vtp-client2#show vtp status
VTP Version                     : 2
Configuration Revision          : 11
Maximum VLANs supported locally : 255
Number of existing VLANs        : 10
VTP Operating Mode              : Client
VTP Domain Name                 : unsri
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0×71 0×4B 0×63 0×34 0×6A 0xC2 0xEB 0×11
Configuration last modified by 192.168.1.2 at 3-1-93 00:21:42

vtp-client2#show vlan

VLAN Name                             Status    Ports
—- ——————————– ——— ——————————-
1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
2    lecture                          active
3    staff                            active
4    guest                            active
5    student                          active
6    hotspot                          active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1    enet  100001     1500  -      -      -        -    -        0      0
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
4    enet  100004     1500  -      -      -        -    -        0      0
5    enet  100005     1500  -      -      -        -    -        0      0
6    enet  100006     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
——————————————————————————

Primary Secondary Type              Ports
——- ——— —————– ——————————————

vtp-client2#conf t
vtp-client2(config)#interface fastEthernet 0/2
vtp-client2(config-if)#switchport mode access
vtp-client2(config-if)#switchport access vlan 6
vtp-client2(config-if)#exit
vtp-client2(config)#interface fastEthernet 0/3
vtp-client2(config-if)#switchport mode access
vtp-client2(config-if)#switchport access vlan 2
vtp-client2(config-if)#exit
vtp-client2(config)#interface fastEthernet 0/4
vtp-client2(config-if)#switchport mode access
vtp-client2(config-if)#switchport access vlan 3
vtp-client2(config-if)#exit
vtp-client2(config)#interface fastEthernet 0/5
vtp-client2(config-if)#switchport mode access
vtp-client2(config-if)#switchport access vlan 4
vtp-client2(config-if)#exit
vtp-client2(config)#interface fastEthernet 0/6
vtp-client2(config-if)#switchport mode access
vtp-client2(config-if)#switchport access vlan 5
vtp-client2(config-if)#exit
vtp-client2(config)#exit

vtp-client2#show vlan

VLAN Name                             Status    Ports
—- ——————————– ——— ——————————-
1    default                          active    Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
2    lecture                          active    Fa0/3
3    staff                            active    Fa0/4
4    guest                            active    Fa0/5
5    student                          active    Fa0/6
6    hotspot                          active    Fa0/2
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1    enet  100001     1500  -      -      -        -    -        0      0
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
4    enet  100004     1500  -      -      -        -    -        0      0
5    enet  100005     1500  -      -      -        -    -        0      0
6    enet  100006     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
——————————————————————————

Primary Secondary Type              Ports
——- ——— —————– ——————————————
vtp-client2#
vtp-client2#

ROUTER 1
Router>enable
Router#conf t
Router(config)#hostname R1

R1(config)#line vty 0 4
R1(config-line)#password candraganteng
R1(config-line)#login
R1(config-line)#exit

R1(config)#enable secret candragantengtenan
R1(config)#service password-encryption

R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 222.124.194.23 255.255.255.224
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#ip route 0.0.0.0 0.0.0.0 222.124.194.1

R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 192.168.1.1 255.255.255.240
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface fastEthernet 0/1.2
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip address 192.168.1.17 255.255.255.240
R1(config-subif)#ip nat inside
R1(config-subif)#exit

R1(config)#interface fastEthernet 0/1.3
R1(config-subif)#encapsulation dot1Q 3
R1(config-subif)#ip address 192.168.1.33 255.255.255.240
R1(config-subif)#ip nat inside
R1(config-subif)#exit

R1(config)#interface fastEthernet 0/1.4
R1(config-subif)#encapsulation dot1Q 4
R1(config-subif)#ip address 192.168.1.49 255.255.255.240
R1(config-subif)#ip nat inside
R1(config-subif)#exit

R1(config)#interface fastEthernet 0/1.5
R1(config-subif)#encapsulation dot1Q 5
R1(config-subif)#ip address 192.168.1.65 255.255.255.240
R1(config-subif)#ip nat inside
R1(config-subif)#exit

R1(config)#ip nat inside source list 1 interface fastEthernet 0/1 overload
R1(config)#access-list 1 permit any

R1(config-subif)#exit
R1(config)#ip dhcp pool vlan2
R1(dhcp-config)#default-router 192.168.1.17
R1(dhcp-config)#network 192.168.1.16 255.255.255.240
R1(dhcp-config)#dns-server 222.124.194.11
R1(dhcp-config)#exit

R1(config)#ip dhcp pool vlan3
R1(dhcp-config)#default-router 192.168.1.33
R1(dhcp-config)#dns-server 222.124.194.11
R1(dhcp-config)#exit

R1(config)#ip dhcp pool vlan4
R1(dhcp-config)#default-router 192.168.1.49
R1(dhcp-config)#network 192.168.1.48 255.255.255.240
R1(dhcp-config)#dns-server 222.124.194.11
R1(dhcp-config)#exit

R1(config)#ip dhcp pool vlan5
R1(dhcp-config)#default-router 192.168.1.65
R1(dhcp-config)#network 192.168.1.64 255.255.255.240
R1(dhcp-config)#dns-server 222.124.194.11
R1(dhcp-config)#exit

R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.15 area 0
R1(config-router)#network 192.168.1.16 0.0.0.15 area 0
R1(config-router)#network 192.168.1.32 0.0.0.15 area 0
R1(config-router)#network 192.168.1.48 0.0.0.15 area 0
R1(config-router)#network 192.168.1.64 0.0.0.15 area 0

R1(config)#exit

R1#copy running-config startup-config
R1#

ROUTER 2
Router>enable
Router#conf t
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 202.134.248.6 255.255.255.240
R2(config-if)#no shutdown
R2(config-if)#ip nat outside

R2(config)#interface fastEthernet 0/1
R2(config-if)#ip address 192.168.1.2 255.255.255.240
R2(config-if)#no shutdown

R2(config)#interface fastEthernet 0/1.6
R2(config-subif)#encapsulation dot1Q 6
R2(config-subif)#ip address 192.168.1.81 255.255.255.240
R2(config-subif)#ip nat inside
R2(config-subif)#exit

R2(config)#ip nat inside source list 1 interface fastEthernet 0/0 overload
R2(config)#access-list 1 permit any
R2(config)#ip route 0.0.0.0 0.0.0.0 202.134.248.1

R2(config)#ip dhcp pool vlan6
R2(dhcp-config)#default-router 192.168.1.81
R2(dhcp-config)#network 192.168.1.80 255.255.255.240
R2(dhcp-config)#dns-server 202.134.248.9
R2(dhcp-config)#exit

R2(config)#line vty 0 4
R2(config-line)#password candraganteng
R2(config-line)#login
R2(config-line)#exit
R2(config)#enable secret candragantengtenan
R2(config)#service password-encryption
R2(config)#

R2(config)#router ospf 1
R2(config-router)#network 192.168.1.0 0.0.0.15 area 0
R2(config-router)#network 192.168.1.80 0.0.0.15 area 0
R2(config-router)#^Z
R2#

ROUTER 1
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 222.124.194.1 to network 0.0.0.0

192.168.1.0/28 is subnetted, 6 subnets
C       192.168.1.0 is directly connected, FastEthernet0/1
C       192.168.1.16 is directly connected, FastEthernet0/1.2
C       192.168.1.32 is directly connected, FastEthernet0/1.3
C       192.168.1.48 is directly connected, FastEthernet0/1.4
C       192.168.1.64 is directly connected, FastEthernet0/1.5
O       192.168.1.80 [110/2] via 192.168.1.2, 00:00:27, FastEthernet0/1
222.124.194.0/27 is subnetted, 1 subnets
C       222.124.194.0 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 222.124.194.1
R1#

ROUTER 2
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 202.134.248.1 to network 0.0.0.0

192.168.1.0/28 is subnetted, 6 subnets
C       192.168.1.0 is directly connected, FastEthernet0/1
O       192.168.1.16 [110/2] via 192.168.1.1, 00:00:44, FastEthernet0/1
O       192.168.1.32 [110/2] via 192.168.1.1, 00:00:34, FastEthernet0/1
O       192.168.1.48 [110/2] via 192.168.1.1, 00:00:34, FastEthernet0/1
O       192.168.1.64 [110/2] via 192.168.1.1, 00:00:24, FastEthernet0/1
C       192.168.1.80 is directly connected, FastEthernet0/1.6
202.134.248.0/28 is subnetted, 1 subnets
C       202.134.248.0 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 202.134.248.1
R2#

download pdf memisahkan-gateway-hotspot-dengan-vlan

, , , , , , , , , , , , , , , , ,

4 Comments

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

rd-rip-ospf

, , , , , , , , , , , , , , , , , ,

No Comments

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

1

Lakukan Skip untuk menghemat waktu

2

Klik Next

3

Untuk pemilihan language pilih English, kecuali anda mengerti bahasa yang lain :)

4

Pilih keyboard dengan layout U.S. English

5

Klik Yes

6

Pilih Review and modify partitioning layout

7

Tidak pilihan lain (no where to run :-p ) klik yes

8

Pilih Reset dan klik yes

9

Klik New, Mount Point pilih /boot ketik size 100 dan klik Ok

10

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.

11

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

12

Klik Next

13

Klik Next

14

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

15

Pilih Asia/Jakarta

16

Masukkan password root, sesuai dengan password yang anda kehendaki

17

Pilih server, Customize now, klik Next

18

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

19

Klik Next

20

Hardisk sedang di format

21

Proses Instalasi tengah berlangsung

22

Klik Reboot, proses instalasi selesai

23

DISABLE DAN FIREWALL AND SELINUX

Pilih Firewall configuration dan klik Run Tool

24

Pada Security Level dan SELinux pilih Disabled, klik OK

25

Pilih Exit dan Enter

26

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

, , , , , , , , , , , , , , , , , , , , ,

1 Comment

Routing antara Vyatta dan Quagga pada Centos 5.2 dengan Protocol OSPF

quagga-vyatta

[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#

poweredbyvyatta_bluecentos_icon_60

, , , , , , , , ,

2 Comments

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

, , , , , , , , , , ,

3 Comments

Integrasi Inherent dan Internet menggunakan Routing OSPF, NAT, Port Forwarding, Load Balancing, Webproxy dengan satu mesin Vyatta (Case Study Univ Muhammadyah Palembang)

login as: vyatta

vyatta@167.205.145.50’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: Fri Nov 20 01:06:43 2009

Masuk ke configuration mode

vyatta@vyatta:~$ configure

[edit]

Set IP address untuk tiap-tiap interfaces

vyatta@vyatta# set interfaces ethernet eth0 address 192.168.0.2/24

[edit]

vyatta@vyatta# set interfaces ethernet eth1 address 192.168.1.2/24

[edit]

vyatta@vyatta# set interfaces ethernet eth2 address 167.205.145.50/29

[edit]

vyatta@vyatta# set interfaces ethernet eth2 address 167.205.145.51/29

[edit]

vyatta@vyatta# set interfaces ethernet eth2 address 167.205.145.52/29

[edit]

vyatta@vyatta# set interfaces ethernet eth3 address 192.168.49.1/24

[edit]

Set Routing Protocol OSPF, disini kita akan mengatur alamat network yang menggunakan OSPF yaitu alamat network 167.205.145.48/29 dan alamat network 118.98.240.189/32 dan ingat jangan pernah meng-advertise alamat IP Private ke Network Inherent.

vyatta@vyatta# set protocols ospf log-adjacency-changes

[edit]

vyatta@vyatta# set protocols ospf parameters router-id 118.98.240.189

[edit]

vyatta@vyatta# set protocols ospf parameters router-id 118.98.240.189

[edit]

vyatta@vyatta# set protocols ospf area 69 network 167.205.145.48/29

[edit]

vyatta@vyatta# set protocols ospf area 69 network 118.98.240.189/32

[edit]

Aktifkan webgui untuk vyatta sehingga kita bisa melakukan administrasi mesin vyatta tidak hanya melalui console teapi juga melalui web. Anda bisa membuka https://alamat-ip-dari-mesin-vyatta misal https://167.205.145.50

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

saveStarting PAGER server

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Set NAT menuju ke inherent

vyatta@vyatta# set service nat rule 10 description NAT-to-Inherent

[edit]

vyatta@vyatta# set service nat rule 10 outbound-interface eth2

[edit]

vyatta@vyatta# set service nat rule 10 type masquerade

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Sampai sini kita sudah bisa mengakses Inherent tetapi berada dalam kondisi NAT

Sekarang bagaimana jika kita ingin agar server kita juga bisa diakses dari inherent dengan mempergunakan IP address yang dialokasikan oleh pengelola inherent sesuai dengan IP address untuk local node kita, padahal server kita ke mempunyai IP Private, disini kita akan memperlakukan satu teknik lagi, yang dikenal dengan IP Forwarding jika kita ingin meneruskan seluruh traffic dari inherent ke server kita, dan Port Forwarding jika kita ingin meneruskan traffic ke port tertentu saja misal vyatta hanya akan meneruskan ke mesin local jika ada request menuju ke port 80 (http). Disini kita akan memperlakukan teknik Port Forwarding. Contoh disini kita menginginkan agar alamat IP server local 192.168.49.2 bisa diakses dari inherent dengan IP address 167.205.145.51 dengan protocol http (Port 80).

vyatta@vyatta# set service nat rule 20 description DNAT-to-Webserver1-from-inherent

[edit]

vyatta@vyatta# set service nat rule 20 type destination

[edit]

vyatta@vyatta# set service nat rule 20 destination address 167.205.145.51

[edit]

vyatta@vyatta# set service nat rule 20 inbound-interface eth2

[edit]

vyatta@vyatta# set service nat rule 20 protocol tcp

[edit]

vyatta@vyatta# set service nat rule 20 destination port 80

[edit]

vyatta@vyatta# set service nat rule 20 inside-address address 192.168.49.2

[edit]

vyatta@vyatta# set service nat rule 20 inside-address port 80

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Nah sekarang bagaimana jika kita mempunyai alat Vicon untuk melakukan telekonferensi, Komunikasi voice dan video ini mempergunakan protocol UDP sebagai protocol transport-nya, nah disini kita akan melakukan IP Forwarding, artinya meneruskan seluruh traffic tanpa perlu memperhatikan traffic tersebut mempergunakan protocol transport apa dan nomor port berapa sebagai destination port-nya.

vyatta@vyatta# set service nat rule 30 description DNAT-to-Vicon-from-inherent

[edit]

vyatta@vyatta# set service nat rule 30 type destination

[edit]

vyatta@vyatta# set service nat rule 30 destination address 167.205.145.52

[edit]

vyatta@vyatta# set service nat rule 30 inbound-interface eth2

[edit]

vyatta@vyatta# set service nat rule 30 inside-address address 192.168.49.3

[edit]

vyatta@vyatta#

Nah pada saat anda memberikan IP pada vicon berikanlah IP Private 192.168.49.3, dan sampai disini berarti baik webserver dan vicon kita sudah bisa berkomunikasi 2 arah dalam artian bisa mengakses dan bisa diakses dari jaringan inherent

Selanjutnya bagaimana kita bisa memanfaatkan IP public pada modem ADSL kita untuk bisa diberikan ke webserver kita, sebenarnya teknik yang dipergunakan sama seperti sebelumnya yaitu teknik Port Forwarding. Pada permodelan network ini kita anggap IP Address 192.168.0.2 dan IP Address 192.168.1.2 adalah IP Public

vyatta@vyatta# set service nat rule 40 description DNAT-from-ISP1-to-webserver1

[edit]

vyatta@vyatta# set service nat rule 40 type destination

[edit]

vyatta@vyatta# set service nat rule 40 destination address 192.168.0.2

[edit]

vyatta@vyatta# set service nat rule 40 protocol tcp

[edit]

vyatta@vyatta# set service nat rule 40 destination port 80

[edit]

vyatta@vyatta# set service nat rule 40 inbound-interface eth0

[edit]

vyatta@vyatta# set service nat rule 40 inside-address address 192.168.49.2

[edit]

vyatta@vyatta# set service nat rule 40 inside-address port 80

[edit]

Nah sekarang server tersebut juga sudah bisa di akses dari internet dengan mempergunakan IP Public, lakukan pendaftaran ke http://pandi.or.id agar server tersebut bisa diakses dengan mempergunakan nama domain

Sekarang kita akan memanfaatkan IP Public satu yaitu lagi 192.168.1.2 untuk diberikan ke server kita yang lain, bisa jadi server ini akan kita jadikan mail server ataupun server yang lain sesuai dengan kebutuhan kita. Dan ingat jika anda ingin menjadikan server ini sebagai mail server, mau tidak mau yang harus anda lakukan adalah melakukan pendaftaran domain ke http://pandi.or.id karena mail server harus mempunyai MX record sehingga MTA dari mail server lain bisa mengirim email ke server kita (komunikasi antar mail server). Tetapi untuk contoh disini kita masih mempergunakan port 80 karena kita ingin agar server kita ini juga berfungsi penyedia layanan web dan bisa dimanfaatkan untuk layanan e-learning dan lain-lain.

vyatta@vyatta# set service nat rule 50 description DNAT-from-ISP2-to-webserver2

[edit]

vyatta@vyatta# set service nat rule 50 type destination

[edit]

vyatta@vyatta# set service nat rule 50 destination address 192.168.1.2

[edit]

vyatta@vyatta# set service nat rule 50 protocol tcp

[edit]

vyatta@vyatta# set service nat rule 50 destination port 80

[edit]

vyatta@vyatta# set service nat rule 50 inbound-interface eth0

[edit]

vyatta@vyatta# set service nat rule 50 inside-address address 192.168.49.4

[edit]

vyatta@vyatta# set service nat rule 50 inside-address port 80

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Kemudian lakukan NAT menuju ke internet melalui ISP1 supaya user pada LAN bisa mengakses layanan internet

vyatta@vyatta# set service nat rule 60 description NAT-to-Internet-via-ISP1

[edit]

vyatta@vyatta# set service nat rule 60 destination address 0.0.0.0/0

[edit]

vyatta@vyatta# set service nat rule 60 outbound-interface eth0

[edit]

vyatta@vyatta# set service nat rule 60 type masquerade

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Sama seperti diatas lakukan NAT sekali lagi menuju ke internet melalui ISP2

vyatta@vyatta# set service nat rule 70 description NAT-to-Internet-via-ISP2

[edit]

vyatta@vyatta# set service nat rule 70 destination address 0.0.0.0/0

[edit]

vyatta@vyatta# set service nat rule 70 outbound-interface eth1

[edit]

vyatta@vyatta# set service nat rule 70 type masquerade

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Set default gateway baik yang melalui ISP1 dan ISP2

vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 192.168.0.1

[edit]

vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 192.168.1.1

[edit]

Sekarang kita akan mencoba melihat routing table yang terbentuk

vyatta@vyatta#exit

[edit]

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

S>* 0.0.0.0/0 [1/0] via 192.168.0.1, eth0

* via 192.168.1.1, eth1

O 118.98.240.189/32 [110/10] is directly connected, lo, 00:59:56

C>* 118.98.240.189/32 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

O 167.205.145.48/29 [110/10] is directly connected, eth2, 01:15:48

C>* 167.205.145.48/29 is directly connected, eth2

C>* 192.168.0.0/24 is directly connected, eth0

C>* 192.168.1.0/24 is directly connected, eth1

O>* 192.168.5.0/24 [110/20] via 167.205.145.49, eth2, 01:15:47

C>* 192.168.49.0/24 is directly connected, eth3

vyatta@vyatta:~$

[edit]

Note:

Perlu dicatat disini, karena ini merupakan simulasi dengan VMware maka maka routing table yang terbentuk terbatas pada network-network yang ada pada simulasi ini. Routing Table akan terbentuk lebih banyak lagi jika kita sudah menghubungkan router ini ke real system.

Set load balancing baik melalui eth0 maupun eth1

vyatta@vyatta:~$configure

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth0 failure-count 5

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth0 nexthop 192.168.0.1

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth0 ping 192.168.0.1

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth1 failure-count 4

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth1 nexthop 192.168.1.1

[edit]

vyatta@vyatta# set load-balancing wan interface-health eth1 ping 192.168.1.1

[edit]

Set rule (pengaturan) dari load balancing agar traffic yang berasal eth3 (LAN) bisa diarahkan keluar melalui eth0 dan eth1, berikan rule 10

vyatta@vyatta# set load-balancing wan rule 10 inbound-interface eth3

[edit]

vyatta@vyatta# set load-balancing wan rule 10 interface eth0 weight 2

[edit]

vyatta@vyatta# set load-balancing wan rule 10 interface eth1 weight 1

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

vyatta@vyatta#

Set lagi rule (pengaturan) dari load balancing seperti diatas, kali ini berikan rule 20

vyatta@vyatta# set load-balancing wan rule 20 inbound-interface eth3

[edit]

vyatta@vyatta# set load-balancing wan rule 20 interface eth0 weight 2

[edit]

vyatta@vyatta# set load-balancing wan rule 20 interface eth1 weight 1

[edit]

vyatta@vyatta# commit

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Jika anda menjadikan server pada alamat IP 192.168.49.2 sebagai DNS local maka pada mesin vyatta arahkan name server menuju IP tersebut

vyatta@vyatta# set system name-server 192.168.49.2

[edit]

Untuk menghemat penggunaan bandwidth maka Vyatta juga bisa dijadikan webproxy yang bisa menyimpan web cache, dan karena seluruh traffic dari LAN akan menuju alamat IP 192.168.49.1 maka alamat IP ini berfungsi sebagai default gateway untuk LAN tersebut, atur listen-address untuk menggunakan IP tersebut.

vyatta@vyatta# set service webproxy listen-address 192.168.49.1

[edit]

vyatta@vyatta# commit

Restarting Squid HTTP Proxy 3.0: squid3.

[edit]

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

Lakukan updating terhadap webproxy

vyatta@vyatta# exit

exit

vyatta@vyatta:~$ update webproxy blacklists

Warning: No url-filtering blacklist installed

Would you like to download a default blacklist? [confirm][y]

–2009-11-22 20:51:06– ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gz

=> `/tmp/blacklists.gz’

—————————————-cut———————————————–

Masuk lagi ke configure mode buat pengaturan untuk web proxy ini

vyatta@vyatta:~$ configure

[edit]

Alokasikan besarnya cache webproxy pada hardisk, nilai yang kita buat dalam ukuran MB, contoh angka 100000 berarti 100000 MB. Lakukan sesuai dengan ketersediaan space yang tersedia pada hardisk anda.

vyatta@vyatta # set service webproxy cache-size 100000

[edit]

Set auto update seminggu sekali supaya tidak terlalu membebani bandwidth

vyatta@vyatta # set service webproxy url-filtering squidguard auto-update weekly

[edit]

Set alamat url yang tidak kita izinkan untuk diakses, misal link game pada facebook, karena konsumsi bandwidth yang cukup besar

vyatta@vyatta # set service webproxy url-filtering squidguard local-block apps.facebook.com

[edit]

Set kategori yang bersifat pornografi dan perjudian maupun kategori yang dilarang lainnya, tetapi anda harus hati-hati dan cukup bijak terhadap content ini, karena beberapa fakultas seperti fakultas kedokteran memerlukan keyword sex untuk menunjang pembelajaran mereka dalam mencari literatur, jurnal dan lain sebagainya

vyatta@vyatta# set service webproxy url-filtering squidguard block-category sex

[edit]

Redirect-url berguna untuk membelokkan traffic jika ada user mengakses content yang termasuk dalam kategori yang dilarang tadi, misal dibelokkan menuju ke official site kita: www.unsri.ac.id

vyatta@vyatta # set service webproxy url-filtering squidguard redirect-url www.unsri.ac.id

[edit]

vyatta@vyatta # commit

[edit]

vyatta@vyatta # save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

vyatta@vyatta #

Demikianlah desain dari network ini kami (Tim ICT Unsri) buat sebagai bentuk kepedulian kami terhadap kemajuan bersama berdasarkan asas Tri Dharma Perguruan Tinggi. Bagaimana kita membuat suatu system yang handal berdasarkan kondisi existing dari network tersebut dan tetap memperhatikan aspek low cost, low requirement and still meet with user requirement but powerful dengan memanfaatkan Vyatta Open Source (Thanks to Vyatta http://vyatta.org) dan low end PC (PC Butut). Terhadap Universitas lain yang berada di bawah sub local node Palembang-UNSRI, kami sangat terbuka untuk saling membantu dalam perancangan network, berdikusi, dan saling berbagi. Let share and discuss guy..remember IT not cost centre

Download pdf

integrasi-inherent-dan-internet-menggunakan-routing-ospf-case-UMP

, ,

No Comments

Perbandingan Singkat (Brief Comparison) perintah Cisco dan Vyatta

Mode:

Cisco Prompt Nama Mode Vyatta Prompt Nama Mode
Router> User Mode vyatta@vyatta:~$ Operational Mode
Router# Privilege Mode vyatta@vyatta# Configurationmode
Router(config)# Global Configuration Mode

—– VYATTA OPERATIONAL MODE COMMANDS —–

ping
traceroute
show arp
show ip ospf neighbor
show ip ospf database
show ip ospf neighbor detail

show ip ospf border-routers

show ip route
show ip route bgp

show ip route ospf

show ip route connected

show ip route rip

show ip route static

show ip interfaces
show clock
show ip dhcp binding
show ip dhcp server statistics
show vrrp all
show ip nat translations
show ip nat statistics

ping
traceroute
show arp
show ip ospf neighbor
show ip ospf database
show ip ospf neighbor detail

show ip ospf border-routers

show ip route
show ip route bgp

show ip route ospf

show ip route connected

show ip route rip

show ip route static

show interfaces
show host date
show dhcp leases
show dhcp statistics
show vrrp
show nat translations
show nat statistics

—– VYATTA CONFIGURATION MODE COMMANDS —–

SAVE
copy run start save
SHOW
show running-config show
HELP
? ?
SET SERVICE
ip http server
line vty 0 4
password
crypto key generate rsa
(only on some IOS versions)
set service https
set service telnet

set service ssh

DHCP
ip dhcp pool mydhcp

network 192.168.0.0 255.255.255.0

default-router 192.168.0.1

dns-server 192.168.100.1

ip dhcp excluded-address 192.168.0.1 192.168.0.10

set service dhcp-server shared-network-name mydhcp

set service dhcp-server shared-network-name mydhcp subnet 192.168.0.0/24

set service dhcp-server shared-network-name mydhcp subnet 192.168.0.0/24 default-router 192.168.0.1

set service dhcp-server shared-network-name mydhcp subnet 192.168.0.0/24 dns-server 192.168.100.1

set service dhcp-server shared-network-name mydhcp subnet 192.168.0.0/24 exclude 192.168.0.1

set service dhcp-server shared-network-name mydhcp subnet 192.168.0.0/24 exclude 192.168.0.10

SET SYSTEM
ip domain-name
hostname
username …password…
ntp server
ip name-server
terminal monitor
clock timezone
set system domain-name
set system host-name
set system login
set system ntp-server
set system name-server
set system syslog console
set system time-zone
logging
logging facility
logging trap
set system syslog host
set system syslog host … facility
set system syslog host….facility…level….
SET PROTOCOLS …
INTERFACES
interface fastEthernet 0/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

description LAN

no shutdown

set interfaces ethernet eth0 address 192.168.1.1/24

set interfaces ethernet eth0 duplex auto

set interfaces ethernet eth0 speed auto

set interfaces ethernet eth0 description LAN

OSPF
router ospf 1

network 192.168.1.0 0.0.0.255 area 1

log-adjacency-changes

router-id 192.168.1.1

set protocols ospf area 1 network 192.168.1.0/24

set protocols ospf log-adjacency-changes

set protocols ospf parameters router-id 192.168.1.1

STATIC
ip route 0.0.0.0 0.0.0.0 192.168.0.1
set protocols static route 0.0.0.0/0 next-hop 192.168.0.1
RIP
router rip

network 192.168.1.0

set protocols rip network 192.168.1.0/24
SNMP
snmp-server community … ro|rw
snmp-server community … ACL
snmp-server location
snmp-server contact
set protocols snmp community … authorization ro|rw
set protocols snmp community … client
set protocols snmp location
set protocols snmp contact

, , , , , , , , , , , ,

6 Comments

Routing protocol OSPF dengan Vyatta untuk sub local node INHERENT ke local node UNSRI

Routing, adalah sebuah proses untuk mem-forward paket data dari satu network menuju network lain. Dengan Routing kita dapat membuat dua atau lebih network yang berbeda saling berkomunikasi. Untuk melakukan hal ini, diperlukan suatu peralatan yang disebut router. Pada saat router menerima suatu packet data maka router akan membaca alamat yang menjadi tujuan berdasarkan header yang terdapat pada packet, setelah router mengetahui kemana alamat yang akan dituju maka router akan melihat routing table Dengan routing table inilah maka router akan tahu kemana ia akan meneruskan packet data tersebut.

Routing table menyimpan informasi mengenai network yang terhubung dengannya (Connected Networks) maupun netwok yang tidak terhubung dengannya (Remote networks). Connected networks adalah network yang terhubung dengan salah satu interface pada router. Remote networks adalah network yang tidak terhubung langsung dengan salah interface pada router. Routing Table bisa dibentuk dengan berbagai macam cara yaitu dengan Static Routing maupun Dynamic Routing.

Static Routing adalah Routing Table yang dibentuk dengan cara di-entry secara manual oleh network administrator, sedangkan Dynamic Routing adalah Routing Table yang dibentuk secara otomatis dengan menggunakan dynamic routing protocols.

Dynamic Routing Protocol dibagi kedalam dua kategori yaitu IGP (Interior Gateway Protocols)  dan EGP (Exterior Gateway Protocol)

Interior Gateway Protocols (IGPs) adalah protocol yang melakukan routing didalam satu autonomous systems sedangkan Exterior Gateway Protocol (EGPs) adalah protocol yang melakukan routing antar autonomous systems

IGPs dibagi ke dalam dua kategori lagi yaitu

  • distance-vector
  • link-state protocols

Distance-vector protocol antara lain:

  • Routing Information Protocol (RIP)
  • Interior Gateway Routing Protocol (IGRP)
  • Enhanced IGRP (EIGRP)

Link-state protocols antara lain

  • Open Shortest Path First (OSPF)
  • Intermediate System-to-Intermediate System (IS-IS).

EGPs

Border Gateway Protocol (BGP).

Inherent (Indonesia Higher Education Network) memilih menggunakan protocol OSPF dikarenakan selain OSPF merupakan protocol open system yang bisa digunakan pada router buatan suatu vendor tertentu maupun router yang dibangun dengan software open source, selain itu dikarenakan OSPF menggunakan Link State Algortitma yaitu jika suatu router yang dikonfigurasi dengan link-state routing protocol maka router tersebut akan membuat suatu  “complete view” dari sebuah topologi dengan cara mengumpulkan informasi dari seluruh router. Sehingga mempunyai “the best path” atau jalan terbaik keseluruh network tujuan dalam suatu topologi.

Dalam membuat suatu complete view suatu router harus mencapai kondisi convergence yaitu kondisi dimana seluruh routing table berada dalam kondisi “state of consistency”. Suatu network disebut sudah convergence jika seluruh router sudah mempunyai routing table yang lengkap dan akurat terhadap network. Sedangkan untuk mencapai kondisi convergence, suatu router membutuhkan convergence time yaitu waktu yang dibutuhkan router untuk berbagi infomasi, melakukan kalkulasi “the best paths“, dan melakukan update terhadap routing tables. Secara Umum, RIP and IGRP mempunyai time converge yang lambat, sedangkan EIGRP and OSPF mempunyai time converge yang lebih cepat.

OSPF dikonfigurasi dengan menggunakan perintah router ospf process-id. Process-id adalah nilai antara 1 and 65535 yang dipilih oleh network administrator. Nilai Process-id bersifat local maksudnya tidak mempengaruhi  OSPF routers untuk membangun hubungan dengan router yang bersebelahan. Di dalam topologi inherent, pengelola menggunakan area-id untuk dijadikan process-id

R1(config)#router ospf <process-id>

Router(config-router)#network network-address wildcard-mask area area-id

OSPF network menggunakan gabungan network-address, wildcard-mask dan area-id

Contoh:

R1’s FastEthernet 0/0 interface mempunyai alamat nerwork 167.205.182.124/30. Subnet mask untuk interface ini /30 atau 255.255.255.252. Untuk mendapatkan subnet masknya kurangkan nilai 255.255.255.255 dengan 255.255.255.252, hasil dari pengurangan tersebut menghasilkan wildcard mask

255.255.255.255

- 255.255.255.252 Subtract the subnet mask

——————-

0.  0.  0. 15  Wildcard mask

Area-id merujuk ke  OSPF area. OSPF area kumpulan dari  routers yang saling berbagi informasi link-state. Seluruh routers pada area yang sama harus mempunyai informasi link-state yang sama pada link-state databases-nya.

OSPF router ID digunakan sebagai identitas unik tiap router pada OSPF. Router ID secara simpel ada sebuah IP address. Routers menentukan ID didasarkan 3 kriteria yaitu:

  1. Menggunakan IP address yang dikonfigurasi dengan perintah OSPF router-id
  2. Jika router-id tidak dikonfigurasi, maka router akan memilih IP address tertinggi pada interface loopback.
  3. Jika interfaces loopback tidak ada yang dikonfigurasi maka router akan memilih IP address tertinggi dari interface fisik.

Adapun Interface Loopback adalah Interface yang bersifat logic atau virtual, interface ini tidak ada dalam bentuk fisik, dan sama halnya dengan interface fisik, interface ini mendapat perlakuan yang sama dengan interface fisik, antara lain mendapat alamat IP dan Subnet Mask seperti halnya kita memberikan IP pada Interface fisik, dan karena bersifat logic tentu interface ini tidak akan mengalami kondisi down seperti Interface fisik, sehingga ia merupakan suatu interface yang aktif setiap saat, dan kalau interface ini di-set dengan diberikan IP maka routing protokol OSPF akan menjadikan alamat IP pada interface loopback ini sebagai  Router-ID untuk router tersebut. Dan ia bukan interface yang menghubungkan suatu network ke router, interface ini hanya membutuhkan satu alamat IP sehingga di konfigurasi dengan subnet mask bernilai 255.255.255.255 atau semua bit bernilai 1 atau dalam bentuk prefix yaitu /32

Router dengan Software Open Source Vyatta

(Konfigurasi oleh PT yang terhubung)

Download iso versi terbaru dari Vyatta pada http://vyatta.org (Thanks to Vyatta). Burning ke CD, kemudian booting PC yang akan dijadikan router dari CD ROM (vyatta sangat hemat resource, pengalaman menunjukkan dengan Pentium 4 RAM 256 dan Hardisk 40 GB, Vyatta menunjukkan performance yang cukup baik).

Masukkan username vyatta dan password vyatta (default)

login as: vyatta

password:

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: Tue Nov 17 07:06:54 2009

Lakukan instalasi

vyatta@vyatta:~$ install-system

Welcome to the Vyatta install program.  This script

will walk you through the process of installing the

Vyatta image to a local hard drive.

Would you like to continue? (Yes/No) [Yes]: yes

Probing drives: OK

Looking for pre-existing RAID groups…none found.

The Vyatta image will require a minimum 1000MB root.

Would you like me to try to partition a drive automatically

or would you rather partition it manually with parted?  If

you have already setup your partitions, you may skip this step.

Partition (Auto/Union/Parted/Skip) [Auto]:

I found the following drives on your system:

sda  8590MB

Install the image on? [sda]:

This will destroy all data on /dev/sda.

Continue? (Yes/No) [No]: yes

How big of a root partition should I create? (1000MB - 8590MB) [8590]MB:

Creating filesystem on /dev/sda1: OK

Mounting /dev/sda1

Copying system image files to /dev/sda1:OK

I found the following configuration files

/opt/vyatta/etc/config/config.boot

Which one should I copy to sda? [/opt/vyatta/etc/config/config.boot]:

Masukkan password yang diinginkan

Would you like to set the passwords for system users (Yes/No) [Yes]: yes

Enter root password:

Retype root password:

Enter vyatta password:

Retype vyatta password:

I need to install the GRUB boot loader.

I found the following drives on your system:

sda  8590MB

Which drive should GRUB modify the boot partition on? [sda]:

Setting up grub: OK

Done!

vyatta@vyatta:~$

Karena masih dalam keadaan booting dari live CD, lakukan reboot.

Setelah reboot masukkan username vyatta dan password yang kita buat tadi.

Ketik configure untuk masuk ke configuration mode

vyatta@vyatta:~$ configure

[edit]

Set IP sesuai yang didapatkan dari pengelola jaringan inherent

vyatta@vyatta# set interfaces ethernet eth0 address 167.205.182.126/30

[edit]

vyatta@vyatta# set interfaces ethernet eth1 address 167.205.145.9/29

[edit]

vyatta@vyatta# set interfaces loopback lo address 118.98.240.184/32

[edit]

Set routing protocol OSPF

vyatta@vyatta# set protocols ospf log-adjacency-changes

[edit]

vyatta@vyatta# set protocols ospf parameters router-id 118.98.240.184

[edit]

vyatta@vyatta# set protocols ospf area 69 network 167.205.182.124/30

[edit]

vyatta@vyatta# set protocols ospf area 69 network 167.205.145.8/29

[edit]

vyatta@vyatta# set protocols ospf area 69 network 118.98.240.184/32

[edit]

Aktifkan konfigurasi

vyatta@vyatta# commit

[edit]

Simpan konfigurasi

vyatta@vyatta# save

Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…

Done

[edit]

vyatta@vyatta# exit

vyatta@vyatta:~$

Melihat routing table yang terbentuk

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  118.98.240.184/32 [110/10] is directly connected, lo, 00:03:32

C>* 118.98.240.184/32 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

O  167.205.145.8/29 [110/10] is directly connected, eth1, 00:03:32

C>* 167.205.145.8/29 is directly connected, eth1

O  167.205.182.124/30 [110/10] is directly connected, eth0, 00:03:37

C>* 167.205.182.124/30 is directly connected, eth0

Melihat database routing

vyatta@vyatta:~$ show ip ospf database

OSPF Router with ID (118.98.240.184)

Router Link States (Area 0.0.0.69)

Link ID  ADV Router  Age  Seq#  CkSum  Link count

118.98.240.184  118.98.240.184  1236 0×80000003 0xf738 3

167.205.182.125 167.205.182.125 1276 0×80000006 0×8e10 1

Net Link States (Area 0.0.0.69)

Link ID  ADV Router  Age  Seq#  CkSum

167.205.182.125 167.205.182.125 1277 0×80000001 0xa33a

Melihat ospf interface

vyatta@vyatta:~$ show ip ospf interface

eth0 is up

ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>

Internet Address 167.205.182.126/30, Broadcast 167.205.182.127, Area 0.0.0.69

MTU mismatch detection:enabled

Router ID 118.98.240.184, Network Type BROADCAST, Cost: 10

Transmit Delay is 1 sec, State Backup, Priority 1

Designated Router (ID) 167.205.182.125, Interface Address 167.205.182.125

Backup Designated Router (ID) 118.98.240.184, Interface Address 167.205.182.126

Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters

Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5

Hello due in 9.124s

Neighbor Count is 1, Adjacent neighbor count is 1

eth1 is up

ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>

Internet Address 167.205.145.9/29, Broadcast 167.205.145.15, Area 0.0.0.69

MTU mismatch detection:enabled

Router ID 118.98.240.184, Network Type BROADCAST, Cost: 10

Transmit Delay is 1 sec, State DR, Priority 1

Designated Router (ID) 118.98.240.184, Interface Address 167.205.145.9

No backup designated router on this network

Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters

Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5

Hello due in 9.124s

Neighbor Count is 0, Adjacent neighbor count is 0

lo is up

ifindex 1, MTU 16436 bytes, BW 0 Kbit <UP,LOOPBACK,RUNNING>

Internet Address 118.98.240.184/32, Area 0.0.0.69

MTU mismatch detection:enabled

Router ID 118.98.240.184, Network Type LOOPBACK, Cost: 10

Transmit Delay is 1 sec, State Loopback, Priority 1

No designated router on this network

No backup designated router on this network

Multicast group memberships: <None>

Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5

Hello due in inactive

Neighbor Count is 0, Adjacent neighbor count is 0

Melihat ospf neighbor

vyatta@vyatta:~$ show ip ospf neighbor

Neighbor ID Pri State  Dead Time Address  Interface  RXmtL RqstL DBsmL

167.205.182.125  1 Full/DR  33.834s 167.205.182.125 eth0:167.205.182.126  0  0  0

vyatta@vyatta:~$

Download pdf

routing-protocol-ospf-dengan-vyatta-untuk-sub-local-node-UNSRI

, , , , , , , , , , , , , , , , , ,

No Comments