华为举例:配置LLDP或CDP报文触发MAC认证实现IP话机接入网络

华为举例:配置LLDP或CDP报文触发MAC认证实现IP话机接入网络

组网需求

缺省情况下,设备在接收到DHCP/ARP/DHCPv6/ND报文后均能触发对用户进行MAC认证。如果客户端配置了静态IPv4地址,此时客户端与设备间没有DHCP或ARP报文,需要通过LLDP或CDP报文触发MAC认证。IP话机接入认证时,IP话机发出的LLDP或CDP协商报文不带VLAN TAG,报文进入接入设备时会打上数据VLAN的TAG,由于配置了任意报文触发MAC认证,话机会先从数据VLAN认证上线。

如图3-62所示,DeviceA下行连接数据业务和语音业务,DeviceA使用VLAN 200传输语音报文,使用VLAN 100传输数据报文。IP Phone和PC串行接入DeviceA。用户对语音通话质量较敏感,需要提高语音数据流的传输优先级,以保证用户的通话质量。

图3-62 配置LLDP或CDP报文触发MAC认证实现IP话机接入交换机示例组网图

本例中Interface1、Interface2分别代表10GE1/0/110GE1/0/2


配置注意事项

本举例主要介绍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上启用MAC认证功能和Voice VLAN功能实现IP语音接入。采用如下的思路配置:

在DeviceA上创建VLAN,并配置各接口加入VLAN,实现二层互通。VLAN200作为语音VLAN,VLAN100作为数据VLAN且作为10GE1/0/1的缺省VLAN。

配置Voice VLAN功能。

配置AAA认证域和MAC认证。


操作步骤

配置DeviceA的VLAN和接口

# 创建VLAN并开启LLDP功能。

<HUAWEI> sysname DeviceA

[DeviceA] vlan batch 100 200 300

[DeviceA] lldp enable   

# 配置接口10GE1/0/1的PVID及允许通过的数据VLAN。

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE 1/0/1] portswitch

[DeviceA-10GE 1/0/1] port link-type hybrid 

[DeviceA-10GE 1/0/1] port hybrid pvid vlan 100

[DeviceA-10GE 1/0/1] port hybrid untagged vlan 100

[DeviceA-10GE 1/0/1] quit

[DeviceA] interface vlanif 100

[DeviceA-Vlanif100] ip address 192.168.100.10 24

[DeviceA-Vlanif100] quit

[DeviceA] interface vlanif 200

[DeviceA-Vlanif200] ip address 192.168.200.10 24

[DeviceA-Vlanif200] quit

# 配置DeviceA连接RADIUS服务器的接口10GE1/0/2为Access类型接口,并将其加入VLAN300。

[DeviceA] interface 10ge 1/0/2

[DeviceA-10GE1/0/2] portswitch

[DeviceA-10GE1/0/2] port link-type access

[DeviceA-10GE1/0/2] port default vlan 300 

[DeviceA-10GE1/0/2] quit

[DeviceA] interface vlanif 300

[DeviceA-Vlanif300] ip address 192.168.1.20 24

[DeviceA-Vlanif300] quit

配置Voice VLAN和OUI地址。

[DeviceA] voice-vlan mac-address 00e0-fc12-3456 mask ffff-ff00-0000   

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE 1/0/1] voice-vlan 200 enable  

[DeviceA-10GE 1/0/1] stp edged-port enable   

[DeviceA-10GE 1/0/1] port hybrid tagged vlan 200

[DeviceA-10GE 1/0/1] voice-vlan remark-mode mac-address  

[DeviceA-10GE 1/0/1] lldp tlv-enable med-tlv network-policy voice-vlan vlan 200   

[DeviceA-10GE 1/0/1] lldp mdn enable txrx   //对于使用CDP等非标准发现协议的IP话机,为了保证设备能够与IP话机建立邻居,需要配置该步骤

[DeviceA-10GE 1/0/1] quit

配置到服务器区的静态路由(假设服务器区连接DeviceA的IP地址为192.168.1.2)。

[DeviceA] ip route-static 192.168.2.0 255.255.255.0 192.168.1.2


配置AAA。

# 创建并配置RADIUS服务器模板“rd1”。

[DeviceA] radius-server template rd1

[DeviceA-radius-rd1] radius-server authentication 192.168.2.30 1812

[DeviceA-radius-rd1] radius-server accounting 192.168.2.30 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

# 创建AAA计费方案“scheme2”并配置计费方式为RADIUS。

[DeviceA-aaa] accounting-scheme scheme2

[DeviceA-aaa-accounting-scheme2] accounting-mode radius

[DeviceA-aaa-accounting-scheme2] accounting realtime 15

[DeviceA-aaa-accounting-scheme2] quit

# 创建认证域“example.com”,并在其上绑定AAA认证方案“abc”、计费方案“scheme2”与RADIUS服务器模板“rd1”。

[DeviceA-aaa] domain example.com

[DeviceA-aaa-domain-example.com] authentication-scheme abc

[DeviceA-aaa-domain-example.com] accounting-scheme scheme2

[DeviceA-aaa-domain-example.com] radius-server rd1

[DeviceA-aaa-domain-example.com] quit

[DeviceA-aaa] quit

# 测试用户是否能够通过RADIUS模板的认证。(已在RADIUS服务器上配置了测试用户test,用户密码Example2012)

[DeviceA] test-aaa test Example2012 radius-template rd1

Info: Account test succeeded.


配置MAC认证。

# 配置MAC接入模板“m1”,开启任意报文触发MAC认证功能。

MAC接入模板中,MAC认证用户的用户名和密码默认均为不带分隔符“-”的MAC地址。需要保证RADIUS服务器上配置的MAC用户名和密码格式与接入设备上的保持一致。

[DeviceA] mac-access-profile name m1

[DeviceA-mac-access-profile-m1] authentication trigger-condition dhcp arp dhcpv6 nd any-l2-packet

[DeviceA-mac-access-profile-m1] quit

# 配置认证模板“p1”,并在其上绑定MAC接入模板“m1”、指定认证模板下用户的强制认证域为“example.com”。

[DeviceA] authentication-profile name p1

[DeviceA-authen-profile-p1] mac-access-profile m1

[DeviceA-authen-profile-p1] access-domain example.com force

[DeviceA-authen-profile-p1] quit

# 在接口10GE1/0/1上绑定认证模板“p1”,使能MAC认证。

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE1/0/1] authentication-profile p1

[DeviceA-10GE1/0/1] quit

检查配置结果

IP Phone能正常上线并实现清晰的语音通话,PC能正常上线。

检查配置结果

IP Phone能正常上线并实现清晰的语音通话,PC能正常上线。

配置脚本

DeviceA的配置脚本

#
sysname DeviceA
#
vlan batch 100 200 300
#
authentication-profile name p1
 mac-access-profile m1
 access-domain example.com 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 192.168.2.30 1812 weight 80
 radius-server accounting 192.168.2.30 1813 weight 80
#
aaa
 authentication-scheme abc
  authentication-mode radius
 accounting-scheme scheme2
  accounting-mode radius
  accounting realtime 15
 domain example.com
  authentication-scheme abc
  accounting-scheme scheme2
  radius-server rd1
#
interface Vlanif100
 ip address 192.168.100.10 255.255.255.0
#
interface Vlanif200
 ip address 192.168.200.10 255.255.255.0
#
interface Vlanif300
 ip address 192.168.1.20 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 
 authentication-profile p1
 lldp tlv-enable med-tlv network-policy voice-vlan vlan 200 lldp mdn enable txrx
 voice-vlan 200 enable
 voice-vlan remark-mode mac-address
#
interface 10GE1/0/2 port link-type access
 port default vlan 300
#
ip route-static 192.168.2.0 255.255.255.0 192.168.1.2
#
mac-access-profile name m1
#
voice-vlan mac-address 00e0-fc12-3456 mask ffff-ff00-0000
#
return


1、本站资源长期持续更新。
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。

转载请保留出处:  www.zh-cjh.com珠海陈坚浩博客 » 华为举例:配置LLDP或CDP报文触发MAC认证实现IP话机接入网络

作者: 小编


手机扫一扫,手机上查看此文章:

一切源于价值!

其他 模板文件不存在: ./template/plugins/comment/pc/index.htm

未雨绸缪、居安思危!

数据安全、有备无患!

注意操作、数据无价!

一切源于价值!