802.1X 典型配置

  • 格式:doc
  • 大小:55.50 KB
  • 文档页数:3

802.1X 典型配置
1. 组网需求
要求在端口Ethernet1/1 上对接入用户进行认证,以控制其访问Internet;接入控制方式要求
是基于MAC 地址的接入控制。

所有接入用户都属于一个缺省的域:,该域最多可容纳30 个用户;认证时,先进
行RADIUS 认证,如果RADIUS 服务器没有响应再转而进行本地认证;计费时,如果RADIUS
计费失败则切断用户连接使其下线。

由两台RADIUS 服务器组成的服务器组与Device 相连,其IP 地址分别为10.1.1.1 和10.1.1.2,
使用前者作为主认证/备份计费服务器,使用后者作为备份认证/主计费服务器。

设置系统与认证RADIUS 服务器交互报文时的共享密钥为name、与计费RADIUS 服务器交
互报文时的共享密钥为money。

设置系统在向RADIUS 服务器发送报文后5 秒种内如果没有得到响应就向其重新发送报文,
发送报文的次数总共为5 次,设置系统每15 分钟就向RADIUS 服务器发送一次实时计费报文。

设置系统从用户名中去除用户域名后再将之传给RADIUS 服务器。

本地802.1X 接入用户的用户名为localuser,密码为localpass,使用明文输入;闲置切断功
能处于打开状态,正常连接时用户空闲时间超过20 分钟,则切断其连接。

2. 组网图
3. 配置步骤
# 配置各接口的IP 地址(略)。

# 添加本地接入用户,启动闲置切断功能并设置相关参数。

<Device> system-view
[Device] local-user localuser
[Device-luser-localuser] service-type lan-access
[Device-luser-localuser] password simple localpass
[Device-luser-localuser] authorization-attribute idle-cut 20 [Device-luser-localuser] quit
# 创建RADIUS 方案radius1 并进入其视图。

[Device] radius scheme radius1
# 设置主认证/计费RADIUS 服务器的IP 地址。

[Device-radius-radius1] primary authentication 10.1.1.1
[Device-radius-radius1] primary accounting 10.1.1.2
# 设置备份认证/计费RADIUS 服务器的IP 地址。

[Device-radius-radius1] secondary authentication 10.1.1.2
[Device-radius-radius1] secondary accounting 10.1.1.1
# 设置系统与认证RADIUS 服务器交互报文时的共享密钥。

[Device-radius-radius1] key authentication name
# 设置系统与计费RADIUS 服务器交互报文时的共享密钥。

[Device-radius-radius1] key accounting money
# 设置系统向RADIUS 服务器重发报文的时间间隔与次数。

[Device-radius-radius1] timer response-timeout 5
1-22
[Device-radius-radius1] retry 5
# 设置系统向RADIUS 服务器发送实时计费报文的时间间隔。

[Device-radius-radius1] timer realtime-accounting 15
# 指示系统从用户名中去除用户域名后再将之传给RADIUS 服务器。

[Device-radius-radius1] user-name-format without-domain
[Device-radius-radius1] quit
# 创建域 并进入其视图。

[Device] domain
# 指定radius1 为该域用户的RADIUS 方案,并采用local 作为备选方案。

[] authentication default radius-scheme radius1 local
[] authorization default radius-scheme radius1 local
[] accounting default radius-scheme radius1 local
# 设置该域最多可容纳30 个用户。

[] access-limit enable 30
# 启动闲置切断功能并设置相关参数。

[] idle-cut enable 20
[] quit
# 配置域 为缺省用户域。

[Device] domain default enable
# 开启全局802.1X 特性。

[Device] dot1x
# 开启指定端口Ethernet1/1 的802.1X 特性。

[Device] interface ethernet 1/1
[Device-Ethernet1/1] dot1x
[Device-Ethernet1/1] quit
# 设置接入控制方式(该命令可以不配置,因为端口的接入控制在缺省情况下就是基于MAC 地址
的)。

[Device] dot1x port-method macbased interface ethernet 1/1
使用命令display dot1x interface ethernet 1/1 可以查看802.1X 的配置情况。

当802.1X 用户使
用username@ 形式的用户名成功通过RADIUS 认证上线后,可使用命令display
connetion 查看到上线用户的连接情况。

若RADIUS 认证失败,则进行本地认证。