카테고리 없음

명령어 정리

도민혁 2022. 8. 2. 22:00

스위치 5차시 명령어


스위치 vlan 확인


- show vlan // 현재 설정된 vlan 종류와 설정된 인터페이스 목록을 띄워줌


- show interface vlan [vlan-number] // vlan에 연결되어 있는 정보를 가져옴

 

 


VLAN


VLAN 생성 및 이름 설정 - vlan [number]


Switch(config)# vlan [number]


Switch(config-vlan)# name [WORD] // 간단한 명칭 설정


Switch(config-vlan)# no name [WORD] // name 삭제

 

 


VLAN 포트 모드- switchport mode [mode]
ACCESS MODE
Switch(config-if)# switchport mode access
// 같은 소속 VLAN 끼리만 통신 가능 주로 호스트에서 사용

 


TRUNK MODE
Switch(config-if)# switchport mode trunk
// 모든 VLAN을 소속시킴 (VLAN에 상관 없이 통신) 주로 스위치끼리 통신할 때 사용
포트에 VLAN 설정 - switchport access vlan[number]


Switch(config-if)# switchport mode access // 스위치포트 모드를 access로 바꿈


Switch(config-if)# switchport access vlan[number]


Port-Security
동적 port-security


Switch(config-if)# switchport mode access


Switch(config-if)# switchport port-security // port-swcurity 활성화


Switch(config-if)# switchport port-security maximum [최대로 학습할 MAC주소 갯수]
// 최대 MAC 학습 개수를 설정

 


Violation mode- switchport port-security violation [mode]
Switch(config-if)# switchport port-security violation protect // 현 상태 유지
Switch(config-if)# switchport port-security violation restrict // protect상태에서 log 메세지 띄움
Switch(config-if)# switchport port-security violation shutdown // 해당포트 비활성화