{"id":1036,"date":"2017-09-20T12:55:38","date_gmt":"2017-09-20T18:55:38","guid":{"rendered":"http:\/\/www.jedge.com\/wordpress\/?p=1036"},"modified":"2018-05-22T21:12:28","modified_gmt":"2018-05-23T03:12:28","slug":"cisco-mac-address-port-security","status":"publish","type":"post","link":"https:\/\/www.jedge.com\/wordpress\/2017\/09\/cisco-mac-address-port-security\/","title":{"rendered":"Cisco MAC Address Port Security"},"content":{"rendered":"<p>Cisco MAC Address Port Security<\/p>\n<p>We are going to configure basic, no frills, port security on the Cisco Catalyst 2960. From Understanding Port Security &#8211; Chapter 62 &#8211; Configuring Port Security<\/p>\n<p><em>You can use port security with dynamically learned and static MAC addresses to restrict a port\u2019s ingress traffic by limiting the MAC addresses that are allowed to send traffic into the port. When you assign secure MAC addresses to a secure port, the port does not forward ingress traffic that has source addresses outside the group of defined addresses. If you limit the number of secure MAC addresses to one and assign a single secure MAC address, the device attached to that port has the full bandwidth of the port.<\/em><br \/>\n<!--more--><br \/>\nThe table below lists the default values on each port for the Cisco 2960. To ensure you also have the default values to follow along with this tutorial I suggest following my previous post on how to <a href=\"http:\/\/www.jedge.com\/wordpress\/2017\/09\/reset-to-cisco-switch-to-factory-defaults\/\" target=\"_blank\" rel=\"noopener\">reset your switch to the factory defaults<\/a>. The tutorial also shows you have to connect to the Cisco device via the console cable and a serial-to-USB adapter.<\/p>\n\n<table id=\"tablepress-2\" class=\"tablepress tablepress-id-2\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Feature<\/th><th class=\"column-2\">Default Setting<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Port security<\/td><td class=\"column-2\">Disabled on a port.<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Sticky address learning<\/td><td class=\"column-2\">Disabled.<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Maximum number of secure MAC addresses per port<\/td><td class=\"column-2\">1<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Violation mode<\/td><td class=\"column-2\">Shutdown. The port shuts down when the maximum number of secure MAC addresses is exceeded.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">Port security aging<\/td><td class=\"column-2\">Disabled. Aging time is 0.<br \/>\nStatic aging is disabled.<br \/>\nType is absolute.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-2 from cache -->\n<p>We are going to keep it simple and work with FastEthernet port 0\/1.<br \/>\n<pre><code>\nSwitch con0 is now available\n\nPress RETURN to get started.\n\nSwitch&gt;enable\nSwitch#config t\nEnter configuration commands, one per line.&nbsp;&nbsp;End with CNTL\/Z.\nSwitch(config)#interface FastEthernet 0\/1\nSwitch(config-if)#switchport mode access\nSwitch(config-if)#switchport port-security\nSwitch(config-if)#switchport port-security maximum 1\nSwitch(config-if)#switchport port-security violation protect\nswitchport port-security mac-address 0015.99d2.99fd\nSwitch(config-if)#end\nSwitch#show port-security\nSecure Port&nbsp;&nbsp;MaxSecureAddr&nbsp;&nbsp;CurrentAddr&nbsp;&nbsp;SecurityViolation&nbsp;&nbsp;Security Action\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Count)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Count)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Count)\n---------------------------------------------------------------------------\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fa0\/1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protect\n---------------------------------------------------------------------------\nTotal Addresses in System (excluding one mac per port)&nbsp;&nbsp;&nbsp;&nbsp; : 0\nMax Addresses limit in System (excluding one mac per port) : 8192\n<\/code><\/pre><br \/>\nThe only thing you need to change regarding the commands above is the MAC address you want to filter. I chose my printer.  Older printers are the likely culprit in office environments for port security based on MAC addresses.<br \/>\n&nbsp;<\/p>\n<p>Resources<\/p>\n<p><a href=\"https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/lan\/catalyst6500\/ios\/12-2SX\/configuration\/guide\/book\/port_sec.pdf\" rel=\"noopener\" target=\"_blank\">https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/lan\/catalyst6500\/ios\/12-2SX\/configuration\/guide\/book\/port_sec.pdf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cisco MAC Address Port Security We are going to configure basic, no frills, port security on the Cisco Catalyst 2960. From Understanding Port Security &#8211; Chapter 62 &#8211; Configuring Port Security You can use port security with dynamically learned and static MAC addresses to restrict a port\u2019s ingress traffic by limiting the MAC addresses that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[161,165,157,28],"class_list":["post-1036","post","type-post","status-publish","format-standard","hentry","category-configuration","tag-cisco","tag-lab-setup","tag-port-security","tag-security"],"_links":{"self":[{"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/posts\/1036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1036"}],"version-history":[{"count":10,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/posts\/1036\/revisions"}],"predecessor-version":[{"id":1052,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/posts\/1036\/revisions\/1052"}],"wp:attachment":[{"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jedge.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}