Port Security
El comando Port security aplica seguridad a los puertos de los switches.
La seguridad en ese puerto define desde la MAC del dispositivo conectado si puede enviar tráfico a través del switch. Puede ser una MAC de un listado una única MAC asociada con ese puerto.
Si una MAC diferente a las permitidas o un puerto detecta una MAC diferente a la asociada a ese puerto, se denegará el tráfico por ese puerto.
Sticky MAC Addresses
Mediante sticky MAC Adress, el switch o router aprende dinámicamente las MACS de los equipos conectados implementandoles las seguridad.
Esta información es almacenada en memoria al hace un write o copy running config startup config
Configuración por defecto
La seguridad esta deshabilitada, el número máximo de MACS aceptada es 1 y el modo de reacción en caso de violación de seguridad es deshabilitar el puerto cuando se llega al máximo de MACS permitidas y enviar un trap SNMP
Como habilitar nuevamente el puerto deshabilitado
errdisable recovery cause psecure-violation
no shut down
Como borrar información almacenada acerca las MACS permitidas
clear port-security dynamic
Como ver lospuertos con seguridad
show mac-address-table
Reacciones permitidas ate una violación de seguridad
- protect— Descarta los paquetes con direcciones de origen MAC desconocidas hasta eliminar un número suficiente de direcciones MAC seguras sea por debajo del valor máximo.
- restrict—Descarta los paquetes con direcciones de origen MAC desconocidas hasta que elimine un número suficiente de direcciones MAC seguras para que caiga por debajo del valor máximo y haga que el contador SecurityViolation aumente.
- shutdown— Pone la interfaz en el estado deshabilitado por error inmediatamente y envía una notificación de captura SNMP.
Configuracion de port security en un puerto trunk
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure. |
Step 2 |
Router(config-if)# switchport |
Configures the port as a Layer 2 port. |
Step 3 |
Router(config-if)# switchport trunk encapsulation {isl | dot1q} |
Configures the encapsulation, which configures the Layer 2 switching port as either an ISL or 802.1Q trunk. |
Step 4 |
Router(config-if)# switchport mode trunk |
Configures the port to trunk unconditionally. |
Step 5 |
Router(config-if)# switchport nonegotiate |
Configures the trunk not to use DTP. |
Step 6 |
Router(config-if)# switchport port-security |
Enables port security on the trunk. |
Step 7 |
Router(config-if)# do show port-securityinterface type1 slot/port | include Port Security |
Verifies the configuration. |
Habilitando seguridad en un puerto de acceso
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure.Note |
Step 2 |
Router(config-if)# switchport |
Configures the port as a Layer 2 port. |
Step 3 |
Router(config-if)# switchport mode access |
Configures the port as a Layer 2 access port.Note |
Step 4 |
Router(config-if)# switchport port-security |
Enables port security on the port. |
Step 5 |
Router(config-if)# do show port-security interface type1 slot/port | include Port Security |
Verifies the configuration. |
Configurar la acción a realizar en un puerto
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure. |
Step 2 |
Router(config-if)# switchport port-security violation {protect | restrict | shutdown} |
(Optional) Sets the violation mode and the action to be taken when a security violation is detected. |
Step 3 |
Router(config-if)# do show port-securityinterface type1 slot/port | includeviolation_mode2 |
Verifies the configuration. |
Configurar el límite de conexiones en un puerto
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure. |
Step 2 |
Router(config-if)# switchport port-security maximum number_of_addresses vlan {vlan_ID | vlan_range} |
Sets the maximum number of secure MAC addresses for the port (default is 1).Note |
Step 3 |
Router(config-if)# do show port-securityinterface type1 slot/port | include Maximum |
Verifies the configuration. |
Seguridad con Sticky MAC
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure. |
Step 2 |
Router(config-if)# switchport port-security mac-address sticky |
Enables port security with sticky MAC addresses on a port.
|
Permitir acceso a una unica MAC
|
|
|
---|---|---|
Step 1 |
Router(config)# interface type1 slot/port |
Selects the LAN port to configure. |
Step 2 |
Router(config-if)# switchport port-security mac-address [sticky] mac_address [vlan vlan_ID] |
Configures a static MAC address as secure on the port.Note |
Step 3 |
Router(config-if)# end |
Exits configuration mode. |
Step 4 |
Router# show port-security address |
Verifies the configuration. |
AUTOR: David Perez Martorell davidperezmartorell@gmail.com
—
Nota: Si te sirvió lo que postié, te pido 2 segundos para contestar las encuestas que figuran abajo.
Gracias!