• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

16-BRAS业务配置指导

目录

13-IPoE配置

本章节下载 13-IPoE配置  (2.48 MB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/SR_Router/SR8800-F/Configure/Operation_Manual/H3C_SR8800-F_CG-R7751PXX-6W102/16/201903/1160385_30005_0.htm

13-IPoE配置

  录

1 IPoE

1.1 IPoE简介

1.1.1 IPoE的系统组成

1.1.2 IPoE接入模式

1.1.3 IPoE用户类型

1.1.4 IPoE会话

1.1.5 IPoE用户的地址策略

1.1.6 IPoE绑定认证用户接入流程

1.1.7 IPoE Web认证用户接入流程

1.1.8 IPoE Web认证支持快速认证

1.1.9 IPoE支持MPLS L3VPN

1.1.10 IPoE支持ITA

1.1.11 IPoE支持EDSG

1.1.12 IPoE支持EAP认证

1.2 IPoE配置限制和指导

1.3 IPoE配置任务简介

1.3.1 IPoE绑定认证接入用户配置任务

1.3.2 IPoE Web认证接入用户配置任务

1.4 IPoE配置准备

1.5 配置远程Portal认证服务器

1.6 配置对HTTPS报文进行重定向的内部侦听端口号

1.7 开启IPoE功能并指定用户的接入模式

1.8 配置IPoE认证方式

1.9 配置IPoE动态个人接入用户

1.9.1 IPoE动态个人接入用户配置任务简介

1.9.2 配置动态个人会话的触发方式

1.9.3 配置动态个人接入用户的认证用户名的命名规则

1.9.4 配置动态个人接入用户的认证密码

1.9.5 配置动态个人接入用户使用的认证域

1.9.6 配置动态个人会话的最大数目

1.9.7 配置DHCP个人接入用户的信任Option

1.9.8 配置DHCP Option中circuit-id和remote-id解析格式

1.9.9 配置DHCP个人接入用户的信任认证域

1.9.10 配置DHCP个人接入用户的认证域名生成规则

1.9.11 配置允许DHCP个人接入用户异常下线后通过报文重新触发上线

1.9.12 配置未知源个人接入用户的信任IP地址/地址范围

1.9.13 配置动态个人接入用户与NAT联动失败用户继续上线功能

1.9.14 配置允许动态个人接入用户采用松散模式上线

1.10 配置IPoE静态个人接入用户

1.10.1 IPoE静态个人接入用户配置任务简介

1.10.2 配置静态个人会话的触发方式

1.10.3 配置静态个人会话

1.10.4 配置静态个人接入用户的认证用户名的命名规则

1.10.5 配置静态个人接入用户的认证密码

1.10.6 配置静态个人接入用户使用的认证域

1.11 配置IPoE专线接入用户

1.11.1 IPoE专线接入用户配置任务简介

1.11.2 配置接口专线用户

1.11.3 配置子网专线用户

1.11.4 配置L2VPN专线用户

1.11.5 配置专线接入用户的认证域

1.12 配置IPoE Web认证接入用户

1.12.1 IPoE Web认证接入用户配置任务简介

1.12.2 配置Web个人接入用户的认证域

1.12.3 配置HTTP报文的快速应答功能

1.12.4 配置HTTPS重定向的SSL服务器端策略

1.12.5 配置Web认证的重定向功能

1.12.6 配置Web认证的被动认证功能

1.12.7 配置Web认证的逃生功能

1.13 配置IPoE Web的快速认证功能

1.13.1 配置限制和指导

1.13.2 配置MAC Trigger无感知认证

1.13.3 配置MAC无感知认证

1.14 配置IPoE个人会话和专线子用户会话的最大总数目

1.15 配置报文业务识别方式以及与认证域的映射关系

1.16 配置IPoE接入用户的静默功能

1.17 配置IPoE接入用户在线探测功能

1.18 配置接口的IPoE接入端口类型

1.19 配置IPoE接入用户的NAS-PORT-ID属性封装

1.20 配置IPoE接入用户的NAS-PORT-ID精绑

1.21 配置IPoE准出认证功能

1.22 配置IPoE会话的流量统计信息的更新时间间隔

1.23 配置IPoE日志及业务维护功能

1.23.1 配置IPoE接入用户日志信息功能

1.23.2 配置业务跟踪对象功能

1.24 配置IPoE个人接入用户漫游功能

1.25 配置IPoE用户接入响应延迟时间

1.26 IPoE显示和维护

1.27 IPoE典型配置举例

1.27.1 未知源IP报文触发IPoE接入配置举例

1.27.2 DHCPv4报文触发IPoE接入配置举例(授权DHCP中继地址池)

1.27.3 DHCPv4报文触发IPoE接入配置举例(授权DHCP地址池组)

1.27.4 DHCPv6报文触发IPoE接入配置举例

1.27.5 IPv6 ND RS报文触发IPoE接入配置举例

1.27.6 ARP报文触发静态IPoE用户接入配置举例

1.27.7 IPoE子网专线用户接入配置举例

1.27.8 IPoE接口专线用户接入配置举例

1.27.9 IPoE L2VPN专线用户接入配置举例

1.27.10 IPoE为接入用户授权地址池和VPN配置举例

1.27.11 IPoE接入用户在线探测配置举例

1.27.12 IPoE静态用户普通Web认证配置举例

1.27.13 IPoE DHCP用户普通Web认证配置举例

1.27.14 IPoE MAC Trigger二层无感知认证配置举例

1.27.15 IPoE MAC二层无感知认证配置举例

1.27.16 IPoE MAC Trigger三层无感知认证配置举例

1.27.17 IPoE MAC三层无感知认证配置举例

1.27.18 IPoE Web支持EAP认证配置举例

1.27.19 IPoE双栈用户普通Web认证配置举例

1.27.20 IPoE双栈用户MAC无感知认证配置举例

1.27.21 IPoE双栈用户接入配置举例

1.27.22 IPoE个人用户漫游配置举例

1.28 IPoE常见故障处理

1.28.1 DHCP接入用户使用的认证域不存在,无法上线

 


1 IPoE

1.1  IPoE简介

IPoE(IP over Ethernet)是一种常见的IPoX接入方式,目前支持绑定和Web两种认证方式。

·     绑定认证是指BRAS设备根据用户接入的位置信息自动生成用户名和密码进行身份认证的一种认证方式,无需用户输入用户名和密码。

·     Web认证是指用户通过访问Web认证服务器的认证页面,交互输入用户名和密码进行身份认证的一种认证方式。

1.1.1  IPoE的系统组成

IPoE的典型组网方式如下图所示,它由六个基本要素组成:用户主机、BRAS接入设备、AAA服务器、安全策略服务器、DHCP服务器和Portal服务器。

图1-1 IPoE系统组成示意图

 

1. 用户主机

用户终端的客户端系统,为运行HTTP/HTTPS协议的浏览器或运行H3C iNode客户端的主机。

2. BRAS接入设备

提供接入服务的设备,主要有三方面的作用:

·     在认证之前,阻止用户访问互联网资源。

·     在认证过程中,与AAA服务器交互,完成身份认证/授权/计费的功能。

·     在认证通过后,允许用户访问被授权的互联网资源。

3. AAA服务器

与接入设备进行交互,完成对用户的认证、授权和计费。目前仅RADIUS(Remote Authentication Dial-In User Service,远程认证拨号用户服务)服务器支持对IPoE用户进行认证、授权和计费。

4. 安全策略服务器(可选)

与接入设备进行交互,完成对用户的安全检测,并对用户进行安全授权操作。

5. DHCP服务器(可选)

与用户主机、接入设备进行交互,完成对用户主机IP地址的管理和分配。

6. Portal服务器(可选)

包括Portal Web服务器和Portal认证服务器。Portal Web服务器负责向客户端提供Web认证页面,并将客户端的认证信息(用户名、密码等)提交给Portal认证服务器。Portal认证服务器用于与接入设备交互认证客户端的认证信息。Portal Web服务器通常与Portal认证服务器是一体的,也可以是独立的服务器端系统。

1.1.2  IPoE接入模式

IPoE的接入模式分为二层和三层两种模式,对应的用户分别通过二层网络或三层网络接入。

·     二层接入:用户直接连接接入设备,或通过二层网络设备连接接入设备。接入设备需要识别用户的MAC地址。

·     三层接入:用户流量通过三层网络路由到接入设备,用户可直接连接接入设备或通过三层转发设备连接接入设备。接入设备不关心用户的MAC地址。

需要注意的是,通过三层转发设备接入时,用户报文信息中的源MAC地址为三层网络设备的MAC地址,并非用户的MAC地址,因此该方式下用户的MAC地址不能作为用户的身份标识。

1.1.3  IPoE用户类型

IPoE支持通过IP报文、ARP报文、RS报文和DHCP报文四种触发方式上线。根据用户是否拥有独立的业务属性,IPoE用户可分为个人接入用户、专线接入用户两种类型。

1. 个人接入用户

个人接入用户拥有独立的业务属性,接入设备根据用户的位置信息和报文特征对其进行独立的认证、授权和计费。

根据触发上线方式的不同,可以将个人接入用户分为以下两种类型:

·     动态个人接入用户

动态个人接入用户通过IP报文、RS报文或DHCP报文触发上线,且由报文动态触发认证并根据认证结果建立IPoE会话。根据触发上线的方式不同可将动态个人接入用户分为未知源IP接入用户、IPv6 ND RS接入用户和DHCP接入用户。对于DHCP接入用户,还需要与DHCP服务器交互获取IP地址;对于IPv6 ND RS接入用户,还需要与接入设备进行交互获取IPv6地址。

·     静态个人接入用户

静态个人接入用户通过IP或ARP报文触发上线,需要用户报文与手工配置的IPoE会话匹配后才能触发认证。

说明

对于不是因为DHCP接入用户主动释放IP地址引起的用户IPoE会话被删除的情况,在开启DHCP接入用户异常下线后重新上线功能后,当设备再次收到该用户的IP或ARP报文时,可恢复用户的IPoE会话,恢复后的IPoE会话仍为DHCP接入类型。有关DHCP接入用户异常下线后重新上线功能的介绍,请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

2. 专线接入用户

专线是指将接入设备上的某个接口或接口上的某些系统资源整体出租给一组用户。一条专线下可以接入多个用户,在认证流程中表现为一个用户,也称为专线接入用户。配置专线后,无需用户IP流量触发,接入设备会自动根据命令行配置的专线接入用户的用户名和密码统一进行认证,通过认证后专线用户才可上线。

根据对专线资源的占用情况,可以分为以下几种类型:

·     接口专线用户:一个接口上接入的所有IP用户,该接口上接入的所有用户统一进行认证、授权和计费。

·     子网专线用户:一个接口上接入的指定子网内的所有IP用户,与接口专线用户类似,该接口上接入的所有指定子网的用户统一进行认证、授权和计费。

·     L2VPN专线用户:L2VPN组网下,一个接口上接入的所有IP用户,与接口专线用户类似,该接口上接入的所有用户统一进行认证、授权和计费。

1.1.4  IPoE会话

一个IPoE会话表示了一个或一组IPoE客户端的所有网络连接,可由客户端的IP报文特征或接入位置信息来标识,用于记录IPoE客户端的身份信息、认证状态、授权属性和DHCP地址分配信息等内容。

根据IPoE用户类型不同,IPoE会话可分为IPoE个人会话和IPoE专线会话两种类型:

1. 个人会话

根据IPoE会话的触发方式,可以将IPoE个人会话分为IPoE动态个人会话和IPoE静态个人会话两种类型。

·     IPoE动态个人会话

由动态个人接入用户触发建立的IPoE会话称为动态个人会话。

每个动态个人会话都有自己的生存周期,动态个人会话将在以下几种情况下被删除:

¡     AAA服务器授权的在线时长到期。

¡     AAA服务器强制用户下线。

¡     在AAA服务器授权的闲置切断时长内,该会话的用户流量小于授权的流量阈值。

¡     接入设备对该会话的在线用户进行探测,对于单协议栈用户,当探测失败的次数达到最大值时会话会被删除,对于双协议栈用户当且仅当双栈都探测失败达到最大值时会话才会被删除。

¡     对于DHCP报文触发建立的IPoE会话,对于单协议栈用户,当DHCP服务器分配的租约时长到期时会话会被删除,对于双协议栈用户当且仅当DHCP服务器分配的租约时长都到期时会话才会被删除。

¡     重启IPoE会话。

¡     用户接入接口Down。

·     IPoE静态个人会话

静态个人会话仅代表一个指定IP地址的IPoE客户端的所有网络连接,通常用于为IP地址已知的客户端单独提供稳定的接入服务。

对于IPoE静态个人会话,又分为:

¡     接口静态个人会话:在接入接口上开启了IPoE功能、且接口状态up的情况下,接入设备会根据配置建立IPoE静态个人会话,在有IP或ARP流量通过时接入设备会尝试以配置的用户名和密码发起认证。

¡     全局静态个人会话:在接入接口上开启了IPoE功能、且接口状态up的情况下,当IP或ARP流量通过时接入设备会尝试以配置的用户名和密码发起认证。如果认证通过,则建立全局静态个人会话;如果认证未通过,则不建立全局静态个人会话。

2. 专线会话

由专线用户的配置触发建立的IPoE会话称为IPoE专线会话,包括以下三种类型:

·     接口专线会话:代表一个接口上所有IPoE客户端的网络连接。

·     子网专线会话:代表一个接口上指定子网内的所有IPoE客户端的网络连接。

·     L2VPN专线会话:代表一个接口上所有IPoE客户端的网络连接。

对于接口专线会话、子网专线会话和L2VPN专线会话:在接入接口上开启了IPoE功能、且接口状态up的情况下,接入设备会根据配置建立专线会话,会话建立成功后无需用户流量触发,接入设备会主动尝试以配置的用户名和密码发起认证。

1.1.5  IPoE用户的地址策略

对于通过DHCP报文触发认证的用户,在认证成功之后由DHCP模块为其分配AAA授权的地址池中的地址。若AAA未授权,则使用用户所属认证域中配置的授权地址池;若认证域中未配置授权地址池,则在接口上配置了IP地址的情况下,由DHCP模块分配与接口IP地址同一网段的IP地址给用户。

对于通过RS报文触发认证的用户,在认证成功之后由IPoE为其分配AAA授权的IPv6地址前缀,用户通过获取的前缀生成IPv6地址。若AAA未授权,则选用接口上配置的第一个符合前缀长度为64的IPv6地址前缀。

其它类型的用户,可以通过静态配置或通过DHCP动态分配获得IP地址,但其IP地址的获取与IPoE认证无关。

1.1.6  IPoE绑定认证用户接入流程

IPoE绑定认证用户的接入流程主要包括以下几个步骤:

(1)     用户识别与发起认证请求

¡     对于动态个人接入用户,当发出的连接请求报文到达接入设备后,接入设备使用从报文中获取用户的物理位置等信息生成用户名和密码或配置的用户名和密码,向AAA服务器发起认证请求。

¡     对于静态个人接入用户,当用户的首报文通过接入设备时,接入设备以配置的认证信息向AAA服务器发起认证请求。

¡     对于专线接入用户,无需用户流量触发,接入设备会主动以配置的认证信息向AAA服务器发起认证请求。

(2)     身份认证

接入设备根据该用户关联的认证域的配置向AAA服务器发起认证请求,并完成认证授权操作,若配置有安全策略服务器,则由安全策略服务器进行安全授权操作。

(3)     地址分配与管理(可选)

对于DHCP接入用户,身份认证通过后,接入设备通知DHCP模块负责为接入用户分配IP地址;对于IPv6 ND RS接入用户,身份认证通过后,IPoE负责为接入用户分配前缀,用户通过此前缀生成IPv6地址;若用户已经获取到IP地址,则无此步骤直接进入步骤(4)。

(4)     接入控制

IP地址分配成功后,接入设备通知用户上线,并根据授权结果对用户进行接入控制,计费等。

下面将详细介绍几种典型的IPoE用户接入流程。

1. DHCP单协议栈用户接入流程

当用户通过DHCP方式动态获取IP地址时,IPoE截获用户的DHCP报文,首先对用户进行身份认证,如果认证通过则可以允许继续申请动态IP地址,否则终止IPoE接入过程。这里以DHCP中继组网环境中的IPv4 DHCP用户的IPoE接入为例,具体流程如图1-2所示。

图1-2 IPv4 DHCP用户接入流程图

 

IPv4 DHCP报文触发的IPoE接入过程如下:

(1)     DHCP客户端发送DHCP-DISCOVER报文;

(2)     接入设备在DHCP-DISCOVER报文中插入Option 82选项,然后把报文交由DHCP中继设备处理;

(3)     DHCP中继设备根据DHCP-DISCOVER报文创建一个IPoE会话,并向AAA服务器发送认证请求。其中,认证请求消息中的用户名包含了用户信息,如DHCP报文中的Client ID选项、用户报文的源MAC地址;

(4)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(5)     DHCP中继获取用户的认证和授权结果,更新IPoE会话的认证状态为通过或失败;

(6)     如果用户认证通过,DHCP中继将DHCP-DISCOVER报文转发给DHCP服务器。如果认证失败,DHCP中继将丢弃DHCP-DISCOVER报文;

(7)     DHCP服务器回应DHCP-OFFER报文。之后,DHCP中继把DHCP-OFFER报文转发给DHCP客户端;

(8)     DHCP客户端根据DHCP-OFFER报文选择一个DHCP服务器,发送DHCP-REQUEST报文。之后,DHCP中继把DHCP-REQUEST报文转发给DHCP服务器;

(9)     DHCP服务器回应DHCP-ACK报文;

(10)     DHCP中继从DHCP-ACK报文中解析出用户的IP地址和其它地址参数信息,更新IPoE会话,并下发User Profile策略,然后将IPoE会话的状态置为在线;

(11)     DHCP中继把DHCP-ACK报文转发给DHCP客户端。DHCP客户端根据收到的DHCP-ACK报文获得IP地址以及相关地址参数信息;

(12)     接入设备向AAA服务器发送计费开始报文,开始对该用户计费。

2. DHCP双协议栈用户接入流程

当用户通过DHCP方式动态获取IP地址时,IPoE截获用户的DHCP报文,首先对用户进行身份认证,如果认证通过则可以允许继续申请动态IP地址,否则终止IPoE接入过程。这里以DHCP中继组网环境中的DHCP用户的IPoE接入为例,具体流程如图1-3所示。

图1-3 DHCP双栈用户接入流程图

 

双协议栈用户DHCP报文触发的IPoE接入过程如下:

(1)     DHCPv4客户端发送DHCP-DISCOVER报文;

(2)     接入设备在DHCP-DISCOVER报文中插入Option 82选项,然后把报文交由DHCPv4中继设备处理;

(3)     DHCPv4中继设备根据DHCP-DISCOVER报文创建一个IPoE会话,并向AAA服务器发送认证请求。其中,认证请求消息中的用户名包含了用户信息,如DHCPv4报文中的Client ID选项、用户报文的源MAC地址;

(4)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(5)     DHCPv4中继获取用户的认证和授权结果,更新IPoE会话的认证状态为通过或失败;

(6)     如果用户认证通过,DHCPv4中继将DHCP-DISCOVER报文转发给DHCP服务器。如果认证失败,DHCPv4中继将丢弃DHCP-DISCOVER报文;

(7)     DHCPv4服务器回应DHCP-OFFER报文。之后,DHCPv4中继把DHCP-OFFER报文转发给DHCPv4客户端;

(8)     DHCPv4客户端根据DHCP-OFFER报文选择一个DHCPv4服务器,发送DHCP-REQUEST报文。之后,DHCPv4中继把DHCP-REQUEST报文转发给DHCPv4服务器;

(9)     DHCPv4服务器回应DHCP-ACK报文;

(10)     DHCPv4中继从DHCP-ACK报文中解析出用户的IP地址和其它地址参数信息,更新IPoE会话,并下发User Profile策略,然后将IPoE会话的状态置为在线;

(11)     DHCPv4中继把DHCP-ACK报文转发给DHCPv4客户端。DHCPv4客户端根据收到的DHCP-ACK报文获得IP地址以及相关地址参数信息;

(12)     接入设备向AAA服务器发送计费开始报文,开始对该用户计费;

(13)     DHCPv6客户端发送Solicit报文,DHCPv6中继设备根据Solicit报文更新IPoE会话信息;

(14)     DHCPv6服务器回应Advertise报文。之后,DHCPv6中继把Advertise报文转发给DHCPv6客户端;

(15)     DHCPv6客户端根据Advertise报文选择一个DHCPv6服务器,发送Request报文。之后,DHCPv6中继把Request报文转发给DHCPv6服务器;

(16)     DHCPv6服务器回应Reply报文;

(17)     DHCPv6中继从Reply报文中解析出用户的IPv6地址和其它地址参数信息,更新IPoE会话;

(18)     DHCPv6中继把Reply报文转发给DHCPv6客户端。DHCPv6客户端根据收到的Reply报文获得IPv6地址以及相关地址参数信息。

3. IPv6 ND RS用户接入流程

当用户通过IPv6 ND RS方式动态获取IPv6地址时,IPoE截获用户的IPv6 ND RS报文,首先对用户进行身份认证,如果认证通过则发送IPv6 RA报文给用户,否则终止IPoE接入过程。这里以二层接入组网环境中的IPv6用户的IPoE接入为例,具体流程如图1-4所示。

图1-4 IPv6 ND RS用户接入流程图

 

IPv6 ND RS报文触发的IPoE接入过程如下:

(1)     用户主机发送IPv6 ND RS报文;

(2)     接入设备根据IPv6 ND RS报文创建一个IPoE会话;

(3)     接入设备向AAA服务器发送认证请求,认证请求消息中的用户名包含了用户信息,如源MAC地址等;

(4)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(5)     接入设备获取用户的认证和授权结果,更新IPoE会话的认证状态为通过或失败。如果用户认证通过,则根据用户MAC地址和获取到的前缀信息生成用户IPv6地址,更新IPoE会话信息。如果认证失败,接入设备则丢弃收到的IPv6 ND RS报文;

(6)     接入设备发送携带前缀信息的IPv6 ND RA报文给用户主机。用户主机根据IPv6 ND RA报文中携带的前缀信息生成IPv6地址;

(7)     接入设备向AAA服务器发送计费开始报文,开始对该用户计费。

4. 未知源IP接入用户接入流程

对于已经通过DHCP、ND RS报文或手工静态配置的方式获取到IP地址的用户,当前接入设备上不存在对应的IPoE会话时,该用户的IP报文会直接触发IPoE认证,具体过程如图1-5所示。

图1-5 未知源IP接入用户触发IPoE接入过程

 

用户IP报文触发IPoE接入的步骤如下:

(1)     用户主机发送IP报文;

(2)     接入设备收到IP报文后,根据已有的IPoE会话检查该用户是否是新接入的用户。如果用户报文中的用户信息未匹配到相应的IPoE会话,则认为该用户是新用户,并为其创建IPoE会话,记录用户信息;对于匹配上IPoE会话且会话状态为已通过认证的用户报文,直接转发;对于匹配上IPoE会话且会话状态不为已通过认证的所有用户报文,均丢弃;

(3)     接入设备根据获取的用户信息向AAA服务器发送认证请求。其中,认证请求消息中的用户名包含了用户信息,如源IP地址或源MAC地址;

(4)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(5)     接入设备收到认证结果。如果用户认证通过,则根据授权信息下发业务策略,将IPoE会话状态置为在线;

(6)     接入设备向AAA服务器发送计费开始报文,开始对该用户进行计费。

5. 静态接入用户和专线接入用户接入流程

静态个人用户的IPoE会话通过配置信息创建,当接口上有指定的IP或ARP报文通过时,将使用配置信息触发认证,认证流程与未知源IP接入方式中的认证流程相同。认证流程完成后,后续对应的用户报文到达设备后,接口直接将其转发。

专线接入用户的IPoE会话通过配置信息创建,无需接口上有报文通过,即可自动根据配置的用户名和密码发起认证。除触发认证方式不同外,其余认证流程与未知源IP接入方式中的认证流程相同,这里不再赘述。认证流程完成后,后续对应的用户报文到达设备对应接口后,即可直接转发。

1.1.7  IPoE Web认证用户接入流程

IPoE Web认证支持DHCP用户接入和静态用户接入,认证过程包含认证前域认证和Web认证两个阶段。

IPoE Web认证用户接入流程主要包括以下几个步骤:

1. 认证前域认证阶段

认证前域阶段的用户接入流程与绑定认证的DHCP用户接入和静态用户接入流程相同,具体请参见“1.1.6  1. DHCP单协议栈用户接入流程”和“1.1.6  5. 静态接入用户和专线接入用户接入流程

2. Web认证阶段

用户可以使用浏览器或iNode客户端进行Web认证。

当用户使用浏览器进行Web认证时,可以主动登录Portal Web服务器的Web认证页面。如果认证前域用户访问的不是Portal Web服务器,接入设备会将此HTTP/HTTPS请求重定向到Portal Web服务器的Web认证页面。当用户使用iNode客户端进行Web认证时,可直接打开客户端认证页面,输入认证信息。用户在认证页面中输入认证信息后提交,Portal Web服务器会将用户的认证信息传递给Portal认证服务器,由Portal认证服务器处理并转发给接入设备。接入设备收到用户认证信息后,将用户的认证信息发送给AAA进行认证,认证成功则通知用户上线,并根据授权结果对用户进行接入控制,计费等。在Web认证阶段,静态接入用户和DHCP接入用户的认证流程基本相同,这里仅以DHCP中继组网环境中的IPoE Web接入为例进行说明,具体流程如图1-6所示。

图1-6 IPoE Web认证用户接入流程

 

IPoE Web认证用户接入流程(以用户使用浏览器进行Web认证为例):

(1)     客户端发起HTTP/HTTPS请求;

(2)     接入设备根据目的地址判断是否需要重定向:如果HTTP/HTTPS请求的目的地址和Portal Web服务器的地址相同则直接转发,否则将此HTTP/HTTPS请求重定向到Portal Web服务器的Web认证页面;

(3)     HTTP/HTTPS请求的目的地址和Portal Web服务器的地址相同时,客户端直接访问Portal Web服务器的Web认证页面;

(4)     对于需要重定向处理的HTTP/HTTPS请求,接入设备将包含Portal Web服务器的Web认证页面URL信息的HTTP/HTTPS报文回复给客户端;

(5)     客户端浏览器自动访问重定向后的URL(即用户配置的Portal Web服务器的Web认证页面);

(6)     Portal Web服务器将Web认证页面内容发送给客户端;

(7)     用户输入用户名和密码,点击登录后将认证信息发送给Portal服务器;

(8)     Portal服务器把Web认证信息转发给接入设备;

(9)     接入设备使用从Portal 服务器获取到的用户信息向AAA服务器发送认证请求;

(10)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(11)     接入设备根据从AAA服务器获取到的认证和授权结果,更新IPoE会话的认证状态为通过或失败;

(12)     如果认证授权成功,接入设备向AAA服务器发送计费开始报文,开始对该用户计费。

说明

当用户使用iNode客户端进行Web认证时,可直接打开客户端认证页面,输入认证信息;后续流程与使用浏览器进行Web认证的(8)(12)相同,这里不再赘述。

 

1.1.8  IPoE Web认证支持快速认证

在IPoE Web认证环境中,为避免在Web认证阶段用户每次上线都需要手工输入认证信息进行认证带来的不便,IPoE Web认证支持快速认证。

对于需要频繁接入网络的合法用户,可以通过基于MAC地址的快速认证功能,使用户无需每次接入网络都手工输入认证信息便可以自动完成Web认证。基于MAC地址的快速认证又称为无感知认证,根据存储用户的认证用户名/密码和用户MAC地址的绑定信息的位置不同,无感知认证分为如下两种方式:

·     MAC Trigger无感知认证:该方式需要在网络中部署支持MAC Trigger协议的MAC绑定服务器,MAC绑定服务器用于记录用户的Web认证信息和用户终端的MAC地址,并将二者进行绑定,以便代替用户完成Web认证。

·     MAC无感知认证:该方式需要在网络中部署具有将用户的Web认证信息和用户终端的MAC地址进行绑定功能的AAA服务器,以便代替用户完成Web认证。

如果配置了IPoE Web的快速认证,则IPoE在认证前域中收到用户的任意IP报文后,都将先进行MAC绑定查询处理。即相对于未配置IPoE Web的快速认证的情况,对于第一次Web接入的用户,上线过程中增加了一次查询处理。

1. MAC Trigger无感知认证流程

MAC Trigger无感知功能具体实现过程如下:

(1)     客户端认证前域上线后发起HTTP/HTTPS请求;

(2)     接入设备根据目的地址判断是否需要重定向:如果HTTP/HTTPS请求的目的地址和Portal Web服务器的地址相同则直接转发,访问Portal Web服务器的Web认证页面;

(3)     否则接入设备将向Portal发送绑定查询请求,等待Portal返回查询结果,根据返回结果不同分为如下情况:

·     如果Portal返回的查询结果是用户未绑定,则:

a.     接入设备将后续HTTP/HTTPS请求重定向到Portal Web服务器的Web认证页面,即设备将包含Portal Web服务器的Web认证页面URL信息的HTTP/HTTPS报文回复给客户端。

b.     客户端浏览器自动访问重定向后的URL,即用户配置的Portal Web服务器的Web认证页面。

c.     Portal Web服务器将Web认证页面内容发送给客户端。

d.     用户输入用户名和密码,点击登录后将认证信息发送给Portal服务器。

·     如果Portal返回的查询结果是用户已绑定,则继续等待Portal服务器返回Web认证信息。

(4)     Portal服务器把Web认证信息转发给接入设备;

(5)     接入设备使用从Portal服务器获取到的用户信息向AAA服务器发送认证请求;

(6)     AAA服务器返回认证结果。若用户认证通过,则发送认证接受报文,并携带授权信息;否则发送认证拒绝报文;

(7)     接入设备根据从AAA服务器获取到的认证和授权结果,更新IPoE会话的认证状态为通过或失败;

(8)     如果认证授权成功,接入设备向AAA服务器发送计费开始报文,开始对该用户计费;

(9)     (本步骤仅适用于用户首次Web认证的情况)用户上线以后,接入设备通知Portal用户已上线,Portal收到用户上线通知后,再通知MAC绑定服务器为用户添加MAC绑定记录;当该用户下线后再接入时,收到用户任意IP报文,接入设备即可根据查询到MAC绑定记录进行快速认证上线。

说明

·     目前,仅IPv4用户支持MAC Trigger无感知认证。

·     MAC Trigger无感知认证仅支持使用浏览器触发Web认证,不支持使用iNode客户端。

 

2. MAC无感知认证流程

MAC无感知功能具体实现过程如下(以用户首次登录为例):

(1)     客户端认证前域上线后发起HTTP/HTTPS请求;

(2)     接入设备根据目的地址判断是否需要重定向:如果HTTP/HTTPS请求的目的地址和Portal Web服务器的地址相同则直接转发,访问Portal Web服务器的Web认证页面;

(3)     否则接入设备使用该用户MAC地址作为用户名向AAA服务器发起认证,因用户是首次登录,AAA服务器根据用户MAC地址查询该用户未绑定,返回认证失败;

a.     接入设备将后续HTTP/HTTPS请求重定向到Portal Web服务器的Web认证页面。

b.     客户端浏览器自动访问重定向后的URL,即用户配置的Portal Web服务器的Web认证页面。

c.     Portal Web服务器将Web认证页面内容发送给客户端。

(4)     用户输入用户名和密码,点击登录后将认证信息发送给Portal服务器;

(5)     Portal服务器把Web认证信息转发给接入设备;

(6)     接入设备使用从Portal服务器获取到的用户信息向AAA服务器发送认证请求;

(7)     用户认证通过,AAA服务器发送认证接受报文,并携带授权信息;

(8)     接入设备根据从AAA服务器获取到的认证和授权结果,更新IPoE会话的认证状态为通过;

(9)     如果认证授权成功,接入设备向AAA服务器发送计费开始报文,开始对该用户计费;

(10)     用户上线以后,接入设备通知AAA服务器用户已上线,AAA服务器为用户添加MAC绑定记录;

(11)     当该用户下线后再接入时,收到用户任意IP报文,接入设备都将直接使用该用户MAC地址作为用户名向AAA服务器发起认证,AAA服务器根据该用户MAC地址查询到MAC绑定记录,返回认证通过,无需用户再此手工输入用户名/密码即可快速上线。

说明

·     MAC无感知认证仅支持使用浏览器触发Web认证,不支持使用iNode客户端。

 

1.1.9  IPoE支持MPLS L3VPN

实际组网应用中,接入用户可以属于不同的VPN,且各VPN之间的业务相互隔离。IPoE通过支持MPLS L3VPN,可实现位于不同VPN中的用户都能通过IPoE方式接入到网络中。用户通过AAA授权后,接入设备可以将不同用户划分到不同授权VPN中,实现服务器指定用户的VPN归属。需要注意的是,IPoE专线用户不支持通过AAA授权(包括ISP域和AAA服务器两种授权方式)VPN属性。有关通过ISP域授权VPN属性的相关介绍,请参见“BRAS业务配置指导”中的“AAA”。

说明

·     当未知源IPoE用户通过授权VPN方式上线时,必须在用户接入接口为用户配置网关IP地址或在公网DHCP地址池中通过gateway-list export-route命令发布网关IP地址,推荐采用公网DHCP地址池发布网关IP地址方式。有关gateway-list export-route命令的介绍,请参见“BRAS业务命令参考”中的“DHCP”。

·     当非未知源IPoE用户通过授权VPN方式上线时,必须在用户接入接口为用户配置网关IP地址或通过proxy-arp enable命令开启用户接入接口的代理ARP功能,推荐配置代理ARP。有关代理ARP的相关介绍,请参见“三层技术-IP业务配置指导”中的“ARP”。

·     在接口绑定VPN的情况下,为保证已经在线的用户流量可以在授权的VPN中正常转发,需要手工删除已有的IPoE会话。

 

1.1.10  IPoE支持ITA

ITA(Intelligent Target Accounting,智能靶向计费)表示根据接入用户访问的不同目的地址定义不同的计费级别,实现基于目的地址的差别化计费。例如在校园网中,可以通过在用户的接入设备上应用ITA业务策略对访问教育网内的用户流量不收费或者收很低的费用,而对于访问教育网外Internet的用户流量收取较高的费用。ITA的具体配置请参见“BRAS业务配置指导”中的“ITA业务”。

1.1.11  IPoE支持EDSG

EDSG是Enhanced Dynamic Service Gateway的简称,是一种将用户的一路流量单独标识出来并独立限速、计费和管理的业务模式。

用户通过RADIUS认证后,若RADIUS服务器为用户授权了EDSG业务策略,设备将使用下发的EDSG业务策略名称查询本地配置的EDSG业务策略,并使用该策略中定义的业务参数对用户提供基于业务的差别化服务。EDSG的具体配置请参见“BRAS业务配置指导”中的“EDSG业务”。

1.1.12  IPoE支持EAP认证

EAP认证仅能与H3C iMC的Portal服务器以及H3C iNode Portal客户端配合使用。

在对接入用户身份可靠性要求较高的网络应用中,传统的基于用户名和口令的用户身份验证方式存在一定的安全问题,基于数字证书的用户身份验证方式通常被用来建立更为安全和可靠的网络接入认证机制。

EAP(Extensible Authentication Protocol,可扩展认证协议)可支持多种基于数字证书的认证方式(例如EAP-TLS),它与IPoE认证相配合,可共同为用户提供基于数字证书的接入认证服务。

图1-7 IPoE支持EAP认证协议交互示意图

 

图1-7所示,在IPoE支持EAP认证的实现中,客户端与Portal服务器之间交互EAP认证报文,Portal服务器与接入设备之间交互携带EAP-Message属性的Portal协议报文,接入设备与RADIUS服务器之间交互携带EAP-Message属性的RADIUS协议报文,由具备EAP服务器功能的RADIUS服务器处理EAP-Message属性中封装的EAP报文,并给出EAP认证结果。整个EAP认证过程中,接入设备只是对Portal服务器与RADIUS服务器之间的EAP-Message属性进行透传,并不对其进行任何处理,因此接入设备上无需任何额外配置。

1.2  IPoE配置限制和指导

目前仅CSPEX单板支持配置本功能。

不支持同时配置IPoE和IP Source Guard功能。关于IP Source Guard功能的详细介绍,请参见“安全配置指导”中的“IP Source Guard”。

IPoE目前仅支持如下接口:

·     三层以太网接口

·     三层以太网子接口

·     三层聚合接口

·     三层聚合子接口

·     L3VE接口

·     L3VE子接口

对于IPoE Web认证,在IPv6网络中,为避免终端使用临时IPv6地址进行认证,从而导致认证失败,可在用户上线接口配置ipv6 nd ra prefix { ipv6-prefix prefix-length | ipv6-prefix/prefix-length } no-advertise命令禁止终端生成临时IPv6地址。其中,ipv6-prefix prefix-length | ipv6-prefix/prefix-length表示用户所在网段的IPv6地址前缀和前缀长度。有关临时IPv6地址的相关介绍,请参见“三层技术-IP业务配置指导”中的“IPv6基础”。

当使用设备作为DHCP Server为IPoE用户分配IP地址时,为确保IPoE功能正常,要求在DHCP地址池中禁用网关地址,具体如下:

·     对于DHCPv4地址池需要通过命令dhcp server forbidden-ipforbidden-ip配置网关IP地址为不参与自动分配的IP地址。

·     对于DHCPv6地址池需要通过命令ipv6 dhcp server forbidden-address配置网关IPv6地址为不参与自动分配的IPv6地址。

有关配置不参与自动分配IP地址命令的详细介绍,请参见“BRAS业务命令参考”中的“DHCP”和“DHCPv6”。

对于IPoE DHCP接入用户,如果同时配置了ISP域授权DNS和DHCP Server分配DNS,则:

·     在IPoE设备作为DHCP Server组网中,用户优先使用ISP域授权的DNS。

·     在IPoE设备作为DHCP Relay组网中,用户优先使用DHCP Server分配的DNS。

在DHCP中继组网环境中,需要注意:

·     当IPoE工作在三层接入模式下,并且BRAS设备同时作为DHCP Server时,为确保DHCP接入用户可以正常上线,不允许在接入接口上配置ip subscriber initiator arp enable命令。

·     当BRAS设备同时作为DHCP Relay时:

¡     对于DHCPv4 Relay需通过dhcp relay client-information record命令开启DHCP中继的用户地址表项记录功能,并通过undo dhcp relay client-information refresh enable命令关闭DHCP中继动态用户地址表项定时刷新功能。

¡     对于DHCPv6 Relay需通过ipv6 dhcp relay client-information record命令用来开启DHCPv6中继用户表项记录功能。

在IPoE应用中,广告推送功能仅对使用80端口号的HTTP报文和443端口号的HTTPS报文生效。

1.3  IPoE配置任务简介

开启IPoE功能并指定用户的接入模式后,可根据实际组网需求配置多种类型的IPoE接入用户。

1.3.1  IPoE绑定认证接入用户配置任务

IPoE绑定认证接入用户配置任务如下:

(1)     开启IPoE功能并指定用户的接入模式

(2)     (可选)置IPoE认证方式

(3)     配置IPoE绑定认证接入用户类型

¡     配置IPoE动态个人接入用户

¡     配置IPoE静态个人接入用户

¡     配置IPoE专线接入用户

同一接口上,IPoE个人接入用户(包括动态个人和静态个人)和IPoE专线接入用户不能共存,只能选择其一;IPoE动态个人接入用户、IPoE静态个人接入用户可以共存。

(4)     (可选)配置IPoE个人会话和专线子用户会话的最大总数目

(5)     (可选)配置报文业务识别方式以及与认证域的映射关系

(6)     (可选)配置IPoE接入用户的静默功能

(7)     (可选)配置IPoE接入用户在线探测功能

(8)     (可选)配置接口的IPoE接入端口类型

(9)     (可选)配置IPoE接入用户的NAS-PORT-ID属性封装

(10)     配置IPoE接入用户的NAS-PORT-ID精绑

当需要根据NAS-PORT-ID精确获取IPoE用户的接入接口的物理位置信息时需要配置本功能。

(11)     配置IPoE准出认证功能

二次认证组网环境下需要配置本功能。

(12)     (可选)配置IPoE会话的流量统计信息的更新时间间隔

(13)     (可选)配置IPoE日志及业务维护功能

¡     配置IPoE接入用户日志信息功能

¡     配置业务跟踪对象功能

(14)     配置IPoE个人接入用户漫游功能

在漫游用户组网情况下需要配置本功能。

(15)     (可选)配置IPoE用户接入响应延迟时间

1.3.2  IPoE Web认证接入用户配置任务

IPoE Web认证接入用户配置任务如下:

(1)     配置远程Portal认证服务器

(2)     配置对HTTPS报文进行重定向的内部侦听端口号

仅当使用HTTPS协议时需要本配置。

(3)     开启IPoE功能并指定用户的接入模式

(4)     置IPoE认证方式

(5)     配置IPoE静态个人接入用户

仅IPoE静态个人接入用户需要本配置

(6)     (可选)配置IPoE Web认证接入用户

(7)     (可选)配置IPoE个人会话和专线子用户会话的最大总数目

(8)     (可选)配置报文业务识别方式以及与认证域的映射关系

(9)     (可选)配置IPoE接入用户的静默功能

(10)     (可选)配置IPoE接入用户在线探测功能

(11)     (可选)配置接口的IPoE接入端口类型

(12)     (可选)配置IPoE接入用户的NAS-PORT-ID属性封装

(13)     配置IPoE接入用户的NAS-PORT-ID精绑

当需要根据NAS-PORT-ID精确获取IPoE用户的接入接口的物理位置信息时需要配置本功能。

(14)     (可选)配置IPoE会话的流量统计信息的更新时间间隔

(15)     (可选)配置IPoE日志及业务维护功能

¡     配置IPoE接入用户日志信息功能

¡     配置业务跟踪对象功能

(16)     配置IPoE Web的快速认证功能

在IPoE Web快速认证组网环境下需要配置本功能。

(17)     配置IPoE个人接入用户漫游功能

在漫游用户组网情况下需要配置本功能。

(18)     (可选)配置IPoE用户接入响应延迟时间

1.4  IPoE配置准备

IPoE提供了一个用户身份认证和安全认证的实现方案,但是仅仅依靠IPoE不足以实现该方案。接入设备的管理者需选择使用RADIUS认证方法或本地认证方法,以配合IPoE完成用户的身份认证。IPoE的配置前提如下:

·     若配置的是DHCP触发方式,需要安装并配置好DHCP服务器。如果是DHCP中继组网,接入设备还需启动DHCP中继功能。

·     如果通过远端RADIUS服务器进行身份认证,则首先保证RADIUS服务器已安装并配置成功,其次需要在RADIUS服务器上配置相应的用户名和密码,然后在接入设备端进行RADIUS客户端的相关设置。如果需要通过远端的安全策略服务器进行安全检测和授权,则需要在H3C iMC安全策略服务器上配置相应的安全策略,并在接入设备上指定安全策略服务器的IP地址。RADIUS客户端以及安全策略服务器的具体配置请参见“BRAS业务配置指导”中的“AAA”。

·     如果通过本地设备进行身份认证,则需要在接入设备上配置相关的本地用户及其属性。本地用户的具体配置请参见“BRAS业务配置指导”中的“AAA”。

·     保证用户、接入设备和各服务器之间路由可达。

1.5  配置远程Portal认证服务器

具体配置请参见“BRAS业务配置指导”中的“Portral”。

1.6  配置对HTTPS报文进行重定向的内部侦听端口号

具体配置请参见“三层技术-IP业务配置指导”中的“HTTP重定向”。

1.7  开启IPoE功能并指定用户的接入模式

1. 配置限制和指导

不允许直接修改IPoE的接入模式,如需修改IPoE的接入模式必须先关闭IPoE功能之后,再在重新开启IPoE功能时指定新的接入模式。

只有在接口上开启了IPv4或IPv6协议栈的IPoE功能后,该协议栈对应的其它IPoE相关配置才能生效。

对于接口专线用户、L2VPN专线用户和双栈静态用户,仅在同时开启IPv4和IPv6协议栈的IPoE功能的情况下,才允许用户上线。

在IPv4网络中,当IPoE工作在二层接入模式时,请采用在DHCP地址池下配置gateway-list export-route命令的方式为用户指定网关地址,不允许采用在接入接口上配置IP地址的方式为用户指定网关地址。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启IPoE功能,并指定用户接入模式。

ip subscriber { l2-connected | routed } enable [ ipv4 | ipv6 ]

缺省情况下,接口上的IPoE功能处于关闭状态。

执行本命令时,如果未指定ipv4ipv6参数,则表示将同时开启IPv4和IPv6协议栈的IPoE功能。

1.8  配置IPoE认证方式

1. 功能简介

目前IPoE支持以下几种认证方式。

·     绑定认证:是指BRAS设备根据用户接入的位置信息自动生成用户名和密码进行身份认证的一种认证方式,无需用户输入用户名和密码。绑定认证适用于所有IPoE接入用户类型。

·     Web认证:是指用户通过访问Web认证服务器的认证页面,交互输入用户名和密码进行身份认证的一种认证方式。Web认证适用于IPoE DHCP个人接入用户和IPoE静态个人接入用户。

·     Web MAC认证是指用户只需在第一次上网时输入用户名/密码,后续无需输入用户名/密码即可上网的一种快速Web认证方式。

缺省情况下,IPoE接入用户采用绑定认证方式。如果需要对IPoE接入用户进行Web认证,必须配置IPoE用户的认证方式为Web认证。

当由绑定认证方式切换到Web或Web MAC认证方式时,根据不同的IPoE会话触发方式,有以下几种处理机制:

·     对于动态个人会话:将删除当前接口上所有动态触发创建的IPoE会话信息,并强制用户下线。

·     对于接口静态个人会话:当前接口上所有静态个人IPoE会话将被重置到初始化状态,并强制用户下线。

·     对于全局静态个人会话:将删除基于当前接口创建的所有IPoE全局静态个人会话,并强制用户下线。

·     对于专线会话:当前接口上IPoE专线会话将被重置到初始化状态,并强制用户下线。

当由Web或Web MAC认证方式切换到绑定认证方式,或在Web和Web MAC两种认证方式之间互切时,将删除当前接口上所有DHCP动态个人会话、全局静态个人会话和重置当前接口静态个人会话为初始化状态,并强制用户下线。

2. 配置限制和指导

当接口同时配置IPoE Web认证和Portal功能时,仅IPoE Web功能生效。如果在配置IPoE Web认证前已有Portal用户上线,配置IPoE Web认证后对已上线的Portal用户无影响,当用户下线后则不再支持从该接口通过Portal方式上线。有关Portal的相关介绍,请参见“BRAS业务配置指导”中的“Portal”。

当DHCP接入用户或者静态接入用户采用Web方式上线时,支持普通Web接入、MAC Trigger无感知接入和MAC无感知接入三种接入方式。当同时配置多种接入方式时,按如下原则选择实际采用的接入方式:

·     当接口上配置了Web认证方式时:

¡     如果未通过portal apply mac-trigger-server命令在接口上应用MAC绑定服务器,则DHCP接入用户或者静态接入用户按普通Web接入流程上线。

¡     如果通过portal apply mac-trigger-server命令在接口上应用了MAC绑定服务器,则DHCP接入用户或者静态接入用户按MAC Trigger无感知接入流程上线。

·     当接口上配置了Web MAC认证方式时,不论是否通过portal apply mac-trigger-server命令在接口上应用MAC绑定服务器,此时DHCP接入用户或者静态接入用户都将按MAC无感知接入流程上线。

目前,仅DHCP接入用户支持三层无感知,静态接入用户不支持。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE接入用户的认证方式。

ip subscriber authentication-method { bind | web [ mac-auth ] }

缺省情况下,IPoE接入用户采用绑定认证。

1.9  配置IPoE动态个人接入用户

1.9.1  IPoE动态个人接入用户配置任务简介

IPoE动态个人接入用户配置任务如下:

(1)     置动态个人会话的触发方式

(2)     (可选)配置动态个人接入用户的认证用户名的命名规则

(3)     (可选)配置动态个人接入用户的认证密码

(4)     (可选)配置动态个人接入用户使用的认证域

(5)     (可选)配置动态个人会话的最大数目

(6)     (可选)配置DHCP个人接入用户的信任Option

(7)     (可选)配置DHCP Option中circuit-id和remote-id解析格式

(8)     (可选)配置DHCP个人接入用户的信任认证域

(9)     (可选)配置DHCP个人接入用户的认证域名生成规则

(10)     (可选)配置允许DHCP个人接入用户异常下线后通过报文重新触发上线

(11)     (可选)配置未知源个人接入用户的信任IP地址/地址范围

(12)     配置动态个人接入用户NAT联动失败用户继续上线功能

在IPoE与NAT联动失败的情况下要求允许用户可以继续上线时,需要配置本功能。

(13)     (可选)配置允许动态个人接入用户采用松散模式上线

1.9.2  配置动态个人会话的触发方式

1. 功能简介

接口上开启了IPoE功能后,缺省情况下丢弃接收到的用户报文,需要配置IPoE用户触发方式,使指定的用户报文得以处理,后续能够正常使用网络服务。

接口上可同时配置多种触发方式,其中:

·     配置未知源IP触发方式后,IPoE会处理接口上收到的普通IP报文,保存用户信息生成IPoE会话,并进行认证、授权和计费。

·     配置DHCP触发方式后,IPoE会处理接口上收到的DHCP Discover报文、DHCP Solicit或直接申请地址的DHCP Request报文,保存用户信息生成IPoE会话,进行认证、授权和计费,并能根据后续的DHCP报文交互更新用户信息。

·     配置IPv6 ND RS触发方式后,IPoE会处理接口上收到的IPv6 ND RS报文,保存用户信息生成IPoE会话,进行认证、授权和计费,并能根据后续的IPv6 ND报文交互更新用户信息。

2. 配置限制和指导

开启IPv6 ND RS报文触发方式,需先确认接入设备可发送IPv6 ND RA报文。若接入设备可以发送IPv6 ND RA报文,则建议IPv6 ND RA报文发送间隔不小于6分钟。

IPv6 ND RS报文触发IPv6 IPoE会话功能仅在二层接入模式下生效。

Windows系统的PC可能生成两类IPv6地址,一类是随机生成,另外一类通过EUI-64方式生成。若用户使用随机生成的IPv6地址接入,会触发IPv6未知源IP报文方式的认证;若用户使用EUI-64方式生成的IPv6地址接入,用户报文可直接触发IPv6 ND RS方式的认证。因此,若要保证用户使用任何一种IPv6地址都可接入,建议在接口上同时开启IPv6未知源IP报文触发方式和IPv6 ND RS触发方式。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPv4动态个人会话的触发方式。

ip subscriber initiator { dhcp | unclassified-ip } enable

缺省情况下,DHCPv4报文以及未知源IP报文触发生成IPoE会话功能均处于关闭状态。

(4)     配置IPv6动态个人会话的触发方式。

ip subscriber initiator { dhcpv6 | ndrs | unclassified-ipv6 } enable

缺省情况下,DHCPv6报文、ND RS报文以及IPv6未知源IP报文触发生成IPoE会话功能均处于关闭状态。

1.9.3  配置动态个人接入用户的认证用户名的命名规则

1. 功能简介

通过该配置可以指定动态个人接入用户认证使用的用户名的命名规则,并且根据该命名规则获取的用户名必须与认证服务器配置的用户名保持一致,用户才可以认证通过。

绑定认证方式下,各种接入用户选取用户名的具体原则如下:

·     对于DHCP接入用户,按如下先后顺序选择认证用户名:

a.     使用ip subscriber dhcp username命令获取到的用户名作为认证用户名。

b.     使用ip subscriber username命令配置的用户名作为认证用户名。

c.     使用用户MAC地址,如果用户MAC地址无法获取,则使用报文源MAC地址。

·     对于ND RS接入用户,按如下先后顺序选择认证用户名:

a.     使用ip subscriber ndrs username获取到的用户名作为认证用户名。

b.     使用ip subscriber username命令配置的用户名作为认证用户名。

c.     使用报文的源MAC地址作为认证用户名。

·     对于未知源IP接入用户,按如下先后顺序选择认证用户名:

a.     使用ip subscriber unclassified-ip username获取到的用户名作为认证用户名。

b.     使用ip subscriber username命令配置的用户名作为认证用户名。

c.     使用报文的源IP地址作为认证用户名。

Web认证方式和Web MAC认证方式下,在认证前域阶段,DHCP个人接入用户按如下先后顺序选择认证用户名:

(1)     使用ip subscriber dhcp username命令获取到的用户名作为认证用户名。

(2)     使用ip subscriber username命令配置的用户名作为认证用户名。

(3)     使用用户MAC地址,如果用户MAC地址无法获取,则使用报文源MAC地址。

Web认证方式下,在Web认证阶段,DHCP个人接入用户按如下先后顺序选择认证用户名:

(1)     使用用户登录时输入的用户名作为认证用户名。

(2)     使用ip subscriber username命令配置的用户名作为认证用户名。

(3)     使用用户MAC地址,如果用户MAC地址无法获取,则使用报文源MAC地址。

Web MAC认证方式下,在Web认证阶段,DHCP个人接入用户按如下先后顺序选择认证用户名:

(1)     使用ip subscriber username命令配置的用户名作为认证用户名

(2)     使用用户MAC地址,如果用户MAC地址无法获取,则使用报文源MAC地址。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置DHCP接入用户的认证用户名。

ip subscriber dhcp username include { circuit-id [ separator separator ] | client-id [ separator separator ] | nas-port-id [ separator separator ] | port [ separator separator ] | remote-id [ separator separator ] | second-vlan [ separator separator ] | slot [ separator separator ] | source-mac [ address-separator address-separator ] [ separator separator ] | string string [ separator separator ] | subslot [ separator separator ] | sysname [ separator separator ] | vendor-class [ original ] [ separator separator ] | separator vendor-specific [ separator separator ] | vlan [ separator separator ] } *

缺省情况下,未配置DHCP个人接入用户的认证用户名的命名规则。

对于采用松散模式上线DHCPv4接入用户,因报文中没有携带DHCP Option信息,所以circuit-idmacclient-idremote-idvendor-classoriginalvendor-specific这些参数不生效;此时,即使命令中指定上述参数,设备在生成用户名时也会按照未指定的情况处理DHCPv6接入用户不支持采用松散模式上线。

(4)     配置未知源IP接入用户的认证用户名。

ip subscriber unclassified-ip username include { nas-port-id [ separator separator ] | port [ separator separator ] | second-vlan [ separator separator ] | slot [ separator separator ] | source-ip [ address-separator address-separator ] [ separator separator ] | source-mac [address-separator address-separator ] [ separator separator ] | string string [ separator separator ] | subslot [ separator separator ] | sysname [ separator separator ] | vlan [ separator separator ] } *

缺省情况下,未配置未知源IP接入用户和静态个人用户的认证用户名的命名规则。

(5)     IPv6 ND RS接入用户的认证用户名

ip subscriber ndrs username include { nas-port-id [ separator separator ] | port [ separator separator ] | second-vlan [ separator separator ] | slot [ separator separator ] | source-mac [ address-separator address-separator ] [ separator separator ] | string string [ separator separator ] | subslot [ separator separator ] | sysname [ separator separator ] | vlan [ separator separator ] } *

缺省情况下,未配置IPv6 ND RS接入用户的认证用户名的命名规则。

(6)     配置IPoE个人接入用户的认证用户名

ip subscriber username { mac-address [ address-separator address-separator ] [ lowercase | uppercase ] | string string }

缺省情况下,未配置IPoE个人接入用户的认证用户名。

当接口上同时配置多种个人会话的触发方式时,如果管理员想避免为每种触发方式单独配置用户名带来的繁琐操作,可通过本命令一次性为当前接口上所有个人用户配置统一的认证用户名。

1.9.4  配置动态个人接入用户的认证密码

1. 功能简介

本节关于DHCPv4接入用户认证密码的选择原则均是针对采用非松散模式上线的情况。采用松散模式上线时,DHCPv4接入用户认证密码的选择原则请见命令手册。有关松散模式上线的介绍,请参见“1.9.14  配置允许动态个人接入用户采用松散模式上线”。

通过该配置指定IPoE接入用户进行认证时使用的密码,该密码必须与认证服务器配置的密码保持一致,用户才可以认证通过。

绑定认证方式下,各种接入用户选取认证密码的具体原则如下:

·     对于DHCP接入用户,按如下先后顺序选择认证密码:

a.     使用ip subscriber dhcp passwordip subscriber dhcpv6 password option16命令获取到的密码作为认证密码。

b.     使用ip subscriber password命令配置的密码作为认证密码。

c.     使用字符串“vlan”作为认证密码。

·     对于其他动态个人接入用户,按如下先后顺序选择认证密码:

a.     使用ip subscriber password命令配置的密码作为认证密码。

b.     使用字符串“vlan”作为认证密码。

Web认证方式和Web MAC认证方式下,在认证前域阶段,DHCP个人接入用户按如下先后顺序选择认证密码:

(1)     使用ip subscriber dhcp passwordip subscriber dhcpv6 password option16命令获取到的密码作为认证密码。

(2)     使用ip subscriber password命令配置的密码作为认证密码。

(3)     使用字符串“vlan”作为认证密码。

Web认证方式下,在Web认证阶段,DHCP个人接入用户按如下先后顺序选择认证密码:

(1)     使用用户登录时输入的密码作为认证密码。

(2)     使用ip subscriber password命令配置的密码作为认证密码。

(3)     使用字符串“vlan”作为认证密码。

Web MAC认证方式下,在Web认证阶段,DHCP个人接入用户按如下先后顺序选择认证密码:

(1)     使用ip subscriber password命令配置的密码作为认证密码。

(2)     使用字符串“vlan”作为认证密码。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置动态个人接入用户的认证密码。

ip subscriber password { mac-address [ address-separator address-separator ] [ lowercase | uppercase ] | { ciphertext | plaintext } string

缺省情况下,动态个人接入用户的认证密码为字符串vlan。

当接口上同时配置多种个人会话的触发方式时,如果管理员想避免为每种触发方式单独配置认证密码带来的繁琐操作,可通过本命令一次性为当前接口上所有个人用户配置统一的认证密码。

(4)     配置DHCPv4个人接入用户使用DHCPv4报文中的信息作为认证密码。

ip subscriber dhcp password { circuit-id mac | option60 [ offset offset ] [ length length ] }

缺省情况下,IPv4 DHCP个人接入用户未使用DHCPv4报文中的信息作为认证密码。

若要使用报文中携带的Option 60内容作为认证密码,还必须配置信任DHCPv4报文中的Option 60字段。信任Option 60字段的介绍请参见“1.9.7  配置DHCP个人接入用户的信任Option”。

(5)     配置DHCPv6个人接入用户使用Option 16字段的内容作为认证密码。

ip subscriber dhcpv6 password option16 [ offset offset ] [ length length ]

缺省情况下,DHCPv6个人接入用户未使用Option 16字段的内容作为认证密码。

若要使用报文中携带的Option 16内容作为认证密码,还必须配置信任DHCPv6报文中的Option 16字段。信任Option 16字段的介绍请参见“1.9.7  配置DHCP个人接入用户的信任Option”。

1.9.5  配置动态个人接入用户使用的认证域

1. 功能简介

本节关于认证域的选择原则均是针对采用非松散模式上线的IPoE用户。采用松散模式上线时,用户认证域的选择原则请见命令手册。有关松散模式上线的介绍,请参见“1.9.14  配置允许动态个人接入用户采用松散模式上线”。

绑定认证方式下,从指定接口上接入的IPoE动态个人接入用户将按照如下先后顺序选择认证域:

·     对于DHCP接入用户:接口上指定的IPoE接入用户使用的强制认证域-->配置的匹配Option 60/Option 16/Option 17中的字符串-->自动获取报文中携带的Option(DHCPv4为Option 60,DHCPv6为Option 16和Option 17)内容字符串-->与报文指定业务特征相映射的认证域-->接口上指定的IPoE接入用户使用的非强制认证域-->系统缺省的认证域。当使用配置的匹配Option 60中的字符串或自动获取报文中携带的Option 60内容字符串作为认证域时,如果同时配置了域名生成规则,此时,域名的选择情况请参见“1.9.10  配置DHCP个人接入用户的认证域名生成规则”。

·     对于ND RS接入用户:接口上指定的IPoE接入用户使用的认证域-->系统缺省的认证域。

·     对于未知源IP接入用户:与报文指定业务特征相映射的认证域-->接口上指定的IPoE接入用户使用的认证域-->系统缺省的认证域。

其中,关于如何使用配置的匹配Option 60/Option 16/Option 17中的字符串作为DHCP个人接入用户的认证域,请参见“1.9.9  配置DHCP个人接入用户的信任认证域

关于报文业务识别方式映射的认证域的具体配置,请参见“1.15  配置报文业务识别方式以及与认证域的映射关系”。

关于缺省认证域的相关介绍及具体配置请参见“BRAS业务配置指导”中的“AAA”。

Web认证方式下,认证域的选择原则请参见“1.12.2  配置Web个人接入用户的认证域”。

2. 配置限制和指导

如果需要使用配置的匹配Option 60/Option 16/Option 17中的字符串或自动获取报文中携带的Option 60/Option 16/Option 17中的信息作为DHCP个人接入用户的认证域,则需要配置接入设备信任DHCPv4 Option 60/DHCPv6 Option 16/DHCPv6 Option 17中的信息,具体配置请参见“1.9.7  配置DHCP个人接入用户的信任Option”。

为使得用户认证成功,必须保证按照认证域优先顺序选择出的认证域在接入设备上存在且配置完整。

当使用option的内容作为认证域时,该域名必须在接入设备上存在,否则视为不可用的认证域。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置动态个人接入用户使用的认证域。

ip subscriber dhcp domain domain-name [ force ]

ip subscriber { ndrs | unclassified-ip } domain domain-name

缺省情况下,DHCP接入用户、IPv6 ND RS接入用户和未知源IP接入用户的认证域为缺省认证域。

1.9.6  配置动态个人会话的最大数目

1. 功能简介

通过配置动态个人会话的最大数目可以控制系统中的动态个人接入用户总数。

2. 配置限制和指导

如果接口上配置的IPoE最大会话数目小于当前处于在线状态的动态个人会话数目,则该配置可以执行成功,且在线IPoE用户不受影响,但系统将不允许新的IPoE用户接入。

在双栈IPoE组网应用中,建议:

·     对于DHCP接入用户:DHCPv4和DHCPv6,二者配置相同的最大会话数。

·     对于未知源IP接入用户:未知源IPv4和未知源IPv6,二者配置相同的最大会话数。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置动态个人会话的最大数目。

ip subscriber { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 } max-session max-number

缺省情况下,未配置接口上允许创建的动态个人会话的最大数目。

本命令与ip subscriber max-session同时配置时,两者可以同时生效,由于控制的角度不同,因此会话数会收到双重限制,即仅在两者均未达到最大会话数限制时才允许创建新的会话。有关ip subscriber max-session命令的相关介绍,请参见“1.14  配置IPoE个人会话和专线子用户会话的最大总数目”。

1.9.7  配置DHCP个人接入用户的信任Option

1. 功能简介

在DHCP中继组网环境中,接入设备可以从用户的DHCP报文中提取出相应的DHCP Option,这些Option中携带了用户接入线路的相关信息,例如接入节点的物理位置、线路速率等。如果接入设备信任DHCP报文中的这些Option,则会使用这些Option中的相关子选项内容来封装发往RADIUS服务器的RADIUS属性,远程RADIUS服务器可结合这些属性对用户进行更为灵活的接入管理。

信任的Option和对应的RADIUS属性对应关系为:

·     若信任DHCPv4 Option 82,则其中的Circuit-ID子选项可用来封装NAS-PORT-ID和DSL_AGENT_CIRCUIT_ID属性。

·     若信任DHCPv4 Option 82,则其中的Remote-ID子选项可用来封装DSL_AGENT_REMOTE_ID属性。

·     若信任DHCPv6 Option 18,则Option 18可用来封装NAS-PORT-ID和DSL_AGENT_CIRCUIT_ID属性。

·     若信任DHCPv6 Option 37,则Option 37可用来封装DSL_AGENT_REMOTE_ID属性。

缺省情况下,按字符串格式对option82、option18和option37中的circuit-id和remote-id字段进行解析。有关circuit-id和remote-id解析格式的介绍,请参见“1.9.8  配置DHCP Option中circuit-id和remote-id解析格式”。

在DHCP组网环境中,如果接入设备信任DHCPv4 Option 60/DHCPv6 Option 16/DHCPv6 Option 17中的信息,在满足一定的条件时,IPoE用户可以使用Option 60/Option 16/Option 17中的信息作为指定的认证域进行认证。有关认证域的具体选择情况,请参见“1.9.5  配置动态个人接入用户使用的认证域”。

2. 配置限制和指导

支持使用Option 60/Option 16/Option 17中的信息作为IPoE用户的认证域。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置信任DHCP报文中的指定Option。

ip subscriber trust { option60 | option82 | option16 | option17 | option18 | option37 }

缺省情况下,不信任DHCP报文中的任何Option。

同一接口视图下可以多次执行本命令配置信任DHCP报文中不同的Option,但不允许同时配置信任Option 16和Option 17。

1.9.8  配置DHCP Option中circuit-id和remote-id解析格式

1. 功能简介

为确保IPoE对circuit-id和remote-id中的信息进行正确解析,需要根据下游设备上送上来的circuit-id和remote-id信息的不同格式,通过本功能为其配置相应的解析格式。

2. 配置限制和指导

仅在通过ip subscriber trust命令配置了信任相应Option的情况下,本功能配置后才生效。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置信任DHCP报文中的指定Option。

ip subscriber trust { option82 | option18 | option37 }

缺省情况下,不信任DHCP报文中的任何Option。

(4)     配置IPoE对DHCP Option中circuit-id的解析格式。

ip subscriber access-line-id circuit-id trans-format { ascii | hex }

缺省情况下,IPoE对DHCP Option中circuit-id解析格式为字符串格式。

(5)     配置IPoE对DHCP Option中remote-id的解析格式。

ip subscriber access-line-id remote-id trans-format { ascii | hex }

缺省情况下,IPoE对DHCP Option中remote-id的解析格式为字符串格式。

1.9.9  配置DHCP个人接入用户的信任认证域

1. 功能简介

在一些组网环境中,接口上可能需要同时开启Portal和DHCP报文触发认证的IPoE功能,例如:管理员给门禁、监控摄像头、打印机等哑终端分配动态的IP地址并使用DHCP报文触发IPoE认证,同时宽带拨号用户使用Portal认证;这种组网环境可配置信任DHCPv4 Option 60/DHCPv6 Option 16/DHCPv6 Option 17字段中某些字符串,使设备根据匹配规则从Option 60/Option 16/Option 17字段提取出的字符串中是否存在与配置的信任字符串相同的字符串,分别做如下不同的处理:

·     如果从Option 60/Option 16/Option 17字段提取的字符串中存在与配置的信任字符串相同的字符串,则DHCP报文触发IPoE接入认证,并按如下优先顺序选择第一个可用的认证域进行认证。

¡     配置了强制认证域的情况下,使用强制认证域进行认证。

¡     配置了信任Option 60/Option 16/Option 17的情况下,如果配置了域名生成规则,则使用根据域名生成规则生成的认证域;如果未配置域名生成规则,则使用配置的信任字符串作为DHCP个人接入用户的认证域。有关域名生成规则的介绍,请参见“1.9.10  配置DHCP个人接入用户的认证域名生成规则”。

¡     未配置信任Option 60/Option 16/Option 17的情况下,认证域的选择请见1.9.5  配置动态个人接入用户使用的认证域

·     如果从Option 60/Option 16/Option 17字段提取的字符串中不存在与配置的信任字符串相同的字符串,则DHCP报文不会触发IPoE接入认证,用户直接进入Portal认证流程。有关Poral认证的相关介绍请参见“BRAS业务配置指导”中的“Portal”。

2. 配置限制和指导

如果需要使用ip subscriber dhcp option60 match/ip subscriber dhcpv6 { option16 | option17 } match命令匹配到的字符串作为认证域,必须配置信任Option 60/Option 16/Option 17。有关信任Option 60/Option 16/Option 17的具体配置请参见“1.9.7  配置DHCP个人接入用户的信任Option”。

支持使用Option 60/Option 16/Option 17中的信息作为IPoE用户的认证域。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置DHCPv4个人接入用户的信任认证域。

ip subscriber dhcp option60 match string [ offset offset ] [ length length ]

缺省情况下,未配置DHCPv4个人接入用户的信任认证域。

(4)     配置DHCPv6个人接入用户的信任认证域。

ip subscriber dhcpv6 { option16 | option17 } match string [ offset offset ] [ length length ]

缺省情况下,未配置DHCPv6个人接入用户的信任认证域。

1.9.10  配置DHCP个人接入用户的认证域名生成规则

1. 功能简介

在一些组网环境中,需要把接入信息和option60的字符拼接后作为认证域来认证。例如:用户A和用户B属于不同的VLAN,但拥有相同的Option60,并通过同一接入接口上线。现要求将用户A和用户B划分到不同的认证域,并根据不同的认证域授权不同的地址池。此时可通过本特性配置VLAN信息参与域名生成,即通过Option60+VLAN组合方式生成不同的域名。

在DHCP接入用户使用Option60中的信息作为认证域的情况下,如果配置了本特性,则配置的参数将参与域名的生成,最终的域名生成规则为:Option60中的作为认证域的字段+命令配置的参数信息。在配置了信任Option60的情况下,Option60中参与域名生成字段的选取规则如下:

·     如果配置了ip subscriber dhcp option60 match命令,并且在Option 60中的指定位置能够匹配到指定的信任字符串,则使用匹配的信任字符串参与域名生成。如果不能匹配到指定的信任字符串,则忽略Option60内容,不会使用Option60内容作为认证域(即按报文未携带option60选项的情况选择认证域)。

·     如果未配置ip subscriber dhcp option60 match命令,则使用ip subscriber trust option60命令提取的内容参与域名生成。

2. 配置限制和指导

如果需要使用ip subscriber dhcp domain include命令生成认证域名,必须配置信任Option 60。有关信任Option 60的具体配置请参见“1.9.9  配置DHCP个人接入用户的信任认证域”。

支持使用Option 60中的信息作为IPoE用户的认证域。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置信任DHCP报文中Option60。

ip subscriber trust  option60

缺省情况下,不信任DHCP报文中的任何Option。

(4)     配置DHCPv4个人接入用户的信任认证域。

ip subscriber dhcp option60 match string [ offset offset ] [ length length ]

缺省情况下,未配置DHCPv4个人接入用户的信任认证域。

(5)     配置DHCPv4个人接入用户的认证域名生成规则。

ip subscriber dhcp domain include vendor-class [ separator separator ] second-vlan [ separator separator ] | string string [ separator separator ] | vlan [ separator separator ] } *

缺省情况下,未配置DHCPv4个人接入用户的认证域名生成规则。

1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线

1. 功能简介

必须在接口上开启未知源IP报文生成IPoE会话功能或ARP报文触发用户上线功能,BRAS设备才会对该接口上异常下线的DHCP用户进行记录。通过对异常下线的DHCP用户信息进行记录,当设备收到DHCP用户的IP或ARP报文时,可根据DHCP异常下线记录表项恢复该用户的IPoE会话。

DHCP用户异常下线是指,不是因为DHCP接入用户主动释放IP地址引起的用户IPoE会话被删除的现象。

2. 配置限制和指导

当接口收到用户IP或ARP报文时,如果该报文可以同时匹配静态IPoE会话和DHCP异常下线记录表项,则按静态IPoE会话方式上线。

为保证用户DHCP接入用户异常下线后可以通过报文重新触发上线,不允许关闭接口上的DHCP报文触发生成IPoE会话的功能并且用户认证域或AAA服务器中需要授权相应的DHCP地址池。

普通Web认证用户异常下线后重新触发上线时只能恢复其在认证前域中的会话;如果该用户需要在Web认证阶段上线,仍需走正常Web认证流程。

目前仅支持DHCPv4异常下线用户重新上线。

需要注意的是,以下任何一种情况都会清除对应接口的异常下线记录表项:

·     接口上关闭未知源IP报文生成IPoE会话功能和ARP报文触发用户上线功能。

·     接口上关闭IPoE功能。

·     接口上关闭DHCP报文触发生成IPoE会话的功能。

·     接口去激活(包括接口所在slot或subslot被拔出、用户上线的全局接口或子接口被删除)。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启未知源IP报文触发生成IPoE会话功能或ARP报文触发用户上线功能。请至少选择其中一项进行配置。

¡     开启未知源IP报文触发生成IPoE会话功能。

ip subscriber initiator unclassified-ip enable [ matching-user ]

缺省情况下,未知源IP报文触发生成IPoE会话功能处于关闭状态。

¡     开启ARP报文触发用户上线功能。

ip subscriber initiator arp enable

缺省情况下,ARP报文触发用户上线功能处于关闭状态。

(4)     (可选)配置异常下线用户再次触发上线时租约到期时间为异常下线前的时间。

ip subscriber lease-end-time original

缺省情况下,异常下线用户再次触发上线时租约到期重新开始计算。

1.9.12  配置未知源个人接入用户的信任IP地址/地址范围

1. 功能简介

在一些组网环境中,接口上可能需要同时开启Portal和未知源IPoE报文触发生成IPoE会话功能,例如:管理员给门禁、监控摄像头、打印机等哑终端分配固定的静态IP地址并使用未知源IPoE触发方式认证,同时宽带拨号用户使用Portal认证;这种组网环境可配置未知源个人接入用户的信任IP地址/地址范围,使设备根据接口上收到的IP报文中源地址是否是信任IP地址,分别做如下不同的处理:

·     如果未知源IP报文能够匹配静态IPoE会话,则不论IP报文中源地址是否是信任的IP地址,都直接走IPoE静态用户上线流程。

·     如果未知源IP报文未能匹配静态IPoE会话,则按如下原则处理:

¡     如果IP报文中源地址是信任的IP地址,则触发未知源IPoE认证;

¡     如果IP报文源地址是非信任IP地址,则不会触发IPoE接入认证,用户直接进入Portal认证流程。有关Poral认证的相关介绍请参见“BRAS业务配置指导”中的“Portal”。

需要注意的是,当接口仅开启未知源IP报文触发生成IPoE会话功能,但未开启Portal功能时,如果配置了信任IP地址,设备根据接口上收到的IP报文中源地址是否是信任IP地址,分别做如下不同的处理:

·     如果未知源IP报文能够匹配静态IPoE会话,则不论IP报文中源地址是否是信任的IP地址,都直接走IPoE静态用户上线流程。

·     如果未知源IP报文未能匹配静态IPoE会话,则只有当未知源IP报文的IP地址与配置的信任IP地址匹配时才会触发IPoE接入认证,否则丢弃报文。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置信任的源IPv4地址/地址范围。

ip subscriber unclassified-ip ip match start-ip-address [ end-ip-address ]

缺省情况下,未配置信任任何源IPv4地址/地址范围。

(4)     配置信任的源IPv6地址/地址范围。

ip subscriber unclassified-ip ipv6 match start-ipv6-address [ end-ipv6-address ]

缺省情况下,未配置信任任何源IPv6地址/地址范围。

1.9.13  配置动态个人接入用户与NAT联动失败用户继续上线功能

1. 功能简介

本配置用来设置动态个人接入用户(包括未知源IP接入用户、IPv6 ND RS接入用户和DHCP接入用户)与NAT联动失败允许用户继续上线功能。例如:当支持NAT联动功能的单板故障导致联动失败时,如需允许用户继续上线,则可配置本功能。有关NAT的相关介绍,请参见“NAT配置指导”中的“NAT”。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启IPoE与NAT联动失败时,允许动态个人接入用户继续上线功能。

ip subscriber nat-fail online

缺省情况下,IPoE与NAT联动失败时,允许动态个人接入用户继续上线功能处于关闭状态。

1.9.14  配置允许动态个人接入用户采用松散模式上线

1. 功能简介

因系统或用户接入接口所在Slot重启导致在线IPoE用户的会话被删除时,待系统或用户接入接口所在Slot重启后,对于DHCP用户,因无法感知接入设备或用户接入接口所在Slot的重启,不会再次发送DHCP报文触发上线,导致接入设备无法为其重新生成DHCP类型的IPoE会话。为解决这类问题,IPoE支持用户采用松散模式上线。

采用松散模式上线时,通过全局接口和物理接口上线的用户,对重启的定义不同,具体如下:

·     通过全局接口上线的用户:松散模式上线,是指系统重启后,允许IPoE用户在指定的loose-time/all-time时长内,通过IP和ARP报文触发上线生成DHCP类型的IPoE会话。

·     通过物理接口上线的用户:松散模式上线,是指用户接入接口所在Slot重启后,允许IPoE用户在指定的loose-time/all-time时长内,通过IP和ARP报文触发上线生成DHCP类型的IPoE会话。

2. 配置限制和指导

在系统或用户接入接口所在Slot重启后的设置时长内,当接口收到用户IP或ARP报文时,按如下先后顺序上线:

·     如果该报文可以匹配静态IPoE会话,则按静态IPoE会话方式上线。

·     如果该报文可以匹配DHCP异常下线记录表项,则按异常下线记录重新上线。

·     如果该报文可以匹配漫游用户,则按漫游流程处理。

·     采用松散模式上线。

对于IPoE DHCP用户,仅在同时满足下列条件时,才支持用户采用松散模式上线:

·     接入接口上配置了二层接入模式。

·     接入接口上开启DHCPv4报文触发生成IPoE会话的功能。

·     通过认证域或AAA服务器为用户授权了DHCPv4地址池。

·     当需要通过IP报文触发上线时,接入接口上必须配置ip subscriber initiator unclassified-ip enable命令,并建议同时指定matching-user参数

·     当需要通过ARP报文触发上线时,接入接口上必须同时配置ip subscriber initiator arp enable命令和ip subscriber initiator unclassified-ip enable命令,并建议同时指定matching-user参数

目前仅IPv4 IPoE动态个人接入用户支持采用松散模式上线,IPv6 IPoE用户不支持。

对于IPoE Web认证用户,采用松散模式上线时只能重新生成其在认证前域中的会话。如果该用户需要在Web认证阶段上线,仍需走正常Web认证流程。

当IPoE用户采用松散模式上线时,为确保IPoE功能正常,不允许再在采用松散模式上线的接入接口上配置Portal功能。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置松散模式上线功能。

ip subscriber access-trigger loose { loose-time | all-time }

1.10  配置IPoE静态个人接入用户

1.10.1  IPoE静态个人接入用户配置任务简介

IPoE静态个人接入用户配置任务如下:

(1)     配置静态个人会话发方式

(2)     配置静态个人会话

(3)     (可选)配置静态个人接入用户的认证用户名的命名规则

(4)     (可选)配置静态个人接入用户的认证密码

(5)     (可选)配置静态个人接入用户使用的认证域

1.10.2  配置静态个人会话的触发方式

1. 功能简介

配置静态个人会话时,必须开启未知源IP报文触发生成IPoE会话的功能,才能使IP报文来触发静态个人会话发起认证。

对于IPv4静态个人会话,如需通过ARP报文触发用户上线,则需要开启静态个人接入用户通过ARP报文触发上线功能,此时,当设备收到的ARP报文与手工配置的IPoE会话匹配后才会触发认证。

关闭静态个人接入用户通过ARP报文触发上线功能时,接口上已由ARP报文触发上线的IPv4静态个人会话将仍保持其在线状态。

2. 配置限制和指导

开启静态个人接入用户通过ARP报文触发上线功能时,请确保给静态个人接入用户分配的网关地址是用户接入接口的IP地址或DHCP地址池中通过命令gateway-list export-route指定的网关地址,否则即使该用户的ARP报文与手工配置的IPoE会话匹配也无法触发认证。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPv4静态个人会话的触发方式。请至少选择其中一项进行配置。

¡     开启未知源IP报文触发生成IPoE会话功能。

ip subscriber initiator unclassified-ip enable [ matching-user ]

缺省情况下,未知源IP报文触发生成IPoE会话功能处于关闭状态。

¡     开启ARP报文触发用户上线功能。

ip subscriber initiator arp enable

缺省情况下,ARP报文触发用户上线功能处于关闭状态。

(4)     配置IPv6静态个人会话的触发方式。

ip subscriber initiator unclassified-ipv6 enable [ matching-user ]

缺省情况下,IPv6未知源IP报文触发生成IPoE会话功能处于关闭状态。

1.10.3  配置静态个人会话

1. 功能简介

管理员手工输入静态个人会话所需的信息(用户IP地址、MAC地址、用户报文的内/外层VLAN)后,接入设备根据这些信息生成对应的静态个人会话。当接口上有与手工配置的静态个人会话相匹配的IP或ARP报文通过时,将触发认证过程。认证成功后,设备对静态个人接入用户下发用户策略,允许该用户报文通过接口并对该用户的流量进行计费。

静态个人会话可在接口上配置,也可以全局配置。当静态个人用户上线时,如果用户报文可同时匹配全局静态个人会话和接口静态个人会话,则优先使用接口静态个人会话上线。

2. 配置限制和指导

同一接口下任意IP地址的静态个人会话最多只能存在一条。

系统视图下,任意IP地址的全局静态个人会话最多只能存在一条。

3. 配置接口静态个人会话

(1)     进入系统视图。

system-view

(2)     (可选)配置设备发送静态个人接入用户上线请求的时间间隔。

ip subscriber static-session request-oneline interval seconds

缺省情况下,设备发送静态个人接入用户上线请求的时间间隔为180秒。

(3)     进入接口视图。

interface interface-type interface-number

(4)     配置IPv4静态个人会话。

ip subscriber session static ip start-ipv4-address [ end-ipv4-address ] [ vlan vlan-id [ second-vlan vlan-id ] ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ request-online ] [ description string ] [ gateway ip ipv4-address ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置IPv4静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

(5)     配置IPv6静态个人会话。

ip subscriber session static ipv6 start-ipv6-address [ end-ipv6-address ] [ vlan vlan-id [ second-vlan vlan-id ] ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ request-online ] [ description string ] [ gateway ipv6 ipv6-address ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置IPv6静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

(6)     配置双栈静态个人会话。

ip subscriber session static ip start-ipv4-address [ end-ipv4-address ] ipv6 start-ipv6-address [ end-ipv6-address ] [ vlan vlan-id [ second-vlan vlan-id ] ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ request-online { ip | ipv6 } ] [ description string ] [ gateway { ip ipv4-address | ipv6 ipv6-address } * ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置双栈静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

4. 配置全局静态个人会话

(1)     进入系统视图。

system-view

(2)     配置IPv4静态个人会话。

ip subscriber session static ip start-ipv4-address [ end-ipv4-address ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ interface interface-type interface-number [ vlan vlan-id [ second-vlan vlan-id ] ] [ request-online ] ] [ description string ] [ gateway ip ipv4-address ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置IPv4静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

(3)     配置IPv6静态个人会话。

ip subscriber session static ipv6 start-ipv6-address [ end-ipv6-address ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ interface interface-type interface-number [ vlan vlan-id [ second-vlan vlan-id ] ] [ request-online ] ] [ description string ] [ gateway ipv6 ipv6-address ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置IPv6静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

(4)     配置双栈静态个人会话。

ip subscriber session static ip start-ipv4-address [ end-ipv4-address ] ipv6 start-ipv6-address [ end-ipv6-address ] [ mac mac-address ] [ domain domain-name ] [ password mac ] [ interface interface-type interface-number [ vlan vlan-id [ second-vlan vlan-id ] ] [ request-online { ip | ipv6 } ] ] [ description string ] [ gateway { ip ipv4-address | ipv6 ipv6-address } * ] [ vpn-instance vpn-instance-name ] [ keep-online ]

缺省情况下,未配置双栈静态个人会话。

本命令中的vlansecond-vlan参数仅子接口支持,非子接口不支持。

(5)     (可选)配置设备发送静态个人接入用户上线请求的时间间隔。

ip subscriber static-session request-oneline interval seconds

缺省情况下,设备发送静态个人接入用户上线请求的时间间隔为180秒。

1.10.4  配置静态个人接入用户的认证用户名的命名规则

1. 功能简介

通过该配置可以指定静态个人接入用户认证使用的用户名的命名规则,并且根据该命名规则获取的用户名必须与认证服务器配置的用户名保持一致,用户才可以认证通过。

绑定认证方式下,静态个人接入用户按如下先后顺序选择认证用户名:

(1)     使用ip subscriber unclassified-ip username获取到的用户名作为认证用户名。

(2)     使用ip subscriber username命令配置的用户名作为认证用户名。

(3)     使用报文的源IP地址作为认证用户名。

Web认证方式和Web MAC认证方式下,在认证前域阶段,静态个人接入用户按如下先后顺序选择认证用户名:

(1)     使用ip subscriber unclassified-ip username获取到的用户名作为认证用户名。

(2)     使用ip subscriber username命令配置的用户名作为认证用户名。

(3)     使用报文的源IP地址作为认证用户名。

Web认证方式下,在Web认证阶段,静态个人接入用户按如下先后顺序选择认证用户名:

(1)     使用用户登录时输入的用户名作为认证用户名。

(2)     使用ip subscriber username命令配置的用户名作为认证用户名。

(3)     使用报文的源IP地址作为认证用户名。

Web MAC认证方式下,在Web认证阶段,静态个人接入用户按如下先后顺序选择认证用户名:

(1)     使用ip subscriber username命令配置的用户名作为认证用户名

(2)     使用报文的源IP地址作为认证用户名。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置未知源IP接入用户的认证用户名。

ip subscriber unclassified-ip username include { nas-port-id [ separator separator ] | port [ separator separator ] | second-vlan [ separator separator ] | slot [ separator separator ] | source-ip [ address-separator address-separator ] [ separator separator ] | source-mac [address-separator address-separator ] [ separator separator ] | string string [ separator separator ] | subslot [ separator separator ] | sysname [ separator separator ] | vlan [ separator separator ] } *

缺省情况下,未知源IP接入用户采用用户报文的源IP地址作为认证用户名。

1.10.5  配置静态个人接入用户的认证密码

1. 功能简介

静态个人接入用户使用接口上配置的IPoE个人接入用户的认证密码进行认证。通过该配置指定的密码必须与认证服务器配置的密码保持一致,用户才可以认证通过。

绑定认证方式下,静态个人接入用户按如下先后顺序选择认证密码:

(1)     ip subscriber session static命令中指定password mac时,使用用户MAC地址作为认证密码。

(2)     使用ip subscriber password命令配置的密码作为认证密码。

(3)     使用字符串“vlan”作为认证密码。

Web认证方式和Web MAC认证方式下,在认证前域阶段,静态个人接入用户按如下先后顺序选择认证密码:

(1)     ip subscriber session static命令中指定password mac时,使用用户MAC地址作为认证密码。

(2)     使用ip subscriber password命令配置的密码作为认证密码。

(3)     使用字符串“vlan”作为认证密码。

Web认证方式下,在Web认证阶段,静态个人接入用户按如下先后顺序选择认证密码:

(1)     使用用户登录时输入的密码作为认证密码。

(2)     使用ip subscriber password命令配置的密码作为认证密码。

(3)     使用字符串“vlan”作为认证密码。

Web MAC认证方式下,在Web认证阶段,静态个人接入用户按如下先后顺序选择认证密码:

(1)     使用ip subscriber password命令配置的密码作为认证密码。

(2)     使用字符串“vlan”作为认证密码。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE个人接入用户的认证密码。

ip subscriber password { ciphertext | plaintext } string

缺省情况下,IPoE个人接入用户的认证密码为字符串vlan。

1.10.6  配置静态个人接入用户使用的认证域

1. 功能简介

绑定认证方式下,静态个人接入用户将按照接口上的配置选择认证域,认证域优先级顺序从高到低依次为:静态IPoE会话中指定的认证域 > 报文业务识别方式映射的认证域 > 未知源IP用户使用的认证域 >缺省认证域。其中,关于报文业务识别方式映射的认证域的具体配置,请参见“1.15  配置报文业务识别方式以及与认证域的映射关系”。关于缺省认证域的相关介绍及具体配置请参见“BRAS业务配置指导”中的“AAA”。

Web认证方式下,认证域的选择原则请参见“1.12.2  配置Web个人接入用户的认证域”。

2. 配置限制和指导

为使得用户认证成功,必须保证按照认证域优先顺序选择出的认证域在接入设备上存在且配置完整。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置未知源IP用户使用的认证域。

ip subscriber unclassified-ip domain domain-name

缺省情况下,未知源IP用户的认证域为缺省认证域。

1.11  配置IPoE专线接入用户

1.11.1  IPoE专线接入用户配置任务简介

IPoE专线接入用户配置任务如下:

(1)     配置IPoE专线接入用户

请选择以下一项任务进行配置:

¡     配置接口专线用户

¡     配置子网专线用户

¡     配置L2VPN专线用户

(2)     (可选)配置专线接入用户的认证域

1.11.2  配置接口专线用户

1. 功能简介

一个IPoE接口专线代表了该接口接入的所有IP用户,接口专线上接入的所有用户统一认证、计费授权。当专线用户在二层接入模式时,从IPoE接口接入的所有IP用户统称为子用户。通过相应的displayreset命令查看或删除指定子用户的信息。有关查看和删除指定子用户信息命令的详细介绍请参见命令手册。

2. 配置限制和指导

每个接口上只能配置一个接口专线用户。

目前,接口专线的子用户支持通过DHCP报文、未知源IP报文和IPv6 ND RS报文触发上线。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置接口专线用户。

ip subscriber interface-leased username name password { ciphertext | plaintext } string [ domain domain-name ]

缺省情况下,未配置接口专线用户。

1.11.3  配置子网专线用户

1. 功能简介

一个IPoE接口子网专线代表了该接口上指定子网的所有IP用户,接口子网专线上接入的所有用户统一认证、计费授权。当子网专线用户在二层接入模式时,从IPoE接口接入的指定子网的所有IP用户统称为子用户。通过相应的displayreset命令可查看或删除指定子用户的信息。有关查看和删除指定子用户信息命令的详细介绍请参见命令手册。

2. 配置限制和指导

一个接口上可以配置多个子网专线用户,但必须保证每个子网的掩码长度一致。每个子网只能配置一个子网专线用户。

目前,子网专线的子用户仅支持通过未知源IP报文触发上线。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPv4子网专线用户。

ip subscriber subnet-leased ip ip-address { mask | mask-length } username name password { ciphertext | plaintext } string [ domain domain-name ]

缺省情况下,未配置IPv4子网专线用户。

(4)     配置IPv6子网专线用户。

ip subscriber subnet-leased ipv6 ipv6-address prefix-length username name password { ciphertext | plaintext } string [ domain domain-name ]

缺省情况下,未配置IPv6子网专线用户。

1.11.4  配置L2VPN专线用户

1. 功能简介

在L2VPN组网下,一个IPoE L2VPN专线用户代表了该接口接入的所有用户,接口上接入的所有用户统一认证、授权和计费。该IPoE专线用户认证成功后,接口上接入的所有L2VPN专线用户流量均允许通过,且共享一个IPoE会话,并基于接口进行授权和计费。

2. 配置限制和指导

每个接口上只能配置一个L2VPN线用户,该用户对接口上的所有IPv4和IPv6流量进行统一处理。

同一三层以太网子接口下,L2VPN专线用户和以太网子接口/三层聚合子接口的报文统计功能互斥,二者只能配置其一。有关以太网子接口的报文统计功能的详细介绍,请参见“接口管理配置指导”中的“以太网接口”。有关三层聚合子接口的报文统计功能的详细介绍,请参见“二层技术-以太网交换配置指导”中的“以太网链路聚合”。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置L2VPN专线用户。

ip subscriber l2vpn-leased username name password { ciphertext | plaintext } string [ domain domain-name ]

缺省情况下,未配置L2VPN专线用户。

1.11.5  配置专线接入用户的认证域

1. 功能简介

IPoE专线接入用户将按照接口上的配置选择认证域,认证域优先级顺序从高到低依次为:IPoE子网/接口专线用户配置中指定的认证域 > 未知源IP用户使用的认证域 > 系统缺省的认证域。IPoE L2VPN专线用户配置中指定的认证域 > 系统缺省的认证域。关于缺省认证域的相关介绍及具体配置请参见“BRAS业务配置指导”中的“AAA”。

2. 配置限制和指导

为使得用户认证成功,必须保证按照认证域优先顺序选择出的认证域在接入设备上存在且配置完整。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置未知源IP用户使用的认证域。

ip subscriber unclassified-ip domain domain-name

缺省情况下,未知源IP用户的认证域为缺省认证域。

1.12  配置IPoE Web认证接入用户

1.12.1  IPoE Web认证接入用户配置任务简介

本节中的所有配置均为可选,请根据实际情况选择配置。

·     配置Web个人接入用户的认证域

·     配置HTTP报文的快速应答功能

·     配置HTTPS重定向的SSL服务器端策略

·     配置Web认证的重定向功能

·     配置Web认证的被动认证功能

·     配置Web认证的逃生功能

·     配置动态个人接入用户的认证用户名的命名规则

·     配置动态个人接入用户的认证密码

·     配置动态个人会话的最大数目

·     配置DHCP个人接入用户的信任Option

·     配置允许DHCP个人接入用户异常下线后通过报文重新触发上线

·     配置允许动态个人接入用户采用松散模式上线

1.12.2  配置Web个人接入用户的认证域

1. 功能简介

Web认证包含认证前域认证和Web认证两个阶段。用户必须先通过认证前域的认证,才能进入Web认证阶段。通过认证前域认证的用户可以获得IP地址(对于DHCP接入用户),以及被授予指定认证前域内配置的相关授权属性(例如:User Profile、Session Group Profile、CAR、URL和User group),并根据授权信息获得相应的网络访问权限。之后,如有HTTP/HTTPS报文触发Web认证,则进入Web认证阶段。

用户可以通过配置修改在认证前域阶段所采用的认证域,缺省情况下按照如下先后顺序选择认证前域:

·     对于IPoE静态个人接入用户:

a.     使用ip subscriber session static命令中配置的认证域。

b.     使用ip subscriber pre-auth domain命令配置的Web认证前域。

c.     报文业务识别方式映射的认证域。

d.     ip subscriber unclassified-ip domain命令中配置的认证域。

e.     系统缺省的认证域。

·     对于IPoE DHCP动态个人接入用户:

a.     报文业务识别方式映射的认证域。

b.     使用ip subscriber pre-auth domain命令配置的Web认证前域。

c.     系统缺省的认证域。

采用Web认证方式时,如果配置了多种认证域,在Web认证阶段,接入用户按如下先后顺序选择认证域:

(1)     用户登录时用户名中携带的ISP域。

(2)     使用ip subscriber web-auth domain命令配置的Web认证域。

(3)     使用系统缺省的ISP域。

采用Web MAC认证方式时,如果配置了多种认证域,在Web认证阶段,接入用户按如下先后顺序选择认证域:

(1)     使用用户登录时用户名中携带的ISP域。

(2)     使用ip subscriber mac-auth domain命令配置的MAC认证域。

(3)     使用ip subscriber web-auth domain命令配置的Web认证域。

(4)     使用系统缺省的ISP域。

2. 配置限制和指导

为确保接入用户在认证前域阶段可以正常进行认证,不允许通过ip subscriber trust命令配置信任DHCPv4为Option 60,DHCPv6为Option 16和Option 17。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置Web认证前域。

ip subscriber pre-auth domain domain-name

缺省情况下,未配置Web认证前域。

(4)     配置MAC认证域。

ip subscriber mac-auth domain domain-name

缺省情况下,未配置MAC认证域。

MAC认证域仅适用于采用Web MAC认证方式的DHCP个人接入用户和静态个人接入用户,在Web认证阶段进行MAC无感知认证时使用。

(5)     配置Web认证域。

ip subscriber web-auth domain domain-name

缺省情况下,未配置Web认证域。

Web认证域仅适用于采用Web认证方式和Web MAC认证方式的DHCP个人接入用户和静态个人接入用户,在Web认证阶段使用。

1.12.3  配置HTTP报文的快速应答功能

1. 功能简介

缺省情况下,当用户使用浏览器进行Web认证时,如果访问的不是Portal Web服务器,接入设备会将此HTTP请求重定向到CPU,由CPU推送Portal Web服务器的Web认证页面。如果攻击者向设备发送大量的HTTP请求报文,会对设备造成拒绝服务攻击。

开启HTTP报文的快速应答功能后,设备可以通过硬件识别HTTP请求报文并自动回复HTTP应答报文,从而减轻CPU的负担,避免成为拒绝服务攻击的目标。

2. 配置限制和指导

目前仅CSPEX类单板(除CSPEX-1204之外)支持本功能。

对于在开启快速应答功能前已经通过认证前域认证上线的用户,本功能开启后不立即生效,当该用户下线后再次通过认证前域上线或者该用户Web上线后再次回到认证前域时本功能才生效。

在同时配置本功能和无感知认证功能的情况下,当用户上线时先尝试按无感知认证方式接入,如果无法无感知(例如:无感知绑定查询请求超时或Portal返回的查询结果是用户未绑定),则由硬件应答推送Web认证页面。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启HTTP报文的快速应答功能。

ip subscriber http-fast-reply enable

缺省情况下,HTTP报文的快速应答功能处于关闭状态。

1.12.4  配置HTTPS重定向的SSL服务器端策略

1. 功能简介

DHCP个人接入用户通过HTTPS报文触发Web认证时,如果用户不使用默认SSL服务器端策略,而是希望使用自定义的SSL服务器端策略保证HTTPS的交互过程,可以进行以下配置。

2. 配置步骤

(1)     配置PKI策略,并成功申请或导入本地证书和CA证书,具体配置请参见“安全配置指导”中的“PKI”。

(2)     配置自定义名称为https_redirect的SSL服务器端策略,并指定使用已配置的PKI域。为避免在用户浏览器和设备建立SSL连接过程中用户浏览器出现“使用的证书不安全”的告警,需在设备上安装用户浏览器信任的证书。具体配置请参见“安全配置指导”中的“SSL”。

1.12.5  配置Web认证的重定向功能

1. 功能简介

根据访问的URL或者用户终端信息的不同,推送不同的认证页面。

重定向URL匹配规则用于控制重定向用户的HTTP或HTTPS请求,该匹配规则可匹配用户的Web请求地址或者用户的终端信息。

为了让用户能够成功访问重定向后的地址,需要通过认证前域用户组ACL配置Permit规则,放行去往该地址的HTTP或HTTPS请求报文。

与ISP域下web-server url命令不同的是,重定向匹配规则可以灵活的进行地址的重定向,而ISP域下web-server url命令一般只用于将用户的HTTP或HTTPS请求重定向到Web服务器进行Web认证。在二者同时存在时,优先使用重定向URL匹配规则进行地址的重定向。

2. 配置步骤

(1)     配置ACL规则,放行去往重定向地址的HTTP或HTTPS请求报文。

ACL配置具体参见“ACL和QoS配置指导”中的“ACL”。

(2)     请依次执行以下命令配置重定向URL匹配规则。

a.     进入系统视图。

system-view

b.     进入接口视图。

interface interface-type interface-number

c.     配置重定向URL匹配规则。

ip subscriber if-match { original-url url-string redirect-url url-string [ url-param-encryption { aes | des } key { cipher | simple } string ] | user-agent user-agent redirect-url url-string }

缺省情况下,未配置IPoE Web重定向URL的匹配规则。

1.12.6  配置Web认证的被动认证功能

1. 功能简介

IOS系统或者部分Android系统的用户接入已开启IPoE Web认证的网络后,设备会主动向这类用户终端推送Web认证页面。开启IPoE被动Web认证功能后,仅在这类用户使用浏览器访问Internet时,设备才会为其推送Web认证页面。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启IPoE被动Web认证功能。

ip subscriber captive-bypass enable [ android | ios ] [ optimize ]

缺省情况下,IPoE被动Web认证功能处于关闭状态。

多次执行本命令,最后一次执行的命令生效。

1.12.7  配置Web认证的逃生功能

1. 功能简介

Web认证的逃生功能是指当设备探测到Web认证服务器或AAA认证服务器不可达时,可自动打开接口上的网络限制,允许用户不需经过Web认证即可访问网络资源。通过配置逃生用户组与Track项关联,可以实现IPoE用户逃生功能。

缺省情况下,Web认证用户在认证前域上线后所属用户组是用户上线时由AAA服务器直接授权或ISP域下授权的用户组。配置逃生用户组与Track项关联后:

·     当Track项状态变成negative时,接入设备会把当前认证前域中所有在线用户从授权用户组迁移到逃生用户组,允许认证前域用户不经过Web认证即可访问逃生用户组的网络资源,已通过认证的用户不受影响;

·     当Track项变成positive时,接入设备会把当前认证前域中所有在线用户从逃生用户组重新迁移到授权用户组,再重新启动认证前域用户的认证功能,认证前域用户需要通过认证之后才能继续访问网络资源,已通过认证的用户不受影响。

2. 配置限制和指导

本功能仅对认证前域中的在线用户生效。

3. 配置步骤

配置Web认证的逃生功能需要进行如下配置:

(1)     配置Track项。

Track监测认证服务器状态的支持NQA,BFD等多种方式,具体配置请参见“可靠性配置指导”中的“Track”。

(2)     配置逃生用户组权限。

用户组具体配置请参见“BRAS业务配置指导”中的“AAA”。

(3)     请依次执行以下命令配置逃生用户组与Track项关联。

a.     进入系统视图。

system-view

b.     进入接口视图。

interface interface-type interface-number

c.     配置逃生用户组与Track项关联。

ip subscriber pre-auth track track-entry-number fail-permit user-group group-name

缺省情况下,未配置逃生用户组与Track项关联。

多次执行本命令,最后一次执行的命令生效。

1.13  配置IPoE Web的快速认证功能

1.13.1  配置限制和指导

目前仅IPoE Web认证支持快速认证功能。

在使用H3C iMC作为Portal认证服务器的情况下,如果Portal服务器上指定的设备IP不是BRAS设备上Portal报文出接口的IP地址,则在用户接入接口上必须通过portal bas-ip命令配置BAS-IP与Portal认证服务器上指定的设备IP一致,否则快速认证功能不生效。有关portal bas-ip命令的详细介绍,请参见“BRAS业务命令参考”中的“Portal”。

1.13.2  配置MAC Trigger无感知认证

1. 配置MAC绑定服务器

MAC绑定服务器的具体配置请参见“BRAS业务配置指导”中的“Portal”。

2. 在接口上应用MAC绑定服务器

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置在IPoE Web认证用户接入接口上应用MAC绑定服务器。

portal apply mac-trigger-server server-name

缺省情况下,未在IPoE Web认证用户接入接口上应用MAC绑定服务器。

本命令的详细介绍请参见“BRAS业务命令参考”中的“Portal”。

1.13.3  配置MAC无感知认证

1. 配置限制和指导

Web MAC认证使用的AAA服务器需要支持MAC绑定功能。

2. 在IPoE采用Web MAC认证方式

具体配置请参见“1.8  置IPoE认证方式”。

1.14  配置IPoE个人会话和专线子用户会话的最大总数目

1. 功能简介

通过配置IPoE个人会话和专线子用户会话的最大总数目可以控制系统中的个人接入用户(包括动态个人和静态个人)和专线子用户的总数。

2. 配置限制和指导

当接口上已创建的IPoE个人会话和专线子用户会话的总数目达到最大值后,则不允许再创建新的IPoE会话。创建的IPoE会话数目包括IPv4单栈会话数目、IPv6单栈会话数目和双栈会话数目,其中,单栈用户占用一个会话资源,双栈用户占用一个会话资源;如果某单栈用户已经成功上线,那么同一用户的另一协议栈可以直接上线,双栈共用一个会话资源。

如果接口上配置的最大会话数小于当前接口上已经在线的会话数,则该配置可以执行成功,且在线的会话不会受影响,但系统将不允许在该接口上再创建新的会话。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE个人会话和专线子用户会话的最大总数目。

ip subscriber max-session max-number

缺省情况下,未配置接口上允许创建的IPoE个人会话和专线子用户会话的最大总数目。

本命令与ip subscriber { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 } max-session同时配置时,两者可以同时生效,由于控制的角度不同,因此会话数会收到双重限制,即仅在两者均未达到最大会话数限制时才允许创建新的会话。有关ip subscriber { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 } max-session命令的相关介绍,请参见“1.9.6  配置动态个人会话的最大数目”。

1.15  配置报文业务识别方式以及与认证域的映射关系

1. 功能简介

不同的IP报文携带了不同的报文信息,可以通过配置业务识别方式,根据用户IP报文的内/外层VLAN ID值、内/外层VLAN携带的802.1p值、DSCP值,来决定对该用户使用不同的认证域。

2. 配置限制和指导

对于DHCPv4接入用户,如果同时配置了信任DHCPv4 Option 60中的信息,则优先使用Option 60中的信息作为指定的认证域。

对于DHCPv6接入用户,如果同时配置了信任DHCPv6 Option 16/Option 17中的信息,则优先使用Option 16/Option 17中的信息作为指定的认证域。

如果配置了某种业务识别方式所映射的认证域,但是没有配置使用该业务识别方式,则前者不生效。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE接入用户的业务识别方式。

ip subscriber service-identify { 8021p { second-vlan | vlan } | dscp | second-vlan | vlan }

本命令中的8021pvlansecond-vlan参数仅子接口支持,非子接口不支持。

(4)     配置IPoE接入用户的IP报文内/外层VLAN值与认证域的映射关系。

ip subscriber vlan vlan-list domain domain-name

本命令仅子接口支持,非子接口不支持。

(5)     配置IPoE接入用户的IP报文内/外层VLAN tag中802.1p值与认证域的映射关系。

ip subscriber 8021p 8021p-list domain domain-name

本命令仅子接口支持,非子接口不支持。

(6)     配置IPoE接入用户的IP报文DSCP值与认证域的映射关系。

ip subscriber dscp dscp-value-list domain domain-name

缺省情况下,未配置IPoE接入用户(包括DHCP接入用户、未知源IP接入用户和静态个人接入用户)使用的业务识别方式,也没有配置与之相映射的认证域。

1.16  配置IPoE接入用户的静默功能

1. 功能简介

配置IPoE接入用户的静默功能后,当某IPoE用户在指定检测周期内连续认证失败次数达到允许的最大值时,将被静默一段时间,在静默周期内设备直接丢弃来自此用户的报文,以降低非法用户使用穷举法试探合法用户密码的成功率,同时避免设备持续向认证服务器转发该IPoE用户的认证报文而对设备性能造成影响。静默期后,如果设备再次收到该用户的报文,则依然可以对其进行认证处理。

2. 配置限制和指导

对于未构成双栈IPoE会话的用户,两个协议栈的认证失败次数是分开统计,当且仅当某个协议栈在一个检测周期内连续认证失败次数达到最大值时,该双栈用户才会被静默。对于已构成双栈IPoE会话的用户,两个协议栈的认证失败次数是统一统计,只要该用户在一个检测周期内连续认证失败次数达到最大值,该用户就会被静默。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启IPoE接入用户的静默功能并指定静默时间。

ip subscriber timer quiet time

缺省情况下,IPoE接入用户的静默时间功能处于关闭状态。

(4)     (可选)配置允许IPoE接入用户在指定检测周期内连续认证失败次数的最大值。

ip subscriber authentication chasten auth-failure auth-period

缺省情况下,认证失败一次立即对用户进行静默处理。

1.17  配置IPoE接入用户在线探测功能

1. 功能简介

接口上开启了IPoE接入用户在线探测功能后,设备在用户上线之后将定时发送探测报文,如果设备在探测间隔内未收到用户的报文,则认为一次探测失败。

若设备首次探测失败,将继续做指定次数(retries)的重复探测,若全部探测尝试都失败(即一直未收到该用户的报文),则认为此用户不在线,停止发送探测报文并删除用户。

若设备在探测过程中收到用户的报文,则认为用户在线,重置探测定时器并开始下一次探测。

设备支持的IPv4探测报文为ARP请求报文和ICMP请求报文,支持的IPv6探测报文为ND协议中的NS报文和ICMPv6请求报文。

2. 配置限制和指导

本探测功能当前仅支持对个人接入用户和二层接入模式下的专线子用户进行探测。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     开启IPv4接入用户在线探测功能。

ip subscriber user-detect ip { arp | icmp } retry retries interval interval

缺省情况下,使用ARP请求报文对IPv4接入用户进行在线探测,探测失败后允许重复尝试5次,探测的时间间隔为120秒。

(4)     开启IPv6接入用户在线探测功能。

ip subscriber user-detect ipv6 { icmp | nd } retry retries interval interval

缺省情况下,使用ND协议中的NS报文对IPv6接入用户进行在线探测,探测失败后允许重复尝试5次,探测的时间间隔为120秒。

1.18  配置接口的IPoE接入端口类型

1. 功能简介

配置的接入端口类型值将作为接入设备向RADIUS服务器发送的RADIUS请求报文的NAS-Port-Type属性值,用于向RADIUS服务器正确传递IPoE接入用户的接入端口信息。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE接入端口类型。

ip subscriber nas-port-type { 802.11 | adsl-cap | adsl-dmt | async | cable | ethernet | g.3-fax | hdlc | idsl | isdn-async-v110 | isdn-async-v120 | isdn-sync | piafs | sdsl | sync | virtual | wireless-other | x.25 | x.75 | xdsl }

缺省情况下,IPoE接入端口类型为Ethernet类型。

1.19  配置IPoE接入用户的NAS-PORT-ID属性封装

1. 功能简介

IPoE用户进行认证时,需要按照运营商要求的封装格式向RADIUS服务器传递NAS-PORT-ID属性,该属性标识了用户所处的物理位置。

NAS-PORT-ID属性支持如下几种封装格式:

·     version 1.0:发送给RADIUS服务器的NAS-PORT-ID属性以电信163大后台要求的格式填充。

·     version 2.0:发送给RADIUS服务器的NAS-PORT-ID属性以YDT 2275-2011宽带接入用户线路(端口)标识要求的格式填充。

·     version3.0:封装格式为version 3.0。version 3.0封装格式的内容形式为:SlotID/00/IfNO/VlanID,其中“/”符号不显示。

·     version4.0:封装格式为version 4.0。其格式为在version3.0的NAS-PORT-ID内容后面添加用户DHCP报文中指定Option的内容:对于IPv4用户,此处添加的是DHCP Option82的内容,即格式为SlotID/00/IfNO/VlanID/Option82,其中“/”符号不显示;对于IPv6用户,此处添加的是DHCP Option18的内容,即格式为SlotID/00/IfNO/VlanID/Option18,其中“/”符号不显示。

在DHCP中继组网环境中,当接入设备采用version 2.0格式封装RADIUS NAS-PORT-ID属性时,可以配置信任DHCPv4 报文中的Option82或DHCPv6报文中的Option18,并在提取出的Option82 或Option18的Circuit-ID子选项中插入NAS信息后,使用该子选项内容填充NAS-PORT-ID属性。插入的新NAS信息标识了用户在本设备上的接入位置。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     为IPoE接入用户配置NAS-PORT-ID属性的封装格式。

ip subscriber nas-port-id format cn-telecom { version1.0 | version2.0 | version3.0 | version4.0 }

缺省情况下,按version 1.0格式填充RADIUS的NAS-PORT-ID属性。

(4)     (可选)配置信任DHCPv4报文中的Option 82或DHCPv6报文中的Option 18。

ip subscriber trust { option82 | option18 }

缺省情况下,不信任DHCPv4报文中的Option 82和DHCPv6报文中的Option 18。

(5)     (可选)配置在提取出的Option 82 Circuit-ID子选项或Option 18内容中插入NAS信息,并使用插入NAS信息后的内容作为NAS-PORT-ID属性。

ip subscriber nas-port-id nasinfo-insert

缺省情况下,如果收到的DHCPv4报文带有Option 82 Circuit-ID子选项,则直接使用该子选项内容作为NAS-PORT-ID属性内容。如果收到的DHCPv6报文带有Option 18,则直接使用该选项内容作为发往RADIUS服务器的NAS-PORT-ID属性内容。

1.20  配置IPoE接入用户的NAS-PORT-ID精绑

1. 功能简介

缺省情况下,设备使用用户上线的接口信息填充NAS-PORT-ID属性上送RADIUS服务器。在某些特殊应用中,当需要手工指定用于填充NAS-PORT-ID属性的上线接口信息时,可配置本特性。例如,若RADIUS服务器上限制了用户A只能通过接口A上线,当用户A切换到一个新接口B上线时,若不想更改RADIUS服务器的配置,可通过本特性配置用户A仍使用接口A的信息填充NAS-PORT-ID属性上送RADIUS服务器。

当NAS-PORT-ID属性的封装格式为version 1.0格式时,若配置本特性,将使用本特性的配置填充NAS-PORT-ID属性中的如下接入接口信息字段:chassis=NAS_chassis;slot=NAS_slot;subslot=NAS_subslot;port=NAS_port。

当NAS-PORT-ID属性的封装格式为version 2.0格式时,若配置本特性,将使用本特性的配置填充NAS-PORT-ID属性中的如下NAS信息字段:{eth|trunk|atm} NAS_chassis/NAS_slot/NAS_subslot/NAS_port。

当NAS-PORT-ID属性的封装格式为version 3.0格式时,若配置本特性,将使用本特性的配置填充NAS-PORT-ID属性中的如下NAS信息字段:SlotID/IfNO。

当NAS-PORT-ID属性的封装格式为version 4.0格式时,若配置本特性,将使用本特性的配置填充NAS-PORT-ID属性中的如下NAS信息字段:对于IPv4用户为SlotID/IfNO/Option82,对于IPv6为SlotID/IfNO/Option18。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     使用指定接口信息填充RADIUS的NAS-PORT-ID属性。

ip subscriber nas-port-id interface interface-type interface-number

缺省情况下,设备使用用户上线的接口信息填充RADIUS的NAS-PORT-ID属性。

1.21  配置IPoE准出认证功能

1. 功能简介

本配置用来设置IPoE的准出认证功能,在二次认证组网环境下需要配置本功能。二次认证是指使用两台设备分别作为准入和准出的网关,用于控制用户访问内网和外网,准入设备负责用户接入内网,准出设备负责用户接入外网。用户通过准入认证后,可以访问内网,在访问外网时,报文在准出设备网关触发IPoE认证,认证通过后将用户放行,认证过程中用户不感知。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE准出认证功能。

ip subscriber access-out

缺省情况下,IPoE准出认证功能处于关闭状态。

1.22  配置IPoE会话的流量统计信息的更新时间间隔

1. 功能简介

本配置用来设置设备每次更新IPoE会话的流量统计信息的时间间隔。

2. 配置限制和指导

在对IPoE接入用户的流量统计精确度要求较高的环境中,可以配置相对较小的更新时间间隔,以提高设备对流量的统计频率;反之,则可以配置较大的更新时间间隔。

当网络中有大量用户上线时,如果为上线用户授权了idle-cut属性,为避免用户因闲置切断时间超时被下线,建议配置较小的更新时间间隔。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置IPoE会话的流量统计信息的更新时间间隔。

ip subscriber timer traffic value

缺省情况下,IPoE会话的流量统计信息的更新时间间隔为1000毫秒。

1.23  配置IPoE日志及业务维护功能

1.23.1  配置IPoE接入用户日志信息功能

1. 功能简介

IPoE接入用户日志是为了满足网络管理员维护的需要,对用户的上线成功、上线失败、正常下线和异常下线的信息进行记录,包括用户名、IP地址、接口名称、两层VLAN、MAC地址、上线失败原因、下线原因等。设备生成的IPoE日志信息会交给信息中心模块处理,信息中心模块的配置将决定日志信息的发送规则和发送方向。关于信息中心的详细描述请参见“网络管理和监控配置指导”中的“信息中心”。

2. 配置限制和指导

为了防止设备输出过多的IPoE日志信息,一般情况下建议不要开启此功能。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     开启IPoE接入用户日志信息功能。

ip subscriber access-user log enable [ successful-login | failed-login | logout [ normal ] [ abnormal ] ] *

缺省情况下,IPoE接入用户日志信息功能处于关闭状态。

1.23.2  配置业务跟踪对象功能

1. 功能简介

业务跟踪对象功能是为了满足网络管理员维护的需要,管理员通过创建业务追踪对象可以追踪接入用户的上下线相关信息,并且通过指定不同的匹配参数,可以实现对特定用户的追踪。

2. 配置限制和指导

开启本功能会时占用大量系统资源,建议仅在故障诊断时使用,一般情况下不要使用。

当配置输出信息到日志服务器时,请确保设备与指定的日志服务器之间路由可达并且日志服务器配置正确。

主备倒换后业务跟踪对象配置会自动失效,需要重新配置。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置业务跟踪对象功能。

trace access-user object object-id { access-mode ipoe | username user-name | interface interface-type interface-number | ip-address ip-address | mac-address mac-address | c-vlan vlan-id | s-vlan vlan-id | tunnel-id tunnel-id } * [ output { file file-name | syslog-server server-ip-address | vty } | aging time ] *

如果指定interface参数,当接入接口所在slot或subslot重启后,业务跟踪对象配置会自动失效,需要重新配置。

1.24  配置IPoE个人接入用户漫游功能

1. 功能简介

上线的IPoE个人接入用户支持在不同接口之间和子接口的不同VLAN之间进行漫游。

为了减小用户在漫游过程中对其它用户产生影响,可通过漫游组限定用户的漫游范围,即限定上线用户只能在上线接口所属的漫游组中进行漫游。例如:假设用户A和用户B的IP地址均为1.1.1.1/24,并且属于同一个VPN实例,用户A先在接口A上通过未知源方式上线,接口A和接口B均开启了漫游功能但未配置漫游组,此时用户B再在接口B上通过未知源方式上线时,设备将会把用户A下线。此时,如需用户A和用户B同时上线,二者互不影响,可为接口A和接口B配置不同的漫游组,以隔离用户A和用户B的漫游范围。

2. 配置限制和指导

为保证IPoE用户可以正常漫游,请确保漫游前后用户接入接口上必须开启完全相同协议栈的IPoE功能,并且配置相同的IPoE认证方式、认证域和漫游组。

目前常见的支持触发漫游的报文有:ARP报文、IPv4报文、IPv6报文、DHCPv4续约报文和DHCPv6续约报文(包括Renew报文和Rebind报文)等。

在漫游场景中,可能存在漫游用户在物理位置发送变化后发送DHCP-DISCOVER报文请求上线的情况,为使这类用户可以按DHCP触发方式重新上线,可配置dhcp session-mismatch action fast-renew命令。需要注意的是,如果攻击源伪造MAC地址信息发起DHCP-DISCOVER报文请求上线时,会导致正常在线用户掉线,可能存在安全隐患。请确保在当前网络不存在攻击的情况下才配置dhcp session-mismatch action fast-renew命令。有关该命令的详细介绍,请参见“BRAS业务命令参考”中的“DHCP”。

在IPv4网络中:

·     当需要通过IPv4报文触发漫游时,漫游的目的接口上必须配置ip subscriber initiator unclassified-ip enable matching-user命令。

·     当需要通过ARP报文触发漫游时,漫游的目的接口上必须同时配置ip subscriber initiator arp enable命令和ip subscriber initiator unclassified-ip enable matching-user命令。

在IPv4网络漫游中,建议同时配置上述两种触发方式。

在IPv6网络中,当需要通过IPv6报文触发漫游时,漫游的目的接口上必须配置ip subscriber initiator unclassified-ipv6 enable matching-user命令。

在DHCP中继组网环境下,需要在DHCP中继接口上通过dhcp select relay proxy命令配置DHCP中继支持代理功能。有关DHCP中继的相关介绍,请参见“BRAS业务配置指导”中的“DHCP”。

漫游过程中,以下变化会导致漫游失败,此时用户需在目的接口上重新认证上线:

·     若漫游过程中漫游用户IP地址发生变化,用户将无法继续漫游。

·     若漫游的目的接口上未配置和漫游前相同的IPoE会话触发方式,会导致用户无法漫游到该接口。例如:在接口A上通过DHCP触发方式上线的某用户漫游到接口B时,如果接口B上未配置DHCP触发方式则不允许用户漫游到接口B。

·     若漫游的目的接口和漫游前的上线接口不在同一个漫游组中,则会漫游失败。

·     针对动态个人接入用户:

¡     在为漫游用户授权VPN的情况下,如果漫游的目的接口绑定了VPN,则要求目的接口绑定的VPN必须和授权的VPN相同,否则不允许用户漫游到该目的接口。

¡     在未为漫游用户授权VPN的情况下,如果漫游前的接口绑定了VPN,则要求漫游的目的接口上必须绑定相同的VPN,否则不允许用户漫游到该目的接口。

·     针对全局静态个人接入用户:

¡     在为漫游用户授权VPN并且静态会话中未指定VPN参数的情况下,如果漫游的目的接口绑定了VPN,则要求目的接口绑定的VPN必须和授权的VPN相同,否则不允许用户漫游到该目的接口。

¡     在未为漫游用户授权VPN并且静态会话中未指定VPN参数的情况下,如果漫游前的接口绑定了VPN,则要求漫游的目的接口上必须绑定相同的VPN,否则不允许用户漫游到该目的接口。

对于IPoE静态个人接入用户,漫游功能的生效情况如下:

·     对于接口静态个人接入用户,仅当在子接口视图下通过ip subscriber session static命令配置静态IPoE会话时,在不指定VLAN的情况下才支持漫游功能,并且只能在在该子接口上的不同VLAN之间进行漫游。

·     对于全局静态个人接入用户,在系统视图下配置ip subscriber session static命令时:

¡     如果指定了用户接入接口但未指定VLAN时,支持在该接入接口上的不同VLAN之间进行漫游。

¡     如果未指定用户接入接口,用户在某接口上线时,如果该接口开启了漫游功能,则允许用户在所有开启本功能的接口之间进行漫游。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE个人接入用户漫游功能。

ip subscriber roaming enable [ roam-group roam-group-name ]

缺省情况下,IPoE个人接入用户漫游功能处于关闭状态。

1.25  配置IPoE用户接入响应延迟时间

1. 功能简介

配置IPoE用户接入响应延迟时间后,系统将按照配置的时间对IPoE用户的上线请求进行延迟响应。

可分别为奇数MAC和偶数MAC配置不同的响应延迟时间。

2. 配置限制和指导

本特性仅对接口上二层接入模式的IPoE用户生效,具体情况如下:

·     若接口上采用绑定认证方式,则本特性仅对IPoE个人接入用户和专线子用户生效。

·     若接口上采用Web认证方式:本特性仅对认证前域阶段的用户生效,对Web认证阶段的用户无影响。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

(3)     配置IPoE用户接入响应延迟时间。

ip subscriber access-delay delay-time [ even-mac | odd-mac ]

缺省情况下,对IPoE用户接入响应不延迟。

如果先配置了携带even-mac(或odd-mac)参数的本命令,再配置未携带任何参数的本命令,则后者会覆盖前者,反之亦然。

1.26  IPoE显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后IPoE的运行情况,通过查看显示信息验证配置的效果。

在用户视图下执行reset命令可以清除IPoE统计信息。

表1-1 IPoE显示和维护

操作

命令

显示异常下线DHCP接入用户的信息(独立运行模式)

display ip subscriber abnormal-logout [ interface interface-type interface-number ] [ { mac mac-address | ip-type ipv4 } * | ip ipv4-address ] [ verbose ] [ slot slot-number ]

显示异常下线DHCP接入用户的信息(IRF模式)

display ip subscriber abnormal-logout [ interface interface-type interface-number ] [ { mac mac-address | ip-type ipv4 } * | ip ipv4-address ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示被静默的IPoE个人接入用户信息(独立运行模式)

display ip subscriber chasten user quiet [ interface interface-type interface-number ] [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | user-type { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 | static } ] [ verbose ] [ slot slot-number ]

显示被静默的IPoE个人接入用户信息(IRF模式)

display ip subscriber chasten user quiet [ interface interface-type interface-number ] [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | user-type { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 | static } ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示有认证失败记录但尚未达到静默条件的IPoE个人接入用户信息(独立运行模式)

display ip subscriber chasten user auth-failed [ interface interface-type interface-number ] [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | user-type { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 | static } ] [ slot slot-number ]

显示有认证失败记录但尚未达到静默条件的IPoE个人接入用户信息(IRF模式)

display ip subscriber chasten user auth-failed [ interface interface-type interface-number ] [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | user-type { dhcp | dhcpv6 | ndrs | unclassified-ip | unclassified-ipv6 | static } ] [ chassis chassis-number slot slot-number ]

显示IPoE个人会话信息(独立运行模式)

display ip subscriber session [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ { { domain domain-name | mac mac-address | static | username name | auth-type { bind | web [ pre-auth | mac-auth | mac-trigger ] } } | ip-type { ipv4 | ipv6 | dual-stack } } * | { ip ipv4-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ] ] [ verbose ] [ slot slot-number ]

显示IPoE个人会话信息(IRF模式)

display ip subscriber session [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ { { domain domain-name | mac mac-address | static | username name | auth-type { bind | web [ pre-auth | mac-auth | mac-trigger ] } } | ip-type { ipv4 | ipv6 | dual-stack } } * | { ip ipv4-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ] ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示IPoE接口专线用户的会话信息(独立运行模式)

display ip subscriber interface-leased [ interface interface-type interface-number ] [ slot slot-number ]

显示IPoE接口专线用户的会话信息(IRF模式)

display ip subscriber interface-leased [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示IPoE接口专线子用户的会话信息(独立运行模式)

display ip subscriber interface-leased user [ interface interface-type interface-number [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ slot slot-number ]

显示IPoE接口专线子用户的会话信息(IRF模式)

display ip subscriber interface-leased user [ interface interface-type interface-number [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示指定IP协议类型的IPoE接口专线子用户的会话信息(独立运行模式)

display ip subscriber interface-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ slot slot-number ]

显示指定IP协议类型的IPoE接口专线子用户的会话信息(IRF模式)

display ip subscriber interface-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示IPoE L2VPN专线用户的会话信息(独立运行模式)

display ip subscriber l2vpn-leased [ interface interface-type interface-number ] [ slot slot-number ]

显示IPoE L2VPN专线用户的会话信息(IRF模式)

display ip subscriber l2vpn-leased [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示IPoE子网专线用户的会话信息(独立运行模式)

display ip subscriber subnet-leased [ interface interface-type interface-number ] [ ip ipv4-address mask-length | ipv6 ipv6-address prefix-length | ip-type { ipv4 | ipv6 } ] [ slot slot-number ]

显示IPoE子网专线用户的会话信息(IRF模式)

display ip subscriber subnet-leased [ interface interface-type interface-number ] [ ip ipv4-address mask-length | ipv6 ipv6-address prefix-length | ip-type { ipv4 | ipv6 } ] [ chassis chassis-number slot slot-number ]

显示IPoE子网专线子用户的会话信息(独立运行模式)

display ip subscriber subnet-leased user [ interface interface-type interface-number [ ip { ipv4-address mask-length | ipv4-address } | ipv6 { ipv6-address prefix-length | ipv6-address } | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ slot slot-number ]

显示IPoE子网专线子用户的会话信息(IRF模式)

display ip subscriber subnet-leased user [ interface interface-type interface-number [ ip { ipv4-address mask-length | ipv4-address } | ipv6 { ipv6-address prefix-length | ipv6-address } | s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示指定IP协议类型的IPoE子网专线子用户的会话信息(独立运行模式)

display ip subscriber subnet-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ slot slot-number ]

显示指定IP协议类型的IPoE子网专线子用户的会话信息(IRF模式)

display ip subscriber subnet-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ verbose ] [ chassis chassis-number slot slot-number ]

显示IPoE个人会话的统计信息(独立运行模式)

display ip subscriber session statistics [ bind [ session-type { dhcp | dhcpv6 | ndrs | static | unclassified-ip | unclassified-ipv6 } ] | web [ pre-auth | mac-auth | mac-trigger ] ] [ domain domain-name ] [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ slot slot-number ]

显示IPoE个人会话的统计信息(IRF模式)

display ip subscriber session statistics [ bind [ session-type { dhcp | dhcpv6 | ndrs | static | unclassified-ip | unclassified-ipv6 } ] | web [ pre-auth | mac-auth | mac-trigger ] ] [ domain domain-name ] [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ chassis chassis-number slot slot-number ]

显示指定IP协议类型的IPoE个人会话统计信息(独立运行模式)

display ip subscriber session statistics ip-type { ipv4 | ipv6 | dual-stack } [ bind | web [ pre-auth | mac-auth | mac-trigger ] ] [ domain domain-name ] [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ slot slot-number ]

显示指定IP协议类型的IPoE个人会话统计信息(IRF模式)

display ip subscriber session statistics ip-type { ipv4 | ipv6 | dual-stack } [ bind | web [ pre-auth | mac-auth | mac-trigger ] ] [ domain domain-name ] [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ chassis chassis-number slot slot-number ]

显示IPoE接口专线用户的会话统计信息(独立运行模式)

display ip subscriber interface-leased statistics  [ domain domain-name ][ interface interface-type interface-number ] [ slot slot-number ]

显示IPoE接口专线用户的会话统计信息(IRF模式)

display ip subscriber interface-leased statistics [ domain domain-name ] [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示IPoE L2VPN专线用户的会话统计信息(独立运行模式)

display ip subscriber l2vpn-leased statistics [ domain domain-name ] [ interface interface-type interface-number ] [ slot slot-number ]

显示IPoE L2VPN专线用户的会话统计信息(IRF模式)

display ip subscriber l2vpn-leased statistics [ domain domain-name ] [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示IPoE子网专线用户的会话统计信息(独立运行模式)

display ip subscriber subnet-leased statistics [ domain domain-name ] [ ip-type { ipv4 | ipv6 } ] [ interface interface-type interface-number ] [ slot slot-number ]

显示IPoE子网专线用户的会话统计信息(IRF模式)

display ip subscriber subnet-leased statistics [ domain domain-name ] [ ip-type { ipv4 | ipv6 } ] [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

显示IPoE用户会话下线原因的统计信息

display ip subscriber offline statistics [ bind | web [ pre-auth ] ] [ ip-type { ipv4 | ipv6 } ] [ interface interface-type interface-number ]

显示IPoE接入用户建立的TCP连接数信息

display ip subscriber tcp-connection interface interface-type interface-number session-id session-id

显示业务跟踪对象的配置信息

display trace access-user [ object object-id ]

清除异常下线DHCP接入用户的信息(独立运行模式)

reset ip subscriber abnormal-logout [ interface interface-type interface-number ] [ slot slot-number ]

清除异常下线DHCP接入用户的信息(IRF模式)

reset ip subscriber abnormal-logout [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

重置或删除IPoE接口专线用户的会话信息,强制用户下线

reset ip subscriber interface-leased [ interface interface-type interface-number ]

删除IPoE接口专线子用户的会话信息,强制用户下线

reset ip subscriber interface-leased user [ interface interface-type interface-number [ ip ipv4-address | ipv6 ipv6-address | mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ]

删除指定IP协议类型的IPoE接口专线子用户的会话信息,强制用户下线

reset ip subscriber interface-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ mac mac-address | s-vlan svlan-id [ c-vlan cvlan-id ] ] ]

重置或删除IPoE子网专线用户的会话信息,强制用户下线

reset ip subscriber subnet-leased [ interface interface-type interface-number ] [ ip ipv4-address mask-length | ipv6 ipv6-address prefix-length } | ip-type { ipv4 | ipv6 } ]

删除IPoE子网专线子用户的会话信息,强制用户下线

reset ip subscriber subnet-leased user [ interface interface-type interface-number [ ip { ipv4-address mask-length | ipv4-address } | ipv6 { ipv6-address prefix-length | ipv6-address } | s-vlan svlan-id [ c-vlan cvlan-id ] ] ]

删除指定IP协议类型的IPoE子网专线子用户的会话信息,强制用户下线

reset ip subscriber subnet-leased user ip-type { ipv4 | ipv6 } [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ]

删除IPoE动态个人会话、全局静态个人会话和重置IPoE接口静态个人会话,强制用户下线

reset ip subscriber session [ interface interface-type interface-number [ s-vlan svlan-id [ c-vlan cvlan-id ] ] ] [ { { domain domain-name | mac mac-address | username name } | ip-type { ipv4 | ipv6 | dual-stack } } * | { ip ipv4-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ] ]

清除IPoE用户会话下线原因统计信息

reset ip subscriber offline statistics [ ip-type { ipv4 | ipv6 } ] [ interface interface-type interface-number ]

 

1.27  IPoE典型配置举例

1.27.1  未知源IP报文触发IPoE接入配置举例

1. 组网需求

·     用户主机通过手工配置或DHCP获得IP地址,经由三层网络以IPoE方式接入到BRAS接入设备。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-8 未知源IP报文触发IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

2.2.2.2   Cleartext-Password :="radius"

以上信息表示:用户名为Host的IP地址2.2.2.2,用户密码为字符串radius。

(2)     配置Device

a.     配置各接口IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     配置IPoE

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并指定三层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber routed enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable

# 设置未知源IP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber unclassified-ip domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              2.2.2.2                   000c-29a6-b656 U/-   Online

                     -                         -/-            -

                     2.2.2.2

1.27.2  DHCPv4报文触发IPoE接入配置举例(授权DHCP中继地址池)

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用DHCP服务器分配IPv4地址。

·     采用RADIUS作为认证、授权和计费服务器。

·     DHCP Client异常下线后通过IPv4报文重新触发上线。

2. 组网图

图1-9 DHCPv4报文触发IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius。

(2)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段3.3.3.0/24。

[DHCP-server-dhcp-pool-pool1] network 3.3.3.0 24

# 配置为用户分配的网关地址为3.3.3.1。

[DHCP-server-dhcp-pool-pool1] gateway-list 3.3.3.1

# 将3.3.3.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 3.3.3.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为3.3.3.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 3.3.3.0 24 4.4.4.2

(3)     配置Device

a.     配置各接口IP地址(略)。

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 3.3.3.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

c.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

d.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1,并授权中继地址池。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] authorization-attribute ip-pool pool1

[Device-isp-dm1] quit

e.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为3.3.3.2。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              3.3.3.2                   000c-29a6-b656 D/-   Online

                     -                         -/-            -

                     000c29a6b656

# 删除IPoE动态个人会话,强制用户下线。

<Device> reset ip subscriber session

# 显示异常下线DHCP接入用户的信息。

<Device> display ip subscriber abnormal-logout

Slot 3:

Interface             IP address             MAC address

GE3/1/2               3.3.3.2                000c-29a6-b656

# DHCP异常下线用户通过未知源IP报文重新触发上线,用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为3.3.3.2,用户仍为DHCP接入类型。

<Device> display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              3.3.3.2                   000c-29a6-b656 D/-   Online

                     -                         -/-            -

                     000c29a6b656

1.27.3  DHCPv4报文触发IPoE接入配置举例(授权DHCP地址池组)

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用DHCP地址池组下地址池为用户分配IPv4地址。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-10 DHCPv4报文触发IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius。

(2)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool2地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool2

# 配置地址池动态分配的IP地址网段2.2.2.0/24。

[DHCP-server-dhcp-pool-pool2] network 2.2.2.0 24

# 配置为用户分配的网关地址为2.2.2.1。

[DHCP-server-dhcp-pool-pool2] gateway-list 2.2.2.1

# 将2.2.2.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool2] forbidden-ip 2.2.2.1

[DHCP-server-dhcp-pool-pool2] quit

# 通过配置静态路由,将目的地址为2.2.2.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 2.2.2.0 24 4.4.4.2

# 创建名称为pool3地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool3

# 配置地址池动态分配的IP地址网段3.3.3.0/24。

[DHCP-server-dhcp-pool-pool3] network 3.3.3.0 24

# 配置为用户分配的网关地址为3.3.3.1。

[DHCP-server-dhcp-pool-pool3] gateway-list 3.3.3.1

# 将3.3.3.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool3] forbidden-ip 3.3.3.1

[DHCP-server-dhcp-pool-pool3] quit

# 通过配置静态路由,将目的地址为3.3.3.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 3.3.3.0 24 4.4.4.2

(3)     配置Device

a.     配置各接口IP地址(略)。

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 创建本地地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] network 1.1.1.0 24

# 配置为用户分配的网关地址为1.1.1.1。

[Device-dhcp-pool-pool1] gateway-list 1.1.1.1 export-route

# 将1.1.1.1设置为禁止地址。

[Device-dhcp-pool-pool1] forbidden-ip 1.1.1.1

[Device-dhcp-pool-pool1] quit

# 创建中继地址池pool2,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool2

[Device-dhcp-pool-pool2] gateway-list 2.2.2.1 export-route

[Device-dhcp-pool-pool2] remote-server 4.4.4.3

# 在中继地址池中通过network命令配置和中继地址池关联的DHCP服务器相同的网段信息,以便DHCP地址组能够判断中继地址池关联的DHCP服务器上是否存在可分配的地址资源。

[Device-dhcp-pool-pool2] network 2.2.2.0 24

[Device-dhcp-pool-pool2] quit

# 创建中继地址池pool3,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool3

[Device-dhcp-pool-pool3] gateway-list 3.3.3.1 export-route

[Device-dhcp-pool-pool3] remote-server 4.4.4.3

# 在中继地址池中通过network命令配置和中继地址池关联的DHCP服务器相同的网段信息,以便DHCP地址组能够判断中继地址池关联的DHCP服务器上是否存在可分配的地址资源。

[Device-dhcp-pool-pool3] network 3.3.3.0 24

[Device-dhcp-pool-pool3] quit

# 创建DHCP地址池组poolgroup1,并将DHCP地址池pool1、DHCP中继地址池pool2和pool3加入到DHCP地址池组中。

[Device] dhcp pool-group poolgroup1

[Device -dhcp-pool-group-poolgroup1] pool pool1

[Device -dhcp-pool-group-poolgroup1] pool pool2

[Device -dhcp-pool-group-poolgroup1] pool pool3

[Device -dhcp-pool-group-poolgroup1] quit

c.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

d.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1,并授权DHCP地址池组。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] authorization-attribute ip-pool-group poolgroup1

[Device-isp-dm1] quit

e.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 先上线253个用户后,显示DHCP本地地址池pool1的统计信息。

[Device] display dhcp server statistics pool pool1

    Total IP addresses:                254

    Free IP addresses:                 0

    Used:                              253

    Pool utilization:                  100.00%

    Bindings:

      Automatic:                       253

      Manual:                          0

      Expired:                         0

    Conflicts:                         0

以上信息说明,DHCP本地地址池pool1的地址利用率为100%,已无可分配的IP地址。

# 此时,再有新用户上线,显示所有DHCP中继的用户地址表项信息。

[Device] display dhcp relay client-information

Total number of client-information items: 1

Total number of dynamic items: 1

Total number of temporary items: 0

IP address       MAC address      Type        Interface            VPN name

2.1.1.2          000c-29a6-b656   Dynamic     GE3/1/2              N/A

以上信息说明,当DHCP本地地址池pool1中的地址资源被耗尽后,如果再有新用户上线,设备将使用中继地址池pool2关联的DHCP服务器上的地址资源为新上线用户分配地址。

1.27.4  DHCPv6报文触发IPoE接入配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用DHCP服务器分配IPv6地址。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-11 DHCPv6报文触发IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4::2/64 {

ipaddr6 = 4::2

netmask=64

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4::2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius。

(2)     配置DHCP服务器

# 创建名称为pool1的DHCPv6地址池并进入其视图。

<DHCP-server> system-view

[DHCP-server] ipv6 dhcp pool pool1

# 配置地址池动态分配的IPv6地址网段3::0/64,DNS服务器地址为8::8。

[DHCP-server-dhcp6-pool-pool1] network 3::0/64

[DHCP-server-dhcp6-pool-pool1] dns-server 8::8

[DHCP-server-dhcp6-pool-pool1] quit

# 配置接口GigabitEthernet3/1/1工作在DHCPv6服务器模式。

[DHCP-server] interface gigabitethernet 3/1/1

[DHCP-server-GigabitEthernet3/1/1] ipv6 dhcp select server

[DHCP-server-GigabitEthernet3/1/1] quit

# 通过配置静态路由,将目的地址为3::0网段的DHCPv6应答报文的下一跳指定为连接DHCPv6客户端网络的接口IPv6地址4::2。

[DHCP-server] ipv6 route-static 3::0 64 4::2

(3)     配置Device

a.     配置各接口IP地址(略)。

b.     配置DHCP relay

# 创建中继地址池pool1,指定匹配该地址池的DHCPv6客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

<Device> system-view

[Device] ipv6 dhcp pool pool1

[Device-dhcp6-pool-pool1] gateway-list 3::1

[Device-dhcp6-pool-pool1] remote-server 4::3

[Device-dhcp6-pool-pool1] quit

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] ipv6 dhcp select relay

# 配置自动生成IPv6链路本地地址,该IPv6链路本地地址作为用户的网关。

[Device–GigabitEthernet3/1/2] ipv6 address auto link-local

# 开启DHCPv6中继用户表项记录功能。

[Device–GigabitEthernet3/1/2] ipv6 dhcp relay client-information record

# 取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息

[Device–GigabitEthernet3/1/2] undo ipv6 nd ra halt

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig managed-address-flag

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig other-flag

[Device–GigabitEthernet3/1/2] quit

c.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4::1

[Device-radius-rs1] primary accounting 4::1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

d.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1,并授权中继地址池。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] authorization-attribute ipv6-pool pool1

[Device-isp-dm1] quit

e.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCPv6报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcpv6 enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IPv6地址为3::2。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              -                         000c-29a6-b656 -/D   Online

                     3::2                      -/-            -

                     000c29a6b656

1.27.5  IPv6 ND RS报文触发IPoE接入配置举例

1. 组网需求

·     通过IPv6 ND RS报文触发上线的用户主机经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备可以发送IPv6 ND RA报文。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-12 IPv6 ND RS报文触发IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

 Framed-IPv6-Prefix =10::10/64

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius,授权IPv6前缀为10::10/64。

(2)     配置Device

a.     配置各接口的IP地址(略)。

b.     取消对接口GigabitEthernet3/1/2发布IPv6 ND RA消息的抑制。

<Device> system-view

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] undo ipv6 nd ra halt

[Device–GigabitEthernet3/1/2] quit

c.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

d.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

e.     配置IPoE

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并制定二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启IPv6 ND RS报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator ndrs enable

# 设置IPv6 ND RS报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber ndrs domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IPv6地址为10::20C:29FF:FEA6:B656。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              -                         000c-29a6-b656 -/N   Online

                     10::20C:29FF:FEA6:B6      -/-            -

                     56

                     000c29a6b656

1.27.6  ARP报文触发静态IPoE用户接入配置举例

1. 组网需求

·     通过ARP报文触发上线的IPoE静态个人接入用户主机经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用RADIUS作为认证、授权和计费服务器。

·     为静态用户分配的网关地址为3.3.3.1。

2. 组网图

图1-13 ARP报文触发静态IPoE接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

3.3.3.2   Cleartext-Password :="radius"

以上信息表示:用户名为Host的IP地址3.3.3.2,用户密码为字符串radius。

(2)     配置Device

a.     配置各接口的IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     配置用户网关

# 全局开启DHCP。

[Device] dhcp enable

# 创建地址池pool1,指定用户的网关地址为3.3.3.1。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 3.3.3.1 export-route

[Device-dhcp-pool-pool1] quit

e.     配置IPoE

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并指定二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# IPoE静态个人接入用户通过ARP报文触发上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 配置IP地址为3.3.3.2,认证域为dm1的静态会话。

[Device–GigabitEthernet3/1/2] ip subscriber session static ip 3.3.3.2 domain dm1

# 配置IPoE静态个人接入用户的认证密码为radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 addrss               SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              3.3.3.2                   147b-1924-0206 S/-   Online

                     -                         -/-            -

                     3.3.3.2

1.27.7  IPoE子网专线用户接入配置举例

1. 组网需求

·     子网5.5.5.0/24、6.6.6.0/24、7.7.7.0/24的所有用户经由二层网络以IPoE方式接入到BRAS 接入设备。

·     子网专线用户认证时使用的用户名和密码分别为:5.5.5.0/24网段用户名us1、密码pw1;6.6.6.0/24网段用户名us2、密码pw2;7.7.7.0/24网段用户名us3、密码pw3。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-14 IPoE子网专线用户接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

us1  Cleartext-Password :="pw1"

us2  Cleartext-Password :="pw2"

us3  Cleartext-Password :="pw3"

以上信息表示:三个子网专线用户的用户名分别为us1、us2、us3,相应的用户密码分别为字符串pw1、pw2、pw3。

(2)     配置Device

a.     配置各接口IP地址以及从IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     配置用户网关

# 全局开启DHCP。

[Device] dhcp enable

# 创建地址池pool1,指定用户的网关地址为5.5.5.1、6.6.6.1和7.7.7.1。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 5.5.5.1 6.6.6.1 7.7.7.1 export-route

[Device-dhcp-pool-pool1] quit

e.     配置IPoE认证

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并指定二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置三个子网专线用户。

[Device–GigabitEthernet3/1/2] ip subscriber subnet-leased ip 5.5.5.0 24 username us1 password plaintext pw1 domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber subnet-leased ip 6.6.6.0 24 username us2 password plaintext pw2 domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber subnet-leased ip 7.7.7.0 24 username us3 password plaintext pw3 domain dm1

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 子网专线用户认证通过之后,各子网网段的用户流量能正常转发,可以使用以下的显示命令查看到IPoE用户在线信息。

[Device] display ip subscriber subnet-leased

Basic:

  Access interface            : GE3/1/2

  VPN instance                : N/A

  Username                    : us1

  Network                     : 5.5.5.0/24

  User ID                     : 0x38060000

  State                       : Online

  Service node                : Slot 3 CPU 0

  Domain                      : dm1

  Login time                  : May 14 20:08:35 2014

  Online time (hh:mm:ss)      : 00:16:37

  IPv4 total users            : 10

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : N/A

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 223423/28598144

  Downlink packets/bytes      : 5802626/742736000

 

Basic:

  Access interface            : GE3/1/2

  VPN instance                : N/A

  Username                    : us2

  Network                     : 6.6.6.0/24

  User ID                     : 0x38060001

  State                       : Online

  Service node                : Slot 3 CPU 0

  Domain                      : dm1

  Login time                  : May 14 20:08:35 2014

  Online time (hh:mm:ss)      : 00:10:37

  IPv4 total users            : 10

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : N/A

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 223423/28598144

  Downlink packets/bytes      : 5802626/742736000

 

Basic:

  Access interface            : GE3/1/2

  VPN instance                : N/A

  Username                    : us3

  Network                     : 7.7.7.0/24

  User ID                     : 0x38060002

  State                       : Online

  Service node                : Slot 3 CPU 0

  Domain                      : dm1

  Login time                  : May 14 20:08:35 2014

  Online time (hh:mm:ss)      : 00:16:03

  IPv4 total users            : 10

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : N/A

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 223423/28598144

  Downlink packets/bytes      : 5802626/742736000

1.27.8  IPoE接口专线用户接入配置举例

1. 组网需求

·     2.2.2.0/24网段内的所有用户经由网关设备以IPoE方式接入到BRAS接入设备。

·     接口专线用户认证时使用的用户名为us1、密码为pw1。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-15 IPoE接口专线用户接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

us1  Cleartext-Password :="pw1"

以上信息表示:接口专线用户的用户名为us1,用户密码为字符串pw1。

(2)     配置Device

a.     配置各接口IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     配置IPoE认证

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并指定三层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber routed enable

# 配置接口专线用户,认证使用的用户名为us1,认证使用的密码为明文pw1,使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber interface-leased username us1 password plaintext pw1 domain dm1

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 接口专线用户认证通过之后,后续经由此接口的用户流量都能正常转发,可以使用以下的显示命令查看到IPoE用户在线信息。

[Device] display ip subscriber interface-leased

Basic:

  Access interface            : GE3/1/2

  VPN instance                : N/A

  Username                    : us1

  User ID                     : 0x30000000

  State                       : Online

  Service node                : Slot 3 CPU 0

  Domain                      : dm1

  Login time                  : May 14 20:04:42 2014

  Online time (hh:mm:ss)      : 00:16:37

  IPv4 total users            : 0

  IPv6 total users            : 0

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 16734145/2141970560

  Downlink packets/bytes      : 22314327/2856233728

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.9  IPoE L2VPN专线用户接入配置举例

1. 组网需求

·     L2VPN专线用户Host A经由二层网络以IPoE方式接入到BRAS设备。

·     L2VPN专线用户认证时使用的用户名为us1、密码为pw1。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-16 IPoE L2VPN专线用户接入配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

us1  Cleartext-Password :="pw1"

以上信息表示:接口专线用户的用户名为us1,用户密码为字符串pw1。

(2)     配置PE2

# 配置LSR ID。

<PE2> system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.9 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 2.2.2.9

# 使能L2VPN。

[PE2] l2vpn enable

# 全局使能LDP。

[PE2] mpls ldp

[PE2-ldp] quit

# 配置连接PE 1的接口GigabitEthernet3/1/2,在此接口上使能LDP。

[PE2] interface gigabitethernet 3/1/2

[PE2-GigabitEthernet3/1/2] ip address 20.1.1.2 24

[PE2-GigabitEthernet3/1/2] mpls enable

[PE2-GigabitEthernet3/1/2] mpls ldp enable

[PE2-GigabitEthernet3/1/2] quit

# 在PE 2上运行OSPF,用于建立LSP。

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# 在PE 2上创建虚拟交换实例,并配置远端PE。

[PE2] vsi vpn1

[PE2-vsi-vpn1] pwsignaling static

[PE2-vsi-vpn1-static] peer 1.1.1.9 pw-id 3 in-label 100 out-label 100

[PE2-vsi-vpn1-static-1.1.1.9-3] quit

[PE2-vsi-vpn1-static] quit

[PE2-vsi-vpn1] quit

# 在接入CE 2的接口GigabitEthernet3/1/1上关联虚拟交换实例。此接口不需配置IP地址。

[PE2] interface gigabitethernet 3/1/1

[PE2-GigabitEthernet3/1/1] xconnect vsi vpn1

[PE2-GigabitEthernet3/1/1] quit

(3)     配置PE1

a.     配置VPLS

# 配置LSR ID。

<PE1> system-view

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] mpls lsr-id 1.1.1.9

# 使能L2VPN。

[PE1] l2vpn enable

# 全局使能LDP。

[PE1] mpls ldp

[PE1-ldp] quit

# 配置连接PE 2的接口GigabitEthernet3/1/2,在此接口上使能LDP。

[PE1] interface gigabitethernet 3/1/2

[PE1-GigabitEthernet3/1/2] ip address 20.1.1.1 24

[PE1-GigabitEthernet3/1/2] mpls enable

[PE1-GigabitEthernet3/1/2] mpls ldp enable

[PE1-GigabitEthernet3/1/2] quit

# 在PE 1上运行OSPF,用于建立LSP。

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# 在PE 1上创建虚拟交换实例,并配置远端PE。

[PE1] vsi vpn1

[PE1-vsi-vpn1] pwsignaling static

[PE1-vsi-vpn1-static] peer 2.2.2.9 pw-id 3 in-label 100 out-label 100

[PE1-vsi-vpn1-static-2.2.2.9-3] quit

[PE1-vsi-vpn1-static] quit

[PE1-vsi-vpn1] quit

# 在接入CE 1的接口GigabitEthernet3/1/1上关联虚拟交换实例。此接口不需配置IP地址。

[PE1] interface gigabitethernet 3/1/1

[PE1-GigabitEthernet3/1/1] xconnect vsi vpn1

[PE1-GigabitEthernet3/1/1] quit

b.     配置RADIUS方案

# 创建名字为rs1的RADIUS方案并进入该方案视图。

<PE1> system-view

[PE1] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[PE1-radius-rs1] primary authentication 4.4.4.1

[PE1-radius-rs1] primary accounting 4.4.4.1

[PE1-radius-rs1] key authentication simple radius

[PE1-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[PE1-radius-rs1] user-name-format without-domain

[PE1-radius-rs1] quit

# 使能RADIUS session control功能。

[PE1] radius session-control enable

c.     配置认证域

# 创建并进入名字为dm1的ISP域。

[PE1] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[PE1-isp-dm1] authentication ipoe radius-scheme rs1

[PE1-isp-dm1] authorization ipoe radius-scheme rs1

[PE1-isp-dm1] accounting ipoe radius-scheme rs1

[PE1-isp-dm1] quit

d.     配置IPoE认证

# 进入接口GigabitEthernet3/1/1视图。

[PE1] interface gigabitethernet 3/1/1

# 使能IPoE功能,并指定二层接入模式。

[PE1–GigabitEthernet3/1/1] ip subscriber l2-connected enable

# 配置L2VPN专线用户,认证使用的用户名为us1,认证使用的密码为明文pw1,使用的认证域为dm1。

[PE1–GigabitEthernet3/1/1] ip subscriber l2vpn-leased username us1 password plaintext pw1 domain dm1

[PE1–GigabitEthernet3/1/1] quit

4. 验证配置

# L2VPN专线用户认证通过之后,后续经由此接口的用户流量都能正常转发,可以使用以下的显示命令查看到IPoE用户在线信息。

[PE1] display ip subscriber l2vpn-leased

Basic:

  Access interface            : GE3/1/1

  VPN instance                : N/A

  Username                    : us1

  User ID                     : 0x30000000

  State                       : Online

  Service node                : Slot 3 CPU 0

  Domain                      : dm1

  Login time                  : May 14 20:04:42 2014

  Online time (hh:mm:ss)      : 00:16:37

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : N/A

  Max IPv4 multicast addresses: 0

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 0

  IPv6 multicast address list : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 16734145/2141970560

  Downlink packets/bytes      : 22314327/2856233728

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.10  IPoE为接入用户授权地址池和VPN配置举例

1. 组网需求

·     用户主机经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用RADIUS作为认证、授权和计费服务器。

·     vpn1中的用户通过DHCP获取IP地址。

2. 组网图

图1-17 IPoE为接入用户授权地址池和VPN配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

 H3C-VPN-Instance :="vpn1",

 Framed-Pool := " pool1"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius,授权VPN实例名称为vpn1,授权IP地址池名称为pool1。

(2)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段3.3.3.0/24。

[DHCP-server-dhcp-pool-pool1] network 3.3.3.0 24

# 配置为客户端分配的网关地址为3.3.3.1。

[DHCP-server-dhcp-pool-pool1] gateway-list 3.3.3.1

# 将3.3.3.1设置为例外地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 3.3.3.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为3.3.3.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 3.3.3.0 24 4.4.4.2

(3)     配置Device

 说明

为保证VPN间流量正常转发,需要配置静态路由和策略路由。

 

a.     配置各接口IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     创建VPN实例

# 创建一个名为vpn1的VPN实例。

[Device] ip vpn-instance vpn1

[Device-vpn-instance-vpn1] quit

e.     配置DHCP relay

# 全局开启DHCP。

[Device] dhcp enable

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] quit

# 创建DHCP地址池pool1,并引用VPN实例vpn1。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] vpn-instance vpn1

# 配置为客户端分配的网关地址为3.3.3.1,且指定导出相应的路由。当本配置生效后,会向vpn1的路由表中添加一条网关地址对应的静态主机路由。

[Device-dhcp-pool-pool1] gateway-list 3.3.3.1 export-route

# 配置远端DHCP服务器地址为4.4.4.3。

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

f.     配置IPoE

# 在接口GigabitEthernet3/1/2上开启IPoE功能,并指定二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

#  设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态IPoE用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

g.     配置代理ARP

# 在接口GigabitEthernet3/1/2上开启代理ARP。

[Device–GigabitEthernet3/1/2] proxy-arp enable

[Device–GigabitEthernet3/1/2] quit

h.     配置策略路由

通过配置静态路由,将vpn1内的DHCP请求方向的流量引入到DHCP服务器端

# 配置静态路由。

[Device] ip route-static vpn-instance vpn1 4.4.4.0 24 4.4.4.3 public

通过配置策略路由,将DHCP服务器回应的流量导入到DHCP客户端所在的VPN

# 创建一个策略to_vpn1,其节点序号为0,匹配模式permit,指定报文在vpn1内转发。

[Device] policy-based-route to_vpn1 permit node 0

[Device-pbr-to_vpn1-0] apply access-vpn vpn-instance vpn1

[Device-pbr-to_vpn1-0] quit

# 在以太接口GigabitEthernet3/1/1上应用该策略路由。

[Device] interface gigabitethernet 3/1/1

[Device–GigabitEthernet3/1/1] ip policy-based-route to_vpn1

[Device–GigabitEthernet3/1/1] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 000c29a6b656

  Domain                      : dm1

  VPN instance                : vpn1

  IP address                  : 3.3.3.2

  User address type           : N/A

  MAC address                 : 000c-29a6-b656

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x380800b5

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 18400 sec

  Access time                 : Sep 14 18:09:28 2014

  Online time (hh:mm:ss)      : 00:16:37

  Service node                : Slot 3 CPU 0

  Authentication type         : Bind

  IPv4 access type            : DHCP

  IPv4 detect state           : N/A

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Sep 14 18:09:28 2014

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 594341/76075648

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.11  IPoE接入用户在线探测配置举例

1. 组网需求

·     用户主机经由三层网络以IPoE方式接入到BRAS接入设备。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-18 IPoE用户在线探测配置组网图

 

3. 配置步骤

(1)     配置RADIUS服务器

说明

下面以Linux系统下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

2.2.2.2  Cleartext-Password :="radius"

2.2.2.3  Cleartext-Password :="radius"

2.2.2.4  Cleartext-Password :="radius"

以上信息表示:三个用户的用户名分别为Host的IP地址2.2.2.2、2.2.2.3、2.2.2.4,用户密码均为字符串radius。

(2)     配置Device

a.     配置各接口IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] quit

d.     配置IPoE认证

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 开启IPoE功能,并指定三层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber routed enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable

# 设置未知源IP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber unclassified-ip domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

# 开启在线用户探测功能,并指定ICMP探测方式,重复尝试次数为2,探测间隔为30秒。

[Device–GigabitEthernet3/1/2] ip subscriber user-detect ip icmp retry 2 interval 30

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

用户认证通过之后,可以通过显示命令display ip subscriber session查看到对应用户信息,若用户主机离线,则设备会在一定时间后探测到,并删除记录的IPoE用户信息。

1.27.12  IPoE静态用户普通Web认证配置举例

1. 组网需求

·     用户主机经由二层网络以IPoE方式接入到BRAS接入设备。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器和Portal Web服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-19 IPoE静态用户普通Web认证配置组网图

3. 配置步骤

(1)     配置Device

a.     配置各接口IP地址(略)

b.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt

[Device-portal-server-newpt] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt] quit

c.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[Device] http-redirect https-port 11111

d.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

e.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

f.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator and

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator and

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator and

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator and

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] quit

# 配置类web_deny,匹配ACL ip。

[Device] traffic classifier web_deny operator and

[Device-classifier-web_deny] if-match acl name ip

[Device-classifier-web_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator and

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator and

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] quit

g.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

h.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文之外,其余报文均禁止通过。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier web_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier web_deny behavior web_deny

[Device-qospolicy-out] quit

i.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

j.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.5

[Device-radius-rs1] primary accounting 4.4.4.5

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

k.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置授权用户组。

[Device-isp-dm1] authorization-attribute user-group web

# 配置Web认证页面URL和Web认证服务器IP地址。

[Device-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[Device-isp-dm1] web-server ip 4.4.4.5

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] quit

l.     配置用户网关

# 全局开启DHCP。

[Device] dhcp enable

# 创建地址池pool1,指定用户的网关地址为192.168.0.1。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] quit

m. 配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

# 配置IPoE静态用户。

[Device–GigabitEthernet3/1/2] ip subscriber session static ip 192.168.0.2

# 配置IPoE用户采用Web认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

(2)     配置RADIUS服务器

# 配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-20所示增加接入设备页面。

¡     输入共享密钥为:radius。

¡     其他采用缺省配置。

图1-20 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-21所示页面输入接入设备地址4.4.4.2并单击<确定>。

图1-21 手动增加接入设备

 

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,进入接入策略管理页面,在该页面中单击<增加>按钮,进入如图1-22所示增加接入策略页面。

¡     输入接入策略名为:AccessPolicy。

¡     其他采用缺省配置。

图1-22 增加接入策略

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,进入接入服务管

理页面,在该页面中单击<增加>按钮,进入如图1-23所示增加接入服务页面。

¡     输入服务名为:IPoE_Server

¡     缺省接入策略选择已创建的策略“AccessPolicy”。

¡     其他采用缺省配置。

图1-23 增加接入服务

 

# 在IMC界面增加用户

单击导航树中的[用户管理/增加用户]菜单项,进入如图1-24所示增加用户页面,填写用户姓名和证件号码为:IPoE_Web001和001。

图1-24 增加用户

 

单击<确定>按钮后完成用户的添加。

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户页面,在该页面中单击<增加>按钮,进入如图1-25所示增加接入用户页面。

¡     用户姓名选择:IPoE_Web001

¡     账号名填写为:user1

¡     密码为:pass1

¡     接入服务选择之前已创建的IPoE_Server

图1-25 增加接入用户

 

(3)     配置Portal服务器

# 配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-26所示。

图1-26 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-27所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-27 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-28所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-28 增加设备信息配置页面

 

# 配置端口组信息

图1-29所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-29 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-30所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-30 增加端口组信息配置页面

iMC-5

 

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 192.168.0.2

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : N/A

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : Static

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-31所示。

图1-31 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : N/A

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : Static

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : N/A

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.13  IPoE DHCP用户普通Web认证配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器和Portal Web服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-32 IPoE普通Web认证配置组网图

 

3. 配置步骤

(1)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1和DNS服务器地址8.8.8.8。

[DHCP-server-dhcp-pool-pool1] network 192.168.0.0 24

[DHCP-server-dhcp-pool-pool1] gateway-list 192.168.0.1

[DHCP-server-dhcp-pool-pool1] dns-list 8.8.8.8

# 将192.168.0.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 192.168.0.0 24 4.4.4.2

(2)     配置Device

a.     配置各接口IP地址(略)

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] quit

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt

[Device-portal-server-newpt] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt] quit

d.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[Device] http-redirect https-port 11111

e.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

f.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

g.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator and

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator and

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator and

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator and

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] quit

# 配置类web_deny,匹配ACL ip。

[Device] traffic classifier web_deny operator and

[Device-classifier-web_deny] if-match acl name ip

[Device-classifier-web_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator and

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator and

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] quit

h.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

i.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文均禁止通过。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier web_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier web_deny behavior web_deny

[Device-qospolicy-out] quit

j.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.5

[Device-radius-rs1] primary accounting 4.4.4.5

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

l.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置认证前域授权地址池以及用户组。

[Device-isp-dm1] authorization-attribute user-group web

[Device-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL。

[Device-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] quit

m. 配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

(3)     配置RADIUS服务器

# 配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-33所示增加接入设备页面。

¡     输入共享密钥为:radius。

¡     其他采用缺省配置。

图1-33 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-34所示页面输入接入设备地址4.4.4.2并单击<确定>。

图1-34 手动增加接入设备

 

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,进入接入策略管理页面,在该页面中单击<增加>按钮,进入如图1-35所示增加接入策略页面。

¡     输入接入策略名为:AccessPolicy。

¡     其他采用缺省配置。

图1-35 增加接入策略

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,进入接入服务管

理页面,在该页面中单击<增加>按钮,进入如图1-36所示增加接入服务页面。

¡     输入服务名为:IPoE_Server

¡     缺省接入策略选择已创建的策略“AccessPolicy”。

¡     其他采用缺省配置。

图1-36 增加接入服务

 

# 在IMC界面增加用户

单击导航树中的[用户管理/增加用户]菜单项,进入如图1-37所示增加用户页面,填写用户姓名和证件号码为:IPoE_Web001和001。

图1-37 增加用户

 

单击<确定>按钮后完成用户的添加。

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户页面,在该页面中单击<增加>按钮,进入如图1-38所示增加接入用户页面。

¡     用户姓名选择:IPoE_Web001

¡     账号名填写为:user1

¡     密码为:pass1

¡     接入服务选择之前已创建的IPoE_Server

图1-38 增加接入用户

 

(4)     配置Portal服务器

# 配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-39所示。

图1-39 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-40所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-40 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-41所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-41 增加设备信息配置页面

 

# 配置端口组信息

图1-42所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-42 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-43所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-43 增加端口组信息配置页面

iMC-5

 

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-44 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.14  IPoE MAC Trigger二层无感知认证配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器、Portal Web服务器以及MAC绑定服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-45 IPoE MAC Trigger二层无感知认证配置组网图

 

3. 配置步骤

(1)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1和DNS服务器地址8.8.8.8。

[DHCP-server-dhcp-pool-pool1] network 192.168.0.0 24

[DHCP-server-dhcp-pool-pool1] gateway-list 192.168.0.1

[DHCP-server-dhcp-pool-pool1] dns-list 8.8.8.8

# 将192.168.0.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 192.168.0.0 24 4.4.4.2

(2)     配置Device

a.     配置各接口IP地址(略)

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] quit

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt

[Device-portal-server-newpt] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt] quit

d.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[Device] http-redirect https-port 11111

e.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

f.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

g.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator and

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator and

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator and

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator and

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] quit

# 配置类ip_cpu,匹配ACL ip。

[Device] traffic classifier ip_cpu operator and

[Device-classifier-ip_cpu] if-match acl name ip

[Device-classifier-ip_cpu] quit

# 配置类ip_deny,匹配ACL ip。

[Device] traffic classifier ip_deny operator and

[Device-classifier-ip_deny] if-match acl name ip

[Device-classifier-ip_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator and

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator and

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] quit

h.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_cpu,对用户组web中用户的所有IP报文都重定向到CPU。

[Device] traffic behavior web_cpu

[Device-behavior-web_cpu] redirect cpu

[Device-behavior-web_cpu] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

i.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文都重定向到CPU,如果重定向无感知认证失败,则丢弃报文。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier ip_cpu behavior web_cpu

[Device-qospolicy-web] classifier ip_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier ip_deny behavior web_deny

[Device-qospolicy-out] quit

j.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.5

[Device-radius-rs1] primary accounting 4.4.4.5

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

l.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置授权地址池以及用户组。

[Device-isp-dm1] authorization-attribute user-group web

[Device-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL。

[Device-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] quit

m. 配置IPoE无感知认证基本功能

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

n.     (可选)配置IPoE DHCP用户异常下线后重新上线功能

说明

·     在允许DHCP用户异常下线后通过报文重新触发上线的组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户异常下线后重新上线的关键配置。相关原理及配置限制和指导请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

o.     (可选)配置IPoE DHCP用户漫游功能

说明

·     在漫游组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户漫游功能的关键配置。相关原理及配置限制和指导请参见“1.24  配置IPoE个人接入用户漫游功能”。漫游功能举例请参见“1.27.22  IPoE个人用户漫游配置举例”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[Device–GigabitEthernet3/1/2] ip subscriber roaming enable

# 在接口上配置DHCP收到物理位置发生变化、MAC地址不变的上线用户发送的DHCP-DISCOVER报文后,先释放将对应MAC地址的已在线租约,再为该用户分配IP地址。

[Device–GigabitEthernet3/1/2] dhcp session-mismatch action fast-renew

[Device–GigabitEthernet3/1/2] quit

p.     (可选)配置IPoE DHCP用户采用松散模式上线功能

说明

·     在接入设备或用户接入接口所在Slot的重启后,允许重启前在线用户重新触发上线的组网中配置本功能。

·     本节仅列出IPoE DHCP用户采用松散模式上线功能的关键配置。相关原理及配置限制和指导请参见“1.9.14  配置允许动态个人接入用户采用松散模式上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

# 开启系统或用户接入接口所在Slot重启后允许IPoE用户一直采用松散模式上线功能。

[Device] ip subscriber access-trigger loose all-time

q.     配置Portal基于MAC地址的快速认证

# 创建MAC绑定服务器mts。

[Device] portal mac-trigger-server mts

# 配置MAC绑定服务器的地址为4.4.4.5

[Device-portal-mac-trigger-server-mts] ip 4.4.4.5

[Device-portal-mac-trigger-server-mts] quit

# 在接口GigabitEthernet3/1/2上应用MAC绑定服务器mts。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] portal apply mac-trigger-server mts

[Device–GigabitEthernet3/1/2] quit

(3)     配置RADIUS服务器

# 配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-46所示增加接入设备页面。

¡     输入共享密钥为:radius。

¡     其他采用缺省配置。

图1-46 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-47所示页面输入接入设备地址4.4.4.2并单击<确定>。

图1-47 手动增加接入设备

 

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,进入接入策略管理页面,在该页面中单击<增加>按钮,进入如图1-48所示增加接入策略页面。

¡     输入接入策略名为:AccessPolicy。

¡     其他采用缺省配置。

图1-48 增加接入策略

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,进入接入服务管

理页面,在该页面中单击<增加>按钮,进入如图1-49所示增加接入服务页面。

¡     输入服务名为:IPoE_Server

¡     缺省接入策略选择已创建的策略“AccessPolicy”。

¡     其他采用缺省配置。

图1-49 增加接入服务

 

# 在IMC界面增加用户

单击导航树中的[用户管理/增加用户]菜单项,进入如图1-50所示增加用户页面,填写用户姓名和证件号码为:IPoE_Web001和001。

图1-50 增加用户

 

单击<确定>按钮后完成用户的添加。

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户页面,在该页面中单击<增加>按钮,进入如图1-51所示增加接入用户页面。

¡     用户姓名选择:IPoE_Web001

¡     账号名填写为:user1

¡     密码为:pass1

¡     接入服务选择之前已创建的IPoE_Server

图1-51 增加接入用户

 

(4)     配置Portal服务器(iMC PLAT 7.1)

说明

下面以iMC为例(使用iMC版本为:iMC PLAT 7.1(E0303)、iMC EIA 7.1(F0303)、iMC EIP 7.1(F0303))说明Portal server的基本配置。

 

# 配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-52所示。

图1-52 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-53所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-53 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-54所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-54 增加设备信息配置页面

 

# 配置端口组信息

图1-55所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-55 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-56所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     无感知认证选择“支持”。

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-56 增加端口组信息配置页面

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上Portal认证服务器配置生效。

(5)     配置MAC绑定服务器(iMC PLAT 7.1)

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,并点击<增加>按钮,进入如图1-57所示增加接入策略页面。

¡     填写接入策略名。

¡     选择业务分组。

¡     其它参数可采用缺省配置。

图1-57 增加接入策略配置

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,并点击<增加>按钮,进入如图1-58所示增加接入服务配置页面。

¡     填写服务名。

¡     勾选“Portal无感知认证”。

¡     其它参数可采用缺省配置。

图1-58 增加接入服务配置

 

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,并点击<增加>按钮,进入如图1-59所示增加接入用户页面。在接入信息部分:

¡     选择可接入的用户。

¡     设置密码。

¡     设置“Portal无感知认证最大绑定数”。

图1-59 增加接入用户

 

# 配置系统参数

单击导航树中的[接入策略管理/业务参数配置/系统配置]菜单项,并点击[终端管理参数配置]对应的<配置>按钮,进入终端管理参数配置页面。

“非智能终端Portal无感知认证”可根据实际需要启用或禁用,本例中为启用。

图1-60 配置终端管理参数

 

单击导航树中的[接入策略管理/业务参数配置/系统配置]菜单项,点击[终端老化时长]对应的<配置>按钮后点击<修改>,进入终端老化时长配置页面。

根据实际需要配置终端老化时间,本例中采用缺省值。

图1-61 配置终端老化时长

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上配置生效。

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-62 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<下线>按钮,通过显示命令查看,此时用户返回认证前域状态

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:59 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:59 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 重新打开浏览器,任意输入访问地址http://63.1.1.240,通过显示命令查看,用户IPoE Web上线

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:53:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web mac-trigger

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:53:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.15  IPoE MAC二层无感知认证配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担Portal认证服务器和Portal Web服务器的职责。

·     由一台支持MAC绑定功能的RADIUS服务器同时承担认证、授权和计费服务器以及MAC绑定服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-63 IPoE MAC二层无感知认证配置组网图

 

3. 配置步骤

(1)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1和DNS服务器地址8.8.8.8。

[DHCP-server-dhcp-pool-pool1] network 192.168.0.0 24

[DHCP-server-dhcp-pool-pool1] gateway-list 192.168.0.1

[DHCP-server-dhcp-pool-pool1] dns-list 8.8.8.8

# 将192.168.0.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 192.168.0.0 24 4.4.4.2

(2)     配置Device

a.     配置各接口IP地址(略)

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] quit

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt

[Device-portal-server-newpt] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt] quit

d.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[Device] http-redirect https-port 11111

e.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

f.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

g.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator and

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator and

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator and

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator and

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] quit

# 配置类ip_cpu,匹配ACL ip。

[Device] traffic classifier ip_cpu operator and

[Device-classifier-ip_cpu] if-match acl name ip

[Device-classifier-ip_cpu] quit

# 配置类ip_deny,匹配ACL ip。

[Device] traffic classifier ip_deny operator and

[Device-classifier-ip_deny] if-match acl name ip

[Device-classifier-ip_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator and

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator and

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] quit

h.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_cpu,对用户组web中用户的所有IP报文都重定向到CPU。

[Device] traffic behavior web_cpu

[Device-behavior-web_cpu] redirect cpu

[Device-behavior-web_cpu] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

i.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文都重定向到CPU,如果重定向无感知认证失败,则丢弃报文。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier ip_cpu behavior web_cpu

[Device-qospolicy-web] classifier ip_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier ip_deny behavior web_deny

[Device-qospolicy-out] quit

j.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

l.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置授权地址池以及用户组。

[Device-isp-dm1] authorization-attribute user-group web

[Device-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL。

[Device-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] quit

m. 配置IPoE无感知认证基本功能

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web MAC认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web mac-auth

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

n.     (可选)配置IPoE DHCP用户异常下线后重新上线功能

说明

·     在允许DHCP用户异常下线后通过报文重新触发上线的组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户异常下线后重新上线的关键配置。相关原理及配置限制和指导请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

o.     (可选)配置IPoE DHCP用户漫游功能

说明

·     在漫游组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户漫游功能的关键配置。相关原理及配置限制和指导请参见“1.24  配置IPoE个人接入用户漫游功能”。漫游功能举例请参见“1.27.22  IPoE个人用户漫游配置举例”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[Device–GigabitEthernet3/1/2] ip subscriber roaming enable

# 在接口上配置DHCP收到物理位置发生变化、MAC地址不变的上线用户发送的DHCP-DISCOVER报文后,先释放将对应MAC地址的已在线租约,再为该用户分配IP地址。

[Device–GigabitEthernet3/1/2] dhcp session-mismatch action fast-renew

[Device–GigabitEthernet3/1/2] quit

p.     (可选)配置IPoE DHCP用户采用松散模式上线功能

说明

·     在接入设备或用户接入接口所在Slot的重启后,允许重启前在线用户重新触发上线的组网中配置本功能。

·     本节仅列出IPoE DHCP用户采用松散模式上线功能的关键配置。相关原理及配置限制和指导请参见“1.9.14  配置允许动态个人接入用户采用松散模式上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

# 开启系统或用户接入接口所在Slot重启后允许IPoE用户一直采用松散模式上线功能。

[Device] ip subscriber access-trigger loose all-time

(3)     配置RADIUS服务器

对于RADIUS服务器上AAA和MAC绑定配置,具体需要参见RADIUS server的配置说明书。

(4)     配置Portal服务器

# 配置Portal主页。

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-39所示。

图1-64 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-40所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-65 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-41所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-66 增加设备信息配置页面

 

# 配置端口组信息

图1-42所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-67 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-43所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-68 增加端口组信息配置页面

iMC-5

 

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-69 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<下线>按钮,通过显示命令查看,此时用户返回认证前域状态

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:59 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:59 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 重新打开浏览器,任意输入访问地址http://63.1.1.240,通过显示命令查看,用户IPoE Web 上线

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : web

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:53:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web mac-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:53:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.16  IPoE MAC Trigger三层无感知认证配置举例

1. 组网需求

·     DHCP Client经由三层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备同时作为DHCP服务器。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器、Portal Web服务器以及MAC绑定服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-70 IPoE MAC Trigger三层无感知认证配置组网图

 

3. 配置步骤

(1)     配置DHCP中继

# 全局开启DHCP。

<RouterA> system-view

[RouterA] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[RouterA] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[RouterA] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/1视图。

[RouterA] interface gigabitethernet 3/1/1

[RouterA–GigabitEthernet3/1/1] dhcp select relay

[RouterA–GigabitEthernet3/1/1] dhcp relay server-address 2.2.2.2

[RouterA–GigabitEthernet3/1/1] quit

# 配置DHCP中继到BRAS侧的缺省路由。

[RouterA] ip route-static 0.0.0.0 24 2.2.2.2

(2)     配置RouterB

a.     配置各接口IP地址(略)

b.     配置DHCP服务器

# 全局开启DHCP。

<RouterB> system-view

[RouterB] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[RouterB] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1和DNS服务器地址8.8.8.8。

[RouterB-dhcp-pool-pool1] network 192.168.0.0 24

[RouterB-dhcp-pool-pool1] gateway-list 192.168.0.1

[RouterB-dhcp-pool-pool1] dns-list 8.8.8.8

# 将192.168.0.1设置为禁止地址。

[RouterB-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[RouterB-dhcp-pool-pool1] quit

# 配置到DHCP中继的路由。

[RouterB] ip route-static 192.168.0.0 24 2.2.2.1

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[RouterB] portal server newpt

[RouterB-portal-server-newpt] ip 4.4.4.5 key simple 123456

[RouterB-portal-server-newpt] quit

d.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[RouterB] http-redirect https-port 11111

e.     创建本地用户组

# 创建认证前域用户组,名称为web。

[RouterB] user-group web

New user group added.

[RouterB-ugroup-web] quit

f.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[RouterB] acl advanced name web_permit

[RouterB-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[RouterB-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[RouterB] acl advanced name neiwang

[RouterB-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[RouterB-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[RouterB] acl advanced name web_http

[RouterB-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[RouterB-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[RouterB] acl advanced name web_https

[RouterB-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[RouterB-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[RouterB] acl advanced name ip

[RouterB-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[RouterB-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[RouterB] acl advanced name neiwang_out

[RouterB-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[RouterB-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[RouterB] acl advanced name web_out

[RouterB-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[RouterB-acl-ipv4-adv-web_out] quit

g.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[RouterB] traffic classifier web_permit operator and

[RouterB-classifier-web_permit] if-match acl name web_permit

[RouterB-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[RouterB] traffic classifier neiwang operator and

[RouterB-classifier-neiwang] if-match acl name neiwang

[RouterB-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[RouterB] traffic classifier web_http operator and

[RouterB-classifier-web_http] if-match acl name web_http

[RouterB-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[RouterB] traffic classifier web_https operator and

[RouterB-classifier-web_https] if-match acl name web_https

[RouterB-classifier-web_https] quit

# 配置类ip_cpu,匹配ACL ip。

[RouterB] traffic classifier ip_cpu operator and

[RouterB-classifier-ip_cpu] if-match acl name ip

[RouterB-classifier-ip_cpu] quit

# 配置类ip_deny,匹配ACL ip。

[RouterB] traffic classifier ip_deny operator and

[RouterB-classifier-ip_deny] if-match acl name ip

[RouterB-classifier-ip_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[RouterB] traffic classifier neiwang_out operator and

[RouterB-classifier-neiwang_out] if-match acl name neiwang_out

[RouterB-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[RouterB] traffic classifier web_out operator and

[RouterB-classifier-web_out] if-match acl name web_out

[RouterB-classifier-web_out] quit

h.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[RouterB] traffic behavior web_permit

[RouterB-behavior-web_permit] filter permit

[RouterB-behavior-web_permit] free account

[RouterB-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[RouterB] traffic behavior neiwang

[RouterB-behavior-neiwang] filter permit

[RouterB-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[RouterB] traffic behavior web_http

[RouterB-behavior-web_http] redirect http-to-cpu

[RouterB-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[RouterB] traffic behavior web_https

[RouterB-behavior-web_https] redirect https-to-cpu

[RouterB-behavior-web_https] quit

# 配置流行为web_cpu,对用户组web中用户的所有IP报文都重定向到CPU。

[RouterB] traffic behavior web_cpu

[RouterB-behavior-web_cpu] redirect cpu

[RouterB-behavior-web_cpu] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[RouterB] traffic behavior web_deny

[RouterB-behavior-web_deny] filter deny

[RouterB-behavior-web_deny] free account

[RouterB-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[RouterB] traffic behavior neiwang_out

[RouterB-behavior-neiwang_out] filter permit

[RouterB-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[RouterB] traffic behavior web_out

[RouterB-behavior-web_out] filter permit

[RouterB-behavior-web_out] free account

[RouterB-behavior-web_out] quit

i.     配置QoS策略

# 配置入方向QoS策略web

[RouterB] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文都重定向到CPU,如果重定向无感知认证失败,则丢弃报文。

[RouterB-qospolicy-web] classifier web_permit behavior web_permit

[RouterB-qospolicy-web] classifier neiwang behavior neiwang

[RouterB-qospolicy-web] classifier web_http behavior web_http

[RouterB-qospolicy-web] classifier web_https behavior web_https

[RouterB-qospolicy-web] classifier ip_cpu behavior web_cpu

[RouterB-qospolicy-web] classifier ip_deny behavior web_deny

[RouterB-qospolicy-web] quit

# 配置出方向QoS策略out

[RouterB] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[RouterB-qospolicy-out] classifier web_out behavior web_out

[RouterB-qospolicy-out] classifier neiwang_out behavior neiwang_out

[RouterB-qospolicy-out] classifier ip_deny behavior web_deny

[RouterB-qospolicy-out] quit

j.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[RouterB] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[RouterB] qos apply policy out global outbound

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[RouterB] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[RouterB-radius-rs1] primary authentication 4.4.4.5

[RouterB-radius-rs1] primary accounting 4.4.4.5

[RouterB-radius-rs1] key authentication simple radius

[RouterB-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[RouterB-radius-rs1] user-name-format without-domain

[RouterB-radius-rs1] quit

l.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[RouterB] domain name dm1

[RouterB-isp-dm1] authentication ipoe none

[RouterB-isp-dm1] authorization ipoe none

[RouterB-isp-dm1] accounting ipoe none

# 配置授权地址池以及用户组。

[RouterB-isp-dm1] authorization-attribute user-group web

[RouterB-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL。

[RouterB-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[RouterB-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[RouterB] domain name dm2

[RouterB-isp-dm2] authentication ipoe radius-scheme rs1

[RouterB-isp-dm2] authorization ipoe radius-scheme rs1

[RouterB-isp-dm2] accounting ipoe radius-scheme rs1

[RouterB-isp-dm2] quit

m. 配置IPoE无感知认证基本功能

# 开启IPoE功能,并配置三层接入模式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber routed enable

# 配置IPoE用户采用Web认证方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[RouterB–GigabitEthernet3/1/1] ip subscriber pre-auth domain dm1

[RouterB–GigabitEthernet3/1/1] ip subscriber web-auth domain dm2

# 开启在线用户探测功能,并指定ICMP探测方式,重复尝试次数为5,探测间隔为120秒。

说明

缺省为ARP探测方式,三层无感知时,需使用ICMP探测方式或关闭探测功能。

 

[RouterB–GigabitEthernet3/1/1] ip subscriber user-detect ip icmp retry 5 interval 120

[RouterB–GigabitEthernet3/1/1] quit

n.     (可选)配置IPoE DHCP用户异常下线后重新上线功能

说明

·     在允许DHCP用户异常下线后通过报文重新触发上线的组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户异常下线后重新上线的关键配置。相关原理及配置限制和指导请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

# 开启DHCP报文触发方式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator unclassified-ip enable matching-user

[RouterB–GigabitEthernet3/1/1] quit

o.     (可选)配置IPoE DHCP用户漫游功能

说明

·     在漫游组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户漫游功能的关键配置。相关原理及配置限制和指导请参见“1.24  配置IPoE个人接入用户漫游功能”。漫游功能举例请参见“1.27.22  IPoE个人用户漫游配置举例”。

 

# 开启DHCP报文触发方式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber roaming enable

# 在接口上配置DHCP收到物理位置发生变化、MAC地址不变的上线用户发送的DHCP-DISCOVER报文后,先释放将对应MAC地址的已在线租约,再为该用户分配IP地址。

[RouterB–GigabitEthernet3/1/1] dhcp session-mismatch action fast-renew

[RouterB–GigabitEthernet3/1/1] quit

p.     配置Portal基于MAC地址的快速认证

# 创建MAC绑定服务器mts。

[RouterB] portal mac-trigger-server mts

# 配置MAC绑定服务器的地址为4.4.4.5

[RouterB-portal-mac-trigger-server-mts] ip 4.4.4.5

[RouterB-portal-mac-trigger-server-mts] quit

# 在接口GigabitEthernet3/1/1上应用MAC绑定服务器mts。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] portal apply mac-trigger-server mts

[RouterB–GigabitEthernet3/1/1] quit

(3)     配置RADIUS服务器

# 配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-46所示增加接入设备页面。

¡     输入共享密钥为:radius。

¡     其他采用缺省配置。

图1-71 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-47所示页面输入接入设备地址4.4.4.2并单击<确定>。

图1-72 手动增加接入设备

 

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,进入接入策略管理页面,在该页面中单击<增加>按钮,进入如图1-48所示增加接入策略页面。

¡     输入接入策略名为:AccessPolicy。

¡     其他采用缺省配置。

图1-73 增加接入策略

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,进入接入服务管

理页面,在该页面中单击<增加>按钮,进入如图1-49所示增加接入服务页面。

¡     输入服务名为:IPoE_Server

¡     缺省接入策略选择已创建的策略“AccessPolicy”。

¡     其他采用缺省配置。

图1-74 增加接入服务

 

# 在IMC界面增加用户

单击导航树中的[用户管理/增加用户]菜单项,进入如图1-50所示增加用户页面,填写用户姓名和证件号码为:IPoE_Web001和001。

图1-75 增加用户

 

单击<确定>按钮后完成用户的添加。

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户页面,在该页面中单击<增加>按钮,进入如图1-51所示增加接入用户页面。

¡     用户姓名选择:IPoE_Web001

¡     账号名填写为:user1

¡     密码为:pass1

¡     接入服务选择之前已创建的IPoE_Server

图1-76 增加接入用户

 

(4)     配置Portal服务器(iMC PLAT 7.1)

说明

下面以iMC为例(使用iMC版本为:iMC PLAT 7.1(E0303)、iMC EIA 7.1(F0303)、iMC EIP 7.1(F0303))说明Portal server的基本配置。

 

# 配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-52所示。

图1-77 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-53所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-78 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-54所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/2的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-79 增加设备信息配置页面

 

# 配置端口组信息

图1-55所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-80 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-56所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     无感知认证选择“支持”。

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-81 增加端口组信息配置页面

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上Portal认证服务器配置生效。

(5)     配置MAC绑定服务器(iMC PLAT 7.1)

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,并点击<增加>按钮,进入如图1-57所示增加接入策略页面。

¡     填写接入策略名。

¡     选择业务分组。

¡     其它参数可采用缺省配置。

图1-82 增加接入策略配置

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,并点击<增加>按钮,进入如图1-58所示增加接入服务配置页面。

¡     填写服务名。

¡     勾选“Portal无感知认证”。

¡     其它参数可采用缺省配置。

图1-83 增加接入服务配置

 

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,并点击<增加>按钮,进入如图1-59所示增加接入用户页面。在接入信息部分:

¡     选择可接入的用户。

¡     设置密码。

¡     设置“Portal无感知认证最大绑定数”。

图1-84 增加接入用户

 

# 配置系统参数

单击导航树中的[接入策略管理/业务参数配置/系统配置]菜单项,并点击[终端管理参数配置]对应的<配置>按钮,进入终端管理参数配置页面。

“非智能终端Portal无感知认证”可根据实际需要启用或禁用,本例中为启用。

图1-85 配置终端管理参数

 

单击导航树中的[接入策略管理/业务参数配置/系统配置]菜单项,点击[终端老化时长]对应的<配置>按钮后点击<修改>,进入终端老化时长配置页面。

根据实际需要配置终端老化时间,本例中采用缺省值。

图1-86 配置终端老化时长

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上配置生效。

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-87 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<下线>按钮,通过显示命令查看,此时用户返回认证前域状态

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:59 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:59 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 重新打开浏览器,任意输入访问地址http://63.1.1.240,通过显示命令查看,用户IPoE Web上线

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:53:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web mac-trigger

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:53:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.17  IPoE MAC三层无感知认证配置举例

1. 组网需求

·     DHCP Client经由三层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备同时作为DHCP服务器。

·     由一台安装了H3C iMC的服务器同时承担Portal认证服务器和Portal Web服务器的职责。

·     由一台支持MAC绑定功能的RADIUS服务器同时承担认证、授权和计费服务器以及MAC绑定服务器的职责。

·     FTP server是一台内网服务器。

2. 组网图

图1-88 IPoE MAC三层无感知认证配置组网图

 

3. 配置步骤

(1)     配置DHCP中继

# 全局开启DHCP。

<RouterA> system-view

[RouterA] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[RouterA] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[RouterA] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/1视图。

[RouterA] interface gigabitethernet 3/1/1

[RouterA–GigabitEthernet3/1/1] dhcp select relay

[RouterA–GigabitEthernet3/1/1] dhcp relay server-address 2.2.2.2

[RouterA–GigabitEthernet3/1/1] quit

# 配置DHCP中继到BRAS侧的缺省路由。

[RouterA] ip route-static 0.0.0.0 24 2.2.2.2

(2)     配置RouterB

a.     配置各接口IP地址(略)

b.     配置DHCP服务器

# 全局开启DHCP。

<RouterB> system-view

[RouterB] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[RouterB] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1和DNS服务器地址8.8.8.8。

[RouterB-dhcp-pool-pool1] network 192.168.0.0 24

[RouterB-dhcp-pool-pool1] gateway-list 192.168.0.1

[RouterB-dhcp-pool-pool1] dns-list 8.8.8.8

# 将192.168.0.1设置为禁止地址。

[RouterB-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[RouterB-dhcp-pool-pool1] quit

# 配置到DHCP中继的路由。

[RouterB] ip route-static 192.168.0.0 24 2.2.2.1

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.5,密钥为明文123456。

[RouterB] portal server newpt

[RouterB-portal-server-newpt] ip 4.4.4.5 key simple 123456

[RouterB-portal-server-newpt] quit

d.     配置对HTTPS报文进行重定向的内部侦听端口号

# 配置对HTTPS报文进行重定向的内部侦听端口号为11111。

[RouterB] http-redirect https-port 11111

e.     创建本地用户组

# 创建认证前域用户组,名称为web。

[RouterB] user-group web

New user group added.

[RouterB-ugroup-web] quit

f.     配置用于认证前域用户的ACL规则

# 为IPv4高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[RouterB] acl advanced name web_permit

[RouterB-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[RouterB-acl-ipv4-adv-web_permit] quit

# 为IPv4高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[RouterB] acl advanced name neiwang

[RouterB-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[RouterB-acl-ipv4-adv-neiwang] quit

# 为IPv4高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[RouterB] acl advanced name web_http

[RouterB-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[RouterB-acl-ipv4-adv-web_http] quit

# 为IPv4高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[RouterB] acl advanced name web_https

[RouterB-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[RouterB-acl-ipv4-adv-web_https] quit

# 为IPv4高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[RouterB] acl advanced name ip

[RouterB-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[RouterB-acl-ipv4-adv-ip] quit

# 为IPv4高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[RouterB] acl advanced name neiwang_out

[RouterB-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[RouterB-acl-ipv4-adv-neiwang_out] quit

# 为IPv4高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[RouterB] acl advanced name web_out

[RouterB-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[RouterB-acl-ipv4-adv-web_out] quit

g.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[RouterB] traffic classifier web_permit operator and

[RouterB-classifier-web_permit] if-match acl name web_permit

[RouterB-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[RouterB] traffic classifier neiwang operator and

[RouterB-classifier-neiwang] if-match acl name neiwang

[RouterB-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[RouterB] traffic classifier web_http operator and

[RouterB-classifier-web_http] if-match acl name web_http

[RouterB-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[RouterB] traffic classifier web_https operator and

[RouterB-classifier-web_https] if-match acl name web_https

[RouterB-classifier-web_https] quit

# 配置类ip_cpu,匹配ACL ip。

[RouterB] traffic classifier ip_cpu operator and

[RouterB-classifier-ip_cpu] if-match acl name ip

[RouterB-classifier-ip_cpu] quit

# 配置类ip_deny,匹配ACL ip。

[RouterB] traffic classifier ip_deny operator and

[RouterB-classifier-ip_deny] if-match acl name ip

[RouterB-classifier-ip_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[RouterB] traffic classifier neiwang_out operator and

[RouterB-classifier-neiwang_out] if-match acl name neiwang_out

[RouterB-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[RouterB] traffic classifier web_out operator and

[RouterB-classifier-web_out] if-match acl name web_out

[RouterB-classifier-web_out] quit

h.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[RouterB] traffic behavior web_permit

[RouterB-behavior-web_permit] filter permit

[RouterB-behavior-web_permit] free account

[RouterB-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[RouterB] traffic behavior neiwang

[RouterB-behavior-neiwang] filter permit

[RouterB-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[RouterB] traffic behavior web_http

[RouterB-behavior-web_http] redirect http-to-cpu

[RouterB-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[RouterB] traffic behavior web_https

[RouterB-behavior-web_https] redirect https-to-cpu

[RouterB-behavior-web_https] quit

# 配置流行为web_cpu,对用户组web中用户的所有IP报文都重定向到CPU。

[RouterB] traffic behavior web_cpu

[RouterB-behavior-web_cpu] redirect cpu

[RouterB-behavior-web_cpu] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[RouterB] traffic behavior web_deny

[RouterB-behavior-web_deny] filter deny

[RouterB-behavior-web_deny] free account

[RouterB-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[RouterB] traffic behavior neiwang_out

[RouterB-behavior-neiwang_out] filter permit

[RouterB-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[RouterB] traffic behavior web_out

[RouterB-behavior-web_out] filter permit

[RouterB-behavior-web_out] free account

[RouterB-behavior-web_out] quit

i.     配置QoS策略

# 配置入方向QoS策略web

[RouterB] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文都重定向到CPU,如果重定向无感知认证失败,则丢弃报文。

[RouterB-qospolicy-web] classifier web_permit behavior web_permit

[RouterB-qospolicy-web] classifier neiwang behavior neiwang

[RouterB-qospolicy-web] classifier web_http behavior web_http

[RouterB-qospolicy-web] classifier web_https behavior web_https

[RouterB-qospolicy-web] classifier ip_cpu behavior web_cpu

[RouterB-qospolicy-web] classifier ip_deny behavior web_deny

[RouterB-qospolicy-web] quit

# 配置出方向QoS策略out

[RouterB] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[RouterB-qospolicy-out] classifier web_out behavior web_out

[RouterB-qospolicy-out] classifier neiwang_out behavior neiwang_out

[RouterB-qospolicy-out] classifier ip_deny behavior web_deny

[RouterB-qospolicy-out] quit

j.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[RouterB] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[RouterB] qos apply policy out global outbound

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[RouterB] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[RouterB-radius-rs1] primary authentication 4.4.4.1

[RouterB-radius-rs1] primary accounting 4.4.4.1

[RouterB-radius-rs1] key authentication simple radius

[RouterB-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[RouterB-radius-rs1] user-name-format without-domain

[RouterB-radius-rs1] quit

l.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[RouterB] domain name dm1

[RouterB-isp-dm1] authentication ipoe none

[RouterB-isp-dm1] authorization ipoe none

[RouterB-isp-dm1] accounting ipoe none

# 配置授权地址池以及用户组。

[RouterB-isp-dm1] authorization-attribute user-group web

[RouterB-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL。

[RouterB-isp-dm1] web-server url http://4.4.4.5:8080/portal/

[RouterB-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[RouterB] domain name dm2

[RouterB-isp-dm2] authentication ipoe radius-scheme rs1

[RouterB-isp-dm2] authorization ipoe radius-scheme rs1

[RouterB-isp-dm2] accounting ipoe radius-scheme rs1

[RouterB-isp-dm2] quit

m. 配置IPoE无感知认证基本功能

# 开启IPoE功能,并配置三层接入模式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber routed enable

# 配置IPoE用户采用Web MAC认证方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber authentication-method web mac-auth

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[RouterB–GigabitEthernet3/1/1] ip subscriber pre-auth domain dm1

[RouterB–GigabitEthernet3/1/1] ip subscriber web-auth domain dm2

# 开启在线用户探测功能,并指定ICMP探测方式,重复尝试次数为5,探测间隔为120秒。

说明

缺省为ARP探测方式,三层无感知时,需使用ICMP探测方式或关闭探测功能。

 

[RouterB–GigabitEthernet3/1/1] ip subscriber user-detect ip icmp retry 5 interval 120

[RouterB–GigabitEthernet3/1/1] quit

n.     (可选)配置IPoE DHCP用户异常下线后重新上线功能

说明

·     在允许DHCP用户异常下线后通过报文重新触发上线的组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户异常下线后重新上线的关键配置。相关原理及配置限制和指导请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

# 开启DHCP报文触发方式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator unclassified-ip enable matching-user

[RouterB–GigabitEthernet3/1/1] quit

o.     (可选)配置IPoE DHCP用户漫游功能

说明

·     在漫游组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户漫游功能的关键配置。相关原理及配置限制和指导请参见“1.24  配置IPoE个人接入用户漫游功能”。漫游功能举例请参见“1.27.22  IPoE个人用户漫游配置举例”。

 

# 开启DHCP报文触发方式。

[RouterB] interface gigabitethernet 3/1/1

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[RouterB–GigabitEthernet3/1/1] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[RouterB–GigabitEthernet3/1/1] ip subscriber roaming enable

# 在接口上配置DHCP收到物理位置发生变化、MAC地址不变的上线用户发送的DHCP-DISCOVER报文后,先释放将对应MAC地址的已在线租约,再为该用户分配IP地址。

[RouterB–GigabitEthernet3/1/1] dhcp session-mismatch action fast-renew

[RouterB–GigabitEthernet3/1/1] quit

(3)     配置RADIUS服务器

对于RADIUS服务器上AAA和MAC绑定配置,具体需要参见RADIUS server的配置说明书。

(4)     配置Portal服务器

# 配置Portal主页。

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-39所示。

图1-89 Portal服务器配置页面

iMC-1

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-40所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-90 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-41所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/2的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-91 增加设备信息配置页面

 

# 配置端口组信息

图1-42所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-92 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-43所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-93 增加端口组信息配置页面

iMC-5

 

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-94 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86380 sec

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<下线>按钮,通过显示命令查看,此时用户返回认证前域状态

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:59 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:59 2016

  Redirect URL                : http://4.4.4.5:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 重新打开浏览器,任意输入访问地址http://63.1.1.240,通过显示命令查看,用户IPoE Web 上线

[RouterB] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : web

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/1

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:53:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web mac-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:53:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.18  IPoE Web支持EAP认证配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器和Portal Web服务器的职责。

2. 组网图

图1-95 IPoE Web支持EAP认证配置组网图

3. 配置步骤

(1)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24,分配的网关地址192.168.0.1

[DHCP-server-dhcp-pool-pool1] network 192.168.0.0 24

[DHCP-server-dhcp-pool-pool1] gateway-list 192.168.0.1

# 将192.168.0.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 192.168.0.0 24 4.4.4.2

(2)     配置Device

a.     配置各接口IP地址(略)

b.     配置DHCP relay

# 全局开启DHCP。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] quit

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

c.     配置Portal认证服务器

# 配置Portal认证服务器:名称为newpt,IP地址为4.4.4.1,密钥为明文123456。

[Device] portal server newpt

[Device-portal-server-newpt] ip 4.4.4.1 key simple 123456

[Device-portal-server-newpt] quit

d.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple 123456

[Device-radius-rs1] key accounting simple 123456

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

e.     配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置授权地址池以及用户组。

[Device-isp-dm1] authorization-attribute ip-pool pool1

# 配置Web认证页面URL和Web认证服务器IP地址。

[Device-isp-dm1] web-server url http://4.4.4.1:8080/portal/

[Device-isp-dm1] web-server ip 4.4.4.1

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] quit

f.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

(3)     配置RADIUS服务器

# 配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-33所示增加接入设备页面。

¡     输入共享密钥为:radius。

¡     其他采用缺省配置。

图1-96 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-39所示页面输入接入设备地址4.4.4.2并单击<确定>。

 

# 增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,并点击<增加>按钮,进入“增加接入策略”页面。

¡     填写接入策略名。

¡     证书认证选择EAP证书认证,证书类型根据实际情况进行选择。

¡     其它参数可采用缺省配置。

图1-97 增加接入策略配置

 

# 增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,并点击<增加>按钮,进入“增加接入服务配置”页面。

¡     填写服务名。

¡     缺省接入策略选择已创建的策略“AccessPolicy”。

¡     其它参数可采用缺省配置。

图1-98 增加接入服务配置

 

# 增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,并点击<增加>按钮,进入增加接入用户页面。在接入信息部分:

¡     选择可接入的用户。

¡     设置密码。

图1-99 增加接入用户

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上配置生效。

(4)     配置Portal服务器(iMC PLAT 7.1)

说明

下面以iMC为例(使用iMC版本为:iMC PLAT 7.1(E0303)、iMC EIA 7.1(F0303)、iMC EIP 7.1(F0303))说明Portal server的基本配置。

 

# 配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-100所示。

图1-100 Portal服务器配置页面

 

# 配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-101所示。

¡     输入IP地址组名为“IPoE_Web_User”;

¡     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

¡     其他采用缺省配置;

¡     单击<确定>按钮完成操作。

图1-101 增加IP地址组配置页面

iMC-2

 

# 增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-102所示。

¡     输入设备名为“NAS”;

¡     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

¡     输入密钥为“123456”;

¡     选择组网方式为“直连”;

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-102 增加设备信息配置页面

 

# 配置端口组信息

图1-103所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-103 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-104所示。

¡     输入端口组名为“group”;

¡     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

¡     认证方式选择EAP认证。

¡     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-104 增加端口组信息配置页面

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上Portal认证服务器配置生效。

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IP地址为192.168.0.2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:51:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:51:28 2016

  Redirect URL                : http://4.4.4.1:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,打开iNode的登录页面,输入服务器地址、和用户名和密码,如图1-105所示。

图1-105 打开iNode客户端

 

# 在iNode客户端属性设置里面选择证书认证,选择证书,并勾选<验证服务器证书>,如图1-106所示。

图1-106 设置iNode客户端属性

 

# iNode客户端属性设置完成后,单击<确定>按钮返回iNode客户端认证页面。

# 在iNode认证页面单击<连接>按钮进行EAP认证,认证成功后可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : client

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:28 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:28 2016

  Redirect URL                : N/A

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<断开>按钮,通过显示命令查看,此时用户返回认证前域状态

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 0015e947f4d4

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  User address type           : N/A

  MAC address                 : 0015-e947-f4d4

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x3808001c

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : 8.8.8.8

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : N/A

  Access time                 : Aug 2 16:52:59 2016

  Online time(hh:mm:ss)       : 00:00:20

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv4 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : N/A

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : Aug 2 16:52:59 2016

  Redirect URL                : http://4.4.4.1:8080/portal/

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink packets/bytes   : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.19  IPoE双栈用户普通Web认证配置举例

1. 组网需求

图1-107所示:Router A为某学校的一台BRAS设备,为学校用户提供IPoE接入服务。要求:

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担RADIUS服务器、Portal认证服务器和Portal Web服务器的职责。

·     FTP server是一台内网服务器。

·     Web认证通过后限速5Mbps。

2. 组网图

图1-107 IPoE双栈用户普通Web认证配置组网图

 

3. 配置步骤

(1)     配置IP地址及路由

按照图1-107配置各接口的IP地址,并确保BRAS设备和各服务器之间路由可达,具体配置过程略。

(2)     设置DNS服务器

请正确设置DNS服务器,以便服务器可以根据IPoE双栈用户先上线的协议栈类型,解析出Web认证页面http://www.h3c.web.com对应的IPv4 URL地址或IPv6 URL地址。DNS服务器具体设置过程略。

(3)     配置DHCP服务器

a.     配置DHCPv4地址池

# 开启DHCP服务。

<DHCP> system-view

[DHCP] dhcp enable

# 创建名称为pool1的DHCPv4地址池并进入其视图。

[DHCP] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24。

[DHCP-dhcp-pool-pool1] network 192.168.0.0 24

# 配置为用户分配的网关地址为192.168.0.1。

[DHCP-dhcp-pool-pool1] gateway-list 192.168.0.1

# 将192.168.0.1设置为禁止地址。

[DHCP-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCPv4应答报文的下一跳指定为连接DHCPv4客户端网络的接口IPv4地址4.4.4.2。

[DHCP] ip route-static 192.168.0.0 24 4.4.4.2

b.     配置DHCPv6地址池

# 创建名称为pool2的DHCPv6地址池并进入其视图。

[DHCP] ipv6 dhcp pool pool2

# 配置地址池动态分配的IPv6地址网段192::0/64。

[DHCP-dhcp6-pool-pool2] network 192::0/64

[DHCP-dhcp6-pool-pool2] quit

# 将192::1设置为禁止地址。

[DHCP] ipv6 dhcp server forbidden-address 192::1

# 配置接口GigabitEthernet3/1/1工作在DHCPv6服务器模式。

[DHCP] interface gigabitethernet 3/1/1

[DHCP-GigabitEthernet3/1/1] ipv6 dhcp select server

[DHCP-GigabitEthernet3/1/1] quit

# 通过配置静态路由,将目的地址为192::0网段的DHCPv6应答报文的下一跳指定为连接DHCPv6客户端网络的接口IPv6地址4::2。

[DHCP] ipv6 route-static 192::0 64 4::2

(4)     配置Device

a.     配置DHCP中继

# 全局开启DHCP。

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

# 创建中继地址池pool2,指定匹配该地址池的DHCPv6客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] ipv6 dhcp pool pool2

[Device-dhcp6-pool-pool2] gateway-list 192::1

[Device-dhcp6-pool-pool2] remote-server 4::3

[Device-dhcp6-pool-pool2] quit

# 配置接口工作在DHCPv4中继模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] dhcp select relay

# 配置自动生成IPv6链路本地地址,该IPv6链路本地地址作为用户的网关。

[Device–GigabitEthernet3/1/2] ipv6 address auto link-local

# 配置接口工作在DHCPv6中继模式,开启DHCPv6中继用户表项记录功能。

[Device–GigabitEthernet3/1/2] ipv6 dhcp select relay

[Device–GigabitEthernet3/1/2] ipv6 dhcp relay client-information record

# 取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息

[Device–GigabitEthernet3/1/2] undo ipv6 nd ra halt

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig managed-address-flag

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig other-flag

# 为避免终端使用临时IPv6地址进行认证,从而导致认证失败,在用户上线接口配置前缀不在RA消息中发布,从而避免终端使用前缀生成临时IPv6地址。

[Device–GigabitEthernet3/1/2] ipv6 nd ra prefix 192::/64 no-advertise

[Device–GigabitEthernet3/1/2] quit

b.     配置Portal认证服务器

# 配置IPv4 Portal认证服务器:名称为newpt1,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt1

[Device-portal-server-newpt1] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt1] quit

# 配置IPv6 Portal认证服务器:名称为newpt2,IPv6地址为4::5,密钥为明文123456。

[Device] portal server newpt2

[Device-portal-server-newpt2] ipv6 4::5 key simple 123456

[Device-portal-server-newpt2] quit

c.     配置HTTPS的内部侦听端口

# 配置HTTPS的内部侦听端口,端口不要跟已有端口冲突即可。

[Device] http-redirect https-port 11111

d.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

e.     配置用于认证前域用户的ACL规则

# 分别为IPv4和IPv6高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

[Device] acl ipv6 advanced name web_permit

[Device-acl-ipv6-adv-web_permit] rule 0 permit ipv6 destination 4::5 128 user-group web

[Device-acl-ipv6-adv-web_permit] quit

# 分别为IPv4和IPv6高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.1 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

[Device] acl ipv6 advanced name neiwang

[Device-acl-ipv6-adv-neiwang] rule 0 permit ipv6 destination 4::1 128 user-group web

[Device-acl-ipv6-adv-neiwang] quit

# 分别为IPv4和IPv6高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

[Device] acl ipv6 advanced name web_http

[Device-acl-ipv6-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv6-adv-web_http] quit

# 分别为IPv4和IPv6高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

[Device] acl ipv6 advanced name web_https

[Device-acl-ipv6-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv6-adv-web_https] quit

# 分别为IPv4和IPv6高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

[Device] acl ipv6 advanced name ip

[Device-acl-ipv6-adv-ip] rule 0 permit ipv6 user-group web

[Device-acl-ipv6-adv-ip] quit

# 分别为IPv4和IPv6高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.1 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

[Device] acl ipv6 advanced name neiwang_out

[Device-acl-ipv6-adv-neiwang_out] rule 0 permit ipv6 source 4::1 128 user-group web

[Device-acl-ipv6-adv-neiwang_out] quit

# 分别为IPv4和IPv6高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

[Device] acl ipv6 advanced name web_out

[Device-acl-ipv6-adv-web_out] rule 0 permit ipv6 source 4::5 128 user-group web

[Device-acl-ipv6-adv-web_out] quit

f.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator or

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] if-match acl ipv6 name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator or

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] if-match acl ipv6 name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator or

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] if-match acl ipv6 name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator or

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] if-match acl ipv6 name web_https

[Device-classifier-web_https] quit

# 配置类web_deny,匹配ACL ip。

[Device] traffic classifier web_deny operator or

[Device-classifier-web_deny] if-match acl name ip

[Device-classifier-web_deny] if-match acl ipv6 name ip

[Device-classifier-web_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator or

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] if-match acl ipv6 name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator or

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] if-match acl ipv6 name web_out

[Device-classifier-web_out] quit

g.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

h.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文均禁止通过。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier web_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier web_deny behavior web_deny

[Device-qospolicy-out] quit

i.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

j.     查看应用的策略是否生效

# 查看入方向QoS策略的配置信息和运行情况。

[Device] display qos policy global slot 3 inbound

  Direction: Inbound

  Policy: web

   Classifier: web_permit

     Operator: OR

     Rule(s) :

      If-match acl name web_permit

      If-match acl ipv6 name web_permit

     Behavior: web_permit

      Filter enable: Permit

      Free account enable

   Classifier: neiwang

     Operator: OR

     Rule(s) :

      If-match acl name neiwang

      If-match acl ipv6 name neiwang

     Behavior: neiwang

      Filter enable: Permit

   Classifier: web_http

     Operator: OR

     Rule(s) :

      If-match acl name web_http

      If-match acl ipv6 name web_http

     Behavior: web_http

      Redirecting:

        Redirect http to CPU

   Classifier: web_https

     Operator: OR

     Rule(s) :

      If-match acl name web_https

      If-match acl ipv6 name web_https

     Behavior: web_https

      Redirecting:

        Redirect https to CPU

   Classifier: web_deny

     Operator: OR

     Rule(s) :

      If-match acl name ip

      If-match acl ipv6 name ip

     Behavior: web_deny

      Filter enable: Deny

      Free account enable

# 查看出方向QoS策略的配置信息和运行情况。

[Device] display qos policy global slot 3 outbound

  Direction: Outbound

  Policy: out

   Classifier: neiwang_out

     Operator: OR

     Rule(s) :

      If-match acl name neiwang_out

      If-match acl ipv6 name neiwang_out

     Behavior: neiwang_out

      Filter enable: Permit

   Classifier: web_out

     Operator: OR

     Rule(s) :

      If-match acl name web_out

      If-match acl ipv6 name web_out

     Behavior: web_out

      Filter enable: Permit

      Free account enable

   Classifier: web_deny

     Operator: OR

     Rule(s) :

      If-match acl name ip

      If-match acl ipv6 name ip

     Behavior: web_deny

      Filter enable: Deny

      Free account enable

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.5

[Device-radius-rs1] primary accounting 4.4.4.5

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

# 设置RADIUS DAE客户端的IP地址为4.4.4.5,与RADIUS DAE客户端交互DAE报文时使用的共享密钥为明文radius。

[Device] radius dynamic-author server

[Device-radius-da-server] client ip 4.4.4.5 key simple radius

[Device-radius-da-server] quit

l.     配置User Profile

# 配置名称为car的User Profile对上线用户发送的报文进行流量监管。报文正常流速为5210kbps,允许325625byte的突发流量通过,速率小于等于5210kbps时正常发送,大于5210kbps时,报文被丢弃。

[Device] user-profile car

[Device-user-profile-car] qos car inbound any cir 5210 cbs 325625

[Device-user-profile-car] quit

m. 配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置前域授权用户组和地址池。

[Device-isp-dm1] authorization-attribute user-group web

[Device-isp-dm1] authorization-attribute ip-pool pool1

[Device-isp-dm1] authorization-attribute ipv6-pool pool2

# 配置Web认证页面URL。

[Device-isp-dm1] web-server url http://www.h3c.web.com

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] authorization-attribute user-profile car

[Device-isp-dm2] quit

n.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

(5)     配置RADIUS服务器

说明

下面以iMC为例,说明RADIUS服务器的基本配置。不同iMC版本配置可能有所不同,具体配置请以实际版本及对应版本的iMC服务器手册为准,本节配置仅供参考。

 

a.     配置接入设备

登录进入iMC管理平台,选择“用户”页签,单击导航树中的[接入策略管理/接入设备管理/接入设备配置]菜单项,进入接入设备配置页面,在该页面中单击<增加>按钮,进入如图1-33所示增加接入设备页面。

-     输入共享密钥为:radius。

-     其他采用缺省配置。

图1-108 增加接入设备

 

在该页面中设备列表下方单击<手工增加>,在如图1-34所示页面输入接入设备地址4.4.4.2并单击<确定>。

图1-109 手动增加接入设备

 

b.     增加接入策略

单击导航树中的[接入策略管理/接入策略管理]菜单项,进入接入策略管理页面,在该页面中单击<增加>按钮,进入如图1-35所示增加接入策略页面。

-     输入接入策略名为:AccessPolicy。

-     其他采用缺省配置。

图1-110 增加接入策略

 

c.     增加接入服务

单击导航树中的[接入策略管理/接入服务管理]菜单项,进入接入服务管

理页面,在该页面中单击<增加>按钮,进入如图1-36所示增加接入服务页面。

-     输入服务名为:IPoE_Server

-     缺省接入策略选择已创建的策略“AccessPolicy”。

-     其他采用缺省配置。

图1-111 增加接入服务

 

d.     在IMC界面增加用户

单击导航树中的[用户管理/增加用户]菜单项,进入如图1-37所示增加用户页面,填写用户姓名和证件号码为:IPoE_Web001和001。

图1-112 增加用户

 

单击<确定>按钮后完成用户的添加。

e.     增加接入用户

单击导航树中的[接入用户管理/接入用户]菜单项,进入接入用户页面,在该页面中单击<增加>按钮,进入如图1-38所示增加接入用户页面。

-     用户姓名选择:IPoE_Web001

-     账号名填写为:user1

-     密码为:pass1

-     接入服务选择之前已创建的IPoE_Server

图1-113 增加接入用户

 

(6)     配置Portal服务器

说明

下面以iMC为例,说明Portal服务器的基本配置。不同iMC版本配置可能有所不同,具体配置请以实际版本及对应版本的iMC服务器手册为准,本节配置仅供参考。

 

a.     配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-39所示。

图1-114 Portal服务器配置页面

 

b.     配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-40所示。

-     输入IP地址组名为“IPoE_Web_User”;

-     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

-     其他采用缺省配置;

-     单击<确定>按钮完成操作。

图1-115 增加IP地址组配置页面(IPv4)

 

图1-116所示,继续上述操作添加IPv6地址组。

-     输入IP地址组名为“IPoE_Web_User-2”;

-     IPv6选项框选择“是”;

-     输入起始地址为“192::1”、终止地址为“192::FFFF”。用户主机IPv6地址必须包含在该IP地址组范围内;

-     其他采用缺省配置;

-     单击<确定>按钮完成操作。

图1-116 增加IP地址组配置页面(IPv6)

 

c.     增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-41所示。

-     输入设备名为“NAS”;

-     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

-     输入密钥为“123456”;

-     选择组网方式为“直连”;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-117 增加设备信息配置页面(IPv4)

 

图1-118所示,继续上述操作添加设备的IPv6信息。

-     输入设备名为“NAS-2”;

-     版本选择“Portal 3.0”;

-     输入IP地址为“4::2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

-     输入密钥为“123456”;

-     选择组网方式为“直连”;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-118 增加设备信息配置页面(IPv6

 

d.     配置端口组信息

图1-42所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-119 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-43所示。

-     输入端口组名为“group”;

-     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-120 增加端口组信息配置页面(IPv4)

 

图1-121所示,继续上述操作添加端口组的IPv6信息。

-     输入端口组名为“group-2”;

-     选择IP地址组为“IPoE_Web_User-2”,用户接入网络时使用的IPv6地址必须属于所选的IPv6地址组;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-121 增加端口组信息配置页面(IPv6

 

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IPv4地址为192.168.0.2,IPv6地址为192::2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 001b21a80949

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86383 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591981 sec

  Access time                 : May 27 00:48:51 2018

  Online time(hh:mm:ss)       : 00:00:19

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:48:51 2018

  Redirect URL                : http://www.h3c.web.com

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-122 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1@dm2

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86356 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591954 sec

  Access time                 : May 27 00:48:51 2018

  Online time(hh:mm:ss)       : 00:00:04

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : 86400 sec, remaining: 86395 sec

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:49:32 2018

  Redirect URL                : N/A

 

QoS:

  User profile                : car (active)

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.20  IPoE双栈用户MAC无感知认证配置举例

1. 组网需求

图1-123所示:Router A为某学校的一台BRAS设备,为学校用户提供IPoE接入服务。要求:

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     BRAS接入设备作为DHCP中继向远端DHCP服务器申请IP地址。

·     由一台安装了H3C iMC的服务器同时承担Portal认证服务器和Portal Web服务器的职责。

·     由一台支持MAC绑定功能的RADIUS服务器同时承担认证、授权和计费服务器以及MAC绑定服务器的职责。

·     FTP server是一台内网服务器。

·     Web认证通过后限速5Mbps。

2. 组网图

图1-123 IPoE双栈用户MAC无感知认证配置组网图

 

3. 配置步骤

(1)     配置IP地址及路由

按照图1-123配置各接口的IP地址,并确保BRAS设备和各服务器之间路由可达,具体配置过程略。

(2)     设置DNS服务器

请正确设置DNS服务器,以便服务器可以根据IPoE双栈用户先上线的协议栈类型,解析出Web认证页面http://www.h3c.web.com对应的IPv4 URL地址或IPv6 URL地址。DNS服务器具体设置过程略。

(3)     配置DHCP服务器

a.     配置DHCPv4地址池

# 开启DHCP服务。

<DHCP> system-view

[DHCP] dhcp enable

# 创建名称为pool1的DHCPv4地址池并进入其视图。

[DHCP] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段192.168.0.0/24。

[DHCP-dhcp-pool-pool1] network 192.168.0.0 24

# 配置为用户分配的网关地址为192.168.0.1。

[DHCP-dhcp-pool-pool1] gateway-list 192.168.0.1

# 将192.168.0.1设置为禁止地址。

[DHCP-dhcp-pool-pool1] forbidden-ip 192.168.0.1

[DHCP-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为192.168.0.0网段的DHCPv4应答报文的下一跳指定为连接DHCPv4客户端网络的接口IPv4地址4.4.4.2。

[DHCP] ip route-static 192.168.0.0 24 4.4.4.2

b.     配置DHCPv6地址池

# 创建名称为pool2的DHCPv6地址池并进入其视图。

[DHCP] ipv6 dhcp pool pool2

# 配置地址池动态分配的IPv6地址网段192::0/64。

[DHCP-dhcp6-pool-pool2] network 192::0/64

[DHCP-dhcp6-pool-pool2] quit

# 将192::1设置为禁止地址。

[DHCP] ipv6 dhcp server forbidden-address 192::1

# 配置接口GigabitEthernet3/1/1工作在DHCPv6服务器模式。

[DHCP] interface gigabitethernet 3/1/1

[DHCP-GigabitEthernet3/1/1] ipv6 dhcp select server

[DHCP-GigabitEthernet3/1/1] quit

# 通过配置静态路由,将目的地址为192::0网段的DHCPv6应答报文的下一跳指定为连接DHCPv6客户端网络的接口IPv6地址4::2。

[DHCP] ipv6 route-static 192::0 64 4::2

(4)     配置Device

a.     配置DHCP中继

# 全局开启DHCP。

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 192.168.0.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

# 创建中继地址池pool2,指定匹配该地址池的DHCPv6客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] ipv6 dhcp pool pool2

[Device-dhcp6-pool-pool2] gateway-list 192::1

[Device-dhcp6-pool-pool2] remote-server 4::3

[Device-dhcp6-pool-pool2] quit

# 配置接口工作在DHCPv4中继模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] dhcp select relay

# 配置自动生成IPv6链路本地地址,该IPv6链路本地地址作为用户的网关。

[Device–GigabitEthernet3/1/2] ipv6 address auto link-local

# 配置接口工作在DHCPv6中继模式,开启DHCPv6中继用户表项记录功能。

[Device–GigabitEthernet3/1/2] ipv6 dhcp select relay

[Device–GigabitEthernet3/1/2] ipv6 dhcp relay client-information record

# 取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息

[Device–GigabitEthernet3/1/2] undo ipv6 nd ra halt

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig managed-address-flag

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig other-flag

# 为避免终端使用临时IPv6地址进行认证,从而导致认证失败,在用户上线接口配置前缀不在RA消息中发布,从而避免终端使用前缀生成临时IPv6地址。

[Device–GigabitEthernet3/1/2] ipv6 nd ra prefix 192::/64 no-advertise

[Device–GigabitEthernet3/1/2] quit

b.     配置Portal认证服务器

# 配置IPv4 Portal认证服务器:名称为newpt1,IP地址为4.4.4.5,密钥为明文123456。

[Device] portal server newpt1

[Device-portal-server-newpt1] ip 4.4.4.5 key simple 123456

[Device-portal-server-newpt1] quit

# 配置IPv6 Portal认证服务器:名称为newpt2,IPv6地址为4::5,密钥为明文123456。

[Device] portal server newpt2

[Device-portal-server-newpt2] ipv6 4::5 key simple 123456

[Device-portal-server-newpt2] quit

c.     配置HTTPS的内部侦听端口

# 配置HTTPS的内部侦听端口,端口不要跟已有端口冲突即可。

[Device] http-redirect https-port 11111

d.     创建本地用户组

# 创建认证前域用户组,名称为web。

[Device] user-group web

New user group added.

[Device-ugroup-web] quit

e.     配置用于认证前域用户的ACL规则

# 分别为IPv4和IPv6高级ACL web_permit创建规则如下:匹配用户组web中用户的目的地址为Portal服务器地址的报文。

[Device] acl advanced name web_permit

[Device-acl-ipv4-adv-web_permit] rule 0 permit ip destination 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_permit] quit

[Device] acl ipv6 advanced name web_permit

[Device-acl-ipv6-adv-web_permit] rule 0 permit ipv6 destination 4::5 128 user-group web

[Device-acl-ipv6-adv-web_permit] quit

# 分别为IPv4和IPv6高级ACL neiwang创建规则如下:匹配用户组web中用户的目的地址为内网服务器地址的报文。

[Device] acl advanced name neiwang

[Device-acl-ipv4-adv-neiwang] rule 0 permit ip destination 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang] quit

[Device] acl ipv6 advanced name neiwang

[Device-acl-ipv6-adv-neiwang] rule 0 permit ipv6 destination 4::6 128 user-group web

[Device-acl-ipv6-adv-neiwang] quit

# 分别为IPv4和IPv6高级ACL web_http创建规则如下:匹配用户组web中用户的目的端口为80的TCP报文(即HTTP报文)。

[Device] acl advanced name web_http

[Device-acl-ipv4-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv4-adv-web_http] quit

[Device] acl ipv6 advanced name web_http

[Device-acl-ipv6-adv-web_http] rule 0 permit tcp destination-port eq www user-group web

[Device-acl-ipv6-adv-web_http] quit

# 分别为IPv4和IPv6高级ACL web_https创建规则如下:匹配用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)。

[Device] acl advanced name web_https

[Device-acl-ipv4-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv4-adv-web_https] quit

[Device] acl ipv6 advanced name web_https

[Device-acl-ipv6-adv-web_https] rule 0 permit tcp destination-port eq 443 user-group web

[Device-acl-ipv6-adv-web_https] quit

# 分别为IPv4和IPv6高级ACL ip创建规则如下:匹配用户组web中用户的IP报文。

[Device] acl advanced name ip

[Device-acl-ipv4-adv-ip] rule 0 permit ip user-group web

[Device-acl-ipv4-adv-ip] quit

[Device] acl ipv6 advanced name ip

[Device-acl-ipv6-adv-ip] rule 0 permit ipv6 user-group web

[Device-acl-ipv6-adv-ip] quit

# 分别为IPv4和IPv6高级ACL neiwang_out创建规则如下:匹配用户组web中源地址为内网服务器IP地址的报文。

[Device] acl advanced name neiwang_out

[Device-acl-ipv4-adv-neiwang_out] rule 0 permit ip source 4.4.4.6 0 user-group web

[Device-acl-ipv4-adv-neiwang_out] quit

[Device] acl ipv6 advanced name neiwang_out

[Device-acl-ipv6-adv-neiwang_out] rule 0 permit ipv6 source 4::6 128 user-group web

[Device-acl-ipv6-adv-neiwang_out] quit

# 分别为IPv4和IPv6高级ACL web_out创建规则如下:匹配用户组web中源地址为Portal服务器IP地址的报文。

[Device] acl advanced name web_out

[Device-acl-ipv4-adv-web_out] rule 0 permit ip source 4.4.4.5 0 user-group web

[Device-acl-ipv4-adv-web_out] quit

[Device] acl ipv6 advanced name web_out

[Device-acl-ipv6-adv-web_out] rule 0 permit ipv6 source 4::5 128 user-group web

[Device-acl-ipv6-adv-web_out] quit

f.     配置用于认证前域用户的类

# 配置类web_permit,匹配ACL web_permit。

[Device] traffic classifier web_permit operator or

[Device-classifier-web_permit] if-match acl name web_permit

[Device-classifier-web_permit] if-match acl ipv6 name web_permit

[Device-classifier-web_permit] quit

# 配置类neiwang,匹配ACL neiwang。

[Device] traffic classifier neiwang operator or

[Device-classifier-neiwang] if-match acl name neiwang

[Device-classifier-neiwang] if-match acl ipv6 name neiwang

[Device-classifier-neiwang] quit

# 配置类web_http,匹配ACL web_http。

[Device] traffic classifier web_http operator or

[Device-classifier-web_http] if-match acl name web_http

[Device-classifier-web_http] if-match acl ipv6 name web_http

[Device-classifier-web_http] quit

# 配置类web_https,匹配ACL web_https。

[Device] traffic classifier web_https operator or

[Device-classifier-web_https] if-match acl name web_https

[Device-classifier-web_https] if-match acl ipv6 name web_https

[Device-classifier-web_https] quit

# 配置类ip_cpu,匹配ACL ip。

[Device] traffic classifier ip_cpu operator or

[Device-classifier-ip_cpu] if-match acl name ip

[Device-classifier-ip_cpu] if-match acl ipv6 name ip

[Device-classifier-ip_cpu] quit

# 配置类ip_deny,匹配ACL ip。

[Device] traffic classifier ip_deny operator or

[Device-classifier-ip_deny] if-match acl name ip

[Device-classifier-ip_deny] if-match acl ipv6 name ip

[Device-classifier-ip_deny] quit

# 配置类neiwang_out,匹配ACL neiwang_out。

[Device] traffic classifier neiwang_out operator or

[Device-classifier-neiwang_out] if-match acl name neiwang_out

[Device-classifier-neiwang_out] if-match acl ipv6 name neiwang_out

[Device-classifier-neiwang_out] quit

# 配置类web_out,匹配ACL web_out。

[Device] traffic classifier web_out operator or

[Device-classifier-web_out] if-match acl name web_out

[Device-classifier-web_out] if-match acl ipv6 name web_out

[Device-classifier-web_out] quit

g.     配置流行为

# 配置流行为web_permit,允许用户组web中用户的目的地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_permit

[Device-behavior-web_permit] filter permit

[Device-behavior-web_permit] free account

[Device-behavior-web_permit] quit

# 配置流行为neiwang,允许用户组web中用户的目的地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang

[Device-behavior-neiwang] filter permit

[Device-behavior-neiwang] quit

# 配置流行为web_http,对用户组web中用户的目的端口为80的TCP报文(即HTTP报文)重定向到CPU。

[Device] traffic behavior web_http

[Device-behavior-web_http] redirect http-to-cpu

[Device-behavior-web_http] quit

# 配置流行为web_https,对用户组web中用户的目的端口为443的TCP报文(即HTTPS报文)重定向到CPU。

[Device] traffic behavior web_https

[Device-behavior-web_https] redirect https-to-cpu

[Device-behavior-web_https] quit

# 配置流行为web_cpu,对用户组web中用户的所有IP报文都重定向到CPU。

[Device] traffic behavior web_cpu

[Device-behavior-web_cpu] redirect cpu

[Device-behavior-web_cpu] quit

# 配置流行为web_deny,禁止用户组web中用户的所有IP报文通过。

[Device] traffic behavior web_deny

[Device-behavior-web_deny] filter deny

[Device-behavior-web_deny] free account

[Device-behavior-web_deny] quit

# 配置流行为neiwang_out,允许用户组web中源地址为内网服务器IP地址的报文通过。

[Device] traffic behavior neiwang_out

[Device-behavior-neiwang_out] filter permit

[Device-behavior-neiwang_out] quit

# 配置流行为web_out,允许用户组web中源地址为Portal服务器IP地址的报文通过。

[Device] traffic behavior web_out

[Device-behavior-web_out] filter permit

[Device-behavior-web_out] free account

[Device-behavior-web_out] quit

h.     配置QoS策略

# 配置入方向QoS策略web

[Device] qos policy web

# 为类指定对应的流行为,规则为对于用户组web中的用户:

允许目的地址为Portal服务器和内网服务器IP地址的报文通过;

对于目的端口为80(HTTP报文)和443(HTTPS报文)的报文重定向到CPU;

除上述报文外,其余报文都重定向到CPU,如果重定向无感知认证失败,则丢弃报文。

[Device-qospolicy-web] classifier web_permit behavior web_permit

[Device-qospolicy-web] classifier neiwang behavior neiwang

[Device-qospolicy-web] classifier web_http behavior web_http

[Device-qospolicy-web] classifier web_https behavior web_https

[Device-qospolicy-web] classifier ip_cpu behavior web_cpu

[Device-qospolicy-web] classifier ip_deny behavior web_deny

[Device-qospolicy-web] quit

# 配置出方向QoS策略out

[Device] qos policy out

# 为类指定对应的流行为,规则为:允许用户组web中源地址为Portal服务器和内网服务器IP地址的报文通过,其余报文均禁止通过。

[Device-qospolicy-out] classifier web_out behavior web_out

[Device-qospolicy-out] classifier neiwang_out behavior neiwang_out

[Device-qospolicy-out] classifier ip_deny behavior web_deny

[Device-qospolicy-out] quit

i.     配置应用策略

# 对接收的用户流量应用QoS策略,策略名为web。

[Device] qos apply policy web global inbound

# 对发送的上线用户流量应用QoS策略,策略名为out。

[Device] qos apply policy out global outbound

j.     查看应用的策略是否生效

# 查看入方向QoS策略的配置信息和运行情况。

[Device] display qos policy global slot 3 inbound

Direction: Inbound

  Policy: web

   Classifier: web_permit

     Operator: OR

     Rule(s) :

      If-match acl name web_permit

      If-match acl ipv6 name web_permit

     Behavior: web_permit

      Filter enable: Permit

      Free account enable

   Classifier: neiwang

     Operator: OR

     Rule(s) :

      If-match acl name neiwang

      If-match acl ipv6 name neiwang

     Behavior: neiwang

      Filter enable: Permit

   Classifier: web_http

     Operator: OR

     Rule(s) :

      If-match acl name web_http

      If-match acl ipv6 name web_http

     Behavior: web_http

      Redirecting:

        Redirect http to CPU

   Classifier: web_https

     Operator: OR

     Rule(s) :

      If-match acl name web_https

      If-match acl ipv6 name web_https

     Behavior: web_https

      Redirecting:

        Redirect https to CPU

   Classifier: ip_cpu

     Operator: OR

     Rule(s) :

      If-match acl name ip

      If-match acl ipv6 name ip

     Behavior: web_cpu

      Redirecting:

        Redirect to the CPU

   Classifier: ip_deny

     Operator: OR

     Rule(s) :

      If-match acl name ip

      If-match acl ipv6 name ip

     Behavior: web_deny

      Filter enable: Deny

      Free account enable

# 查看出方向QoS策略的配置信息和运行情况。

[Device] display qos policy global slot 3 outbound

Direction: Outbound

  Policy: out

   Classifier: web_out

     Operator: OR

     Rule(s) :

      If-match acl name web_out

      If-match acl ipv6 name web_out

     Behavior: web_out

      Filter enable: Permit

      Free account enable

   Classifier: neiwang_out

     Operator: OR

     Rule(s) :

      If-match acl name neiwang_out

      If-match acl ipv6 name neiwang_out

     Behavior: neiwang_out

      Filter enable: Permit

   Classifier: ip_deny

     Operator: OR

     Rule(s) :

      If-match acl name ip

      If-match acl ipv6 name ip

     Behavior: web_deny

      Filter enable: Deny

      Free account enable

k.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

# 设置RADIUS DAE客户端的IP地址为4.4.4.1,与RADIUS DAE客户端交互DAE报文时使用的共享密钥为明文radius。

[Device] radius dynamic-author server

[Device-radius-da-server] client ip 4.4.4.1 key simple radius

[Device-radius-da-server] quit

l.     配置User Profile

# 配置名称为car的User Profile对上线用户发送的报文进行流量监管。报文正常流速为5210kbps,允许325625byte的突发流量通过,速率小于等于5210kbps时正常发送,大于5210kbps时,报文被丢弃。

[Device] user-profile car

[Device-user-profile-car] qos car inbound any cir 5210 cbs 325625

[Device-user-profile-car] quit

m. 配置认证前域和Web认证域

# 配置IPoE用户认证前使用的认证域。

[Device] domain name dm1

[Device-isp-dm1] authentication ipoe none

[Device-isp-dm1] authorization ipoe none

[Device-isp-dm1] accounting ipoe none

# 配置前域授权用户组和地址池。

[Device-isp-dm1] authorization-attribute user-group web

[Device-isp-dm1] authorization-attribute ip-pool pool1

[Device-isp-dm1] authorization-attribute ipv6-pool pool2

# 配置Web认证页面URL。

[Device-isp-dm1] web-server url http://www.h3c.web.com

[Device-isp-dm1] quit

# 配置IPoE用户在Web认证阶段使用的认证域。

[Device] domain name dm2

[Device-isp-dm2] authentication ipoe radius-scheme rs1

[Device-isp-dm2] authorization ipoe radius-scheme rs1

[Device-isp-dm2] accounting ipoe radius-scheme rs1

[Device-isp-dm2] authorization-attribute user-profile car

[Device-isp-dm2] quit

n.     配置IPoE无感知认证基本功能

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 配置IPoE用户采用Web MAC认证方式。

[Device–GigabitEthernet3/1/2] ip subscriber authentication-method web mac-auth

The operation may cut all users on this interface. Continue?[Y/N]:y

# 配置Web认证前域为dm1,Web认证域和Web MAC认证域均为dm2。

[Device–GigabitEthernet3/1/2] ip subscriber pre-auth domain dm1

[Device–GigabitEthernet3/1/2] ip subscriber web-auth domain dm2

[Device–GigabitEthernet3/1/2] ip subscriber mac-auth domain dm2

[Device–GigabitEthernet3/1/2] quit

o.     (可选)配置IPoE DHCP用户异常下线后重新上线功能

说明

·     在允许DHCP用户异常下线后通过报文重新触发上线的组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户异常下线后重新上线的关键配置。相关原理及配置限制和指导请参见“1.9.11  配置允许DHCP个人接入用户异常下线后通过报文重新触发上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

p.     (可选)配置IPoE DHCP用户漫游功能

说明

·     在漫游组网中需要配置本功能。

·     本节仅列出IPoE DHCP用户漫游功能的关键配置。相关原理及配置限制和指导请参见“1.24  配置IPoE个人接入用户漫游功能”。漫游功能举例请参见“1.27.22  IPoE个人用户漫游配置举例”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IPv4报文和IPv6报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ipv6 enable matching-user

# 开启IPoE个人接入用户漫游功能。

[Device–GigabitEthernet3/1/2] ip subscriber roaming enable

[Device–GigabitEthernet3/1/2] quit

q.     (可选)配置IPoE DHCP用户采用松散模式上线功能

说明

·     在接入设备或用户接入接口所在Slot的重启后,允许重启前在线用户重新触发上线的组网中配置本功能。

·     本节仅列出IPoE DHCP用户采用松散模式上线功能的关键配置。相关原理及配置限制和指导请参见“1.9.14  配置允许动态个人接入用户采用松散模式上线”。

 

# 开启DHCP报文触发方式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

[Device–GigabitEthernet3/1/2] quit

# 开启系统或用户接入接口所在Slot重启后允许IPoE用户一直采用松散模式上线功能。

[Device] ip subscriber access-trigger loose all-time

(5)     配置RADIUS服务器

对于RADIUS服务器上AAA和MAC绑定配置,具体需要参见RADIUS server的配置说明书。

(6)     配置Portal服务器

说明

下面以iMC为例,说明Portal服务器的基本配置。不同iMC版本配置可能有所不同,具体配置请以实际版本及对应版本的iMC服务器手册为准,本节配置仅供参考。

 

a.     配置Portal主页。

单击导航树中的[接入策略管理/Portal服务管理/服务器配置]菜单项,进入服务器配置页面,配置Portal主页,采用缺省配置即可,并单击<确定>按钮完成操作,如图1-124所示。

图1-124 Portal服务器配置页面

 

b.     配置Portal认证的地址组范围

单击导航树中的[接入策略管理/Portal服务管理/IP地址组配置]菜单项,进入“IP地址组配置”页面,在该页面中单击<增加>按钮,进入“增加IP地址组配置”页面,如图1-125所示。

-     输入IP地址组名为“IPoE_Web_User”;

-     输入起始地址为“192.168.0.1”、终止地址为“192.168.0.255”。用户主机IP地址必须包含在该IP地址组范围内;

-     其他采用缺省配置;

-     单击<确定>按钮完成操作。

图1-125 增加IP地址组配置页面(IPv4)

 

图1-126所示,继续上述操作添加IPv6地址组。

-     输入IP地址组名为“IPoE_Web_User-2”;

-     IPv6选项框选择“是”;

-     输入起始地址为“192::1”、终止地址为“192::FFFF”。用户主机IPv6地址必须包含在该IP地址组范围内;

-     其他采用缺省配置;

-     单击<确定>按钮完成操作。

图1-126 增加IP地址组配置页面(IPv6)

 

c.     增加Portal接入设备信息

单击导航树中的[接入策略管理/Portal服务管理/设备配置]菜单项,进入“设备配置”页面,在该页面中单击<增加>按钮,进入“增加设备信息”页面,如图1-127所示。

-     输入设备名为“NAS”;

-     输入IP地址为“4.4.4.2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

-     输入密钥为“123456”;

-     选择组网方式为“直连”;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-127 增加设备信息配置页面(IPv4

 

图1-128所示,继续上述操作添加设备的IPv6信息。

-     输入设备名为“NAS-2”;

-     版本选择“Portal 3.0”;

-     输入IP地址为“4::2”,该地址为Portal报文出接口GigabitEthernet3/1/1的IP地址;

-     输入密钥为“123456”;

-     选择组网方式为“直连”;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-128 增加设备信息配置页面(IPv6

 

d.     配置端口组信息

图1-129所示返回[接入策略管理/Portal服务管理/设备配置]菜单项,单击<端口组信息管理>按钮,进入“端口组信息配置”页面。

图1-129 设备信息列表

 

在“端口组信息配置”页面中单击<增加>按钮,进入“增加端口组信息”页面,如图1-130所示。

-     输入端口组名为“group”;

-     选择IP地址组为“IPoE_Web_User”,用户接入网络时使用的IP地址必须属于所选的IP地址组;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-130 增加端口组信息配置页面(IPv4

 

图1-131所示,继续上述操作添加端口组的IPv6信息。

-     输入端口组名为“group-2”;

-     选择IP地址组为“IPoE_Web_User-2”,用户接入网络时使用的IPv6地址必须属于所选的IPv6地址组;

-     其它参数采用缺省值,并单击<确定>按钮完成操作。

图1-131 增加端口组信息配置页面(IPv6

 

# 最后单击导航树中的[接入策略管理/业务参数配置/系统配置手工生效]菜单项,使以上Portal认证服务器配置生效。

4. 验证配置

# 用户认证前域认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IPv4地址为192.168.0.2,IPv6地址为192::2。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 001b21a80949

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86383 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591981 sec

  Access time                 : May 27 00:48:51 2018

  Online time(hh:mm:ss)       : 00:00:19

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:48:51 2018

  Redirect URL                : http://www.h3c.web.com

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

# 用户认证前域认证通过之后,登录Web页面,如图1-44所示。

图1-132 登录Web页面

 

# 在认证页面输入用户名和密码单击<上线>按钮进行Web认证,可以使用以下的显示命令查看IPoE用户在线信息。

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : user1@dm2

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86356 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591954 sec

  Access time                 : May 27 00:49:20 2018

  Online time(hh:mm:ss)       : 00:00:04

  Service node                : Slot 3 CPU 0

  Authentication type         : Web

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : 86400 sec, remaining: 86395 sec

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:49:20 2018

  Redirect URL                : N/A

 

QoS:

  User profile                : car (active)

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

# 点击<下线>按钮,通过显示命令查看,此时用户返回认证前域状态

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : 001b21a80949

  Domain                      : dm1

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86383 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591981 sec

  Access time                 : May 27 00:49:30 2018

  Online time(hh:mm:ss)       : 00:00:19

  Service node                : Slot 3 CPU 0

  Authentication type         : Web pre-auth

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : N/A, remaining: N/A

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:49:30 2018

  Redirect URL                : http://www.h3c.web.com

 

QoS:

  User profile                : N/A

  Session group profile       : N/A

  User group ACL              : web (active)

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

# 重新打开浏览器,任意输入访问地址http://63.1.1.240,通过显示命令查看,用户IPoE Web上线

[Device] display ip subscriber session verbose

Basic:

  Description                 : -

  Username                    : web

  Domain                      : dm2

  VPN instance                : N/A

  IP address                  : 192.168.0.2

  IPv6 address                : 192::2

  User address type           : N/A

  MAC address                 : 001b-21a8-0949

  Service-VLAN/Customer-VLAN  : -/-

  Access interface            : GE3/1/2

  User ID                     : 0x30000004

  VPI/VCI(for ATM)            : -/-

  VSI Index                   : -

  VSI link ID                 : -

  VXLAN ID                    : -

  DNS servers                 : N/A

  IPv6 DNS servers            : N/A

  DHCP lease                  : 86400 sec

  DHCP remain lease           : 86356 sec

  DHCPv6 lease                : 2592000 sec

  DHCPv6 remain lease         : 2591954 sec

  Access time                 : May 27 00:50:01 2018

  Online time(hh:mm:ss)       : 00:00:04

  Service node                : Slot 3 CPU 0

  Authentication type         : Web mac-auth

  IPv4 access type            : DHCP

  IPv6 access type            : DHCP

  IPv4 detect state           : Detecting

  IPv6 detect state           : Detecting

  State                       : Online

 

AAA:

  ITA policy name             : N/A

  IP pool                     : pool1

  IPv6 pool                   : pool2

  Primary DNS server          : N/A

  Secondary DNS server        : N/A

  Primary IPv6 DNS server     : N/A

  Secondary IPv6 DNS server   : N/A

  Session idle cut            : N/A

  Session duration            : 86400 sec, remaining: 86395 sec

  Traffic quota               : N/A

  Traffic remained            : N/A

  Acct start-fail action      : Online

  Acct update-fail action     : Online

  Acct quota-out action       : Offline

  Dual-stack accounting mode  : Merge

  Max IPv4 multicast addresses: 4

  IPv4 multicast address list : N/A

  Max IPv6 multicast addresses: 4

  IPv6 multicast address list : N/A

  Accounting start time       : May 27 00:50:01 2018

  Redirect URL                : N/A

 

QoS:

  User profile                : car (active)

  Session group profile       : N/A

  User group ACL              : N/A

  Inbound CAR                 : N/A

  Outbound CAR                : N/A

  Inbound user priority       : N/A

  Outbound user priority      : N/A

 

Flow statistic:

  Uplink   packets/bytes      : 0/0

  Downlink packets/bytes      : 0/0

  IPv6 uplink   packets/bytes : 0/0

  IPv6 downlink packets/bytes : 0/0

1.27.21  IPoE双栈用户接入配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用DHCP服务器分别分配IPv4和IPv6地址。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-133 DHCP报文触发IPoE接入配置组网图

 

3. 配置步骤

说明

此例假设用户通过DHCP方式申请时,DHCP报文中并未携带option60选项。

 

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius。

(2)     配置DHCP服务器

¡     配置DHCPv4地址池

# 开启DHCP服务。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1的DHCPv4地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段3.3.3.0/24。

[DHCP-server-dhcp-pool-pool1] network 3.3.3.0 24

# 配置为用户分配的网关地址为3.3.3.1。

[DHCP-server-dhcp-pool-pool1] gateway-list 3.3.3.1

# 将3.3.3.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 3.3.3.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为3.3.3.0网段的DHCPv4应答报文的下一跳指定为连接DHCPv4客户端网络的接口IPv4地址4.4.4.2。

[DHCP-server] ip route-static 3.3.3.0 24 4.4.4.2

¡     配置DHCPv6地址池

# 创建名称为pool2的DHCPv6地址池并进入其视图。

[DHCP-server] ipv6 dhcp pool pool2

# 配置地址池动态分配的IPv6地址网段3::0/64。

[DHCP-server-dhcp6-pool-pool2] network 3::0/64

[DHCP-server-dhcp6-pool-pool2] quit

# 将3::1设置为禁止地址。

[DHCP-server] ipv6 dhcp server forbidden-address 3::1

# 配置接口GigabitEthernet3/1/1工作在DHCPv6服务器模式。

[DHCP-server] interface gigabitethernet 3/1/1

[DHCP-server-GigabitEthernet3/1/1] ipv6 dhcp select server

[DHCP-server-GigabitEthernet3/1/1] quit

# 通过配置静态路由,将目的地址为3::0网段的DHCPv6应答报文的下一跳指定为连接DHCPv6客户端网络的接口IPv6地址4::2。

[DHCP-server] ipv6 route-static 3::0 64 4::2

(3)     配置Device

a.     配置各接口IP地址(略)。

b.     配置DHCP relay

# 开启DHCP服务。

<Device> system-view

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 3.3.3.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

# 创建中继地址池pool2,指定匹配该地址池的DHCPv6客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] ipv6 dhcp pool pool2

[Device-dhcp6-pool-pool2] gateway-list 3::1

[Device-dhcp6-pool-pool2] remote-server 4::3

[Device-dhcp6-pool-pool2] quit

# 进入接口GigabitEthernet3/1/2视图。

[Device] interface gigabitethernet 3/1/2

# 配置接口工作在中继模式。

[Device–GigabitEthernet3/1/2] dhcp select relay

[Device–GigabitEthernet3/1/2] ipv6 dhcp select relay

# 配置自动生成IPv6链路本地地址,该IPv6链路本地地址作为用户的网关。

[Device–GigabitEthernet3/1/2] ipv6 address auto link-local

# 开启DHCPv6中继用户表项记录功能。

[Device–GigabitEthernet3/1/2] ipv6 dhcp relay client-information record

# 取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息

[Device–GigabitEthernet3/1/2] undo ipv6 nd ra halt

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig managed-address-flag

[Device–GigabitEthernet3/1/2] ipv6 nd autoconfig other-flag

[Device–GigabitEthernet3/1/2] quit

c.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

d.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1,并授权中继地址池。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] authorization-attribute ip-pool pool1

[Device-isp-dm1] authorization-attribute ipv6-pool pool2

[Device-isp-dm1] quit

e.     配置IPoE

# 开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/2

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCP和DHCPv6报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcpv6 enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户认证通过之后,可以使用以下的显示命令查看IPoE用户在线信息,其中,用户获得的IPv4地址为3.3.3.2,IPv6地址为3::2。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              3.3.3.2                   000c-29a6-b656 D/D   Online

                     3::2                      -/-            -

                     000c29a6b656

1.27.22  IPoE个人用户漫游配置举例

1. 组网需求

·     DHCP Client经由二层网络以IPoE方式接入到BRAS接入设备。

·     采用DHCP服务器分配IP地址。

·     允许用户进行漫游。例如:当用户从区域A漫游到区域B时,始终保持用户在线状态。

·     采用RADIUS作为认证、授权和计费服务器。

2. 组网图

图1-134 DHCP报文触发IPoE漫游接入配置组网图

 

3. 配置步骤

说明

此例假设用户通过DHCP方式申请时,DHCP报文中并未携带option60选项

 

(1)     配置RADIUS服务器

说明

下面以Linux下的Free Radius服务器为例,说明RADIUS server的基本配置。

 

# 配置RADIUS客户端信息。

在clients.conf文件中增加如下信息:

client 4.4.4.2/32 {

ipaddr = 4.4.4.2

netmask=32

secret=radius

}

以上信息表示:RADIUS客户端的IP地址为4.4.4.2,共享密钥为字符串radius。

# 配置合法用户信息。

在users文件中增加如下信息:

000c29a6b656  Cleartext-Password :="radius"

以上信息表示:用户名为Host的MAC地址000c29a6b656,用户密码为字符串radius。

(2)     配置DHCP服务器

# 全局开启DHCP。

<DHCP-server> system-view

[DHCP-server] dhcp enable

# 创建名称为pool1地址池并进入其视图。

[DHCP-server] dhcp server ip-pool pool1

# 配置地址池动态分配的IP地址网段3.3.3.0/24。

[DHCP-server-dhcp-pool-pool1] network 3.3.3.0 24

# 配置为用户分配的网关地址为3.3.3.1。

[DHCP-server-dhcp-pool-pool1] gateway-list 3.3.3.1

# 将3.3.3.1设置为禁止地址。

[DHCP-server-dhcp-pool-pool1] forbidden-ip 3.3.3.1

[DHCP-server-dhcp-pool-pool1] quit

# 通过配置静态路由,将目的地址为3.3.3.0网段的DHCP应答报文的下一跳指定为连接DHCP客户端网络的接口IP地址4.4.4.2。

[DHCP-server] ip route-static 3.3.3.0 24 4.4.4.2

(3)     配置Device

a.     配置各接口IP地址(略)。

b.     配置RADIUS方案

# 创建名称为rs1的RADIUS方案并进入该方案视图。

<Device> system-view

[Device] radius scheme rs1

# 配置RADIUS方案的主认证和主计费服务器及其通信密钥。

[Device-radius-rs1] primary authentication 4.4.4.1

[Device-radius-rs1] primary accounting 4.4.4.1

[Device-radius-rs1] key authentication simple radius

[Device-radius-rs1] key accounting simple radius

# 配置发送给RADIUS服务器的用户名不携带ISP域名。

[Device-radius-rs1] user-name-format without-domain

[Device-radius-rs1] quit

c.     配置认证域

# 创建并进入名称为dm1的ISP域。

[Device] domain name dm1

# 配置ISP域使用的RADIUS方案rs1,并授权中继地址池。

[Device-isp-dm1] authentication ipoe radius-scheme rs1

[Device-isp-dm1] authorization ipoe radius-scheme rs1

[Device-isp-dm1] accounting ipoe radius-scheme rs1

[Device-isp-dm1] authorization-attribute ip-pool pool1

[Device-isp-dm1] quit

d.     配置DHCP relay

# 开启DHCP服务。

[Device] dhcp enable

# 启用DHCP中继的用户地址表项记录功能。

[Device] dhcp relay client-information record

# 关闭DHCP中继动态用户地址表项定时刷新功能。

[Device] undo dhcp relay client-information refresh enable

# 进入接口GigabitEthernet3/1/1和GigabitEthernet3/1/2视图。

[Device] interface range gigabitethernet 3/1/1 gigabitethernet 3/1/2

# 配置接口工作在中继代理模式。

[Device–if-range] dhcp select relay proxy

# 在接口上配置DHCP收到物理位置发生变化、MAC地址不变的上线用户发送的DHCP-DISCOVER报文后,先释放将对应MAC地址的已在线租约,再为该用户分配IP地址。

说明

如果攻击源伪造MAC地址信息发起DHCP-DISCOVER报文请求上线时,会导致正常在线用户掉线,可能存在安全隐患。请确保在当前网络不存在攻击的情况下才配置本功能。

 

[Device–if-range] dhcp session-mismatch action fast-renew

[Device–if-range] quit

# 创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[Device] dhcp server ip-pool pool1

[Device-dhcp-pool-pool1] gateway-list 3.3.3.1 export-route

[Device-dhcp-pool-pool1] remote-server 4.4.4.3

[Device-dhcp-pool-pool1] quit

e.     配置IPoE

# 在GigabitEthernet3/1/1开启IPoE功能,并配置二层接入模式。

[Device] interface gigabitethernet 3/1/1

[Device–GigabitEthernet3/1/1] ip subscriber l2-connected enable

# 开启DHCP报文触发方式。

[Device–GigabitEthernet3/1/1] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/1] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[Device–GigabitEthernet3/1/1] ip subscriber roaming enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/1] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/1] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/1] quit

# 在GigabitEthernet3/1/2开启IPoE功能,并配置二层接入模式。

[Device–GigabitEthernet3/1/2] ip subscriber l2-connected enable

# 开启DHCP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator dhcp enable

# 开启ARP报文触发用户上线功能。

[Device–GigabitEthernet3/1/2] ip subscriber initiator arp enable

# 开启未知源IP报文触发方式。

[Device–GigabitEthernet3/1/2] ip subscriber initiator unclassified-ip enable matching-user

# 开启IPoE个人接入用户漫游功能。

[Device–GigabitEthernet3/1/2] ip subscriber roaming enable

# 设置DHCP报文触发方式使用的认证域为dm1。

[Device–GigabitEthernet3/1/2] ip subscriber dhcp domain dm1

# 设置动态用户的认证密码为明文radius。

[Device–GigabitEthernet3/1/2] ip subscriber password plaintext radius

[Device–GigabitEthernet3/1/2] quit

4. 验证配置

# 用户在区域A认证通过之后,查看IPoE用户在线信息。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/1              3.3.3.2                   000c-29a6-b656 D/-   Online

                     -                         -/-            -

                     000c29a6b656

# 然后当用户漫游到区域B时,再次查看IPoE用户在线信息。

[Device] display ip subscriber session

Type: D-DHCP   S-Static     U-Unclassified-IP   N-NDRS

Interface            IP address                MAC address    Type  State

                     IPv6 address              SVLAN/CVLAN    VXLAN

                     Username

GE3/1/2              3.3.3.2                   000c-29a6-b656 D/-   Online

                     -                         -/-            -

                     000c29a6b656

以上信息标明,用户上线接入接口已从GigabitEthernet3/1/1切换为GigabitEthernet3/1/2,即用户已从区域A漫游到区域B。

1.28  IPoE常见故障处理

1.28.1  DHCP接入用户使用的认证域不存在,无法上线

1. 故障现象

网络连接正常且接口上的IPoE配置正确的情况下,某些DHCP客户端无法正常进行认证。

2. 故障分析

·     当DHCP客户端发送的报文里携带了指定的Option(DHCPv4为Option 60,DHCPv6为Option 16和Option 17)时,若该Option内容对应的ISP域在接入设备上不存在,则无法进行认证。

·     当接口上指定了IPoE用户认证时使用的ISP域,且DHCP客户端发送的报文里未携带指定的Option时,若接口上指定的ISP域在接入设备上不存在,则无法进行认证。

3. 处理过程

通过调试信息或抓包工具查看DHCP客户端报文中是否携带Client-ID Option:

(1)     若报文中携带了指定的Option(DHCPv4为Option 60,DHCPv6为Option 16和Option 17),则查看其内容,并在接入设备上配置与之同名的ISP域。

(2)     若报文中未携带指定的Option,则查看接口上是否指定了ISP域。若指定了ISP域,则在接入设备上配置与之同名的ISP域。

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们