本文档为 IPv6 串行链路上的点对点协议 (PPP) 质询握手身份验证协议 (CHAP)/密码验证协议 (PAP) 身份验证提供配置示例。
当启用 PAP 或 CHAP 时,本地路由器会要求远程设备证明其身份,然后才允许数据流量流过。PAP 身份验证要求远程设备发送名称和密码,并根据本地用户名数据库或远程安全服务器数据库中匹配的条目对名称和密码进行检查。CHAP 身份验证会向远程设备发送质询消息。远程设备使用共享密钥加密质询值,并通过响应消息将加密的值及其名称返回到本地路由器。本地路由器会尝试将远程设备的名称与本地用户名或远程安全服务器数据库中存储的关联密钥进行匹配。本地路由器会使用所存储的密钥加密原始质询,验证加密的值是否匹配。
尝试进行此配置之前,请确保满足以下要求:
了解 PAP/CHAP 验证流程
了解基本 IPv6
本文档中的信息基于以下软件和硬件版本:
Cisco IOS 软件版本 12.4,高级 IP 服务功能集
Cisco 3700 系列多业务接入路由器
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
在示例中,路由器 R1 和 R2 配置了 PPP 身份验证。在路由器R1中,接口S1/0启用了IPv6,通过实施EUI-64,IPv6地址2011:2706:ABC::/64 eui-64。扩展唯一标识符(EUI)使主机能够自动分配无需手动配置或DHCP即可获得唯一的64位IPv6接口标识符。这是在以太网接口上完成的,方法是引用已经唯一的 48 位 MAC 地址并将该值重新格式化使之符合 EUI-64 规范。同样地,路由器 R2 上的 S1/0 接口也具有 IPv6 地址 2011:2706:ABC::/64 eui-64。
路由器 R1 和 R2 配置了基本 PPP/CHAP 身份验证。
本文档使用以下配置:
R1 的配置 |
---|
hostname R1 ! aaa new-model ! aaa authentication ppp default local ! username R2 password 0 cisco interface Serial1/0 no ip address encapsulation ppp ipv6 address 2011:2706:ABC::/64 eui-64 ipv6 enable no fair-queue ppp authentication chap callin ! |
R2 配置 |
---|
interface Serial1/1 no ip address encapsulation ppp ipv6 address 2011:2706:ABC::/64 eui-64 ipv6 enable clock rate 64000 ppp chap hostname R2 ppp chap password 0 cisco |
本部分提供可用于确认您的配置是否正常运行的信息。
在路由器 R1 上,发出以下命令:
debug ppp negotiation *Jun 27 08:34:56:357: Se1/0 PPP: Outbound cdp packet dropped *Jun 27 08:34:56:845: %SYS-5-CONFIG_|: Configured from console by console *Jun 27 08:34:58:357: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up *Jun 27 08:34:58:357: Se1/0 PPP: Using default call direction *Jun 27 08:34:58:357: Se1/0 PPP: Treating connection as a dedicated line *Jun 27 08:34:58:357: Se1/0 PPP: Session handle[470002F8] Session id[29] *Jun 27 08:34:58:357: Se1/0 PPP: Phase is ESTABLISHING, Active Open *Jun 27 08:34:58:357: Se1/0 LCP: O CONFREQ [Closed] id 72 len 15 *Jun 27 08:34:58:357: Se1/0 LCP: AuthProto CHAP (0x0305C22305) *Jun 27 08:34:58:357: Se1/0 LCP: MagicNumber 0x35B44C0F (0x050635B44C0F) *Jun 27 08:34:58:361: Se1/0 LCP: I CONFREQ {REQsent] id 59 len 10 *Jun 27 08:34:58:361: Se1/0 LCP: MagicNumber 0x1FEDF9A2 (0x05061FEDF9A2) *Jun 27 08:34:58:361: Se1/0 LCP: O CONFACK {REQsent] id 59 len 10 *Jun 27 08:34:58:361: Se1/0 LCP: MagicNumber 0x1FEDF9A2 (0x05061FEDF9A2) *Jun 27 08:34:58:365: Se1/0 LCP: I CONFACK {ACKsent] id 72 len 15 *Jun 27 08:34:58:365: Se1/0 LCP: AuthProto CHAP (0x0305C22305) *Jun 27 08:34:58.365: Se1/0 LCP: MagicNumber 0x35B44C0F (0x050635B44C0F) *Jun 27 08:34:58.365: Se1/0 LCP: State is Open *Jun 27 08:34:58.365: Se1/0 PPP: Phase is AUTHENTICATING, by this end *Jun 27 08:34:58.365: Se1/0 CHAP: O CHALLENGE id 5 len 23 from "R1" *Jun 27 08:34:58.377: Se1/0 CHAP: I RESPONSE id 5 len 23 from "R2" *Jun 27 08:34:58.377: Se1/0 PPP: Phase is FORWARDING, Attempting Forward *Jun 27 08:34:58.377: Se1/0 PPP: Phase is AUTHENTICATING, Unauthenticated User *Jun 27 08:34:58.381: Se1/0 PPP: Phase is FORWARDING, Attempting Forward *Jun 27 08:34:58.381: Se1/0 PPP: Phase is AUTHENTICATING, Authenticated User *Jun 27 08:34:58.381: Se1/0 CHAP: O SUCCESS id 5 len 4 *Jun 27 08:34:58.381: Se1/0 PPP: Phase is UP *Jun 27 08:34:58.381: Se1/0 CDPCP: O CONFREQ [Closed] id 1 len 4 *Jun 27 08:34:58.381: Se1/0 IPV6CP: O CONFREQ [Closed] id 1 len 14 *Jun 27 08:34:58.381: Se1/0 IPV6CP: Interface-Id 021B:54FF:FEA9:24B0 (0x010A021B54FFFEA924B0) *Jun 27 08:34:58.381: Se1/0 PPP: Process pending ncp packets *Jun 27 08:34:58.389: Se1/0 CDPCP: I CONFREQ [REQsent] id 1 len 4 *Jun 27 08:34:58.389: Se1/0 CDPCP: O CONFACK [REQsent] id 1 len 4 *Jun 27 08:34:58.389: Se1/0 IPV6CP: I CONFREQ [REQsent] id 1 len 14 *Jun 27 08:34:58.389: Se1/0 IPV6CP: Interface-Id 021F:CAFF:FE04:F918 (0x010A021FCAFFFE04F918) *Jun 27 08:34:58.389: Se1/0 IPV6CP: O CONFACK [REQsent] id 1 len 14 *Jun 27 08:34:58.389: Se1/0 IPV6CP: Interface-Id 021F:CAFF:FE04:F918 (0x010A021FCAFFFE04F918) *Jun 27 08:34:58.393: Se1/0 CDPCP: I CONFACK [ACKsent] id 1 len 4 *Jun 27 08:34:58.393: Se1/0 CDPCP: State is Open *Jun 27 08:34:58.393: Se1/0 IPV6CP: I CONFACK [ACKsent] id 1 len 14 *Jun 27 08:34:58.393: Se1/0 IPV6CP: Interface-Id 021B:54FF:FEA9:24B0 (0x010A021B54FFFEA924B0) *Jun 27 08:34:58.393: Se1/0 IPV6CP: State is Open *Jun 27 08:34:59.381: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
*Jun 27 08:37:46.045: Se1/0 PPP: Using default call direction *Jun 27 08:37:46.045: Se1/0 PPP: Treating connection as a dedicated line *Jun 27 08:37:46.045: Se1/0 PPP: Session handle[C40002F9] Session id[30] *Jun 27 08:37:46.045: Se1/0 PPP: Authorization NOT required *Jun 27 08:37:46.053: Se1/0 CHAP: O CHALLENGE id 6 len 23 from "R1" *Jun 27 08:37:46.065: Se1/0 CHAP: I RESPONSE id 6 len 23 from "R2" *Jun 27 08:37:46.065: Se1/0 PPP: Sent CHAP LOGIN Request *Jun 27 08:37:46.065: Se1/0 PPP: Received LOGIN Response PASS *Jun 27 08:37:46.069: Se1/0 CHAP: O SUCCESS id 6 len 4
在路由器 R2 上,发出以下命令:
debug ppp authentication *Feb 28 05:18:39.439: Se1/1 PPP: Using default call direction *Feb 28 05:18:39.439: Se1/1 PPP: Treating connection as a dedicated line *Feb 28 05:18:39.439: Se1/1 PPP: Session handle[E300000B] Session id[35] *Feb 28 05:18:39.439: Se1/1 PPP: Authorization required *Feb 28 05:18:39.451: Se1/1 PPP: No authorization without authentication *Feb 28 05:18:39.455: Se1/1 CHAP: I CHALLENGE id 7 len 23 from "R1" *Feb 28 05:18:39.459: Se1/1 CHAP: Using hostname from interface CHAP *Feb 28 05:18:39.459: Se1/1 CHAP: Using password from interface CHAP *Feb 28 05:18:39.459: Se1/1 CHAP: O RESPONSE id 7 len 23 from "R2" *Feb 28 05:18:39.467: Se1/1 CHAP: I SUCCESS id 7 len 4
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
05-Jul-2011 |
初始版本 |