{"id":1232,"date":"2021-02-16T22:07:33","date_gmt":"2021-02-16T22:07:33","guid":{"rendered":"https:\/\/dft.wiki\/?p=1232"},"modified":"2026-06-09T09:40:58","modified_gmt":"2026-06-09T13:40:58","slug":"port-secutiry-on-cisco-devices","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1232","title":{"rendered":"Port-Secutiry on Cisco Devices"},"content":{"rendered":"<p>Showing the current configuration before starting:<\/p>\n<pre>do show vlan brief\r\ndo show mac address-table\r\ndo show mac address-table int g0\/1\r\ndo show port-security int g0\/1<\/pre>\n<p>Setting up Port-Security on interface G0\/1:<\/p>\n<pre>int g0\/1\r\nswitchport host\r\nswitchport port-security max 1\r\nswitchport port-security violation protect<\/pre>\n<p>OR<\/p>\n<pre>switchport port-security violation restrict<\/pre>\n<p>OR<\/p>\n<pre>switchport port-security violation shutdown<\/pre>\n<ul>\n<li>Protect\n<ul>\n<li>Drops all packets from unauthorized sources without notifying or alerting network administrators.<\/li>\n<\/ul>\n<\/li>\n<li>Restrict\n<ul>\n<li>Drops all packets from sources that exceed the maximum allowed and increments the SecurityViolation counter.<\/li>\n<\/ul>\n<\/li>\n<li>Shutdown\n<ul>\n<li>Shuts down the port and sends an SNMP notification. The port must be brought up manually or configured with auto-recovery.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Then, enable Port-Security.<\/p>\n<pre>switchport port-security<\/pre>\n<p>Setting up auto-recovery for violated ports:<\/p>\n<pre>errdisable recovery cause psecure-violation\r\nerrdisable recovery interval 600\r\ndo show errdisable recovery<\/pre>\n<p>Manually setting the allowed MAC address for a port:<\/p>\n<pre>switchport port-security mac-address FF:FF:FF:FF:FF:FF<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Showing the current configuration before starting: do show vlan brief do show mac address-table do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1232","post","type-post","status-publish","format-standard","hentry","category-ccna"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1232"}],"version-history":[{"count":7,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1232\/revisions"}],"predecessor-version":[{"id":5781,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1232\/revisions\/5781"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}