Study Session Number 16! Switch Security - Port Security! #17

Hi Everyone, 

Today I'm gonna learn more about switch security, I think today's session will be focused more on protecting and limiting the physical ports themselves so I dont think there will be to much ground that needs to be covered today, after I've went through the notes I'm going to do some labbing and take last lesson and this lesson and put the theory into practice just to build the muscle memory - I think last lesson all the things discussed we're relatively straightforward so hopefully this lesson will be to. 

In a regular switched environment when a device connects into a switchport the MAC address of that device gets stored onto the switches CAM table and the device gets allocated into the network along with any specific vlan that it may have been assigned to, but what if a rouge device connects into a switchport that is designated for a manager? they now have complete access into the companies network. By configuring port security each port can be designed so that only specified MAC addresses can gain access to the network - this might be allowing the managers laptop's MAC address on the network, this then prevents any rouge devices as only that MAC address can gain access, another method is to limit the amount of MAC addresses that are allowed on a specific switchport to say 3 MAC addresses are only allowed for one port any more and the port will shutdown or drop the frames. 

Static - Statically configuring MAC addresses that are allowed on a specific port. 

DynamicHow many MAC addresses are permitted on a specific port and are dynamically learned (Example - Only two MAC addresses are permitted, so first two devices plugged in are allowed access to the network). 
    Aging Interval - defines the time for which mac addresses that have been learned will be                forgotten.

Sticky - Automatically add a learnt MAC address to the running-config. The switch learns the MAC then saves it to the running configuration, this eliminates having to save the switch and allows for constant updating. Eg Running-config (RAM) to startup-config (NVRAM). 

Static & Dynamic together = Static is defining specific MAC addresses, dynamic is defining a number of MAC addresses. A combination of both static and dynamic can be configured, for example - limit the port to four mac addresses then statically assign two.

Security violation states -
Shutdown - This is the default state puts port into error disabled mode (also snmp trap if snmp is configured).
Protect - Drops packets with unknown source mac addresses.
Restrict - Drops packets with unknown source mac addresses + security violation is incremented.

Commands - 

NOTE: FOR SWITCHPORT SECURITY COMMAND, INTERFACES MUST BE SET TO ACCESS PORTS OR IT WONT WORK, THIS IS CAUSED BY DTP.

Manually configure interface with MAC -
int *int*
    mac-address *mac address*

Enable switchport security -
int *int*.
    switchport port-security - can now be verified by show port security command.

Static security - 
int *int*.
    switchport port-security
    switchport port-security mac-address *static MAC addresses*

Dynamic security - 
int *int*.
    switchport port-security
    switchport port-security maximum *amount of allowed MAC addresses*

Sticky Security -
int *int*.
    switchport port-security
    switchport port-security mac-address sticky - adds current mac address into NVRAM.

Shutdown, Protect, Restrict -
int *int*.
    switchport port-security
    switchport port-security violation *shutdown, protect or restrict*
To fix a port from error disabled physically remove the host with the invalid mac-address or turn the port off and on (shutdown then no shutdown). 
OR
(config) errdisable recovery cause psecure-violation
              errdisable recovery interval *in seconds* - this sets a time for when the port goes down                   until it goes back to normal.
Verify - 
show port-security
    show port-security address - same output as last command instead it shows mac address over        interface.
    show port-security interface *int*
show mac-address table 

Comments

Popular posts from this blog

Python Crash Course Chapter 1-2! #1

I PASSED! Cisco CCNA 200-301! Experience & Where I'm going from here!

Python Notes #6 Functions