공부/패킷 트레이서

[CISCO/구문실습] SPAN 구성 및 확인

Codey 2023. 11. 1. 20:34

SPAN(SwitchPortAnalyzer)이란?

  • 소스 포트에서 들어오는 각 프레임의 복사본을 대상 포트에서 패킷분석기 또는 IDS로 보냄
  • Source(SPAN) PORT : 해당 포트로 들어오는 트래픽이 대상 포트에 복제되면서 모니터링
  • Destination(SPAN) PORT : 소스(SPAN)포트를 미러링하는 포트
    • 대상 SPAN 포트는 패킷분석기, IDS와 같은 분석장치에 많이 연결됨

구문

Switch(config)# monitor session [number] source interface [interface]
Switch(config)# monitor session [number] source vlan [vlan]
Switch(config)# monitor session [number] destination interface [interface]
Switch(config)# monitor session [number] destination vlan [vlan]

S1에서 SPAN을 구성하려면 다음 단계를 완료하세요.

  • 전역 구성 모드로 들어갑니다.
  • SPAN 명령을 실행하여 소스 포트 fastethernet 0/1 의 트래픽을 모니터링합니다 . 세션 번호로 1을 사용합니다.
  • 대상 포트 fastethernet 0/2 에서 세션 1 모니터링 트래픽을 캡처합니다 .
  • 전역 구성 모드를 종료합니다.
S1# configure terminal
S1(config)#monitor session 1 source interface fastethernet 0/1
S1(config)#monitor session 1 destination interface fastethernet 0/2
S1(config)#exit

 

캡처된 트래픽이 F0/2로 전송되는 소스 포트 F0/1을 모니터링하도록 SPAN이 구성되었는지 확인합니다.

S1#show monitor
Session 1
---------
Type                   : Local Session
Source Ports           : 
    Both               : Fa0/1 
Destination Ports      : Fa0/2
    Encapsulation      : Native
          Ingress      : Disabled
// Fa0/1은 트래픽을 모니터링, Fa0/2는 모니터링한 트래픽을 캡처합니다.