局域网安全-MAC地址认证 1. 组网需求 如图1所示,某用户的工作站与以太网设备的端口GigabitEthernet1/0/1相连接。 · 设备的管理者希望在端口GigabitEthernet1/0/1上对用户接入进行MAC地址认证,以控制其对Internet的访问。 · 要求设备每隔180秒就对用户是否下线进行检测;并且当用户认证失败时,需等待180秒后才能对用户再次发起认证。 · 所有用户都属于域:aabbcc.net,认证时使用本地认证的方式。 · 使用用户的MAC地址做用户名和密码,其中MAC地址带连字符、字母小写。 2. 组网图 图1启动MAC地址认证对接入用户进行本地认证
3. 配置步骤 (1) 配置本地MAC地址认证 # 添加本地接入用户。用户名和密码均为接入用户的MAC地址00-e0-fc-12-34-56,服务类型为lan-access。 <Device> system-view [Device] local-user 00-e0-fc-12-34-56 [Device-luser-00-e0-fc-12-34-56] password simple 00-e0-fc-12-34-56 [Device-luser-00-e0-fc-12-34-56] service-type lan-access [Device-luser-00-e0-fc-12-34-56] quit # 配置ISP域,使用本地认证方法。 [Device] domain aabbcc.net [Device-isp-aabbcc.net] authentication lan-access local [Device-isp-aabbcc.net] quit # 开启全局MAC地址认证特性。 [Device] mac-authentication # 开启端口GigabitEthernet1/0/1的MAC地址认证特性。 [Device] mac-authentication interface gigabitethernet 1/0/1 # 配置MAC地址认证用户所使用的ISP域。 [Device] mac-authentication domain aabbcc.net # 配置MAC地址认证的定时器。 [Device] mac-authentication timer offline-detect 180 [Device] mac-authentication timer quiet 180 # 配置MAC地址认证用户名格式:使用带连字符的MAC地址作为用户名与密码,其中字母小写。 [Device] mac-authentication user-name-format mac-address with-hyphen lowercase (2) 验证配置结果 # 显示MAC地址配置信息。 <Device> display mac-authentication MAC address authentication is enabled. User name format is MAC address in lowercase, like xx-xx-xx-xx-xx-xx Fixed username:mac Fixed password:not configured Offline detect period is 180s Quiet period is 180s. Server response timeout value is 100s The max allowed user number is 2048 per slot Current user number amounts to 1 Current domain is aabbcc.net Silent Mac User info: MAC Addr From Port Port Index Gigabitethernet1/0/1 is link-up MAC address authentication is enabled Authenticate success: 1, failed: 0 Max number of on-line users is 1024 Current online user number is 1 MAC Addr Authenticate state Auth Index 00e0-fc12-3456 MAC_AUTHENTICATOR_SUCCESS 29 # 用户认证成功后,可通过如下显示命令查看上线用户的连接信息。 <Device> display connection Slot: 1 Index=29 ,Username=00-e0-fc-12-34-56@aabbcc.net IP=N/A IPv6=N/A MAC=00e0-fc12-3456 Total 1 connection(s) matched on slot 1. Total 1 connection(s) matched.
|