Fahmi Ahsan
Fahmi Ahsan
Published in
4 min readAug 6, 2019

--

Port Security pada Switch Cisco

Assalamualaikum Wr.Wb

Kali ini kita akan belajar cara mengkonfigurasi Port Security di Switch Cisco, sebelum mulai mengkonfigurasi apa itu Port Security ? yaitu metode pengamanan dengan cara mendaftarkan Mac-Address dari sebuah End Device yang bias mengakses port tertentu jika mac-address yang tidak terdaftar megakses port tersebut switch akan melakukan langkah eksekusi dengan beberapa metode :

· Shutdown, jika terjadi pelanggaran maka port tersebut akan dimatikan atau shutdown

· Protect, jika terjadi pelanggaran port akan tetap menyala tetapi tidak dapat digunakan dan switch akan mengirimkan pesan notifikasi

· Restrict, jika terjadi pelanggaran maka port akan tetap menyala namun switch tidak akan mengirimkan pesan notifikasi

Berikutnya kita akan belajar mengkonfigurasi

  1. Silahkan kalian buat topologi seperti di gambar.

2.Lalu kita masuk ke terminal switch, saat pertama kali masuk kita berada di mode user kita harus masuk ke Global Configurastion Mode dan untuk masuk ke Global Configurastion Mode, Kita harus masuk ke Prilege Mode dulu.

Masuk ke Privilege Mode

Switch>enableSwitch#

Masuk ke Global Configuration Mode : conf t

Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#

3.setelah itu kita konfigurasi port fa0/1 menjadi violation shutdown.

Switch(config)#int fa0/1Switch(config)#switchport mode accessSwitch(config)#switchport port-securitySwitch(config)#switchport port-security mac-address stickySwitch(config)#switchport port-security violation shutdown

4.kemudian ulangi langkah sebelumnya tetapi interface diganti fa0/2 dan violation restrict.

Switch(config)#int fa0/2Switch(config)#switchport mode accessSwitch(config)#switchport port-securitySwitch(config)#switchport port-security mac-address stickySwitch(config)#switchport port-security violation restrict

5.sama seperti langkah sebelumnya tetapi interface diganti fa0/3 dan violation protect.

Switch(config)#int fa0/3Switch(config)#switchport mode accessSwitch(config)#switchport port-securitySwitch(config)#switchport port-security mac-address stickySwitch(config)#switchport port-security violation protect

6.jika sudah cek apakah port security nya sudah berhasil di konfigurasi

Switch(config)#do show port-security

7.lalu kita masuk ke salah satu pc untuk ping ke pc lainya hal ini untuk mendaftarkan mac address pc ke port.

C:\>ping 10.10.23.2Pinging 10.10.23.2 with 32 bytes of data:Reply from 10.10.23.2: bytes=32 time=69ms TTL=128Reply from 10.10.23.2: bytes=32 time=7ms TTL=128Reply from 10.10.23.2: bytes=32 time=11ms TTL=128Ping statistics for 10.10.23.2:Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 7ms, Maximum = 69ms, Average = 29msC:\>ping 10.10.23.3Pinging 10.10.23.3 with 32 bytes of data:Reply from 10.10.23.3: bytes=32 time=1ms TTL=128Reply from 10.10.23.3: bytes=32 time<1ms TTL=128Reply from 10.10.23.3: bytes=32 time<1ms TTL=128Reply from 10.10.23.3: bytes=32 time<1ms TTL=128Ping statistics for 10.10.23.3:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 1ms, Average = 0msC:\>ping 10.10.23.1Pinging 10.10.23.1 with 32 bytes of data:Reply from 10.10.23.1: bytes=32 time=19ms TTL=128Reply from 10.10.23.1: bytes=32 time<1ms TTL=128Reply from 10.10.23.1: bytes=32 time=5ms TTL=128Reply from 10.10.23.1: bytes=32 time<1ms TTL=128Ping statistics for 10.10.23.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 19ms, Average = 6ms

8.setelah selesai ping pc masuk ke switch lagi untuk mengecek apakah mac-address pc sudah terdaftar.

Switch(config)#do sh mac address-tableMac Address Table — — — — — — — — — — — — — — — — — — — — — -Vlan Mac Address Type Ports — — — — — — — — — — — — — — -1 0060.70eb.3413 DYNAMIC Fa0/21 00d0.ff93.96dd DYNAMIC Fa0/31 00e0.a3e0.628a DYNAMIC Fa0/1Switch(config)#

9.lalu untuk pembuktianya kita pindah pc kita.

10.Lalu kita coba ping dari masing-masing pc maka hasilnya akan RTO.

C:\>ping 10.10.23.2Pinging 10.10.23.2 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 10.10.23.2:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),C:\>ping 10.10.23.3Pinging 10.10.23.3 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 10.10.23.3:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),C:\>ping 10.10.23.1Pinging 10.10.23.1 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 10.10.23.1:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Lalu kita lihat topologi kita apakah port yang kita konfigurasi violation shutdown sudah mati.

Dan bisa dilihat bahwa port fa0/1 mati karena tadi kita konfigurasi violation shutdown.

--

--