【技術(shù)分享】配置802.1x 本地認(rèn)證
2023-02-28 16:12 作者:微思網(wǎng)絡(luò) | 我要投稿

實(shí)驗(yàn)拓?fù)?/strong>

實(shí)驗(yàn)需求
PC1(10.10.10.2/30)直接連接到RouterA的Eth2/0/1端口,RouterA的VLANIF10接口IP地址10.10.10.1/30(為PC1上的網(wǎng)關(guān)IP地址),配置802.1x協(xié)議進(jìn)行訪問(wèn)控制,認(rèn)證方式采用本地認(rèn)證。
實(shí)驗(yàn)步驟
RouterA的配置
V200R007及之前版本:
#???????????????????????????????????????????????????????????????????????????????
vlan?batch?10
#
dot1x?enable??//使能全局802.1x認(rèn)證
#
aaa
?local-user?huawei?password?cipher?huawei@123??//添加本地用戶密碼為“huawei@123”?
?local-user?huawei?privilege?level?0???
?local-user?huawei?service-type?8021x??//添加本地接入用戶???????????????????????????????????
#????????????????????????????????????????????????????????????????????????????????????
interface?Ethernet2/0/1??????????????????????????????????????????????????
?port?link-type?access??????????????????????????????????????????????????????????
?port?default?vlan?10???????????????????????????????????????????????????????????
?dot1x?enable??//使能接口的802.1x認(rèn)證
?dot1x?port-method?port??//指定接口上用戶的接入方式為基于接口???????????????????
#
interface?Vlanif10
?ip?address?10.10.10.1?255.255.255.252
#
V200R008及之后版本:
#???????????????????????????????????????????????????????????????????????????????
vlan?batch?10
#
authentication-profile?name?p1
?dot1x-access-profile?d1????//在認(rèn)證模板p1上綁定802.1x接入模板d1
#
aaa
?local-user?huawei?password?cipher?huawei@123??//添加本地用戶密碼為“huawei@123”?
?local-user?huawei?privilege?level?0???
?local-user?huawei?service-type?8021x??//添加本地接入用戶???????????????????????????????????
#????????????????????????????????????????????????????????????????????????????????????
interface?Ethernet2/0/1??????????????????????????????????????????????????
?port?link-type?access??????????????????????????????????????????????????????????
?port?default?vlan?10???????????????????????????????????????????????????????????
?authentication-profile?p1??//接口下綁定認(rèn)證模板p1
#
interface?Vlanif10
?ip?address?10.10.10.1?255.255.255.252
#
dot1x-access-profile?name?d1
#驗(yàn)證配置結(jié)果
客戶端認(rèn)證軟件輸入用戶名“huawei”,密碼“huawei@123”可以成功上線,執(zhí)行display access-user可以查看上線用戶的信息。
標(biāo)簽: