본문 바로가기

NCS/기술적보안구축

Port Security

Port Security 기본 설정

IOU3#interface ethernet 3/2 
IOU3(config-if)#shutdown               
IOU3(config-if)#switchport mode access 
IOU3(config-if)#switchport port-security
IOU3(config-if)#switchport port-security maximum 1
IOU3(config-if)#switchport port-security violation restrict

IOU3(config-if)#no shutdown

 

 

 포트 보안 설정 지침 사항(Port Security Configuration Guidelines)

  • 포트 보안은 정적 액세스 포트(static access-port)에서만 설정 할 수 있다.
  • 보안포트(port security)는 동적 액세스 포트나 트렁크 포트에서는 설정 할 수 없다.

  • 보안 포트(port security)는 SPAN(Switch Port Analyzer)의 목적지 포트가 될 수 없다.

  • 보안 포트(port security)는 패스트 이터채널(Fast EtherChannel)이나 기가 비트 이더채널(Gigabit EtherChannel) 포트 그룹이 될 수 없다.

  • 보안 포트(port security)는 802.1X 포트가 될 수 없다.

  •  보이스 VLAN(voice VLAN)에 정적 보안 MAC 주소를 설정할 수 없다.

  • 보이스 VLAN에 포트 보안을 활성화할 때, 해당 포트에 최소 두 개의 MAC 주소를 보안 주소로 허용하도록 설정 해야 한다. 포트가 Cisco IP 폰에 연결 될 때, IP 폰은 액세스 VLAN의 MAC 주소와 보이스 VLAN의 MAC 주소를 요구한다. 따라서, 최소 두 개의 MAC 주소를 설정해야 한다. PC를 IP 폰과 연결 할 때는 추가로 MAC 주소가 필요하다.

 

 

 

인터페이스에 값들

IOU3#show port-security interface ethernet 3/2
Port Security              : Enabled
Port Status                : Secure-down
Violation Mode             : Restrict
Aging Time                 : 0 mins (기본값)
Aging Type                 : Absolute (기본값)

 

 

port-security aging time의 기본값은 infinity 이다.
aging type absolute(절대적 시간으로 측정) , inactivity(트래픽이 발생되는 시간의 간격을 특정) 두 종류가 있다.

명시적으로 aging time 1 로 설정한 경우,  1 분후에 보안mac으로 등록된 값이 없어진다.
이 값은 #show port-security address 명령을 입력 했을때 type이 SecureConfigured, SecureDynamic인 경우에만 해당된다. 즉 SecureSticky인 경우에는 aging time은 영향을 미치지 못한다.

.IOU3(config)#interface ethernet 3/2              
IOU3(config-if)#switchport port-security aging type inactivity
IOU3(config-if)#switchport port-security aging time 1

 

 

IOU3)#show port-securiity address

               Secure Mac Address Table
-----------------------------------------------------------------------------
Vlan    Mac Address       Type                          Ports   Remaining Age
                                                                   (mins)   
----    -----------       ----                          -----   -------------
   1    000c.29a6.b172    SecureDynamic                 Et3/2      < 1
-----------------------------------------------------------------------------
 

IOU3(config-if)#switchport port-security mac 000c.29a6.b172

 

IOU3(config-if)#do sh port add                            
               Secure Mac Address Table
-----------------------------------------------------------------------------
Vlan    Mac Address       Type                          Ports   Remaining Age
                                                                   (mins)   
----    -----------       ----                          -----   -------------
   1    000c.29a6.b172    SecureConfigured              Et3/2      < 1
-----------------------------------------------------------------------------
 

 

IOU3#show port-security address
               Secure Mac Address Table
-----------------------------------------------------------------------------
Vlan    Mac Address       Type                          Ports   Remaining Age
                                                                   (mins)   
----    -----------       ----                          -----   -------------
   1    000c.29a6.b172    SecureSticky                  Et3/2        -
-----------------------------------------------------------------------------
Total Addresses in System (excluding one mac per port)     : 0
Max Addresses limit in System (excluding one mac per port) : 4096

 

* aging time의 설정값은 영향을 미치지 못한다.
 

 

 

 

IOU3#show port-security interface ethernet 3/2
Port Security              : Enabled
Port Status                : Secure-up
Violation Mode             : Restrict
Aging Time                 : 1 mins
Aging Type                 : inactivity

SecureStatic Address Aging : Enabled
Maximum MAC Addresses      : 1
Total MAC Addresses        : 1
Configured MAC Addresses   : 0
Sticky MAC Addresses       : 0
Last Source Address:Vlan   : 000c.29a6.b172:1
Security Violation Count   : 202