简介
本文档介绍如何为单主机和多域方案配置基于身份的网络服务2.0(IBNS)。
先决条件
要求
Cisco 建议您了解以下主题:
- 局域网可扩展身份验证协议(EAPoL)
- Radius协议
- 思科身份服务引擎版本2.0
使用的组件
本文档中的信息基于以下软件和硬件版本:
- 思科身份服务引擎版本2.0补丁2
- 使用Windows 7操作系统的终端
- 思科交换机3750X,带IOS 15.2(4)E1
- 思科交换机3850,带03.02.03.SE
- Cisco IP 电话 9971
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
配置
配置理论
要启用IBNS 2.0,您需要在Cisco交换机上以特权模式执行命令:
#authentication display new-style
使用如下所示的命令配置IBNS 2.0的交换机端口:
access-session host-mode {single-host | multi-domain | multi-auth}
access-session port-control auto
dot1x pae authenticator
{mab}
service-policy type control subscriber TEST
这些命令在接口上启用dot1x身份验证,或者启用MAC身份验证绕行(MAB)。使用新语法时,使用以access-session开头的命令。这些命令的用途与使用旧语法的命令相同(以身份验证关键字开头)。应用service-policy以指定可用于接口的策略映射。
所述的策略映射定义了身份验证期间交换机(身份验证器)的行为。例如,您可以指定在身份验证失败时会发生什么情况。对于每个事件,可以根据在其下配置的类映射中匹配的事件类型配置多个操作。例如,查看所示的列表(policy-map TEST4)。如果连接到应用此策略的接口的dot1x端点发生故障,则会执行DOT1X_FAILED中定义的操作。如果要为MAB_FAILED和DOT1X_FAILED等类指定相同的行为,则可以使用默认类 — 始终类映射。
policy-map type control subscriber TEST4
(...)
event authentication-failure match-first
10 class DOT1X_FAILED do-until-failure
10 terminate dot1x
(...)
40 class always do-until-failure
10 terminate mab
20 terminate dot1x
30 authentication-restart 60
(...)
用于IBNS 2.0的策略映射必须始终具有类型控制用户。
您可以通过以下方式查看可用事件的列表:
Switch(config-event-control-policymap)#event ?
aaa-available aaa-available event
absolute-timeout absolute timeout event
agent-found agent found event
authentication-failure authentication failure event
authentication-success authentication success event
authorization-failure authorization failure event
inactivity-timeout inactivity timeout event
session-started session started event
tag-added tag to apply event
tag-removed tag to remove event
template-activated template activated event
template-activation-failed template activation failed event
template-deactivated template deactivated event
template-deactivation-failed template deactivation failed event
timer-expiry timer-expiry event
violation session violation event
在事件配置中,您可以定义如何评估类:
Switch(config-event-control-policymap)#event authentication-failure ?
match-all Evaluate all the classes
match-first Evaluate the first class
您可以为类映射定义类似的选项,不过您可以在此处指定如何在类匹配的情况下执行操作:
Switch(config-class-control-policymap)#10 class always ?
do-all Execute all the actions
do-until-failure Execute actions until one of them fails
do-until-success Execute actions until one of them is successful
新dot1x样式配置的最后一部分(可选)是类映射。 它还可以键入控制用户,用于匹配特定行为或流量。配置类映射条件评估的要求。您可以指定必须匹配所有条件,或者必须匹配任何条件,或者不匹配任何条件。
Switch(config)#class-map type control subscriber ?
match-all TRUE if everything matches in the class-map
match-any TRUE if anything matches in the class-map
match-none TRUE if nothing matches in the class-map
以下是用于匹配dot1x身份验证失败的类映射示例:
class-map type control subscriber match-all DOT1X_FAILED
match method dot1x
match result-type method dot1x authoritative
对于某些情况(大多数情况下,当使用服务模板时),您需要添加授权更改(CoA)的配置:
aaa server radius dynamic-author
client 10.48.17.232 server-key cisco
单主机方案
网络图

配置
在装有IOS 15.2(4)E1的Catalyst 3750X上测试的单主机方案所需的基本802.1X配置。使用Windows Native Supplicant客户端和Cisco AnyConnect测试的方案。
aaa new-model
!
aaa group server radius tests
server name RAD-1
!
aaa authentication dot1x default group tests
aaa authorization network default group tests
!
dot1x system-auth-control
!
policy-map type control subscriber TEST
event session-started match-all
10 class always do-until-failure
10 authenticate using dot1x priority 10
!
interface GigabitEthernet1/0/21
switchport access vlan 613
switchport mode access
access-session host-mode single-host
access-session port-control auto
dot1x pae authenticator
service-policy type control subscriber TEST
!
radius server RAD-1
address ipv4 10.48.17.232 auth-port 1812 acct-port 1813
key cisco
多域方案
网络图

配置
由于IP电话(思科IP电话9971)的PoE(以太网供电)要求,在采用IOS 03.02.03.SE的Catalyst 3850上测试了多域方案。
aaa new-model
!
aaa group server radius tests
server name RAD-1
!
aaa authentication dot1x default group tests
aaa authorization network default group tests
!
aaa server radius dynamic-author
client 10.48.17.232 server-key cisco
!
dot1x system-auth-control
!
class-map type control subscriber match-all DOT1X
match method dot1x
!
class-map type control subscriber match-all DOT1X_FAILED
match method dot1x
match result-type method dot1x authoritative
!
class-map type control subscriber match-all DOT1X_NO_RESP
match method dot1x
match result-type method dot1x agent-not-found
!
class-map type control subscriber match-all MAB
match method mab
!
class-map type control subscriber match-all MAB_FAILED
match method mab
match result-type method mab authoritative
!
policy-map type control subscriber TEST4
event session-started match-all
10 class always do-until-failure
10 authenticate using dot1x priority 10
20 authenticate using mab priority 20
event authentication-failure match-first
10 class DOT1X_FAILED do-until-failure
10 terminate dot1x
20 class MAB_FAILED do-until-failure
10 terminate mab
20 authenticate using dot1x priority 10
30 class DOT1X_NO_RESP do-until-failure
10 terminate dot1x
20 authentication-restart 60
40 class always do-until-failure
10 terminate mab
20 terminate dot1x
30 authentication-restart 60
event agent-found match-all
10 class always do-until-failure
10 terminate mab
20 authenticate using dot1x priority 10
event authentication-success match-all
10 class always do-until-failure
10 activate service-template DEFAULT_LINKSEC_POLICY_SHOULD_SECURE
!
interface GigabitEthernet1/0/1
switchport access vlan 613
switchport mode access
switchport voice vlan 612
access-session host-mode multi-domain
access-session port-control auto
mab
dot1x pae authenticator
spanning-tree portfast
service-policy type control subscriber TEST4
!
radius-server attribute 6 on-for-login-auth
radius-server attribute 8 include-in-access-req
radius-server attribute 25 access-request include
radius-server vsa send cisco-nas-port
!
radius server RAD-1
address ipv4 10.48.17.232 auth-port 1812 acct-port 1813
key cisco
验证
使用本部分可确认配置能否正常运行。
出于验证目的,使用此命令可列出所有交换机端口上的会话:
show access-session
您还可以从单个交换机端口查看有关会话的详细信息:
show access-session interface [Gi 1/0/1] {detail}
故障排除
本部分提供了可用于对配置进行故障排除的信息。
为了对802.1X相关问题进行故障排除,可以采用与旧式802.1X语法相同的方式启用调试:
debug mab all
debug dot1x all
debug pre all*
*对于debug pre,您可以仅使用事件和/或规则将输出限制为IBNS 2.0相关信息。