SPACE.IN
[ Network ] 스위치 보안 본문
● 스위치 보안 = 포트 보안
: L2 기반의 장비인 스위치는 MAC주소를 기반으로 통신한다.
: 포트당 학습할 수 있는 MAC주소의 개수를 제한할 있다.
: 특정 컴퓨터의 침입을 DDoS를 맥 주소를 사용해 차단할 수 있다.
● 포트 보안 학습 방식
1) static : 정적으로 MAC 주소를 입력하여 포트 보안 설정
2) dynamic : 동적으로 학습하여 포트 보안 설정, 개수 제한
: 학습한 주소(MAC)는 nvram에 저장 할 수 없다
::::static은 reload하면 sh port-secrurity add에 주소가 리셋댐 = reload 후 sh port add에 ip가 사라진걸 볼 수 있음
3) sticky : 동적과 동일하고(dynamic과 동일하지만) running-config에 기록한다
+ 맥주소를 지정해서 그 개수를 넘으면 막는거임
● 스위치 보안 위반시 모드
1) protect : 현 상태는 유지하고 위반된 MAC주소의 장비로부터 오는 모든 프레임 drop
2) restrict : 현 상태는 유지하고 위반된 MAC주소의 장비로부터 오는 모든 프레임 drop
: 위의 내용을 log에 기록
3) shutdown : 위반시 포트 상태를 비활성시킨다
● 스위치 설정
int f0/0 ::: pc쪽 인터페이스
(config-if)# switchport mode access
(config-if)# switchport port-security
방법1)
(config-if)# switch port-security
(config-if)# switch port-security mac-address (냅다 ip적거나)
방법2)
(config-if)# switch port-security
(config-if)# switch port-security mac-address sticky >> 정적 :: 개수 지정하는방식으로 하기
(config-if)# switch port-security maximum 1 >> 개수 지정하면 무줙건 최대값도 정해줘야함
스위치 보안
(config-if)# swich port-security violation (종류)
ex. sw port violation protect
확인) show port-security
확인) show port-security address
++ 스위치 보안은 트렁크 상태에서는 설정할 수 없다
(실습)
패킷트레이서에서 맥주소랑 ip주소 같이 변경 :: config > fastethernet 들어가면 창 한번에 다 있어서 거기서 설정
(풀이)
++ pc에 ip, mac, gateway 주기
++ router에 라우팅 다 하기
[ 동적 보안 ]
1. 최대 2 까지
2. protect
int fa0/2
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation protect
----------------------------------------------
copy run start
reload
show port-securty
show port-security address
++ 얘는 동적보안이라서 copy r s가 안먹힘 ! 그래서 reload하고 보면 address 삭제된걸 확인할 수 있음
[ 정적 보안 ]
1. 최대 2 까지
2. protect
int fa0/2 ::: pc쪽 인터페이스
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security mac-address 0000.0000.2111
switchport port-security mac-address 0000.0000.2112
switchport port-security violation protect
---------------------------------------------
copy run start
reload
show port-security
show port-security address
[ sticky 보안 ]
1. 최대 2 까지
2. protect
int fa0/2
switchport mode access
switchport port-security
switchport port-security mac-address sticky
switchport port-security maximum 2
switchport port-security violation protect
---------------------------------------------
copy run start
reload
show port-security
show port-security address
+++
if 안되면
>> 스위치에서 copy r s하고 reload한뒤에
# clear mac-address-table
# show mac-address-table
더블체크
'Network' 카테고리의 다른 글
[ Network ] OSPF 수동축약 / virtual link (0) | 2024.08.22 |
---|---|
[ Network ] ACCESS LIST (ACL) / Extended ACL (0) | 2024.08.20 |
[ Network ] 실습 _ OSPF (인증, 재분배) (0) | 2024.08.08 |
[ Network ] SWITCH / trunk (0) | 2024.08.07 |
[ Network ] OSPF / DR / BDR (0) | 2024.07.30 |