Kamis, 29 September 2011

Konfig Router Basic OSPF - VLAN - DHCP



KONFIG ROUTER BOGOR

Router>ena
Router#conf t
Router(config)#hostname BOGOR       --à Memberi nama Router                               
(config)# enable secret cisco --> utk set password utk masuk privileged mode (passwordnya : cisco)
(config)#no ip domain-lookup -à untuk menghilangkan loading verifikasi sintaks yg salah

(config)# line vty 0 4
(config-line)# password semangat
(config-line)# login   
(config-line)# exec-timeout 5 0
(config-line)# logging synchronous --> agar prompt muncul lagi ketika ada logging

BOGOR (config)#int se0/0       -> interface ke arah WAN
BOGOR (config-if)#ip add 172.16.2.2 255.255.255.252                    
BOGOR (config-if)#description KONEKSI KE ROUTER JAKARTA
BOGOR (config-if)#no shut
BOGOR (config-if)#clock rate 64000
BOGOR (config-if)#ex

BOGOR (config)#int Fa1/1
BOGOR (config-if)#no ip add
BOGOR (config-if)#no shut
BOGOR (config-if)#ex
 
BOGOR (config)#interface FastEthernet1/1.10
BOGOR (config-subif)#encapsulation dot1Q 10
BOGOR (config-subif)#ip address 192.168.30.1 255.255.255.240      à SET IP GW LAN 1
BOGOR (config-subif)# description LINK KE LAN 1

BOGOR (config)#interface FastEthernet1/1.20
BOGOR (config-subif)# encapsulation dot1Q 20
BOGOR (config-subif)# ip address 192.168.40.1 255.255.255.240  à SET IP GW LAN 2
BOGOR (config-subif)# description LINK KE LAN 2

Jika kita ingin membuat IP DHCP di Segment LAN, maka kita perlu menambahkan command berikut :

Ket : dns-server : bisa juga di isikan DNS Public

BOGOR (config)#ip dhcp pool LAN1
BOGOR (dhcp-config)#network 192.168.30.0 255.255.255.240
BOGOR (dhcp-config)#dns-server 192.168.30.1
BOGOR (dhcp-config)#default-router 192.168.30.1
BOGOR (dhcp-config)#exit

BOGOR (config)#ip dhcp pool LAN2
BOGOR (dhcp-config)#network 192.168.40.0 255.255.255.240
BOGOR (dhcp-config)#dns-server 192.168.40.1
BOGOR (dhcp-config)#default-router 192.168.40.1
BOGOR (dhcp-config)#exit

ROUTING OSPF BOGOR

BOGOR (config)#router ospf 100
BOGOR (config-router)#network 172.16.2.0 0.0.0.3 area 0
BOGOR (config-router)#network 192.168.30.0 0.0.0.15 area 0
BOGOR (config-router)#network 192.168.40.0 0.0.0.15 area 0

Lalu kita setting switchnya, langkah-langkahnya sebagai berikut :
Definisikan Vlan :

Switch#vlan database
Switch(vlan)#vlan 10 name LAN 1
Switch(vlan)#vlan 20 name LAN 2

Delegasikan port untuk mengakses tiap-tiap Vlan yang sudah didefinisikan :

Switch>enable
Switch#configure terminal
Switch(config)#interface fa0/1 -> Menuju router
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit

Switch(config)#interface fa0/2 -> Menuju LAN 1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit

Switch(config)#interface fa0/3 -> Menuju LAN 2
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
-------------
KONFIG ROUTER BANDUNG

Router>en
Router#conf t
Router(config)#hostname BANDUNG

BANDUNG (config)#int Fa0/0
BANDUNG (config-if)#ip add 172.16.1.1 255.255.255.252
BANDUNG (config-if)#description LINK KE ROUTER JAKARTA
BANDUNG (config-if)#no shut
BANDUNG (config-if)#ex

BANDUNG (config)#int fa1/1
BANDUNG (config-if)#ip add 192.168.10.1 255.255.255.0
BANDUNG (config-if)#description LINK KE LAN BANDUNG
BANDUNG (config-if)#no shut
BANDUNG (config-if)#ex

ROUTING OSPF BANDUNG

BANDUNG (config)#router ospf 100
BANDUNG (config-router)#network 172.16.1.0 0.0.0.3 area 0
BANDUNG (config-router)#network 192.168.10.0 0.0.0.255 area 0
BANDUNG (config-router)#exit
-------------------------
KONFIG ROUTER JAKARTA

Router>en
Router#conf t
Router(config)#hostname JAKARTA

JAKARTA (config)#int se0/1
JAKARTA (config-if)#ip add 172.16.2.1 255.255.255.252
JAKARTA (config-if)#description LINK KE ROUTER BOGOR
JAKARTA (config-if)#no shut
JAKARTA (config-if)#ex

JAKARTA (config)#int fa1/0
JAKARTA (config-if)#ip add 172.16.1.2 255.255.255.252
JAKARTA (config-if)#description LINK KE ROUTER BANDUNG
JAKARTA (config-if)#no shut
JAKARTA (config-if)#ex

JAKARTA (config)#int fa1/1
JAKARTA (config-if)#ip add 192.168.20.0 255.255.255.0
JAKARTA (config-if)#description LINK KE LAN JAKARTA
JAKARTA (config-if)#no shut
JAKARTA (config-if)#ex

ROUTING OSPF JAKARTA

JAKARTA (config)#router ospf 100
JAKARTA (config-router)#network 172.16.2.0 0.0.0.3 area 0
JAKARTA (config-router)#network 192.168.20.0 0.0.0.255 area 0
JAKARTA (config-router)#network 172.16.1.0 0.0.0.3 area 0
JAKARTA (config-router)#exit

Tidak ada komentar:

Posting Komentar