Inhaltsverzeichnis
Mit Port Monitoring oder Port Mirroring kann der Traffic eines Switchports auf einen weiteren Port gespiegelt werden, um dort aufgezeichnet zu werden (wireshark, tcpdump etc.)
Port Monitoring (SPAN)
- Quell-Port: GigabitEthernet0/5 (Server)
- Ziel-Port: GigabitEthernet0/10 (wireshark/tcpdump)
swtich-01#configure terminal
swtich-01#(config)#monitor session 1 source interface GigabitEthernet0/5
swtich-01#(config)#monitor session 1 destination interface GigabitEthernet0/10
swtich-01#(config)#end
swtich-01#show monitor
Session 1
---------
Type : Local Session
Source Ports :
Both : Gi0/5
Destination Ports : Gi0/10
Encapsulation : Native
Ingress : Disabled
Learning : Disabled
swtich-01#
Remote Port Monitoring (RSPAN)
Es ist auch möglich die Port-Spiegelung über mehrere Swiches hinweg einzurichten. Der Transport des zu spiegelnden Traffics erfolgt über ein extra VLAN.
Auf allen beteiligen Switches muss das „Transport VLAN“ angelegt werden.
configure terminal (config)#vlan 999 (config-vlan)#name port-mirror (config-vlan)#remote-span (config-vlan)#end
Konfiguration auf Switch 1 (Quelle):
swtich-01#configure terminal swtich-01#(config)#monitor session 1 source interface GigabitEthernet0/5 swtich-01#(config)#monitor session 1 destination remote vlan 999 swtich-01#(config)#end swtich-01#
Konfiguration auf Switch 3 (Ziel):
swtich-03#configure terminal
swtich-03#(config)#monitor session 1 source remote vlan 999
swtich-03#(config)#monitor session 1 destination interface GigabitEthernet0/24
swtich-03#(config)#end
swtich-03#show monitor
Session 1
---------
Type : Remote Destination Session
Source RSPAN VLAN : 999
Destination Ports : Gi0/24
Encapsulation : Native
Ingress : Disabled
Learning : Disabled
swtich-03#

