Membuat Static Route di Windows 7

Awalnya karena ada kabutuhan khusus untuk akses jaringan intranet dari kantor menggunakan vpn, namun dari akses vpn tersebut hanya diberikan akses ke beberapa Web Server tertentu saja di jaringan intranet, otomatis setelah terhubung dengan vpn tidak bisa terhubung dengan internet luar karena secara default metric dari vpn adapter lebih kecil dari wifi adapter dan lan adapter. Disini peran static route untuk memisahkan jalur, dimana saat terhubung vpn anda akan akses ke Web Server di Intranet kantor dilewatkan vpn dan untuk akses ke Internet dilewatkan ke jaringan Wifi semula.

Specifies the cost to reach the destination. Routes with lower metrics are chosen over routes with higher metrics. A typical use of the metric value is to indicate the number of routers that must be crossed to reach the destination.

Pertama, cek status ip dhcp client dari wifi, pastikan dapat akses ke Internet

C:\Users\khusni_nadzif>ipconfig

Windows IP Configuration

Ethernet adapter Bluetooth Network Connection:

 Media State . . . . . . . . . . . : Media disconnected
 Connection-specific DNS Suffix . :

Ethernet adapter LAN Laptop:

 Media State . . . . . . . . . . . : Media disconnected
 Connection-specific DNS Suffix . :

Wireless LAN adapter WIFI:

 Connection-specific DNS Suffix . :
 IPv4 Address. . . . . . . . . . . : 192.168.100.245
 Subnet Mask . . . . . . . . . . . : 255.255.255.0
 Default Gateway . . . . . . . . . : 192.168.100.1

C:\Users\khusni_nadzif>ping detik.com

Pinging detik.com [203.190.241.43] with 32 bytes of data:
Reply from 203.190.241.43: bytes=32 time=3ms TTL=59
Reply from 203.190.241.43: bytes=32 time=2ms TTL=59
Reply from 203.190.241.43: bytes=32 time=2ms TTL=59
Reply from 203.190.241.43: bytes=32 time=7ms TTL=59

Ping statistics for 203.190.241.43:
 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
 Minimum = 2ms, Maximum = 7ms, Average = 3ms

Kedua, cek routing awal sebelum anda connect ke vpn, pastikan routing ke internet (0.0.0.0/0) melalui gateway yang anda dapat dari dhcp server.

 C:\Users\khusni_nadzif>route print
===========================================================================
Interface List
 16...28 e3 47 df b0 ac ......Bluetooth Device (Personal Area Network)
 12...28 d2 44 69 9d 08 ......Realtek PCIe GBE Family Controller
 11...28 e3 47 df b0 ab ......Qualcomm Atheros AR956x Wireless Network Adapter
 1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
 0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.245 20 //Ke Internet//
 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
 192.168.100.0 255.255.255.0 On-link 192.168.100.245 266
 192.168.100.245 255.255.255.255 On-link 192.168.100.245 266
 192.168.100.255 255.255.255.255 On-link 192.168.100.245 266
 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
 224.0.0.0 240.0.0.0 On-link 192.168.100.245 266
 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
 255.255.255.255 255.255.255.255 On-link 192.168.100.245 266
===========================================================================
Persistent Routes:
 None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination Gateway
 1 306 ::1/128 On-link
 1 306 ff00::/8 On-link
===========================================================================
Persistent Routes:
 None

Ketiga, Pada VPN Adapter yang telah dibuat, lakukan perubahan pada default gateway nya. Klik kanan pada VPN Adapter -> Masuk di VPN Properties -> Klik Tab Networking -> Pilih Internet Protocol Version 4 -> Klik Properties -> Klik Advanced -> Uncheck pada ‘Use default gateway on remote network’ -> Klik OK

VPN Default Route.JPG
Disable default gateway on remote network

Alasan kenapa di disable karena kita tetap akan memprioritaskan akses ke Internet, sedangkan akses vpn hanya untuk ke beberapa Web Server yang ada di jaringan Intranet kantor saja, sedangkan kalau di centang maka default gateway ke internet juga akan melewati vpn ini (tidak direkomendasikan).

Keempat, Connect ke VPN yang telah anda buat sebelumnya. cek ip yang didapat dari vpn server.

 C:\Users\khusni_nadzif>ipconfig

Windows IP Configuration

PPP adapter VPN Office:

 Connection-specific DNS Suffix . :
 IPv4 Address. . . . . . . . . . . : 172.18.0.18
 Subnet Mask . . . . . . . . . . . : 255.255.255.255
 Default Gateway . . . . . . . . . :

Ethernet adapter Bluetooth Network Connection:

 Media State . . . . . . . . . . . : Media disconnected
 Connection-specific DNS Suffix . :

Ethernet adapter LAN Laptop:

 Media State . . . . . . . . . . . : Media disconnected
 Connection-specific DNS Suffix . :

Wireless LAN adapter WIFI:

 Connection-specific DNS Suffix . :
 IPv4 Address. . . . . . . . . . . : 192.168.100.245
 Subnet Mask . . . . . . . . . . . : 255.255.255.0
 Default Gateway . . . . . . . . . : 192.168.100.1

Kelima, Buat static route ke arah Web Server di jaringan Intranet kantor, misalkan beberapa IP Web server berada di network 192.168.0.0/16 arahkan ke gateway melalui IP VPN yang didapat sebelumnya (172.18.0.18) kemudian cek status static route yang telah dibuat.

C:\Users\khusni_nadzif>route add 192.168.0.0 mask 255.255.0.0 172.18.0.18
 OK! //Perintah menambahkan static route//

C:\Users\khusni_nadzif>route print
===========================================================================
Interface List
 32...........................VPN Office
 16...28 e3 47 df b0 ac ......Bluetooth Device (Personal Area Network)
 12...28 d2 44 69 9d 08 ......Realtek PCIe GBE Family Controller
 11...28 e3 47 df b0 ab ......Qualcomm Atheros AR956x Wireless Network Adapter
 1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
 0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.245 20 //Akses ke internet//
 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
 172.18.0.0 255.255.0.0 202.169.33.253 172.18.0.18 21
 172.18.0.18 255.255.255.255 On-link 172.18.0.18 276
 192.168.0.0 255.255.0.0 On-link 172.18.0.18 21 //Akses ke intranet//
 192.168.100.0 255.255.255.0 On-link 192.168.100.245 266
 192.168.100.245 255.255.255.255 On-link 192.168.100.245 266
 192.168.100.255 255.255.255.255 On-link 192.168.100.245 266
 192.168.255.255 255.255.255.255 On-link 172.18.0.18 276
 202.169.33.253 255.255.255.255 192.168.100.1 192.168.100.245 11
 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
 224.0.0.0 240.0.0.0 On-link 192.168.100.245 266
 224.0.0.0 240.0.0.0 On-link 172.18.0.18 276
 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
 255.255.255.255 255.255.255.255 On-link 192.168.100.245 266
 255.255.255.255 255.255.255.255 On-link 172.18.0.18 276
===========================================================================
Persistent Routes:
 None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination Gateway
 1 306 ::1/128 On-link
 1 306 ff00::/8 On-link
===========================================================================
Persistent Routes:
 None

Keenam, Verifikasi koneksi ke Web Server di jaringan Intranet kantor dan koneksi ke jaringan Internet

C:\Users\khusni_nadzif>ping 192.168.0.90

Pinging 192.168.0.90 with 32 bytes of data:
Reply from 192.168.0.90: bytes=32 time=5ms TTL=64
Reply from 192.168.0.90: bytes=32 time=2ms TTL=64
Reply from 192.168.0.90: bytes=32 time=4ms TTL=64
Reply from 192.168.0.90: bytes=32 time=2ms TTL=64

Ping statistics for 192.168.0.90:
 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
 Minimum = 2ms, Maximum = 5ms, Average = 3ms

C:\Users\khusni_nadzif>tracert 192.168.0.90

Tracing route to 192.168.0.90 over a maximum of 30 hops

 1 2 ms 2 ms 2 ms 192.168.0.90

Trace complete.

C:\Users\khusni_nadzif>ping detik.com

Pinging detik.com [203.190.241.43] with 32 bytes of data:
Reply from 203.190.241.43: bytes=32 time=3ms TTL=59
Reply from 203.190.241.43: bytes=32 time=2ms TTL=59
Reply from 203.190.241.43: bytes=32 time=2ms TTL=59
Reply from 203.190.241.43: bytes=32 time=7ms TTL=59

Ping statistics for 203.190.241.43:
 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
 Minimum = 2ms, Maximum = 7ms, Average = 3ms

C:\Users\khusni_nadzif>tracert detik.com

Tracing route to detik.com [203.190.242.69]
over a maximum of 30 hops:

 1 4 ms 1 ms 1 ms hotspot.b [192.168.100.1]
 2 2 ms 2 ms 3 ms 182.253.242.1
 3 13 ms * 2 ms 202.169.59.93
 4 2 ms 1 ms 2 ms detik.openixp.net [218.100.36.9]
 5 2 ms 3 ms 3 ms 203.190.244.35
 6 2 ms 5 ms 4 ms 203.190.242.69

Trace complete.

Namun untuk konfigurasi penambahan static route diatas masih ada kekurangan yaitu ketika laptop restart/reboot, konfigurasi tersebut akan hilang, maka untuk menyimpan permanen static route diatas tambahkan perintah ‘-p’ setelah route.

C:\Users\khusni_nadzif>route -p add 192.168.0.0 mask 255.255.0.0 172.18.0.18

Pada intinya untuk mengatur rute jaringan itu tergantung dari taste seorang administrator 🙂 Keep Sharing !!!

Cara Membuat Static Route di Windows 7 SELESAI 🙂

Sumber: https://technet.microsoft.com/en-us/library/cc958877.aspx

Advertisements

Author: admin@khsnndzf

Good People

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s