시스코 2950 스위치 보안 설정
~~엑세스 포트에서만 보안이 가능
Switch(config-if)#interface fastethernet 0/1
Switch(config-if)#switchport mode access
~~~Port-Security 활성화 하기
Switch(config-if)# switchport port-security
~~~최대 등록 가능한 MAC Address를 5개로 제한한다.
Switch(config-if)# switchport port-security maximum 5
~~~해당 규칙 위배시 동작 방법 설정
Switch(config-if)# switchport port-security violation restrict
Protect : 보안침해시 해당 장비만 접속을 거부하고, 접속이 허용된 장비는 계속 포트 사용 가능
Restrict : protect모드와 같으나 추가적으로 로깅메세리를 발생하거나 보안 침해 카운터를 증가시킨다.
shutdown : 보안침해시 포트를 셧다운 시킨다--기본값
~~~해당 포트에 등록될 MAC Address를 정적으로 구성
Switch(config-if)# switchport port-security mac-address 0000.c000.f000
또는
~~~Switchport MAC-Address 동적으로 매핑 (자동으로 해당 포트에 연결된 MAC을 학습한 후
동적으로 등록해주는 방법입니다.)
Switch(config-if)# switchport port-security mac-address sticky
*** sticky 설정이 되면 해당 포트에 MAC이 학습되는 경우 설정된 최대 갯수 만큼 자동으로 다음처럼 설정되어 running-config에 저장되므로 copy run start 명령으로 저장해 놓으면 다시 실행시 항상 등록되어 있습니다.
~~~정보 확인
Switch(config-if)#do sh por int fa0/1
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 0
Configured MAC Addresses : 0
Sticky MAC Addresses : 0
Last Source Address : 0000.0000.0000
Security Violation Count : 0
구성 선택 사항.....
~~~문제 유발 MAC Address 제거
Switch(config-if)# mac-address-table static 0090.1234.5678 vlan vlan_id drop