
Port Mirroring (Port İkizleme), bir switch üzerindeki bir porttan gelen trafiği başka bir porta kopyalamak için kullanılır. Bu, genel olarak sunucu gibi cihazların trafiğini izlemek ve analiz etmek için kullanılır.
“Cisco Packet Tracer” üzerinde bir uygulama gerçekleştirelim.

Topolojimizde bir adet sunucumuz var. Bu sunucuya gelen trafiği port ikizleme ile “FastEthernet 0/1” portuna kopyalayacağız.
Switch#en
Switch(config)# monitor session 1 source interface FastEthernet 0/2 ( Kaynak Port )
Switch(config)# monitor session 1 destination interface FastEthernet 0/1 ( Hedef Port FastEthernet 0/2 bu porta kopyalanacak. )
Switch(config)# do wri
*** "session" numarası, "destination" ve "source" cihaz için aynı olmalıdır.Bu örnekte, “FastEthernet 0/2” portuna gelen ve çıkan trafik “FastEthernet 0/1” portuna kopyalanacaktır. Cihazımıza kurduğumuz bir ağ trafik analiz yazılımı ile trafiği izleyebiliriz. Bu yazılıma örnek olarak “Wireshark” verilebilir.
Belirli bir port aralığını da kopyalayabiliriz.
Switch#en
Switch(config)# monitor session 1 source interface FastEthernet 0/14 - 23
Switch(config)# monitor session 1 destination interface FastEthernet 0/1
Switch(config)# do wriBu örnekte, “FastEthernet 0/14” ile “FastEthernet 0/23” (dahil) arasındaki portların trafiği “FastEthernet 0/1” portuna kopyalanacaktır.
Switch#en
Switch(config)# monitor session 1 source interface FastEthernet 0/10 , FastEthernet 0/17
Switch(config)# monitor session 1 destination interface FastEthernet 0/1
Switch(config)# do wriBir başka örneğimizde, “FastEthernet 0/10” ve “FastEthernet 0/17” portlarının trafiği “FastEthernet 0/1” portuna kopyalanacaktır.
Bu işlemi “VLAN” için de uygulamak mümkündür.
Switch#en
Switch(config)# monitor session 1 source vlan 10 ( VLAN 10 da bulunan cihazların trafiği kopyalanacaktır. )
Switch(config)# monitor session 1 destination FastEthernet 0/1
Switch(config)# do wriSadece gelen veya giden trafiği de kopyalayabiliriz. Örneğin, gelen trafiği bir porta, giden trafiği başka bir porta kopyalayabiliriz.
Switch#en
Switch(config)# monitor session 1 source interface FastEthernet 0/24 rx ( Receive --> Gelen )
Switch(config)# monitor session 1 destination interface FastEthernet 0/1
Switch(config)#
Switch(config)# monitor session 2 source interface FastEthernet 0/24 tx ( Transmit --> İletilen )
Switch(config)# monitor session 2 destination interface FastEthernet 0/2Bu örnekte, “FastEthernet 0/24” portuna gelen trafik “FastEthernet 0/1” portuna kopyalanacaktır. “FastEthernet 0/24” portundan çıkan trafik ise “FastEthernet 0/2” portuna kopyalanacaktır.
Yaptığımız konfigürasyonu görüntülemek için aşağıdaki kontrol komutunu kullanabiliriz.
Switch# show monitor session all
Oluşturduğumuz konfigürasyonları silmek için aşağıdaki komutu kullanabiliriz.
Switch(config)# no monitor 1 source interface FastEthernet 0/24
Switch(config)# no monitor 1 destination interface FastEthernet 0/1Daha fazla bilgisayar-ağları içeriği için takipte kalın…

Leave a Reply