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

UNTUK VPN SERVER R1
Masuk ke Configure Mode
vyatta@vyatta:~$ configure
[edit]
Kemudian set IP untuk interface yang berada pada R1
vyatta@vyatta# set interfaces ethernet eth0 address 192.168.1.1/24
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 222.124.194.2/27
[edit]
Jika anda membuat VPN skala laboratorium berdasarkan contoh topologi diatas maka untuk menghubungkan dua alamat network atau lebih diperlukan router dan untuk itu anda perlu menge-set routing protocol supaya tercipta routing tabel, kebetulan untuk contoh tutorial ini kita akan menggunakan routing protocol OSPF. Abaikan langkah ini jika anda mengimplementasikan VPN server yang terhubung langsung dengan internet
vyatta@vyatta# set protocols ospf area 1 network 222.124.194.0/27
[edit]
Set interface eth0 sebagai passive interface agar broadcast pada peristiwa updating routing tabel tidak diteruskan ke local area network
vyatta@vyatta# set protocols ospf passive-interface eth0
[edit]
vyatta@vyatta#
Sesuai dengan petunjuk diatas jika VPN server anda terhubung langsung dengan internet maka set-lah static routing yang berfungsi sebagai default routing untuk setiap paket data yang akan keluar menuju jaringan public
vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 222.124.194.1
Beri host name pada VPN Server 1
vyatta@vyatta#set system host-name R1
Set IPSec pada interface yang terhubung dengan internet
vyatta@vyatta#set vpn ipsec ipsec-interfaces interface eth1
vyatta@vyatta#show vpn ipsec ipsec-interfaces
vyatta@vyatta#set vpn ipsec ike-group IKE-1R1 proposal 1
vyatta@vyatta#set vpn ipsec ike-group IKE-1R1 proposal 1 encryption aes256
vyatta@vyatta#set vpn ipsec ike-group IKE-1R1 proposal 1 hash sha1
vyatta@vyatta#set vpn ipsec ike-group IKE-1 R1 proposal 2 encryption aes128
vyatta@vyatta#set vpn ipsec ike-group IKE-1 R1 proposal 2 hash sha1
vyatta@vyatta#set vpn ipsec ike-group IKE-1R1 lifetime 3600
vyatta@vyatta#show -all vpn ipsec ike-group IKE-1R1
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 proposal 1
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 proposal 1 encryption aes256
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 proposal 1 hash sha1
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 proposal 2 encryption 3des
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 proposal 2 hash md5
vyatta@vyatta#set vpn ipsec esp-group ESP-1R1 lifetime 1800
vyatta@vyatta#show -all vpn ipsec esp-group ESP-1R1
vyatta@vyatta#set vpn ipsec site-to-site peer 202.146.180.228 authentication mode pre-shared-secret
vyatta@vyatta#edit vpn ipsec site-to-site peer 202.146.180.228
vyatta@vyatta#set authentication pre-shared-secret test_key_1
vyatta@vyatta#set ike-group IKE-1R1
vyatta@vyatta#set local-ip 222.124.194.2
vyatta@vyatta#set tunnel 1 local-subnet 192.168.1.0/24
vyatta@vyatta#set tunnel 1 remote-subnet 192.168.2.0/24
vyatta@vyatta#set tunnel 1 esp-group ESP-1R1
vyatta@vyatta#top
vyatta@vyatta#commit
vyatta@vyatta#show -all vpn ipsec site-to-site peer 202.146.180.228
vyatta@vyatta#exit
Generate RSA key
vyatta@R1>vpn rsa-key generate
A local RSA key file already exists and will be overwritten
<CTRL>C to exit: 8
Your new local RSA key has been generated
The public portion of the key is:
0sAQNZtj56JMxVNR7bhUazGNcNbaybFEi0zf8FZd7fQkSd8GT9HDBQ2QunL7P3LdArEoU9Vw7R0oJzew9zTq3J9mU4/OfG/n1NbNLfcT17QHP7EldgPpGcQ6TaXpfToIENsqN0nEPyT9AM7SBUa8B78wSsE7×9XFI4knSgUX5FmhV5452DWl2nYGrBqVEvL2rnHhbnR2Z0DGbYebWyO4Lbl3TWJkkVrXT6QgzN1GQw0/MkaknEBIFk6XuoAm8HbVE0zFL4Wr/Zs2t1k0amCsh/Dqhj+UZkdxV0LN69BELYn5EYiqigNPlgZFDnZ0jhz1EqxnQ2QT4Q+ErwIf1v0KkhlA+f8Lg2H5GdxkY9pnWcd+zSOQHf
(catatan: pada saat generate RSA key bisa jadi waktu yang perlukan cukup lama, untuk itu anda harus sabar menunggu)
Copy RSA key ini dan masuk lagi ke configure mode
vyatta@R1>configure
Set VPN RSA key dan beri nama dengan R2-Key (sebab berfungsi sebagai key buat R2 yang ingin berhubungan dengan R1) kemudian paste-kan RSA key tadi
vyatta@R1# set vpn rsa-keys rsa-key-name R2-key rsa-key 0sAQNZtj56JMxVNR7bhUazGNcNbaybFEi0zf8FZd7fQkSd8GT9HDBQ2QunL7P3LdArEoU9Vw7R0oJzew9zTq3J9mU4/OfG/n1NbNLfcT17QHP7EldgPpGcQ6TaXpfToIENsqN0nEPyT9AM7SBUa8B78wSsE7×9XFI4knSgUX5FmhV5452DWl2nYGrBqVEvL2rnHhbnR2Z0DGbYebWyO4Lbl3TWJkkVrXT6QgzN1GQw0/MkaknEBIFk6XuoAm8HbVE0zFL4Wr/Zs2t1k0amCsh/Dqhj+UZkdxV0LN69BELYn5EYiqigNPlgZFDnZ0jhz1EqxnQ2QT4Q+ErwIf1v0KkhlA+f8Lg2H5GdxkY9pnWcd+zSOQHf
Simpan hasil konfigurasi
vyatta@R1# commit
[edit]
vyatta@R1#save
UNTUK ROUTER R2
Abaikan langkah ini jika anda memang mengimplementasikan VPN Server yang terhubung langsung dengan internet. Jika tidak ikuti langkah dibawah ini
Set host name
vyatta@vyatta# system host-name R2
[edit]
Kemudian set IP untuk interface yang berada pada R2
vyatta@vyatta# set interfaces ethernet eth0 address 222.124.194.1/27
[edit]
vyatta@vyatta# set interfaces ethernet eth0 address 222.124.194.1/27
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 202.146.180.224/29
[edit]
Set routing protocol
vyatta@vyatta# set protocols ospf area 1 network 222.124.194.0/27
[edit]
vyatta@vyatta# set protocols ospf area 1 network 202.146.180.224/29
[edit]
Simpan hasil konfigurasi
vyatta@vyatta#commit
vyatta@vyatta#save
UNTUK VPN SERVER R3
Masuk ke configure mode
vyatta@vyatta:~$ configure
[edit]
vyatta@vyatta# system host-name R3
[edit]
vyatta@vyatta# set interfaces ethernet eth0 address 202.146.180.228/29
[edit]
vyatta@vyatta# set interfaces ethernet eth1 address 192.168.2.1/24
[edit]
Sama seperti keterangan diatas jika anda membuat VPN skala laboratorium berdasarkan topologi diatas maka diperlukan routing protocol supaya tercipta routing table. Abaikan juga langkah ini jika anda mengimplementasikan VPN server yang terhubung langsung dengan internet
vyatta@vyatta# set protocols ospf area 0 network 202.146.180.224/29
[edit]
vyatta@vyatta# set protocols ospf passive-interface eth1
[edit]
vyatta@vyatta#
Dan seperti yang sudah dijelaskan jika VPN server anda terhubung langsung dengan internet maka set-lah static routing yang berfungsi sebagai default routing untuk setiap paket data yang akan keluar menuju jaringan public
vyatta@vyatta# set protocols static route 0.0.0.0/0 next-hop 202.146.180.225
Set ipsec pada interface yang terhubung dengan internet
vyatta@vyatta#set vpn ipsec ipsec-interfaces interface eth0
vyatta@vyatta#show vpn ipsec ipsec-interfaces
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 proposal 1
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 proposal 1 encryption aes256
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 proposal 1 hash sha1
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 proposal 2 encryption aes128
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 proposal 2 hash sha1
vyatta@vyatta#set vpn ipsec ike-group IKE-1R3 lifetime 3600
vyatta@vyatta#show -all vpn ipsec ike-group IKE-1R3
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 proposal 1
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 proposal 1 encryption aes256
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 proposal 1 hash sha1
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 proposal 2 encryption 3des
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 proposal 2 hash md5
vyatta@vyatta#set vpn ipsec esp-group ESP-1R3 lifetime 1800
vyatta@vyatta#show -all vpn ipsec esp-group ESP-1R3
vyatta@vyatta#set vpn ipsec site-to-site peer 222.124.194.2 authentication mode pre-shared-secret
vyatta@vyatta#edit vpn ipsec site-to-site peer 222.124.194.2
vyatta@vyatta#set authentication pre-shared-secret test_key_1
vyatta@vyatta#set ike-group IKE-1R3
vyatta@vyatta#set local-ip 202.146.180.228
vyatta@vyatta#set tunnel 1 local-subnet 192.168.2.0/24
vyatta@vyatta#set tunnel 1 remote-subnet 192.168.1.0/24
vyatta@vyatta#set tunnel 1 esp-group ESP-1R3
vyatta@vyatta#top
vyatta@vyatta#commit
vyatta@vyatta#show -all vpn ipsec site-to-site peer 222.124.194.2
vyatta@vyatta#exit
vyatta@R3>vpn rsa-key generate
A local RSA key file already exists and will be overwritten
<CTRL>C to exit: 8
Your new local RSA key has been generated
The public portion of the key is:
0sAQOaAFWK13JnatBgfiQR76ei0/yhxfdAzJ85AU2pu9udS8t3oKQU3EhZvuQVGA/YRkY9godKr7bz3Gw0hfDVXVumX/zwKmW8AcYoCCvj7xMAnyCHHRmtHaSaT/5AMXBHGEaQpkGyXfrvs55+drxtAaLFXgVQ0MDivYUYmASicNErUy9MPWLSABfvhH+i0QrTEHcIwmyzD/0AGlz0QvbcMlssEDe7OVmjLeOKwp+yb+uNr+48+1aMggIL0qfENfDH+JZh8jlNF3LriRrXJkTLkGdLjfVv3TUtdUoSa6eiCJ18XrbTr+vVaRNvOVWY9d9Bl3yZVmAaEihYGiqOynnWtyNsZHEaiHofS+DU5lzv/BI2MyVb
Jika ingin melihat RSA key yang sudah digenerate
vyatta@R3> show vpn ike rsa-keys
Local public key (/opt/vyatta/etc/config/ipsec.d/rsa-keys/localhost.key):
0sAQOaAFWK13JnatBgfiQR76ei0/yhxfdAzJ85AU2pu9udS8t3oKQU3EhZvuQVGA/YRkY9godKr7bz3Gw0hfDVXVumX/zwKmW8AcYoCCvj7xMAnyCHHRmtHaSaT/5AMXBHGEaQpkGyXfrvs55+drxtAaLFXgVQ0MDivYUYmASicNErUy9MPWLSABfvhH+i0QrTEHcIwmyzD/0AGlz0QvbcMlssEDe7OVmjLeOKwp+yb+uNr+48+1aMggIL0qfENfDH+JZh8jlNF3LriRrXJkTLkGdLjfVv3TUtdUoSa6eiCJ18XrbTr+vVaRNvOVWY9d9Bl3yZVmAaEihYGiqOynnWtyNsZHEaiHofS+DU5lzv/BI2MyVb
Masuk kembali ke configure mode set RSA key name dengan nama R1-key
vyatta@R3> configure
[edit]
vyatta@EAST# set vpn rsa-keys rsa-key-name R1-key rsa-key 0sAQOaAFWK13JnatBgfiQR76ei0/yhxfdAzJ85AU2pu9udS8t3oKQU3EhZvuQVGA/YRkY9godKr7bz3Gw0hfDVXVumX/zwKmW8AcYoCCvj7xMAnyCHHRmtHaSaT/5AMXBHGEaQpkGyXfrvs55+drxtAaLFXgVQ0MDivYUYmASicNErUy9MPWLSABfvhH+i0QrTEHcIwmyzD/0AGlz0QvbcMlssEDe7OVmjLeOKwp+yb+uNr+48+1aMggIL0qfENfDH+JZh8jlNF3LriRrXJkTLkGdLjfVv3TUtdUoSa6eiCJ18XrbTr+vVaRNvOVWY9d9Bl3yZVmAaEihYGiqOynnWtyNsZHEaiHofS+DU5lzv/BI2MyVb
[edit]
Simpan hasil konfigurasi
vyatta@R3# commit
[edit]
vyatta@R3# save
Saving configuration to ‘/opt/vyatta/etc/config/config.boot’…
Done
[edit]
vyatta@R3#
Sampai langkah ini VPN Site to site sudah selesai kita lakukan, untuk client-client yang terhubung pada VPN server, set IP sesuai dengan alamat yang terdapat pada masing-masing site dengan tidak lupa memberikan gateway, yaitu alamat IP yang terdapat pada router/VPN Server yang terhubung dengan Local Area Network.
Contoh untuk client yang berada pada alamat network 192.168.1.0/24 maka bisa diberikan alamat
IP Address: 192.168.1.2
Subnet Mask 255.255.255.0
Gateway: 192.168.1.1
Kemudian lakukan ping antar local area network untuk menguji apakah VPN server ini sudah berjalan sebagaimana mestinya
VPN REMOTE ACCESS
Setelah selesai melakukan konfigurasi untuk VPN site to site selanjutnya kita bisa melakukan konfigurasi untuk VPN remote access. Disini kita akan menjadikan R1 sebagai VPN Server Remote access
Masuk ke configure mode
vyatta@R1>configure
vyatta@R1#set vpn pptp remote-access outside-address 222.124.194.2
Atur range IP pool, yaitu IP yang akan diberikan secara otomatis pada user yang mengakses VPN server, sehingga pada client akan mempunyai dua IP yaitu IP yang digunakan untuk berhubungan dengan internet, dan satu lagi IP yang didapat dari hasil tunneling ke VPN server, dengan IP yang didapat dari VPN Server inilah maka client tampak seolah-olah berada network yang sama dengan network yang diaksesnya
vyatta@R1#set vpn pptp remote-access client-ip-pool start 192.168.1.50
vyatta@R1#set vpn pptp remote-access client-ip-pool stop 192.168.1.60
vyatta@R1#set vpn pptp remote-access authentication mode local
Buat username dan password untuk user agar bisa mengakses VPN Server, ulangi lagi
langkah ini jika ingin menambah user lain
vyatta@R1#set vpn pptp remote-access authentication local-users username candra password fasilkom
Supaya user yang mengakses ke VPN server juga bisa mengakses internet maka pada Server VPN kita lakukan NAT
vyatta@R1#set service nat rule 10 type source
vyatta@R1#set service nat rule 10 source address 192.168.1.0/24
vyatta@R1#set service nat rule 10 outbound-interface eth1
vyatta@R1#set service nat rule 10 outside-address address 222.124.194.2
Dan jika kita memiliki DNS Server local kita bisa mengarahkan query ke IP DNS server local
set vpn pptp remote-access dns-servers server-2 192.168.1.2
Tetapi jika kita memiliki DNS server yang berada ditempat lain maka kita bisa melakukan forwarding ke IP DNS server tersebut (Misal DNS dengan IP 202.146.180.230)
vyatta@R1# set service dns forwarding listen-on eth1
[edit]
vyatta@R1# set service dns forwarding name-server 222.124.194.18
[edit]
Dan jika kita ingin agar web server kita tadi juga berfungsi sebagai web caching maka
vyatta@R1#set service webproxy listen-address 192.168.1.1
Simpan hasil konfigurasi
vyatta@R1#commit
vyatta@R1#save
vyatta@R1#show vpn pptp remote-access
Selanjutnya supaya user bisa mengkases VPN server lakukan konfigurasi dengan cara:
- Pilh Start > Control Panel > Network Connections.
- Pilih Create a new connection. klik Next.
- Pilih Connect to the network at my workplace. klik Next.
- Pilih Virtual Private Network connection. klik Next.
- Buat nama; sebagai contoh “VPN-FASILKOM†klik Next.
- Pilih Do not dial the initial connection. klik Next.
- Ketik alamat dari VPN server yaitu 222.124.194.3 klik Next.
- Pilih Do not use my smart card. klik Next.
- Tandai add shortcut to this connection to my desktop
- klik Finish
- Klik dua kali shortcut yang sudah terbentuk pada desktop
- Masukkan username dan password untuk user yang sudah dibuat pada server
- Setelah proses authentikasi valid akan user akan terhubung dengan VPN server
- Untuk mengetahui IP yang didapat dari VPN server, klik start, ketik CMD kemudian enter
- Kemudian ketik ipconfig /all, maka disitu akan terlihat berapa IP yang didapatkan, bandingkan alamat network IP tersebut dengan alamat network local area yang diakses
- Lakukan ping dengan salah satu alamat yang terdapat pada Local Area Network tersebut, jika mendapat reply berarti VPN Server remote access sudah berhasil kita buat
Selamat mencoba
Download pdf
vpn-remote-access-dan-site-to-site-dengan-vyatta
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.






























