{"id":882,"date":"2011-09-07T21:51:00","date_gmt":"2011-09-07T13:51:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=882"},"modified":"2023-11-07T21:52:58","modified_gmt":"2023-11-07T13:52:58","slug":"cisco-port-auth","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/882","title":{"rendered":"Cisco Port Auth"},"content":{"rendered":"\n<p>Port-Based Authentication<br>this feature is based on the IEEE 802.1x standard<br>both the switch and the end user&#8217;s PC must support, and a authentication server for support 802.1x<br>ps:<br>only RADIUS is supported for 802.1x in cisco<br>ps:<br>802.1x EAPOL(Extensible Authentication Protocol over LANs) is a Layer 2 protocol<br>ps:<br>EAPOL,STP,CDP protocols are allowed through the switch port before authentication takes place<\/p>\n\n\n\n<p>unauthorized condition<br>1.An 802.1x switch port begins in the unauthorized state (#dot1x port-control auto)<br>2.The authorized state of the port ends when the user logs out<br>3.The switch can also time out the user&#8217;s authorized session<br>If this happens, the client must reauthenticate to continue using the switch port<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<\/p>\n\n\n\n<p><br>1<br>Enable AAA on the switch.<br><strong>Switch(config)# aaa new-model<\/strong><br>The &#8220;new model&#8221; is much more scalable than the &#8220;old model,&#8221; in which the authentication source<br>was explicitly configured.<br>It globally enables AAA on the switch, with default lists applied to the VTYs<\/p>\n\n\n\n<p>2<br>Define external RADIUS servers<br><strong>Switch(config)# radius-server host &lt; hostname | ip-address &gt; [key ]<\/strong><br>host\u6307\u5b9aradius\u4f4d\u7f6e<br>key\u6307\u5b9araidus\u5b9a\u7fa9\u7684secret shared<br>This command can be repeated to define additional RADIUS servers<\/p>\n\n\n\n<p>3<br>Define the authentication method for 802.1x<br><strong>Switch(config)# aaa authentication &lt; dot1x &gt; default group radius<\/strong><br>\u5404\u53c3\u6578\u8aaa\u660e\u5982\u4e0b<br>&lt; dot1x &gt; \u6307\u5b9a802.1x\u7684\u8a8d\u8b49\u65b9\u5f0f<\/p>\n\n\n\n<p>4<br>Enable 802.1x on the switch:<br><strong>Switch(config)# dot1x system-auth-control<\/strong><\/p>\n\n\n\n<p>5<br>Configure each switch port that will use 802.1x:<br>Switch(config)# interface &lt; interface &gt;<br>Switch(config-if)# switchport mode access<br><strong>Switch(config-if)# dot1x port-control &lt; auto | force-authorized | force-unauthorized&gt;<\/strong><br>\u53c3\u6578\u8aaa\u660e\u5982\u4e0b<br><strong>auto<\/strong><br>The port uses an 802.1x exchange to move from the unauthorized to the authorized state,<br>each port must be configured the auto state so that connected PCs are forced to authenticate through the 802.1x exchange<br><strong>force-authorized(default)<\/strong><br>The port is forced to always authorize any connected client. No authentication is necessary<br>\u4fdd\u6301\u8a8d\u8b49\u7684\u72c0\u614b,\u56e0\u6b64\u4e0d\u9700\u8a8d\u8b49\u5373\u53ef\u50b3\u8f38\u8cc7\u6599<br><strong>force-unauthorized<\/strong><br>The port is forced to never authorize any connected client,As a result, the port cannot move to the authorized state to pass traffic to a connected client.<br>\u4fdd\u6301\u672a\u8a8d\u8b49\u7684\u72c0\u614b<br>ps:<br>If the client PC is configured to use 802.lx but the switch does not support it, the PC abandons the protocol and communicates normally.<br>ps:<br>\u4e0d\u652f\u63f4Etherchannel,Tunmk port,Span port(Sniffer port)<\/p>\n\n\n\n<p>6(optional)<br>Allow multiple hosts on a switch port.<br><strong>Switch(config-if)# dot1x host-mode multi-host<\/strong><\/p>\n\n\n\n<p><br>ex:<br>radius\u4e3b\u6a5f\u70ba10.1.1.1\u4e26\u4f7f\u7528BigSecret\u505a\u70basecret key<br>fa0\/1-40\u8981\u6c42client\u4f7f\u7528802.1x\u8a8d\u8b49<br><strong>switch\u8a2d\u5b9a\u90e8\u4efd<\/strong><br>Switch(config)# aaa new-model<br>Switch(config)# radius-server host 10.1.1.1 key BigSecret<br>Switch(config)# aaa authentication dot1x default group radius<br>Switch(config)# dot1x system-auth-control<br>Switch(config)# interface range FastEthernet0\/1 &#8211; 40<br>Switch(config-if)# switchport access vlan 10<br>Switch(config-if)# switchport mode access<br>Switch(config-if)# dot1x port-control auto<br><strong>client_pc\u8a2d\u5b9a\u90e8\u4efd<\/strong><br>\u8a2d\u5b9a802.1x\u76f8\u95dc\u8a2d\u5b9a<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/p>\n\n\n\n<p><strong>#show dot1x all<\/strong><br>to verify the 802.1x operation on each switch port that is configured to use port-based authentication<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Port-Based Authenticationthis  &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[31],"tags":[],"class_list":["post-882","post","type-post","status-publish","format-standard","hentry","category-cisco-security"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=882"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/882\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}