华为举例:配置IP话机MAC认证和IP话机下挂PC 802.1X认证
华为举例:配置IP话机MAC认证和IP话机下挂PC 802.1X认证
组网需求
如图3-61所示,用户为了节省投资成本,希望通过VoIP实现IP话机和PC同时接入网络。用户的IP话机支持LLDP协议,能够通过LLDP获取语音VLAN。用户希望网络规划满足如下要求:
IP话机发送的语音报文,优先级比较低,需要提升报文的优先级以保证通话质量。
语音报文使用VLAN 200进行通信,数据报文使用VLAN 100进行通信。
IP话机和PC的IP地址通过DHCP服务器动态分配。
IP话机使用MAC认证、PC使用802.1X认证接入DeviceA。

本例中Interface1、Interface2、Interface3分别代表10GE1/0/1、10GE1/0/2、10GE1/0/3。

配置注意事项
本举例主要介绍DeviceA上的NAC相关配置,RADIUS服务器配置这里不做相关说明。
对于使用CDP等非标准发现协议的IP话机,为了保证设备能够与IP话机建立邻居,需要配置命令lldp mdn enable txrx。
LLDP协商语音VLAN需要一定的时间,当LLDP邻居学习较慢时,IP话机可能存在数据VLAN先上线后无法快速切换到语音VLAN、导致一段时间内语音VLAN转发权限不通的问题。此时可以配置MAC迁移功能,使用语音VLAN快速重新触发认证。开启MAC迁移和迁移前探测功能的配置步骤如下:
[HUAWEI] authentication mac-move enable vlan all
[HUAWEI] authentication mac-move detect enable
配置思路
在DeviceA上配置网络互连互通。
在DeviceA上配置DHCP功能,为PC和IP话机分配IP地址。
在DeviceA上配置AAA,为用户进行RADIUS认证、授权、计费。
在DeviceA上配置802.1X和MAC认证,对用户进行接入认证。
操作步骤
配置网络互连互通。
# 创建VLAN并开启LLDP功能。
<HUAWEI> system-view
[HUAWEI] sysname DeviceA
[DeviceA] vlan batch 100 200 300
[DeviceA] lldp enable
# 把接口加入数据VLAN。
[DeviceA] interface 10ge 1/0/1
[DeviceA-10GE1/0/1] portswitch
[DeviceA-10GE1/0/1] port link-type hybrid
[DeviceA-10GE1/0/1] port hybrid pvid vlan 100
[DeviceA-10GE1/0/1] port hybrid untagged vlan 100
[DeviceA-10GE1/0/1] quit
[DeviceA] interface 10ge 1/0/2
[DeviceA-10GE1/0/2] portswitch
[DeviceA-10GE1/0/2] port link-type hybrid
[DeviceA-10GE1/0/2] port hybrid pvid vlan 100
[DeviceA-10GE1/0/2] port hybrid untagged vlan 100
[DeviceA-10GE1/0/2] quit
[DeviceA] interface 10ge 1/0/3
[DeviceA-10GE1/0/3] portswitch
[DeviceA-10GE1/0/3] port link-type access
[DeviceA-10GE1/0/3] port default vlan 300
[DeviceA-10GE1/0/3] quit
[DeviceA] interface vlanif 100
[DeviceA-Vlanif100] ip address 10.1.1.1 24
[DeviceA-Vlanif100] quit
[DeviceA] interface vlanif 300
[DeviceA-Vlanif300] ip address 10.3.1.1 24
[DeviceA-Vlanif300] quit
# 把接口加入语音VLAN。
[DeviceA] interface 10ge 1/0/1
[DeviceA-10GE1/0/1] port hybrid tagged vlan 200
[DeviceA-10GE1/0/1] quit
[DeviceA] interface 10ge 1/0/2
[DeviceA-10GE1/0/2] port hybrid tagged vlan 200
[DeviceA-10GE1/0/2] quit
[DeviceA] interface vlanif 200
[DeviceA-Vlanif200] ip address 10.2.1.1 24
[DeviceA-Vlanif200] quit
# 使能接口的Voice VLAN功能和接口以TLV方式授权语音VLAN。
[DeviceA] interface 10ge 1/0/1
[DeviceA-10GE1/0/1] voice-vlan 200 enable
[DeviceA-10GE1/0/1] stp edged-port enable
[DeviceA-10GE1/0/1] lldp tlv-enable med-tlv network-policy voice-vlan vlan 200 cos 6 dscp 60
[DeviceA-10GE1/0/1] lldp mdn enable txrx //对于使用CDP等非标准发现协议的IP话机,为了保证设备能够与IP话机建立邻居,需要配置该步骤
[DeviceA-10GE1/0/1] quit
[DeviceA] interface 10ge 1/0/2
[DeviceA-10GE1/0/2] voice-vlan 200 enable
[DeviceA-10GE1/0/2] stp edged-port enable
[DeviceA-10GE1/0/2] lldp tlv-enable med-tlv network-policy voice-vlan vlan 200 cos 6 dscp 60
[DeviceA-10GE1/0/2] lldp mdn enable txrx //对于使用CDP等非标准发现协议的IP话机,为了保证设备能够与IP话机建立邻居,需要配置该步骤
[DeviceA-10GE1/0/2] quit
# 配置到服务器区的静态路由,假设下一跳为10.3.1.2。
[DeviceA] ip route-static 0.0.0.0 0.0.0.0 10.3.1.2
配置DHCP功能。
[DeviceA] dhcp enable
[DeviceA] interface vlanif 100
[DeviceA-Vlanif100] dhcp select interface
[DeviceA-Vlanif100] quit
[DeviceA] interface vlanif 200
[DeviceA-Vlanif200] dhcp select interface
[DeviceA-Vlanif200] quit
配置AAA。
# 创建并配置RADIUS服务器模板“rd1”。
[DeviceA] radius-server template rd1
[DeviceA-radius-rd1] radius-server authentication 10.5.1.3 1812
[DeviceA-radius-rd1] radius-server accounting 10.5.1.3 1813
[DeviceA-radius-rd1] radius-server shared-key cipher Huawei@123456789
[DeviceA-radius-rd1] quit
# 创建AAA认证方案“abc”并配置认证方式为RADIUS。
[DeviceA] aaa
[DeviceA-aaa] authentication-scheme abc
[DeviceA-aaa-authen-abc] authentication-mode radius
[DeviceA-aaa-authen-abc] quit
# 配置计费方案“acco1”。
[DeviceA-aaa] accounting-scheme acco1
[DeviceA-aaa-accounting-acco1] accounting-mode radius
[DeviceA-aaa-accounting-acco1] accounting realtime 15
[DeviceA-aaa-accounting-acco1] quit
# 创建认证域“isp”,并在其上绑定AAA认证方案“abc”、计费方案acco1与RADIUS服务器模板“rd1”。
[DeviceA-aaa] domain isp
[DeviceA-aaa-domain-isp] authentication-scheme abc
[DeviceA-aaa-domain-isp] accounting-scheme acco1
[DeviceA-aaa-domain-isp] radius-server rd1
[DeviceA-aaa-domain-isp] quit
[DeviceA-aaa] quit
配置802.1X和MAC认证。
# 配置MAC接入模板。
[DeviceA] mac-access-profile name m1
[DeviceA-mac-access-profile-m1] quit
# 配置802.1X接入模板,并配置客户端认证超时时间为30秒。
[DeviceA] dot1x-access-profile name d1
[DeviceA-dot1x-access-profile-d1] dot1x authentication-method eap
[DeviceA-dot1x-access-profile-d1] dot1x timer client-timeout 30
[DeviceA-dot1x-access-profile-d1] quit
# 在认证模板“p1”下绑定MAC接入模板、802.1X接入模板。
[DeviceA] authentication-profile name p1
[DeviceA-authen-profile-p1] mac-access-profile m1
[DeviceA-authen-profile-p1] dot1x-access-profile d1
# 使能MAC旁路认证功能。
[DeviceA-authen-profile-p1] authentication dot1x-mac-bypass
# 配置认证强制域,用户名携带域时可以不配置802.1X认证用户使用强制域。
[DeviceA-authen-profile-p1] access-domain isp dot1x force
[DeviceA-authen-profile-p1] access-domain isp mac-authen force
[DeviceA-authen-profile-p1] quit
# 在接口下绑定认证模板。
[DeviceA] interface 10ge 1/0/1
[DeviceA-10GE1/0/1] authentication-profile p1
[DeviceA-10GE1/0/1] quit
[DeviceA] interface 10ge 1/0/2
[DeviceA-10GE1/0/2] authentication-profile p1
[DeviceA-10GE1/0/2] quit
检查配置结果
话机启动终端后,触发进行802.1X认证,802.1X认证失败后,进行MAC认证,MAC认证成功。
PC终端启动后,输入用户名和密码,开始802.1X认证,认证成功后,用户可以访问网络。
用户上线后,执行命令display access-user mac-address查看在线用户信息。
配置脚本
DeviceA的配置脚本
#
sysname DeviceA
#
vlan batch 100 200 300
#
authentication-profile name p1
mac-access-profile m1
dot1x-access-profile d1
authentication dot1x-mac-bypass
access-domain isp dot1x force
access-domain isp mac-authen force
#
radius-server template rd1
radius-server shared-key cipher %+%##!!!!!!!!!"!!!!"!!!!*!!!!SKvr${[Fs.3t@/5k|BENhEu>W(3\~XG!!D;!!!!!2jp5!!!!!!A!!!!3"pK8qv!}9M#(4$jGWvQF/R[CNe/+:W^jk8HUe&W%+%#
radius-server authentication 10.5.1.3 1812 weight 80
radius-server accounting 10.5.1.3 1813 weight 80
#
aaa
authentication-scheme abc
authentication-mode radius
accounting-scheme acco1
accounting-mode radius
accounting realtime 15
domain isp
authentication-scheme abc
accounting-scheme acco1
radius-server rd1
#
dhcp enable
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
dhcp select interface
#
interface Vlanif200
ip address 10.2.1.1 255.255.255.0
dhcp select interface
#
interface Vlanif300
ip address 10.3.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid tagged vlan 200
port hybrid untagged vlan 100
stp edged-port enable
lldp mdn enable txrx
lldp tlv-enable med-tlv network-policy voice-vlan vlan 200 cos 6 dscp 60
voice-vlan 200 enable
authentication-profile p1
#
interface 10GE1/0/2
port link-type hybrid
port hybrid pvid vlan 100
port hybrid tagged vlan 200
port hybrid untagged vlan 100
stp edged-port enable
lldp mdn enable txrx
lldp tlv-enable med-tlv network-policy voice-vlan vlan 200 cos 6 dscp 60
voice-vlan 200 enable
authentication-profile p1
#
interface 10GE1/0/3
port link-type access
port default vlan 300
#
ip route-static 0.0.0.0 0.0.0.0 10.3.1.2
#
dot1x-access-profile name d1
dot1x timer client-timeout 30
#
mac-access-profile name m1
#
return2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 华为举例:配置IP话机MAC认证和IP话机下挂PC 802.1X认证
作者: 小编
| 手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm