• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

06-VPN配置指导

目录

06-ADVPN配置

本章节下载 06-ADVPN配置  (954.67 KB)

06-ADVPN配置


1 ADVPN

1.1  ADVPN简介

ADVPN(Auto Discovery Virtual Private Network,自动发现虚拟专用网络)是一种基于VAM(VPN Address Management,VPN地址管理)协议的动态VPN技术。

在企业网各分支机构使用动态地址接入公网的情况下,可以利用ADVPN在各分支机构间建立VPN。

1.1.1  VAM协议介绍

VAM协议负责收集、维护和分发动态变化的公网地址等信息,采用Client/Server模型。ADVPN网络中的节点(称为ADVPN节点)作为VAM Client。当公网地址变化时,VAM Client将当前公网地址注册到VAM Server。ADVPN节点通过VAM协议从VAM Server获取另一端ADVPN节点的当前公网地址,从而实现在两个节点之间动态建立跨越IP核心网络的ADVPN隧道。

1.1.2  ADVPN组网结构

ADVPN通过ADVPN域区分不同的VPN网络,ADVPN域由域ID来标识。属于同一个VPN的VAM Client需要规划到相同的ADVPN域中,且一个VAM Client只能属于一个ADVPN域;VAM Server可以同时为多个ADVPN域服务,管理多个ADVPN域的VAM Client。

ADVPN节点分为如下两类:

·     Hub:ADVPN网络的中心设备。它是路由信息交换的中心。

·     Spoke:ADVPN网络的分支设备,通常是企业分支机构的网关。该节点不会转发收到的其它ADVPN节点的数据。

根据数据转发方式的不同,ADVPN组网结构分为如下两种:

·     Full-Mesh(全互联)网络:Spoke和Spoke之间可以建立隧道直接通信。

·     Hub-Spoke网络:Spoke之间不能建立隧道直接通信,只能通过Hub转发数据。

当一个ADVPN域中的ADVPN节点数目较多时,由于某些原因(如动态路由协议邻居数限制等),Hub无法管理全部的ADVPN节点。此时,可以将ADVPN网络划分为多个Hub组,每个Hub组中包含一个或多个Hub,及一部分Spoke节点,以减轻Hub节点的负担。

1. Full-Mesh网络

图1-1所示,在Full-Mesh网络中,Spoke向VAM Server注册后获得Spoke所属ADVPN域所在Hub组中Hub的信息,并与Hub建立永久的ADVPN隧道。当两个Spoke之间有数据报文交互时,Spoke从VAM Server获取对端Spoke的公网地址,并在Spoke之间直接建立隧道。Spoke之间的隧道是动态的,当在一段时间(Spoke-Spoke隧道空闲超时时间)内没有数据报文交互时,则删除该隧道。

图1-1 Full-Mesh网络示意图

 

2. Hub-Spoke网络

图1-2所示,在Hub-Spoke网络中,Spoke向VAM Server注册后获得Spoke所属ADVPN域所在Hub组中Hub的信息,并与Hub建立永久的ADVPN隧道。两个Spoke之间有数据报文交互时,该报文通过Hub转发,不会在Spoke之间建立隧道。Hub既作为路由信息交换的中心,又作为数据转发的中心。

图1-2 Hub-Spoke网络示意图

 

3. 划分多个Hub组网络

图1-3所示,划分多个Hub组网络中,Hub组的划分方式为:

·     所有Hub必须属于同一个Hub组,该Hub组作为骨干区域。骨干区域采用Full-Mesh组网,即Hub向VAM Server注册后获得骨干区域中所有Hub的信息,并在每两个Hub之间都建立永久的ADVPN隧道。

·     将Spoke部署到除骨干区域外的其他Hub组中。这些Hub组内至少有1个Hub,可以使用Full-Mesh组网也可以使用Hub-Spoke组网。Spoke向VAM Server注册后获得Spoke所属ADVPN域所在Hub组中Hub的信息,并与Hub建立永久的ADVPN隧道。一个Hub组内的Spoke只与本组的Hub建立ADVPN隧道,不与其他Hub组的Hub建立ADVPN隧道。

同一个Hub组内,隧道建立方式和数据转发方式由其组网方式决定。不同Hub组间,数据需要通过本组的Hub转发到目的组的Hub,再由目的组Hub转发到对应的Spoke。

为了减少Hub跨组转发数据时的压力,可以允许不同组的Spoke直接建立隧道,但该隧道是动态的,当在一段时间(Spoke-Spoke隧道空闲超时时间)内没有数据报文交互时,则删除该隧道。

图1-3 划分多个Hub组网络示意图

 

1.1.3  ADVPN工作机制

ADVPN对VAM Server和VAM Client的地址具有一定要求:

·     VAM Server只需要具有公网地址,且该公网地址必须静态配置,不能动态变化。

·     VAM Client需要具有公网地址和私网地址。公网地址是VAM Client连接IP核心网络的接口的地址,既可以静态配置也可以动态获取。私网地址是ADVPN隧道接口的地址,必须静态配置。在同一个ADVPN域内,同一个Hub组内的VAM Client的私网地址应该属于同一个网段。

ADVPN的关键是通过VAM Client的私网地址获取动态变化的公网地址,以便建立ADVPN隧道、转发报文。ADVPN的工作过程分为连接初始化、注册、隧道建立、路由学习和报文转发四个阶段,下面对这四个阶段做简单说明。

1. 连接初始化阶段

图1-4所示,连接初始化阶段用来协商完整性验证、加密算法及密钥,其过程为:

(1)     Client通过连接请求报文将自己支持的完整性验证算法、加密算法等发送给Server。

(2)     Server按照优先级从高到低的顺序从自己支持的算法列表中依次选择算法,与Client发送的算法列表进行匹配。如果存在相同的算法,则Server通过连接响应报文将该算法发送给Client;如果不存在相同的算法,则算法协商失败,断开连接。

(3)     如果协商结果为不对VAM协议报文进行加密或认证(Server上配置不需要加密或认证),则Server和Client不必生成加密密钥或完整性验证密钥。否则,Server和Client都根据预共享密钥生成加密密钥和完整性验证密钥。

(4)     Client和Server分别利用生成的加密密钥和完整性验证密钥对初始化完成报文进行保护,并发送给对端。如果对端能够正确解密和验证该报文,则算法、密钥协商成功,后续的VAM协议报文都通过协商的算法和密钥进行保护。否则,协商失败,断开连接。

图1-4 连接初始化流程图

 

2. 注册阶段

图1-5所示,注册阶段的具体过程为:

(1)     Client向Server发送注册请求报文,注册请求报文中包括Client的公网地址、私网地址、连接的私网网段等信息。

(2)     Server收到注册请求报文后,根据配置决定是否对该Client进行身份认证。如果配置为不认证,则直接注册Client信息并向Client发送注册成功响应;如果配置为认证,Server向Client回应身份认证请求,并指明需要的认证方法。VAM支持PAP和CHAP两种认证方式。

(3)     Client向Server提交自己的身份信息。

(4)     Server通过AAA对Client进行认证和计费。认证和计费成功后,Server向Client发送注册成功响应报文,注册成功报文中携带Server下发给Client的Hub信息。

图1-5 注册流程图

 

3. 隧道建立阶段

Spoke要和Hub建立永久隧道,一个Spoke可以和任意多个Hub建立永久隧道。如果在一个ADVPN域中有多个Hub,则Hub之间需要建立永久隧道。具体隧道建立流程如图1-6所示。

图1-6 隧道建立流程图

 

(1)     发起隧道建立请求

¡     Hub-Spoke隧道:Spoke收到Server下发的Hub信息后,检查与这些Hub之间是否存在隧道。如果隧道不存在,则向Hub发送隧道建立请求报文。

¡     Hub-Hub隧道:Hub收到Server下发的已注册成功的Hub信息后,检查与这些Hub之间是否存在隧道。如果隧道不存在,则向其发送隧道建立请求报文。

¡     Spoke-Spoke隧道:在Full-Mesh组网中,Spoke收到某个数据报文后,若没有查到相应的能够转发该报文的隧道,则会向Server发送地址解析请求,根据得到的地址解析响应向对端Spoke发起隧道建立请求。

(2)     隧道对端收到隧道建立请求后,保存隧道信息,并向请求发起方发送隧道建立成功响应报文。

4. 路由学习和报文转发阶段

ADVPN节点可以通过以下两种方式学习私网路由:

·     通过静态或动态路由协议学习:ADVPN网络连接的各个私网及ADVPN隧道接口上都需要配置静态路由或动态路由协议,实现私网路由的连通。ADVPN隧道建立以后,路由协议通过隧道进行邻居发现、路由更新,并建立路由表。ADVPN隧道可以看作是私网中的一条普通链路,负责连接不同的私网网段。完成私网路由的学习后,Spoke接收到它连接的私网用户访问其他私网的报文时,查找路由表找到私网下一跳的地址。Spoke通过VAM Server查询私网下一跳对应的公网地址,并将该公网地址作为隧道的目的地址对报文进行封装。封装后的报文通过ADVPN隧道发送给对端。

·     向VAM Server注册和查询私网网段:ADVPN节点将本地连接的私网网段信息注册到VAM Server。Spoke接收到它连接的私网用户访问其他私网的报文时,将报文的目的地址发送给VAM Server,通过VAM Server查询连接该目的地址所在私网网段的ADVPN节点的信息(包括ADVPN节点的公网和私网地址),并在本地生成到达该私网网段的路由,路由下一跳为该ADVPN节点。完成查询后,Spoke将查询到的ADVPN节点的公网地址作为隧道的目的地址对报文进行封装。封装后的报文通过ADVPN隧道发送给对端。

在ADVPN网络中,如果同时使用了上述两种私网路由学习方式,则Spoke接收到它连接的私网用户访问其他私网的报文时,会同时将私网路由的下一跳地址和报文的目的地址发送给VAM Server,VAM Server优先根据目的地址进行查询,即优先采用向VAM Server注册和查询私网网段方式。如果同时通过上述两种方式学习到了到达同一私网网段的路由,则优先选择路由优先级小的路由转发报文。

说明

·     路由协议只在Hub和Spoke以及各Hub之间进行交互,在Spoke与Spoke之间不直接交换路由信息。

·     ADVPN组网采用的是Full-Mesh网络还是Hub-Spoke网络,由路由决定。如果学习到的路由下一跳是对端Spoke,则为Full-Mesh网络;如果学习到的路由下一跳是Hub,则为Hub-Spoke网络。

 

1.1.4  穿越NAT的ADVPN隧道

当隧道发起方在NAT网关后侧时,则可以建立穿越NAT的Spoke-Spoke隧道;如果隧道接收方在NAT网关后侧,则数据包要由Hub转发,直到接收方发起隧道建立请求。如果双方都在NAT网关后侧,则它们都无法与对方建立隧道,所有的数据包都只能从Hub转发。

如果NAT网关采用Endpoint-Independent Mapping(不关心对端地址和端口转换模式),隧道接收方在NAT网关后侧时,也可以建立穿越NAT的Spoke-Spoke隧道。

1.2  硬件适配关系

本特性的支持情况与设备型号有关,请以设备的实际情况为准。

系列

型号

说明

F50X0系列

F5010、F5020、F5020-GM、F5030、F5030-6GW、F5030-6GW-G、F5040、F5060、F5080、F5000-A、F5000-C、F5000-S、F5000-M

支持

F5000-CN系列

F5000-CN30、F5000-CN60

支持

F5000-AI系列

F5000-AI-15、F5000-AI-20、F5000-AI-40

支持

F5000-V系列

F5000-V30

支持

F1000-AI系列

F1000-AI-03、F1000-AI-05、F1000-AI-10、F1000-AI-15、F1000-AI-20、F1000-AI-25、F1000-AI-30、F1000-AI-35、F1000-AI-50、F1000-AI-55、F1000-AI-60、F1000-AI-65、F1000-AI-70、F1000-AI-75、F1000-AI-80、F1000-AI-90

支持

F1000-L系列

F1003-L、F1005-L、F1010-L

支持

F1003-L-C、F1003-L-S

不支持

F10X0系列

F1003-C、F1003-M、F1003-S、F1005、F1005-GM、F1010、F1010-GM、F1020、F1020-GM、F1030、F1030-GM、F1050、F1060、F1070、F1070-GM、F1070-GM-L、F1080、F1090

支持

F1000-V系列

F1000-V50、F1000-V60、F1000-V70、F1000-V90

支持

F1000-SASE系列

F1000-SASE100、F1000-SASE200

支持

F1000-AK系列

F1000-AK108、F1000-AK109、F1000-AK110、F1000-AK115、F1000-AK120、F1000-AK125、F1000-AK130、F1000-AK135、F1000-AK140、F1000-AK145、F1000-AK150、F1000-AK155、F1000-AK160、F1000-AK165、F1000-AK170、F1000-AK175、F1000-AK180、F1000-AK185、F1000-GM-AK370、F1000-GM-AK380、F1000-AK710、F1000-AK711、F1000-AK1010、F1000-AK1015、F1000-AK1020、F1000-AK1025、F1000-AK1030、F1000-AK1105、F1000-AK1110、F1000-AK1115、F1000-AK1120、F1000-AK1125、F1000-AK1130、F1000-AK1140、F1000-AK1150、F1000-AK1160、F1000-AK1170、F1000-AK1180、F1000-AK1205、F1000-AK1212、F1000-AK1215、F1000-AK1222、F1000-AK1232、F1000-AK1235、F1000-AK1242、F1000-AK1252、F1000-AK1262、F1000-AK1272、F1000-AK1305、F1000-AK1312、F1000-AK1315、F1000-AK1322、F1000-AK1332、F1000-AK1342、F1000-AK1352、F1000-AK1362、F1000-AK1414、F1000-AK1424、F1000-AK1434、F1000-AK1505、F1000-AK1514、F1000-AK1515、F1000-AK1524、F1000-AK1534、F1000-AK1614、F1000-AK9109、F1000-AK9110、F1000-AK9120、F1000-AK9210、F1000-AK9150、F1000-AK9160、F1000-AK9180、F1000-AK9190

支持

插卡

IM-NGFWX-IV、LSCM1FWDSD0、LSCM2FWDSD0、LSPM6FWD、LSPM6FWDB、LSQM1FWDSC0、LSQM2FWDSC0、LSU3FWCEA0、LSUM1FWCEAB0、LSUM1FWDEC0、LSWM1FWD0、LSX1FWCEA1、LSXM1FWDF1

支持

vFW系列

vFW1000、vFW2000、vFW-E-Cloud

不支持

 

1.3  ADVPN配置任务简介

搭建ADVPN网络时,一般先配置VAM Server,然后配置Hub设备,最后配置Spoke设备。ADVPN网络中的设备作为Hub还是Spoke,需要在VAM Server上进行指定。

ADVPN配置任务如下:

(1)     配置VAM Server

(2)     配置ADVPN节点

a.     配置VAM Client

b.     配置路由

c.     配置ADVPN隧道

d.     (可选)配置IPsec保护ADVPN隧道报文

e.     (可选)开启ADVPN日志功能

1.4  配置VAM Server

本特性的支持情况与设备型号有关,请以设备的实际情况为准。

系列

型号

说明

F50X0系列

F5010、F5020、F5020-GM、F5030、F5030-6GW、F5030-6GW-G、F5040、F5060、F5080、F5000-A、F5000-C、F5000-S、F5000-M

支持

F5000-CN系列

F5000-CN30、F5000-CN60

支持

F5000-AI系列

F5000-AI-15、F5000-AI-20、F5000-AI-40

支持

F5000-V系列

F5000-V30

支持

F1000-AI系列

F1000-AI-03、F1000-AI-05、F1000-AI-10、F1000-AI-15

不支持

F1000-AI-20、F1000-AI-25、F1000-AI-30、F1000-AI-35、F1000-AI-50、F1000-AI-55、F1000-AI-60、F1000-AI-65、F1000-AI-70、F1000-AI-75、F1000-AI-80、F1000-AI-90

支持

F1000-L系列

F1003-L、F1003-L-C、F1003-L-S、F1005-L、F1010-L

不支持

F10X0系列

F1005、F1005-GM、F1010、F1010-GM

不支持

F1003-C、F1003-M、F1003-S、F1020、F1020-GM、F1030、F1030-GM、F1050、F1060、F1070、F1070-GM、F1070-GM-L、F1080、F1090

支持

F1000-V系列

F1000-V50、F1000-V60、F1000-V70、F1000-V90

支持

F1000-SASE系列

F1000-SASE100、F1000-SASE200

不支持

F1000-AK系列

F1000-AK108、F1000-AK109、F1000-AK110、F1000-AK115、F1000-AK120、F1000-AK125、F1000-AK710、F1000-AK1010、F1000-AK1015、F1000-AK1020、F1000-AK1025、F1000-AK1030、F1000-AK1105、F1000-AK1110、F1000-AK1115、F1000-AK1120、F1000-AK1130、F1000-AK1140、F1000-AK1150、F1000-AK1160、F1000-AK1170、F1000-AK1180、F1000-AK9109、F1000-AK9110、F1000-AK9120、F1000-AK9210、F1000-AK9150

不支持

F1000-AK130、F1000-AK135、F1000-AK140、F1000-AK145、F1000-AK150、F1000-AK155、F1000-AK160、F1000-AK165、F1000-AK170、F1000-AK175、F1000-AK180、F1000-AK185、F1000-GM-AK370、F1000-GM-AK380、F1000-AK711、F1000-AK1125、F1000-AK1205、F1000-AK1212、F1000-AK1215、F1000-AK1222、F1000-AK1232、F1000-AK1235、F1000-AK1242、F1000-AK1252、F1000-AK1262、F1000-AK1272、F1000-AK1305、F1000-AK1312、F1000-AK1315、F1000-AK1322、F1000-AK1332、F1000-AK1342、F1000-AK1352、F1000-AK1362、F1000-AK1414、F1000-AK1424、F1000-AK1434、F1000-AK1505、F1000-AK1514、F1000-AK1515、F1000-AK1524、F1000-AK1534、F1000-AK1614、F1000-AK9160、F1000-AK9180、F1000-AK9190

支持

插卡

IM-NGFWX-IV、LSCM1FWDSD0、LSCM2FWDSD0、LSPM6FWD、LSPM6FWDB、LSQM1FWDSC0、LSQM2FWDSC0、LSU3FWCEA0、LSUM1FWCEAB0、LSUM1FWDEC0、LSWM1FWD0、LSX1FWCEA1、LSXM1FWDF1

支持

vFW系列

vFW1000、vFW2000、vFW-E-Cloud

不支持

 

1.4.1  VAM Server配置任务简介

VAM Server配置任务如下:

(1)     创建ADVPN域

(2)     开启VAM Server功能

(3)     配置VAM Server的预共享密钥

(4)     配置Hub组

(5)     (可选)配置VAM Server的监听端口号

(6)     (可选)配置VAM协议报文的安全参数

(7)     (可选)配置对VAM Client的身份认证方式

(8)     (可选)配置Keepalive报文参数

(9)     (可选)配置请求报文重传参数

1.4.2  创建ADVPN域

(1)     进入系统视图。

system-view

(2)     创建ADVPN域,并进入ADVPN域视图。

vam server advpn-domain domain-name id domain-id

1.4.3  开启VAM Server功能

(1)     进入系统视图。

system-view

(2)     开启VAM Server功能。请选择其中一项进行配置。

¡     在系统视图下,开启所有或指定ADVPN域的VAM Server功能。

vam server enable [ advpn-domain domain-name ]

¡     请依次执行以下命令,开启指定ADVPN域的VAM Server功能。

vam server advpn-domain domain-name [ id domain-id ]

server enable

缺省情况下,VAM Server功能处于关闭状态。

1.4.4  配置VAM Server的预共享密钥

1. 功能简介

预共享密钥用于生成加密/完整性验证的密钥:

·     在连接初始化阶段预共享密钥用来生成验证和加密连接请求、连接响应报文的初始密钥。

·     如果选择对后续的报文进行加密和验证,则预共享密钥还用来生成验证和加密后续报文的连接密钥。

VAM Client/VAM Server通过报文解密、完整性验证是否成功,可以判断二者的预共享密钥是否相同,从而实现对VAM Server/VAM Client的身份认证。

2. 配置限制和指导

同一个ADVPN域内的VAM Server和VAM Client上配置的预共享密钥必须一致。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     配置VAM Server的预共享密钥。

pre-shared-key { cipher | simple } string

缺省情况下,未配置VAM Server的预共享密钥。

1.4.5  配置Hub组

1. 功能简介

在大规模组网情况下,将ADVPN域划分为多个Hub组可以方便管理。创建Hub组后,可以按照Spoke的私网地址网段或地址范围,将Spoke划分到不同的Hub组中,并为每个Hub组指定一个或多个Hub。VAM Server只向VAM Client下发其所属的Hub组内的Hub信息。VAM Client只与本Hub组内的Hub建立永久ADVPN隧道。

缺省情况下,不允许跨Hub组建立Spoke-Spoke直连隧道,如果配置了跨Hub组建立Spoke-Spoke直连隧道的规则,则在Hub上线后,VAM Server将指定的规则下发到Hub。在Hub转发私网数据报文的同时,会将数据报文与收到的规则进行匹配。如果匹配成功,Hub向发送该数据报文的Spoke发送重定向报文。Spoke收到重定向报文后,将被重定向的数据报文的目的地址发送给VAM Server,向VAM Server查询连接该目的地址所在私网网段的Spoke节点的信息,并与该Spoke建立直连隧道。

跨Hub组Spoke-Spoke直连隧道建立前,数据报文仍由Hub进行转发。直连隧道建立后,数据报文将直接发送到直连路由下一跳所对应的Spoke,而不再经过Hub中转。

当VAM Client向VAM Server注册时,根据VAM Client的私网地址将VAM Client划分到对应的ADVPN域Hub组中:

(1)     根据Hub组名称字典序依次匹配各Hub组内配置的Hub私网地址。

(2)     如果匹配上,则VAM Client为Hub,并被划分到该Hub组;如果VAM Client不是Hub,再根据Hub组名称字典序依次匹配各Hub组内配置的Spoke私网地址范围。

(3)     如果匹配上,则VAM Client为Spoke,并被划分到该Hub组;否则,VAM Client既不是Hub也不是Spoke,注册失败。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     创建Hub组,并进入Hub组视图。

hub-group group-name

(4)     配置Hub的私网地址。

(IPv4网络)

hub private-address private-ip-address [ public-address { public-ipv4-address | public-ipv6-address } [ advpn-port port-number ] ]

(IPv6网络)

hub ipv6 private-address private-ipv6-address [ public-address { public-ipv4-address | public-ipv6-address } [ advpn-port port-number ] ]

缺省情况下,没有配置Hub私网地址。

每个Hub组必须至少配置一个Hub私网地址。

(5)     配置Spoke的私网地址范围。

(IPv4网络)

spoke private-address { network ip-address { mask-length | mask } | range start-ipv4-address end-ipv4-address }

(IPv6网络)

spoke ipv6 private-address { network prefix prefix-length | range start-ipv6-address end-ipv6-address }

缺省情况下,没有配置Spoke的私网地址范围。每个Hub组可以配置多个Spoke的IPv4和IPv6私网地址范围。

(6)     配置跨Hub组建立Spoke-Spoke直连隧道的规则。

(IPv4网络)

shortcut interest { acl { acl-number | name acl-name } | all }

(IPv6网络)

shortcut ipv6 interest { acl { ipv6-acl-number | name ipv6-acl-name } | all }

缺省情况下,没有配置跨Hub组建立Spoke-Spoke直连隧道的规则,不允许跨Hub组建立Spoke-Spoke直连隧道。

1.4.6  配置VAM Server的监听端口号

1. 配置限制和指导

VAM Server的监听端口号与VAM Client上指定的VAM Server的端口号必须一致。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置VAM Server的监听端口号。

vam server listen-port port-number

缺省情况下,VAM Server的监听端口号为18000。

1.4.7  配置VAM协议报文的安全参数

1. 功能简介

该配置用来设置VAM协议报文的验证、加密算法。VAM Server根据配置的报文完整性验证、加密算法以及优先级与VAM Client发送的算法列表进行协商,协商后的算法分别作为两端协议报文的完整性验证算法和加密算法。

VAM Server与VAM Client固定使用SHA-1验证算法和AES-CBC-128加密算法对连接初始化请求和响应报文进行完整性验证和加密;使用协商出来的验证算法和加密算法对其他VAM协议报文进行完整性验证和加密。

2. 配置限制和指导

验证/加密算法在配置中的出现顺序决定其使用优先级。配置中越靠前的验证/加密算法,其优先级越高。

修改验证/加密算法对已经注册的VAM Client没有影响,新注册的VAM Client将采用修改后的算法进行协商。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     配置VAM协议报文的验证算法。

authentication-algorithm { aes-xcbc-mac | md5 | none | sha-1 | sha-256 } *

缺省情况下,VAM协议报文的验证算法为SHA-1。

(4)     配置VAM协议报文的加密算法。

encryption-algorithm { 3des-cbc | aes-cbc-128 | aes-cbc-192 | aes-cbc-256 | aes-ctr-128 | aes-ctr-192 | aes-ctr-256 | des-cbc | none } *

缺省情况下,按照优先级由高到低依次使用AES-CBC-256、AES-CBC-192、AES-CBC-128、AES-CTR-256、AES-CTR-192、AES-CTR-128、3DES-CBC、DES-CBC算法。

1.4.8  配置对VAM Client的身份认证方式

1. 功能简介

该配置用来设置VAM Server对VAM Client的认证方式,包括不认证或采用AAA认证,采用AAA认证时,可选择PAP或CHAP认证方式。只有通过身份认证的VAM Client才可以接入到ADVPN域。VAM Server端AAA的具体配置请参见“安全配置指导”中的“AAA”。

2. 配置限制和指导

如果配置时指定的认证ISP域不存在,则VAM Server对VAM Client的身份认证会失败。

修改认证方式对已经注册的VAM Client没有影响,新注册的VAM Client将按照修改后的认证方式进行身份认证。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     配置VAM Server对VAM Client的身份认证方式。

authentication-method { none | { chap | pap } [ domain isp-name ] }

缺省情况下,VAM Server使用CHAP方式,对VAM Client进行身份认证,认证使用的ISP域为用户配置的缺省ISP域。

1.4.9  配置Keepalive报文参数

1. 功能简介

VAM Client和VAM Server之间通过Keepalive报文保持联系。该配置用来设置VAM Client发送Keepalive报文的时间间隔和重发次数。当VAM Client注册成功后,VAM Server会将配置的参数在注册响应中下发给VAM Client,同一个ADVPN域中所有VAM Client的Keepalive报文参数都是相同的。

VAM Client按照VAM Server指定的时间间隔向VAM Server发送Keepalive报文,VAM Server收到Keepalive报文后回复响应报文。当Keepalive报文的重发次数达到指定的值仍没有收到VAM Server的响应时,VAM Client认为与VAM Server的连接中断,不再发送Keepalive报文。当VAM Server在时间间隔×重发次数的时间内没有收到VAM Client的Keepalive报文,则认为与VAM Client的连接中断,会删除该VAM Client的信息并将其下线。

2. 配置限制和指导

如果VAM Server改变Keepalive报文参数,则修改后的参数只对新注册的VAM Client生效,已经注册的VAM Client不受影响。

如果VAM Server与VAM Client间存在配置了动态NAT的设备,则Keepalive报文的发送时间间隔应小于NAT表项的老化时间,从而保证NAT表项不会老化。

请根据实际组网情况,合理配置VAM Client发送Keepalive报文的时间间隔和重发次数。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     配置VAM Client向VAM Server发送Keepalive报文的时间间隔和重试次数。

keepalive interval interval retry retries

缺省情况下,VAM Client发送Keepalive报文的时间间隔为180秒,重试次数是3次。

1.4.10  配置请求报文重传参数

1. 功能简介

VAM Server向VAM Client发送请求报文后,如果在指定的时间间隔内没有收到响应报文,VAM Server将重新发送该请求报文,直到收到响应报文或者VAM Client Keepalive超时(即VAM Server在Keepalive报文发送时间间隔×重发次数的时间内没有收到VAM Client的Keepalive报文)为止。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入ADVPN域视图。

vam server advpn-domain domain-name [ id domain-id ]

(3)     配置VAM Server重发请求报文的时间间隔。

retry interval interval

缺省情况下,VAM Server重发请求报文的时间间隔为5秒。

1.5  配置VAM Client

1.5.1  VAM Client配置任务简介

VAM Client配置任务如下:

(1)     创建VAM Client

(2)     开启VAM Client功能

(3)     配置VAM Server的地址

(4)     配置VAM Client所属的ADVPN域

(5)     配置VAM Client的预共享密钥

(6)     (可选)配置请求报文重传参数

(7)     (可选)配置VAM Client连接超时的静默时间

(8)     (可选)配置认证用户名和密码

1.5.2  创建VAM Client

(1)     进入系统视图。

system-view

(2)     创建VAM Client,并进入VAM Client视图。

vam client name client-name

1.5.3  开启VAM Client功能

(1)     进入系统视图。

system-view

(2)     开启VAM Client功能。请选择其中一项进行配置。

¡     开启VAM Client的VAM Client功能。

vam client enable [ name client-name ]

¡     请依次执行以下命令开启指定VAM Client的VAM Client功能。

vam client name client-name

client enable

缺省情况下, VAM Client功能处于关闭状态。

1.5.4  配置VAM Server的地址

1. 功能简介

可以为一个VAM Client配置两个VAM Server,一个主VAM Server,一个备VAM Server。VAM Client会同时向主VAM Server和备VAM Server进行注册,如果都注册成功,VAM Client会优先使用先注册成功的VAM Server向其下发的信息。当该VAM Server故障时,VAM Client再使用另外一个VAM Server下发的信息。

2. 配置限制和指导

如果主VAM Server和备VAM Server的地址相同(配置了相同的地址或通过域名解析到相同的地址),则只有主VAM Server有效。

VAM Client上指定的VAM Server端口号,必须和VAM Server上配置的监听端口号一致。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置主VAM Server的地址。

server primary { ip-address ip-address | ipv6-address ipv6-address | name host-name } [ port port-number ]

缺省情况下,没有配置主VAM Server的地址。

(4)     (可选)配置备VAM Server的地址。

server secondary { ip-address ip-address | ipv6-address ipv6-address | name host-name } [ port port-number ]

缺省情况下,没有配置备VAM Server的地址。

1.5.5  配置VAM Client所属的ADVPN域

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置VAM Client所属的ADVPN域。

advpn-domain domain-name

缺省情况下,VAM Client不属于任何ADVPN域。

1.5.6  配置VAM Client的预共享密钥

1. 功能简介

预共享密钥用于生成加密/完整性验证的密钥:

·     在连接初始化阶段预共享密钥用来生成验证和加密连接请求、连接响应报文的初始密钥。

·     如果选择对后续的报文进行加密和验证,则预共享密钥还用来生成验证和加密后续报文的连接密钥。

VAM Client/VAM Server通过报文解密、完整性验证是否成功,可以判断二者的预共享密钥是否相同,从而实现对VAM Server/VAM Client的身份认证。

2. 配置限制和指导

同一个ADVPN域内的VAM Client和VAM Server上配置的预共享密钥必须一致。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置VAM Client的预共享密钥。

pre-shared-key { cipher | simple } string

缺省情况下,未配置预共享密钥。

1.5.7  配置请求报文重传参数

1. 功能简介

VAM Client向VAM Server发送请求报文后,如果在指定的时间间隔内没有收到响应报文,VAM Client将重新发送请求报文。如果重新发送请求报文的次数超过指定的重发次数,则VAM Client认为VAM Server不可达。

私网注册请求报文和节点信息更新请求报文不受重发次数的限制,将会按照指定的时间间隔一直发送,直至VAM Client下线。

VAM Client发送Keepalive报文的时间间隔和重发次数由VAM Server的配置决定。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置VAM协议报文重传参数。

retry interval interval count retries

缺省情况下,VAM协议报文重发间隔时间为5秒,重传次数为3次。

1.5.8  配置VAM Client连接超时的静默时间

1. 功能简介

VAM Client在与VAM Server连接超时后,会进入静默状态,此时VAM Client不处理任何报文。当静默时间到达后,VAM Client将重新发起连接请求。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置VAM Client连接超时的静默时间。

dumb-time time-interval

缺省情况下,VAM Client连接超时的静默时间为120秒。

1.5.9  配置认证用户名和密码

1. 功能简介

配置VAM Client的用户名和密码,用于向VAM Server进行身份认证。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VAM Client视图。

vam client name client-name

(3)     配置认证用户名和密码。

user username password { cipher | simple } string

缺省情况下,没有配置认证用户名和密码。

1.6  配置路由

ADVPN客户端IPv4私网支持的路由协议为OSPF、RIP和BGP:

·     采用OSPF路由协议时,如果是Full-Mesh网络,OSPF接口的网络类型需要配置为broadcast;如果是Hub-Spoke网络,OSPF接口的网络类型需要配置为p2mp。OSPF的具体配置请参见“三层技术-IP路由配置指导”中的“OSPF”。

·     采用RIP路由协议时,不支持Full-Mesh网络,仅支持Hub-Spoke网络,且需要关闭水平分割功能。RIP的具体配置请参见“三层技术-IP路由配置指导”中的“RIP”。

·     采用BGP路由协议时,如果是Full-Mesh网络,需要通过路由策略等配置,保证一端Spoke学习到的到达对端私网路由的下一跳为对端Spoke的地址(EBGP不支持Full-Mesh网络);如果是Hub-Spoke网络,需要通过路由策略等配置,保证一端Spoke学习到的到达对端私网路由的下一跳为Hub的地址。BGP和路由策略的具体配置请参见“三层技术-IP路由配置指导”中的“BGP”和“路由策略”。

ADVPN客户端IPv6私网支持的路由协议为OSPFv3、RIPng和IPv6 BGP:

·     采用OSPFv3路由协议时,如果是Full-Mesh网络,OSPFv3接口的网络类型需要配置为broadcast;如果是Hub-Spoke网络,OSPFv3接口的网络类型需要配置为p2mp。OSPFv3的具体配置请参见“三层技术-IP路由配置指导”中的“OSPFv3”。

·     采用RIPng路由协议时,只支持Full-Mesh网络。RIPng的具体配置请参见“三层技术-IP路由配置指导”中的“RIPng”。

·     采用IPv6 BGP路由协议时,如果是Full-Mesh网络,需要通过路由策略等配置,保证一端Spoke学习到的到达对端私网路由的下一跳为对端Spoke的地址(EBGP不支持Full-Mesh网络);如果是Hub-Spoke网络,需要通过路由策略等配置,保证一端Spoke学习到的到达对端私网路由的下一跳为Hub的地址。IPv6 BGP和路由策略的具体配置请参见“三层技术-IP路由配置指导”中的“BGP”和“路由策略”。

1.7  配置ADVPN隧道

1. 配置限制和指导

如果设备上配置了多个使用GRE封装的ADVPN隧道接口,且隧道的源端地址或源接口相同时,不同GRE封装的ADVPN隧道接口的GRE Key必须不同。关于GRE Key的详细介绍请参见“VPN配置指导”中的“GRE”。

关于Tunnel接口的详细介绍,请参见“VPN配置指导”中的“隧道”。关于interface tunnelsourcetunnel dfbit enable命令以及Tunnel接口下更多配置命令的详细介绍,请参见“VPN命令参考”中的“隧道”。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     创建ADVPN隧道类型的Tunnel接口,并进入Tunnel接口视图。

interface tunnel number [ mode advpn { gre | udp } [ ipv6 ] ]

在隧道的两端应配置相同的隧道模式,否则可能造成报文传输失败。

(3)     配置Tunnel接口的私网地址。

(IPv4网络)

ip address ip-address { mask | mask-length } [ sub ]

(IPv6网络)

ipv6 address ipv6-address prefix-length

缺省情况下,Tunnel接口上没有配置私网地址。

在同一个Hub组中,所有Tunnel接口的地址应该配置为同一个网段。

(4)     配置ADVPN隧道的源端地址或源接口。

source { ip-address | interface-type interface-number }

缺省情况下,没有配置ADVPN隧道的源端地址和源接口。

如果设置的是源端地址,则该地址将作为封装后隧道报文的源地址;如果设置的是源接口,则该接口的地址将作为封装后隧道报文的源地址。

(5)     (可选)设置封装后隧道报文的DF(Don’t Fragment,不分片)标志。

tunnel dfbit enable

缺省情况下,未设置隧道报文的不分片标志,即转发隧道报文时允许分片。

(6)     (可选)配置ADVPN报文的源UDP端口号。

advpn source-port port-number

缺省情况下,ADVPN报文的源UDP端口号为18001。

本命令只有在UDP封装模式的ADVPN隧道类型的Tunnel接口下才能配置。

如果Tunnel接口下执行vam client命令时指定了compatible参数,则该Tunnel接口配置的源端口号必须和其他Tunnel接口不同。

(7)     配置Tunnel接口绑定的VAM Client。

(IPv4网络)

vam client client-name [ compatible advpn0 ]

(IPv6网络)

vam ipv6 client client-name

缺省情况下,Tunnel隧道接口没有绑定任何VAM Client。

一个VAM Client只能与一个Tunnel接口绑定。

(8)     (可选)配置ADVPN隧道的私网信息。

(IPv4网络)

advpn network ip-address { mask-length | mask } [ preference preference-value ]

(IPv6网络)

advpn ipv6 network prefix prefix-length [ preference preference-value ]

缺省情况下,没有配置ADVPN隧道的私网信息。

私网路由的优先级建议高于其他动态路由协议,低于静态路由。

(9)     (可选)配置ADVPN隧道的Keepalive报文发送周期及最大发送次数。

keepalive interval interval retry retries

缺省情况下,ADVPN隧道的Keepalive报文发送周期为180秒,最大发送次数为3次。

在同一个ADVPN域中,所有Tunnel接口的Keepalive报文发送周期及最大发送次数必须一致。

(10)     (可选)配置Spoke-Spoke类型ADVPN隧道的空闲超时时间。

advpn session idle-time time-interval

缺省情况下,Spoke-Spoke类型ADVPN隧道的空闲超时时间为600秒。

修改此参数,已经建立的Spoke-Spoke类型ADVPN隧道会使用修改后的参数值重新开始计时。

(11)     (可选)配置ADVPN隧道建立失败的静默时间。

advpn session dumb-time time-interval

缺省情况下,ADVPN隧道建立失败的静默时间为120秒。

修改此参数后,已经建立的ADPVN隧道不会改变静默时间,之后建立的ADPVN隧道会使用修改后的静默时间。

(12)     (可选)配置ADVPN隧道的组名

advpn group group-name

缺省情况下,未配置ADVPN隧道的组名。

只能在Spoke上进行此配置。

(13)     (可选)配置ADVPN隧道组名与QoS策略的对应关系

advpn map group group-name qos-policy policy-name outbound

缺省情况下,未配置ADVPN隧道组名与QoS策略的对应关系。

只能在Hub上进行此配置。

1.8  配置IPsec保护ADVPN隧道报文

设备支持用IPsec安全框架来保护ADVPN隧道数据报文和控制报文的传递,其基本配置思路如下:

(1)     配置IPsec安全提议:指定安全协议、认证算法和加密算法、封装模式等。

(2)     配置IKE协商方式的IPsec安全框架。

(3)     在ADVPN隧道接口上应用IKE协商方式的IPsec安全框架。

详细配置请参见“安全配置指导”中的“IPsec”。

1.9  开启ADVPN日志功能

1. 功能简介

设备生成的ADVPN日志信息将被发送到设备的信息中心,通过设置信息中心的参数,决定日志信息的输出规则(即是否允许输出以及输出方向)。有关信息中心参数的配置请参见“网络管理和监控配置指导”中的“信息中心”。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     开启ADVPN日志功能。

advpn logging enable

缺省情况下,ADVPN日志功能处于关闭状态。

1.10  ADVPN显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后ADVPN的运行情况,通过查看显示信息验证配置的效果。

在用户视图下,执行reset命令可以清除相应的统计信息。

注意

执行reset vam server address-map命令清除注册到VAM Server上的IPv4私网地址和公网地址映射信息时,设备会向注册该IPv4私网地址的VAM Client发送错误通知报文,要求VAM Client下线。

执行reset vam server ipv6 address-map命令清除注册到VAM Server上的IPv6私网地址和公网地址映射信息时,设备会向注册该IPv6私网地址的VAM Client发送错误通知报文,要求VAM Client下线。

执行reset vam client fsm命令重置VAM Client的状态机后,VAM Client会立刻尝试重新上线。

执行reset vam client ipv6 fsm命令重置IPv6 VAM Client的状态机后,IPv6 VAM Client会立刻尝试重新上线。

 

表1-1 ADVPN显示和维护

操作

命令

显示注册到VAM Server上的VAM Client的IPv4私网地址和公网地址映射信息

display vam server address-map [ advpn-domain domain-name [ private-address private-ip-address ] ] [ verbose ]

显示注册到VAM Server上的VAM Client的IPv6私网地址和公网地址映射信息

display vam server ipv6 address-map [ advpn-domain domain-name [ private-address private-ipv6-address ] ] [ verbose ]

显示注册到VAM Server上的VAM Client的IPv4私网信息

display vam server private-network [ advpn-domain domain-name [ private-address private-ip-address ] ]

显示注册到VAM Server上的VAM Client的IPv6私网信息

display vam server ipv6 private-network [ advpn-domain domain-name [ private-address private-ipv6-address ] ]

显示VAM Server上ADVPN域的统计信息

display vam server statistics [ advpn-domain domain-name ]

显示VAM Client的状态机信息

display vam client fsm [ name client-name ]

显示VAM Client的统计信息

display vam client statistics [ name client-name ]

显示VAM Client收到的VAM Server下发的跨Hub组建立IPv4 Spoke-Spoke直连隧道的规则

display vam client shortcut interest [ name client-name ]

显示VAM Client收到的VAM Server下发的跨Hub组建立IPv6 Spoke-Spoke直连隧道的规则

display vam client shortcut ipv6 interest [ name client-name ]

显示ADVPN隧道组名与QoS策略的对应关系

display advpn group-qos-map [ interface tunnel number [ group group-name ] ]

显示IPv4 ADVPN隧道的信息

display advpn session [ interface tunnel number [ private-address private-ip-address ] ] [ verbose ]

显示IPv6 ADVPN隧道的信息

display advpn ipv6 session [ interface tunnel number [ private-address private-ipv6-address ] ] [ verbose ]

显示不同状态下ADVPN会话的个数

display advpn session count

清除注册到VAM Server上的IPv4私网地址和公网地址映射信息

reset vam server address-map [ advpn-domain domain-name [ private-address private-ip-address ] ]

清除注册到VAM Server上的IPv6私网地址和公网地址映射信息

reset vam server ipv6 address-map [ advpn-domain domain-name [ private-address private-ipv6-address ] ]

清除VAM Server上ADVPN域的统计信息

reset vam server statistics [ advpn-domain domain-name ]

重置VAM Client的状态机

reset vam client [ ipv6 ] fsm [ name client-name ]

清除VAM Client的统计信息

reset vam client statistics [ name client-name ]

删除IPv4 ADVPN隧道

reset advpn session [ interface tunnel number [ private-address private-ip-address ] ]

删除IPv6 ADVPN隧道

reset advpn ipv6 session [ interface tunnel number [ private-address private-ipv6-address ] ]

清除IPv4 ADVPN隧道的统计信息

reset advpn session statistics [ interface tunnel number [ private-address private-ip-address ] ]

清除IPv6 ADVPN隧道的统计信息

reset advpn ipv6 session statistics [ interface tunnel number [ private-address private-ipv6-address ] ]

 

1.11  ADVPN典型配置举例

1.11.1  IPv4 Full-Mesh类型ADVPN典型配置举例

1. 组网需求

·     在IPv4 Full-Mesh的组网方式下,主、备VAM Server负责管理、维护各个节点的信息;AAA服务器负责对VAM Client进行认证和计费管理;两个Hub互为备份,负责数据的转发和路由信息的交换。

·     Spoke与Hub之间建立永久的ADVPN隧道。

·     同一ADVPN域中,任意的两个Spoke之间在有数据时动态建立ADVPN隧道。

2. 组网图

图1-7 IPv4 Full-Mesh类型ADVPN组网图

设备

接口

IP地址

设备

接口

IP地址

Hub 1

GE1/0/1

1.0.0.1/24

Spoke 1

GE1/0/1

1.0.0.3/24

 

Tunnel1

192.168.0.1/24

 

GE1/0/2

192.168.1.1/24

Hub 2

GE1/0/1

1.0.0.2/24

 

Tunnel1

192.168.0.3/24

 

Tunnel1

192.168.0.2/24

Spoke 2

GE1/0/1

1.0.0.4/24

AAA server

 

1.0.0.10/24

 

GE1/0/2

192.168.2.1/24

Primary server

GE1/0/1

1.0.0.11/24

 

Tunnel1

192.168.0.4/24

Secondary server

GE1/0/1

1.0.0.12/24

 

 

 

 

3. 配置主VAM Server

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<PrimaryServer> system-view

[PrimaryServer] interface gigabitethernet 1/0/1

[PrimaryServer-GigabitEthernet1/0/1] ip address 1.0.0.11 255.255.255.0

[PrimaryServer-GigabitEthernet1/0/1] quit

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[PrimaryServer] security-zone name untrust

[PrimaryServer-security-zone-Untrust] import interface gigabitethernet 1/0/1

[PrimaryServer-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使VAM Server可以向VAM Clinet发送VAM协议报文,具体配置步骤如下。

[PrimaryServer] security-policy ip

[PrimaryServer-security-policy-ip] rule name advpnlocalout

[PrimaryServer-security-policy-ip-1-advpnlocalout] source-zone local

[PrimaryServer-security-policy-ip-1-advpnlocalout] destination-zone untrust

[PrimaryServer-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.11

[PrimaryServer-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.1 1.0.0.12

[PrimaryServer-security-policy-ip-1-ipseclocalout] action pass

[PrimaryServer-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使VAM Server可以接收和处理来自VAM Clinet的VAM协议报文,具体配置步骤如下。

[PrimaryServer-security-policy-ip] rule name advpnlocalin

[PrimaryServer-security-policy-ip-2-advpnlocalin] source-zone untrust

[PrimaryServer-security-policy-ip-2-advpnlocalin] destination-zone local

[PrimaryServer-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.1 1.0.0.12

[PrimaryServer-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.11

[PrimaryServer-security-policy-ip-2-advpnlocalin] action pass

[PrimaryServer-security-policy-ip-2-advpnlocalin] quit

[PrimaryServer-security-policy-ip] quit

(4)     配置AAA认证

# 配置RADIUS方案。

[PrimaryServer] radius scheme abc

[PrimaryServer-radius-abc] primary authentication 1.0.0.10 1812

[PrimaryServer-radius-abc] primary accounting 1.0.0.10 1813

[PrimaryServer-radius-abc] key authentication simple 123

[PrimaryServer-radius-abc] key accounting simple 123

[PrimaryServer-radius-abc] user-name-format without-domain

[PrimaryServer-radius-abc] quit

[PrimaryServer] radius session-control enable

# 配置ISP域的AAA方案。

[PrimaryServer] domain abc

[PrimaryServer-isp-abc] authentication advpn radius-scheme abc

[PrimaryServer-isp-abc] accounting advpn radius-scheme abc

[PrimaryServer-isp-abc] quit

[PrimaryServer] domain default enable abc

(5)     配置VAM Server,用于管理和维护VAM Client地址信息。

[PrimaryServer] vam server advpn-domain abc id 1

[PrimaryServer-vam-server-domain-abc] hub-group 0

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub private-address 192.168.0.1

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub private-address 192.168.0.2

[PrimaryServer-vam-server-domain-abc-hub-group-0] spoke private-address network 192.168.0.0 255.255.255.0

[PrimaryServer-vam-server-domain-abc-hub-group-0] quit

[PrimaryServer-vam-server-domain-abc] pre-shared-key simple 123456

[PrimaryServer-vam-server-domain-abc] authentication-method chap

[PrimaryServer-vam-server-domain-abc] server enable

[PrimaryServer-vam-server-domain-abc] quit

4. 配置备VAM Server

除IP地址外,备VAM Server的ADVPN配置与主VAM Server相同,不再赘述。

5. 配置Hub1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub1> system-view

[Hub1] interface gigabitethernet 1/0/1

[Hub1-GigabitEthernet1/0/1] ip address 1.0.0.1 255.255.255.0

[Hub1-GigabitEthernet1/0/1] quit

[Hub1] interface tunnel1 mode advpn gre

[Hub1-Tunnel1] ip address 192.168.0.1 255.255.255.0

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub1] security-zone name untrust

[Hub1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub1-security-zone-Untrust] import interface tunnel1

[Hub1-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub1] security-policy ip

[Hub1-security-policy-ip] rule name advpnlocalout

[Hub1-security-policy-ip-1-advpnlocalout] source-zone local

[Hub1-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Hub1-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.1

[Hub1-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Hub1-security-policy-ip-1-ipseclocalout] action pass

[Hub1-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name advpnlocalin

[Hub1-security-policy-ip-2-advpnlocalin] source-zone untrust

[Hub1-security-policy-ip-2-advpnlocalin] destination-zone local

[Hub1-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Hub1-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.1

[Hub1-security-policy-ip-2-advpnlocalin] action pass

[Hub1-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ipseclocalout

[Hub1-security-policy-ip-3-ipseclocalout] source-zone local

[Hub1-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Hub1-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.1

[Hub1-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.2 1.0.0.4

[Hub1-security-policy-ip-3-ipseclocalout] action pass

[Hub1-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ipseclocalin

[Hub1-security-policy-ip-4-ipseclocalin] source-zone untrust

[Hub1-security-policy-ip-4-ipseclocalin] destination-zone local

[Hub1-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.2 1.0.0.4

[Hub1-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.1

[Hub1-security-policy-ip-4-ipseclocalin] action pass

[Hub1-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ospflocalout

[Hub1-security-policy-ip-5-ospflocalout] source-zone local

[Hub1-security-policy-ip-5-ospflocalout] destination-zone untrust

[Hub1-security-policy-ip-5-ospflocalout] service ospf

[Hub1-security-policy-ip-5-ospflocalout] action pass

[Hub1-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ospflocalin

[Hub1-security-policy-ip-6-ospflocalin] source-zone untrust

[Hub1-security-policy-ip-6-ospflocalin] destination-zone local

[Hub1-security-policy-ip-6-ospflocalin] service ospf

[Hub1-security-policy-ip-6-ospflocalin] action pass

[Hub1-security-policy-ip-6-ospflocalin] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub1] vam client name Hub1

[Hub1-vam-client-Hub1] advpn-domain abc

[Hub1-vam-client-Hub1] pre-shared-key simple 123456

[Hub1-vam-client-Hub1] user hub1 password simple hub1

[Hub1-vam-client-Hub1] server primary ip-address 1.0.0.11

[Hub1-vam-client-Hub1] server secondary ip-address 1.0.0.12

[Hub1-vam-client-Hub1] client enable

[Hub1-vam-client-Hub1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub1] ike keychain abc

[Hub1-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Hub1-ike-keychain-abc] quit

[Hub1] ike profile abc

[Hub1-ike-profile-abc] keychain abc

[Hub1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub1] ipsec transform-set abc

[Hub1-ipsec-transform-set-abc] encapsulation-mode transport

[Hub1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub1-ipsec-transform-set-abc] quit

[Hub1] ipsec profile abc isakmp

[Hub1-ipsec-profile-isakmp-abc] transform-set abc

[Hub1-ipsec-profile-isakmp-abc] ike-profile abc

[Hub1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Hub1] ospf 1

[Hub1-ospf-1] area 0

[Hub1-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Hub1-ospf-1-area-0.0.0.0] quit

[Hub1-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Hub1] interface tunnel1

[Hub1-Tunnel1] vam client Hub1

[Hub1-Tunnel1] ospf network-type broadcast

[Hub1-Tunnel1] source gigabitethernet 1/0/1

[Hub1-Tunnel1] tunnel protection ipsec profile abc

[Hub1-Tunnel1] quit

6. 配置Hub2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub2> system-view

[Hub2] interface gigabitethernet 1/0/1

[Hub2-GigabitEthernet1/0/1] ip address 1.0.0.2 255.255.255.0

[Hub2-GigabitEthernet1/0/1] quit

[Hub2] interface tunnel1 mode advpn gre

[Hub2-Tunnel1] ip address 192.168.0.2 255.255.255.0

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub2] security-zone name untrust

[Hub2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub2-security-zone-Untrust] import interface tunnel1

[Hub2-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub2] security-policy ip

[Hub2-security-policy-ip] rule name advpnlocalout

[Hub2-security-policy-ip-1-advpnlocalout] source-zone local

[Hub2-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Hub2-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.2

[Hub2-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Hub2-security-policy-ip-1-ipseclocalout] action pass

[Hub2-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name advpnlocalin

[Hub2-security-policy-ip-2-advpnlocalin] source-zone untrust

[Hub2-security-policy-ip-2-advpnlocalin] destination-zone local

[Hub2-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Hub2-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.2

[Hub2-security-policy-ip-2-advpnlocalin] action pass

[Hub2-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ipseclocalout

[Hub2-security-policy-ip-3-ipseclocalout] source-zone local

[Hub2-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Hub2-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.2

[Hub2-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.4

[Hub2-security-policy-ip-3-ipseclocalout] action pass

[Hub2-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ipseclocalin

[Hub2-security-policy-ip-4-ipseclocalin] source-zone untrust

[Hub2-security-policy-ip-4-ipseclocalin] destination-zone local

[Hub2-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.4

[Hub2-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.2

[Hub2-security-policy-ip-4-ipseclocalin] action pass

[Hub2-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ospflocalout

[Hub2-security-policy-ip-5-ospflocalout] source-zone local

[Hub2-security-policy-ip-5-ospflocalout] destination-zone untrust

[Hub2-security-policy-ip-5-ospflocalout] service ospf

[Hub2-security-policy-ip-5-ospflocalout] action pass

[Hub2-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ospflocalin

[Hub2-security-policy-ip-6-ospflocalin] source-zone untrust

[Hub2-security-policy-ip-6-ospflocalin] destination-zone local

[Hub2-security-policy-ip-6-ospflocalin] service ospf

[Hub2-security-policy-ip-6-ospflocalin] action pass

[Hub2-security-policy-ip-6-ospflocalin] quit

[Hub2-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub2] vam client name Hub2

[Hub2-vam-client-Hub2] advpn-domain abc

[Hub2-vam-client-Hub2] pre-shared-key simple 123456

[Hub2-vam-client-Hub2] user hub2 password simple hub2

[Hub2-vam-client-Hub2] server primary ip-address 1.0.0.11

[Hub2-vam-client-Hub2] server secondary ip-address 1.0.0.12

[Hub2-vam-client-Hub2] client enable

[Hub2-vam-client-Hub2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub2] ike keychain abc

[Hub2-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Hub2-ike-keychain-abc] quit

[Hub2] ike profile abc

[Hub2-ike-profile-abc] keychain abc

[Hub2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub2] ipsec transform-set abc

[Hub2-ipsec-transform-set-abc] encapsulation-mode transport

[Hub2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub2-ipsec-transform-set-abc] quit

[Hub2] ipsec profile abc isakmp

[Hub2-ipsec-profile-isakmp-abc] transform-set abc

[Hub2-ipsec-profile-isakmp-abc] ike-profile abc

[Hub2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Hub2] ospf 1

[Hub2-ospf-1] area 0

[Hub2-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Hub2-ospf-1-area-0.0.0.0] quit

[Hub2-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Hub2] interface tunnel1

[Hub2-Tunnel1] vam client Hub2

[Hub2-Tunnel1] ospf network-type broadcast

[Hub2-Tunnel1] source gigabitethernet 1/0/1

[Hub2-Tunnel1] tunnel protection ipsec profile abc

[Hub2-Tunnel1] quit

7. 配置Spoke1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke1> system-view

[Spoke1] interface gigabitethernet 1/0/1

[Spoke1-GigabitEthernet1/0/1] ip address 1.0.0.3 255.255.255.0

[Spoke1-GigabitEthernet1/0/1] quit

[Spoke1] interface tunnel 1 mode advpn gre

[Spoke1-Tunnel1] ip address 192.168.0.3 255.255.255.0

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke1] security-zone name untrust

[Spoke1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke1-security-zone-Untrust] import interface tunnel1

[Spoke1-security-zone-Untrust] quit

[Spoke1] security-zone name trust

[Spoke1-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke1-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke1] security-policy ip

[Spoke1-security-policy-ip] rule name advpnlocalout

[Spoke1-security-policy-ip-1-advpnlocalout] source-zone local

[Spoke1-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Spoke1-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.3

[Spoke1-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Spoke1-security-policy-ip-1-ipseclocalout] action pass

[Spoke1-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name advpnlocalin

[Spoke1-security-policy-ip-2-advpnlocalin] source-zone untrust

[Spoke1-security-policy-ip-2-advpnlocalin] destination-zone local

[Spoke1-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Spoke1-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.3

[Spoke1-security-policy-ip-2-advpnlocalin] action pass

[Spoke1-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ipseclocalout

[Spoke1-security-policy-ip-3-ipseclocalout] source-zone local

[Spoke1-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Spoke1-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.3

[Spoke1-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.4

[Spoke1-security-policy-ip-3-ipseclocalout] action pass

[Spoke1-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ipseclocalin

[Spoke1-security-policy-ip-4-ipseclocalin] source-zone untrust

[Spoke1-security-policy-ip-4-ipseclocalin] destination-zone local

[Spoke1-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.4

[Spoke1-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.3

[Spoke1-security-policy-ip-4-ipseclocalin] action pass

[Spoke1-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ospflocalout

[Spoke1-security-policy-ip-5-ospflocalout] source-zone local

[Spoke1-security-policy-ip-5-ospflocalout] destination-zone untrust

[Spoke1-security-policy-ip-5-ospflocalout] service ospf

[Spoke1-security-policy-ip-5-ospflocalout] action pass

[Spoke1-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ospflocalin

[Spoke1-security-policy-ip-6-ospflocalin] source-zone untrust

[Spoke1-security-policy-ip-6-ospflocalin] destination-zone local

[Spoke1-security-policy-ip-6-ospflocalin] service ospf

[Spoke1-security-policy-ip-6-ospflocalin] action pass

[Spoke1-security-policy-ip-6-ospflocalin] quit

[Spoke1-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke1] vam client name Spoke1

[Spoke1-vam-client-Spoke1] advpn-domain abc

[Spoke1-vam-client-Spoke1] pre-shared-key simple 123456

[Spoke1-vam-client-Spoke1] user spoke1 password simple spoke1

[Spoke1-vam-client-Spoke1] server primary ip-address 1.0.0.11

[Spoke1-vam-client-Spoke1] server secondary ip-address 1.0.0.12

[Spoke1-vam-client-Spoke1] client enable

[Spoke1-vam-client-Spoke1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke1] ike keychain abc

[Spoke1-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Spoke1-ike-keychain-abc] quit

[Spoke1] ike profile abc

[Spoke1-ike-profile-abc] keychain abc

[Spoke1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke1] ipsec transform-set abc

[Spoke1-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke1-ipsec-transform-set-abc] quit

[Spoke1] ipsec profile abc isakmp

[Spoke1-ipsec-profile-isakmp-abc] transform-set abc

[Spoke1-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Spoke1] ospf 1

[Spoke1-ospf-1] area 0

[Spoke1-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Spoke1-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[Spoke1-ospf-1-area-0.0.0.0] quit

[Spoke1-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。将Spoke1的DR优先级配置为0,以使Spoke1不参与DR/BDR选举。

[Spoke1] interface tunnel1

[Spoke1-Tunnel1] vam client Spoke1

[Spoke1-Tunnel1] ospf network-type broadcast

[Spoke1-Tunnel1] ospf dr-priority 0

[Spoke1-Tunnel1] source gigabitethernet 1/0/1

[Spoke1-Tunnel1] tunnel protection ipsec profile abc

[Spoke1-Tunnel1] quit

8. 配置Spoke2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke2> system-view

[Spoke2] interface gigabitethernet 1/0/1

[Spoke2-GigabitEthernet1/0/1] ip address 1.0.0.4 255.255.255.0

[Spoke2-GigabitEthernet1/0/1] quit

[Spoke2] interface tunnel 1 mode advpn gre

[Spoke2-Tunnel1] ip address 192.168.0.4 255.255.255.0

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke2] security-zone name untrust

[Spoke2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke2-security-zone-Untrust] import interface tunnel1

[Spoke2-security-zone-Untrust] quit

[Spoke2] security-zone name trust

[Spoke2-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke2-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke2] security-policy ip

[Spoke2-security-policy-ip] rule name advpnlocalout

[Spoke2-security-policy-ip-1-advpnlocalout] source-zone local

[Spoke2-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Spoke2-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.4

[Spoke2-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Spoke2-security-policy-ip-1-ipseclocalout] action pass

[Spoke2-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name advpnlocalin

[Spoke2-security-policy-ip-2-advpnlocalin] source-zone untrust

[Spoke2-security-policy-ip-2-advpnlocalin] destination-zone local

[Spoke2-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Spoke2-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.4

[Spoke2-security-policy-ip-2-advpnlocalin] action pass

[Spoke2-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ipseclocalout

[Spoke2-security-policy-ip-3-ipseclocalout] source-zone local

[Spoke2-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Spoke2-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.4

[Spoke2-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.3

[Spoke2-security-policy-ip-3-ipseclocalout] action pass

[Spoke2-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ipseclocalin

[Spoke2-security-policy-ip-4-ipseclocalin] source-zone untrust

[Spoke2-security-policy-ip-4-ipseclocalin] destination-zone local

[Spoke2-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.3

[Spoke2-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.4

[Spoke2-security-policy-ip-4-ipseclocalin] action pass

[Spoke2-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ospflocalout

[Spoke2-security-policy-ip-5-ospflocalout] source-zone local

[Spoke2-security-policy-ip-5-ospflocalout] destination-zone untrust

[Spoke2-security-policy-ip-5-ospflocalout] service ospf

[Spoke2-security-policy-ip-5-ospflocalout] action pass

[Spoke2-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ospflocalin

[Spoke2-security-policy-ip-6-ospflocalin] source-zone untrust

[Spoke2-security-policy-ip-6-ospflocalin] destination-zone local

[Spoke2-security-policy-ip-6-ospflocalin] service ospf

[Spoke2-security-policy-ip-6-ospflocalin] action pass

[Spoke2-security-policy-ip-6-ospflocalin] quit

[Spoke2-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

<Spoke2> system-view

[Spoke2] vam client name Spoke2

[Spoke2-vam-client-Spoke2] advpn-domain abc

[Spoke2-vam-client-Spoke2] pre-shared-key simple 123456

[Spoke2-vam-client-Spoke2] user spoke2 password simple spoke2

[Spoke2-vam-client-Spoke2] server primary ip-address 1.0.0.11

[Spoke2-vam-client-Spoke2] server secondary ip-address 1.0.0.12

[Spoke2-vam-client-Spoke2] client enable

[Spoke2-vam-client-Spoke2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke2] ike keychain abc

[Spoke2-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Spoke2-ike-keychain-abc] quit

[Spoke2] ike profile abc

[Spoke2-ike-profile-abc] keychain abc

[Spoke2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke2] ipsec transform-set abc

[Spoke2-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke2-ipsec-transform-set-abc] quit

[Spoke2] ipsec profile abc isakmp

[Spoke2-ipsec-profile-isakmp-abc] transform-set abc

[Spoke2-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Spoke2] ospf 1

[Spoke2-ospf-1] area 0

[Spoke2-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Spoke2-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255

[Spoke2-ospf-1-area-0.0.0.0] quit

[Spoke2-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。将Spoke2的DR优先级配置为0,以使Spoke2不参与DR/BDR选举。

[Spoke2] interface tunnel1

[Spoke2-Tunnel1] vam client Spoke2

[Spoke2-Tunnel1] ospf network-type broadcast

[Spoke2-Tunnel1] ospf dr-priority 0

[Spoke2-Tunnel1] source gigabitethernet 1/0/1

[Spoke2-Tunnel1] tunnel protection ipsec profile abc

[Spoke2-Tunnel1] quit

9. 验证配置

# 显示注册到主VAM Server的所有VAM Client的IPv4私网地址映射信息。

[PrimaryServer] display vam server address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address  Public address              Type   NAT  Holding time

0          192.168.0.1      1.0.0.1                     Hub    No   0H 52M  7S

0          192.168.0.2      1.0.0.2                     Hub    No   0H 47M 31S

0          192.168.0.3      1.0.0.3                     Spoke  No   0H 28M 25S

0          192.168.0.4      1.0.0.4                     Spoke  No   0H 19M 15S

# 显示注册到备VAM Server的所有VAM Client的IPv4私网地址映射信息。

[SecondaryServer] display vam server address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address  Public address              Type   NAT  Holding time

0          192.168.0.1      1.0.0.1                     Hub    No   0H 52M  7S

0          192.168.0.2      1.0.0.2                     Hub    No   0H 47M 31S

0          192.168.0.3      1.0.0.3                     Spoke  No   0H 28M 25S

0          192.168.0.4      1.0.0.4                     Spoke  No   0H 19M 15S

以上显示信息表示Hub1、Hub2、Spoke1和Spoke2均已将地址映射信息注册到VAM Server。

# 显示Hub1上的IPv4 ADVPN隧道信息。

[Hub1] display advpn session

Interface         : Tunnel1

Number of sessions: 3

Private address  Public address              Port  Type  State      Holding time

192.168.0.2      1.0.0.2                     --    H-H   Success    0H 46M  8S

192.168.0.3      1.0.0.3                     --    H-S   Success    0H 27M 27S

192.168.0.4      1.0.0.4                     --    H-S   Success    0H 18M 18S

以上显示信息表示Hub1与Hub2、Spoke1、Spoke2建立了永久隧道。Hub2上的显示信息与Hub1类似。

# 显示Spoke1上的IPv4 ADVPN隧道信息。

[Spoke1] display advpn session

Interface         : Tunnel1

Number of sessions: 2

Private address  Public address              Port  Type  State      Holding time

192.168.0.1      1.0.0.1                     --    S-H   Success    0H 46M  8S

192.168.0.2      1.0.0.2                     --    S-H   Success    0H 46M  8S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke2上的显示信息与Spoke1类似。

# 在Spoke1上ping Spoke2的私网地址192.168.0.4。

[Spoke1] ping 192.168.0.4

Ping 192.168.0.4 (192.168.0.4): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.0.4: icmp_seq=0 ttl=255 time=4.000 ms

56 bytes from 192.168.0.4: icmp_seq=1 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=2 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=3 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=4 ttl=255 time=1.000 ms

 

--- Ping statistics for 192.168.0.4 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.000/4.000/1.549 ms

# 显示Spoke1上的IPv4 ADVPN隧道信息。

[Spoke1] display advpn session

Interface         : Tunnel1

Number of sessions: 3

Private address  Public address              Port  Type  State      Holding time

192.168.0.1      1.0.0.1                     --    S-H   Success    0H 46M  8S

192.168.0.2      1.0.0.2                     --    S-H   Success    0H 46M  8S

192.168.0.4      1.0.0.4                     --    S-S   Success    0H  0M  1S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke1与Spoke2建立了Spoke-Spoke临时隧道。Spoke2上的显示信息与Spoke1类似。

1.11.2  IPv6 Full-Mesh类型ADVPN典型配置举例

1. 组网需求

·     在IPv6 Full-Mesh的组网方式下,主、备VAM Server负责管理、维护各个节点的信息;AAA服务器负责对VAM Client进行认证和计费管理;两个Hub互为备份,负责数据的转发和路由信息的交换。

·     Spoke与Hub之间建立永久的ADVPN隧道。

·     同一ADVPN域中,任意的两个Spoke之间在有数据时动态建立ADVPN隧道。

2. 组网图

图1-8 IPv6 Full-Mesh类型ADVPN组网图

设备

接口

IP地址

设备

接口

IP地址

Hub 1

GE1/0/1

1::1/64

Spoke 1

GE1/0/1

1::3/64

 

Tunnel1

192:168::1/64

 

GE1/0/2

192:168:1::1/64

Hub 2

GE1/0/1

1::2/64

 

Tunnel1

192:168::3/64

 

Tunnel1

192:168::2/64

Spoke 2

GE1/0/1

1::4/64

AAA server

 

1::10/64

 

GE1/0/2

192:168:2::1/64

Primary server

GE1/0/1

1::11/64

 

Tunnel1

192:168::4/64

Secondary server

GE1/0/1

1::12/64

 

 

 

 

3. 配置主VAM Server

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<PrimaryServer> system-view

[PrimaryServer] interface gigabitethernet 1/0/1

[PrimaryServer-GigabitEthernet1/0/1] ipv6 address 1::11/64

[PrimaryServer-GigabitEthernet1/0/1] quit

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[PrimaryServer] security-zone name untrust

[PrimaryServer-security-zone-Untrust] import interface gigabitethernet 1/0/1

[PrimaryServer-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使VAM Server可以向VAM Clinet发送VAM协议报文,具体配置步骤如下。

[PrimaryServer] security-policy ipv6

[PrimaryServer-security-policy-ipv6] rule name advpnlocalout

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] source-zone local

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::11

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::1 1::12

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] action pass

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使VAM Server可以接收和处理来自VAM Clinet的VAM协议报文,具体配置步骤如下。

[PrimaryServer-security-policy-ipv6] rule name advpnlocalin

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] destination-zone local

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::1 1::12

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::11

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] action pass

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] quit

[PrimaryServer-security-policy-ipv6] quit

(4)     配置AAA认证

# 配置RADIUS方案。

[PrimaryServer] radius scheme abc

[PrimaryServer-radius-abc] primary authentication ipv6 1::10 1812

[PrimaryServer-radius-abc] primary accounting ipv6 1::10 1813

[PrimaryServer-radius-abc] key authentication simple 123

[PrimaryServer-radius-abc] key accounting simple 123

[PrimaryServer-radius-abc] user-name-format without-domain

[PrimaryServer-radius-abc] quit

[PrimaryServer] radius session-control enable

# 配置ISP域的AAA方案。

[PrimaryServer] domain abc

[PrimaryServer-isp-abc] authentication advpn radius-scheme abc

[PrimaryServer-isp-abc] accounting advpn radius-scheme abc

[PrimaryServer-isp-abc] quit

[PrimaryServer] domain default enable abc

(5)     配置VAM Server,用于管理和维护VAM Client地址信息

[PrimaryServer] vam server advpn-domain abc id 1

[PrimaryServer-vam-server-domain-abc] hub-group 0

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::1

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::2

[PrimaryServer-vam-server-domain-abc-hub-group-0] spoke ipv6 private-address network 192:168::0 64

[PrimaryServer-vam-server-domain-abc-hub-group-0] quit

[PrimaryServer-vam-server-domain-abc] pre-shared-key simple 123456

[PrimaryServer-vam-server-domain-abc] authentication-method chap

[PrimaryServer-vam-server-domain-abc] server enable

[PrimaryServer-vam-server-domain-abc] quit

4. 配置备VAM Server

除IP地址外,备VAM Server的ADVPN配置与主VAM Server相同,不再赘述。

5. 配置Hub1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub1> system-view

[Hub1] interface gigabitethernet 1/0/1

[Hub1-GigabitEthernet1/0/1] ipv6 address 1::1 64

[Hub1-GigabitEthernet1/0/1] quit

[Hub1] interface tunnel 1 mode advpn gre ipv6

[Hub1-Tunnel1] ipv6 address 192:168::1 64

[Hub1-Tunnel1] ipv6 address fe80::1 link-local

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub1] security-zone name untrust

[Hub1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub1-security-zone-Untrust] import interface tunnel1

[Hub1-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub1] security-policy ipv6

[Hub1-security-policy-ipv6] rule name advpnlocalout

[Hub1-security-policy-ipv6-1-advpnlocalout] source-zone local

[Hub1-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Hub1-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::1

[Hub1-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Hub1-security-policy-ipv6-1-ipseclocalout] action pass

[Hub1-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name advpnlocalin

[Hub1-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Hub1-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Hub1-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Hub1-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::1

[Hub1-security-policy-ipv6-2-advpnlocalin] action pass

[Hub1-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ipseclocalout

[Hub1-security-policy-ipv6-3-ipseclocalout] source-zone local

[Hub1-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Hub1-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::1

[Hub1-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::2 1::4

[Hub1-security-policy-ipv6-3-ipseclocalout] action pass

[Hub1-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ipseclocalin

[Hub1-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Hub1-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Hub1-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::2 1::4

[Hub1-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::1

[Hub1-security-policy-ipv6-4-ipseclocalin] action pass

[Hub1-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ospflocalout

[Hub1-security-policy-ipv6-5-ospflocalout] source-zone local

[Hub1-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Hub1-security-policy-ipv6-5-ospflocalout] service ospf

[Hub1-security-policy-ipv6-5-ospflocalout] action pass

[Hub1-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ospflocalin

[Hub1-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Hub1-security-policy-ipv6-6-ospflocalin] destination-zone local

[Hub1-security-policy-ipv6-6-ospflocalin] service ospf

[Hub1-security-policy-ipv6-6-ospflocalin] action pass

[Hub1-security-policy-ipv6-6-ospflocalin] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub1] vam client name Hub1

[Hub1-vam-client-Hub1] advpn-domain abc

[Hub1-vam-client-Hub1] pre-shared-key simple 123456

[Hub1-vam-client-Hub1] user hub1 password simple hub1

[Hub1-vam-client-Hub1] server primary ipv6-address 1::11

[Hub1-vam-client-Hub1] server secondary ipv6-address 1::12

[Hub1-vam-client-Hub1] client enable

[Hub1-vam-client-Hub1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub1] ike keychain abc

[Hub1-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Hub1-ike-keychain-abc] quit

[Hub1] ike profile abc

[Hub1-ike-profile-abc] keychain abc

[Hub1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub1] ipsec transform-set abc

[Hub1-ipsec-transform-set-abc] encapsulation-mode transport

[Hub1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub1-ipsec-transform-set-abc] quit

[Hub1] ipsec profile abc isakmp

[Hub1-ipsec-profile-isakmp-abc] transform-set abc

[Hub1-ipsec-profile-isakmp-abc] ike-profile abc

[Hub1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Hub1] ospfv3 1

[Hub1-ospfv3-1] router-id 0.0.0.1

[Hub1-ospfv3-1] area 0

[Hub1-ospfv3-1-area-0.0.0.0] quit

[Hub1-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装模式的IPv6 ADVPN隧道接口Tunnel1。

[Hub1] interface tunnel1

[Hub1-Tunnel1] vam ipv6 client Hub1

[Hub1-Tunnel1] ospfv3 1 area 0

[Hub1-Tunnel1] ospfv3 network-type broadcast

[Hub1-Tunnel1] source gigabitethernet 1/0/1

[Hub1-Tunnel1] tunnel protection ipsec profile abc

[Hub1-Tunnel1] quit

6. 配置Hub2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub2> system-view

[Hub2] interface gigabitethernet 1/0/1

[Hub2-GigabitEthernet1/0/1] ipv6 address 1::2 64

[Hub2-GigabitEthernet1/0/1] quit

[Hub2] interface tunnel 1 mode advpn gre ipv6

[Hub2-Tunnel1] ipv6 address 192:168::2 64

[Hub2-Tunnel1] ipv6 address fe80::2 link-local

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub2] security-zone name untrust

[Hub2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub2-security-zone-Untrust] import interface tunnel1

[Hub2-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub2] security-policy ipv6

[Hub2-security-policy-ipv6] rule name advpnlocalout

[Hub2-security-policy-ipv6-1-advpnlocalout] source-zone local

[Hub2-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Hub2-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::2

[Hub2-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Hub2-security-policy-ipv6-1-ipseclocalout] action pass

[Hub2-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name advpnlocalin

[Hub2-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Hub2-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Hub2-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Hub2-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::2

[Hub2-security-policy-ipv6-2-advpnlocalin] action pass

[Hub2-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ipseclocalout

[Hub2-security-policy-ipv6-3-ipseclocalout] source-zone local

[Hub2-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Hub2-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::2

[Hub2-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::4

[Hub2-security-policy-ipv6-3-ipseclocalout] action pass

[Hub2-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ipseclocalin

[Hub2-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Hub2-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Hub2-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::4

[Hub2-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::2

[Hub2-security-policy-ipv6-4-ipseclocalin] action pass

[Hub2-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ospflocalout

[Hub2-security-policy-ipv6-5-ospflocalout] source-zone local

[Hub2-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Hub2-security-policy-ipv6-5-ospflocalout] service ospf

[Hub2-security-policy-ipv6-5-ospflocalout] action pass

[Hub2-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ospflocalin

[Hub2-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Hub2-security-policy-ipv6-6-ospflocalin] destination-zone local

[Hub2-security-policy-ipv6-6-ospflocalin] service ospf

[Hub2-security-policy-ipv6-6-ospflocalin] action pass

[Hub2-security-policy-ipv6-6-ospflocalin] quit

[Hub2-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub2] vam client name Hub2

[Hub2-vam-client-Hub2] advpn-domain abc

[Hub2-vam-client-Hub2] pre-shared-key simple 123456

[Hub2-vam-client-Hub2] user hub2 password simple hub2

[Hub2-vam-client-Hub2] server primary ipv6-address 1::11

[Hub2-vam-client-Hub2] server secondary ipv6-address 1::12

[Hub2-vam-client-Hub2] client enable

[Hub2-vam-client-Hub2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub2] ike keychain abc

[Hub2-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Hub2-ike-keychain-abc] quit

[Hub2] ike profile abc

[Hub2-ike-profile-abc] keychain abc

[Hub2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub2] ipsec transform-set abc

[Hub2-ipsec-transform-set-abc] encapsulation-mode transport

[Hub2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub2-ipsec-transform-set-abc] quit

[Hub2] ipsec profile abc isakmp

[Hub2-ipsec-profile-isakmp-abc] transform-set abc

[Hub2-ipsec-profile-isakmp-abc] ike-profile abc

[Hub2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Hub2] ospfv3 1

[Hub2-ospfv3-1] router-id 0.0.0.2

[Hub2-ospfv3-1] area 0

[Hub2-ospfv3-1-area-0.0.0.0] quit

[Hub2-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。

[Hub2] interface tunnel1

[Hub2-Tunnel1] vam ipv6 client Hub2

[Hub2-Tunnel1] ospfv3 1 area 0

[Hub2-Tunnel1] ospfv3 network-type broadcast

[Hub2-Tunnel1] source gigabitethernet 1/0/1

[Hub2-Tunnel1] tunnel protection ipsec profile abc

[Hub2-Tunnel1] quit

7. 配置Spoke1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke1> system-view

[Spoke1] interface gigabitethernet 1/0/1

[Spoke1-GigabitEthernet1/0/1] ipv6 address 1::3 64

[Spoke1-GigabitEthernet1/0/1] quit

[Spoke1] interface tunnel 1 mode advpn gre ipv6

[Spoke1-Tunnel1] ipv6 address 192:168::3 64

[Spoke1-Tunnel1] ipv6 address fe80::3 link-local

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke1] security-zone name untrust

[Spoke1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke1-security-zone-Untrust] import interface tunnel1

[Spoke1-security-zone-Untrust] quit

[Spoke1] security-zone name trust

[Spoke1-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke1-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke1] security-policy ipv6

[Spoke1-security-policy-ipv6] rule name advpnlocalout

[Spoke1-security-policy-ipv6-1-advpnlocalout] source-zone local

[Spoke1-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::3

[Spoke1-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Spoke1-security-policy-ipv6-1-ipseclocalout] action pass

[Spoke1-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name advpnlocalin

[Spoke1-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Spoke1-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Spoke1-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Spoke1-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::3

[Spoke1-security-policy-ipv6-2-advpnlocalin] action pass

[Spoke1-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ipseclocalout

[Spoke1-security-policy-ipv6-3-ipseclocalout] source-zone local

[Spoke1-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::3

[Spoke1-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::4

[Spoke1-security-policy-ipv6-3-ipseclocalout] action pass

[Spoke1-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ipseclocalin

[Spoke1-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Spoke1-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Spoke1-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::4

[Spoke1-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::3

[Spoke1-security-policy-ipv6-4-ipseclocalin] action pass

[Spoke1-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ospflocalout

[Spoke1-security-policy-ipv6-5-ospflocalout] source-zone local

[Spoke1-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-5-ospflocalout] service ospf

[Spoke1-security-policy-ipv6-5-ospflocalout] action pass

[Spoke1-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ospflocalin

[Spoke1-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Spoke1-security-policy-ipv6-6-ospflocalin] destination-zone local

[Spoke1-security-policy-ipv6-6-ospflocalin] service ospf

[Spoke1-security-policy-ipv6-6-ospflocalin] action pass

[Spoke1-security-policy-ipv6-6-ospflocalin] quit

[Spoke1-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke1] vam client name Spoke1

[Spoke1-vam-client-Spoke1] advpn-domain abc

[Spoke1-vam-client-Spoke1] pre-shared-key simple 123456

[Spoke1-vam-client-Spoke1] user spoke1 password simple spoke1

[Spoke1-vam-client-Spoke1] server primary ipv6-address 1::11

[Spoke1-vam-client-Spoke1] server secondary ipv6-address 1::12

[Spoke1-vam-client-Spoke1] client enable

[Spoke1-vam-client-Spoke1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke1] ike keychain abc

[Spoke1-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Spoke1-ike-keychain-abc] quit

[Spoke1] ike profile abc

[Spoke1-ike-profile-abc] keychain abc

[Spoke1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke1] ipsec transform-set abc

[Spoke1-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke1-ipsec-transform-set-abc] quit

[Spoke1] ipsec profile abc isakmp

[Spoke1-ipsec-profile-isakmp-abc] transform-set abc

[Spoke1-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Spoke1] ospfv3 1

[Spoke1-ospfv3-1] router-id 0.0.0.3

[Spoke1-ospfv3-1] area 0

[Spoke1-ospfv3-1-area-0.0.0.0] quit

[Spoke1-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。将Spoke1的DR优先级配置为0,以使Spoke1不参与DR/BDR选举。

[Spoke1] interface tunnel1

[Spoke1-Tunnel1] vam ipv6 client Spoke1

[Spoke1-Tunnel1] ospfv3 1 area 0

[Spoke1-Tunnel1] ospfv3 network-type broadcast

[Spoke1-Tunnel1] ospfv3 dr-priority 0

[Spoke1-Tunnel1] source gigabitethernet 1/0/1

[Spoke1-Tunnel1] tunnel protection ipsec profile abc

[Spoke1-Tunnel1] quit

8. 配置Spoke2

(1)     配置各接口的IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke2> system-view

[Spoke2] interface gigabitethernet 1/0/1

[Spoke2-GigabitEthernet1/0/1] ipv6 address 1::4 64

[Spoke2-GigabitEthernet1/0/1] quit

[Spoke2] interface tunnel 1 mode advpn gre ipv6

[Spoke2-Tunnel1] ipv6 address 192:168::4 64

[Spoke2-Tunnel1] ipv6 address fe80::4 link-local

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke2] security-zone name untrust

[Spoke2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke2-security-zone-Untrust] import interface tunnel1

[Spoke2-security-zone-Untrust] quit

[Spoke2] security-zone name trust

[Spoke2-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke2-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke2] security-policy ipv6

[Spoke2-security-policy-ipv6] rule name advpnlocalout

[Spoke2-security-policy-ipv6-1-advpnlocalout] source-zone local

[Spoke2-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::4

[Spoke2-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Spoke2-security-policy-ipv6-1-ipseclocalout] action pass

[Spoke2-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name advpnlocalin

[Spoke2-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Spoke2-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Spoke2-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Spoke2-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::4

[Spoke2-security-policy-ipv6-2-advpnlocalin] action pass

[Spoke2-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ipseclocalout

[Spoke2-security-policy-ipv6-3-ipseclocalout] source-zone local

[Spoke2-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::4

[Spoke2-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::3

[Spoke2-security-policy-ipv6-3-ipseclocalout] action pass

[Spoke2-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ipseclocalin

[Spoke2-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Spoke2-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Spoke2-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::3

[Spoke2-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::4

[Spoke2-security-policy-ipv6-4-ipseclocalin] action pass

[Spoke2-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ospflocalout

[Spoke2-security-policy-ipv6-5-ospflocalout] source-zone local

[Spoke2-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-5-ospflocalout] service ospf

[Spoke2-security-policy-ipv6-5-ospflocalout] action pass

[Spoke2-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ospflocalin

[Spoke2-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Spoke2-security-policy-ipv6-6-ospflocalin] destination-zone local

[Spoke2-security-policy-ipv6-6-ospflocalin] service ospf

[Spoke2-security-policy-ipv6-6-ospflocalin] action pass

[Spoke2-security-policy-ipv6-6-ospflocalin] quit

[Spoke2-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke2] vam client name Spoke2

[Spoke2-vam-client-Spoke2] advpn-domain abc

[Spoke2-vam-client-Spoke2] pre-shared-key simple 123456

[Spoke2-vam-client-Spoke2] user spoke2 password simple spoke2

[Spoke2-vam-client-Spoke2] server primary ipv6-address 1::11

[Spoke2-vam-client-Spoke2] server secondary ipv6-address 1::12

[Spoke2-vam-client-Spoke2] client enable

[Spoke2-vam-client-Spoke2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke2] ike keychain abc

[Spoke2-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Spoke2-ike-keychain-abc] quit

[Spoke2] ike profile abc

[Spoke2-ike-profile-abc] keychain abc

[Spoke2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke2] ipsec transform-set abc

[Spoke2-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke2-ipsec-transform-set-abc] quit

[Spoke2] ipsec profile abc isakmp

[Spoke2-ipsec-profile-isakmp-abc] transform-set abc

[Spoke2-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Spoke2] ospfv3 1

[Spoke2-ospfv3-1] router-id 0.0.0.4

[Spoke2-ospfv3-1] area 0

[Spoke2-ospfv3-1-area-0.0.0.0] quit

[Spoke2-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。将Spoke2的DR优先级配置为0,以使Spoke2不参与DR/BDR选举。

[Spoke2] interface tunnel1

[Spoke2-Tunnel1] vam ipv6 client Spoke2

[Spoke2-Tunnel1] ospfv3 1 area 0

[Spoke2-Tunnel1] ospfv3 network-type broadcast

[Spoke2-Tunnel1] ospfv3 dr-priority 0

[Spoke2-Tunnel1] source gigabitethernet 1/0/1

[Spoke2-Tunnel1] tunnel protection ipsec profile abc

[Spoke2-Tunnel1] quit

9. 验证配置

# 显示注册到主VAM Server的所有VAM Client的IPv6私网地址映射信息。

[PrimaryServer] display vam server ipv6 address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address       Public address         Type   NAT  Holding time

0          192:168::1            1::1                   Hub    No   0H 52M  7S

0          192:168::2            1::2                   Hub    No   0H 47M 31S

0          192:168::3            1::3                   Spoke  No   0H 28M 25S

0          192:168::4            1::4                   Spoke  No   0H 19M 15S

# 显示注册到备VAM Server的所有VAM Client的IPv6私网地址映射信息。

[SecondaryServer] display vam server ipv6 address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address       Public address         Type   NAT  Holding time

0          192:168::1            1::1                   Hub    No   0H 52M  7S

0          192:168::2            1::2                   Hub    No   0H 47M 31S

0          192:168::3            1::3                   Spoke  No   0H 28M 25S

0          192:168::4            1::4                   Spoke  No   0H 19M 15S

以上显示信息表示Hub1、Hub2、Spoke1和Spoke2均已将地址映射信息注册到VAM Server。

# 显示Hub1上的IPv6 ADVPN隧道信息。

[Hub1] display advpn ipv6 session

Interface         : Tunnel1

Number of sessions: 3

Private address       Public address        Port  Type  State      Holding time

192:168::2            1::2                  --    H-H   Success    0H 46M  8S

192:168::3            1::3                  --    H-S   Success    0H 27M 27S

192:168::4            1::4                  --    H-S   Success    0H 18M 18S

以上显示信息表示Hub1与Hub2、Spoke1、Spoke2建立了永久隧道。Hub2上的显示信息与Hub1类似。

# 显示Spoke1上的IPv6 ADVPN隧道信息。

[Spoke1] display advpn ipv6 session

Interface         : Tunnel1

Number of sessions: 2

Private address       Public address        Port  Type  State      Holding time

192:168::1            1::1                  --    S-H   Success    0H 46M  8S

192:168::2            1::2                  --    S-H   Success    0H 46M  8S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke2上的显示信息与Spoke1类似。

# 在Spoke1上ping Spoke2的私网地址192:168::4。

[Spoke1] ping ipv6 192:168::4

Ping6(56 data bytes) 192:168::4 --> 192:168::4, press CTRL_C to break

56 bytes from 192:168::4, icmp_seq=0 hlim=64 time=3.000 ms

56 bytes from 192:168::4, icmp_seq=1 hlim=64 time=0.000 ms

56 bytes from 192:168::4, icmp_seq=2 hlim=64 time=1.000 ms

56 bytes from 192:168::4, icmp_seq=3 hlim=64 time=1.000 ms

56 bytes from 192:168::4, icmp_seq=4 hlim=64 time=1.000 ms

 

--- Ping6 statistics for 192:168::4 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.200/3.000/0.980 ms

# 显示Spoke1上的IPv6 ADVPN隧道信息。

[Spoke1] display advpn ipv6 session

Interface         : Tunnel1

Number of sessions: 3

Private address       Public address        Port  Type  State      Holding time

192:168::1            1::1                  --    S-H   Success    0H 46M  8S

192:168::2            1::2                  --    S-H   Success    0H 46M  8S

192.168::4            1::4                  --    S-S   Success    0H 0M  1S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke1与Spoke2建立了Spoke-Spoke临时隧道。Spoke2上的显示信息与Spoke1类似。

1.11.3  IPv4 Hub-Spoke类型ADVPN典型配置举例

1. 组网需求

·     在IPv4 Hub-Spoke的组网方式下,数据通过Hub-Spoke隧道进行转发。主、备VAM Server负责管理、维护各个节点的信息;AAA服务器负责对VAM Client进行认证和计费管理;两个Hub互为备份,负责数据的转发和路由信息的交换。

·     Spoke与Hub之间建立永久的ADVPN隧道。

2. 组网图

图1-9 IPv4 Hub-Spoke类型ADVPN组网图

设备

接口

IP地址

设备

接口

IP地址

Hub 1

GE1/0/1

1.0.0.1/24

Spoke 1

GE1/0/1

1.0.0.3/24

 

Tunnel1

192.168.0.1/24

 

GE1/0/2

192.168.1.1/24

Hub 2

GE1/0/1

1.0.0.2/24

 

Tunnel1

192.168.0.3/24

 

Tunnel1

192.168.0.2/24

Spoke 2

GE1/0/1

1.0.0.4/24

AAA server

 

1.0.0.10/24

 

GE1/0/2

192.168.2.1/24

Primary server

GE1/0/1

1.0.0.11/24

 

Tunnel1

192.168.0.4/24

Secondary server

GE1/0/1

1.0.0.12/24

 

 

 

 

3. 配置主VAM Server

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<PrimaryServer> system-view

[PrimaryServer] interface gigabitethernet 1/0/1

[PrimaryServer-GigabitEthernet1/0/1] ip address 1.0.0.11 255.255.255.0

[PrimaryServer-GigabitEthernet1/0/1] quit

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[PrimaryServer] security-zone name untrust

[PrimaryServer-security-zone-Untrust] import interface gigabitethernet 1/0/1

[PrimaryServer-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使VAM Server可以向VAM Clinet发送VAM协议报文,具体配置步骤如下。

[PrimaryServer] security-policy ip

[PrimaryServer-security-policy-ip] rule name advpnlocalout

[PrimaryServer-security-policy-ip-1-advpnlocalout] source-zone local

[PrimaryServer-security-policy-ip-1-advpnlocalout] destination-zone untrust

[PrimaryServer-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.11

[PrimaryServer-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.1 1.0.0.12

[PrimaryServer-security-policy-ip-1-ipseclocalout] action pass

[PrimaryServer-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使VAM Server可以接收和处理来自VAM Clinet的VAM协议报文,具体配置步骤如下。

[PrimaryServer-security-policy-ip] rule name advpnlocalin

[PrimaryServer-security-policy-ip-2-advpnlocalin] source-zone untrust

[PrimaryServer-security-policy-ip-2-advpnlocalin] destination-zone local

[PrimaryServer-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.1 1.0.0.12

[PrimaryServer-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.11

[PrimaryServer-security-policy-ip-2-advpnlocalin] action pass

[PrimaryServer-security-policy-ip-2-advpnlocalin] quit

[PrimaryServer-security-policy-ip] quit

(4)     配置AAA认证

# 配置RADIUS方案。

<PrimaryServer> system-view

[PrimaryServer] radius scheme abc

[PrimaryServer-radius-abc] primary authentication 1.0.0.10 1812

[PrimaryServer-radius-abc] primary accounting 1.0.0.10 1813

[PrimaryServer-radius-abc] key authentication simple 123

[PrimaryServer-radius-abc] key accounting simple 123

[PrimaryServer-radius-abc] user-name-format without-domain

[PrimaryServer-radius-abc] quit

[PrimaryServer] radius session-control enable

# 配置ISP域的AAA方案。

[PrimaryServer] domain abc

[PrimaryServer-isp-abc] authentication advpn radius-scheme abc

[PrimaryServer-isp-abc] accounting advpn radius-scheme abc

[PrimaryServer-isp-abc] quit

[PrimaryServer] domain default enable abc

(5)     配置VAM Server,用于管理和维护VAM Client地址信息

[PrimaryServer] vam server advpn-domain abc id 1

[PrimaryServer-vam-server-domain-abc] hub-group 0

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub private-address 192.168.0.1

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub private-address 192.168.0.2

[PrimaryServer-vam-server-domain-abc-hub-group-0] spoke private-address network 192.168.0.0 255.255.255.0

[PrimaryServer-vam-server-domain-abc-hub-group-0] quit

[PrimaryServer-vam-server-domain-abc] pre-shared-key simple 123456

[PrimaryServer-vam-server-domain-abc] authentication-method chap

[PrimaryServer-vam-server-domain-abc] server enable

[PrimaryServer-vam-server-domain-abc] quit

4. 配置备VAM Server

除IP地址外,备VAM Server的ADVPN配置与主VAM Server相同,不再赘述。

5. 配置Hub1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub1> system-view

[Hub1] interface gigabitethernet 1/0/1

[Hub1-GigabitEthernet1/0/1] ip address 1.0.0.1 255.255.255.0

[Hub1-GigabitEthernet1/0/1] quit

[Hub1] interface tunnel1 mode advpn gre

[Hub1-Tunnel1] ip address 192.168.0.1 255.255.255.0

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub1] security-zone name untrust

[Hub1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub1-security-zone-Untrust] import interface tunnel1

[Hub1-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub1] security-policy ip

[Hub1-security-policy-ip] rule name advpnlocalout

[Hub1-security-policy-ip-1-advpnlocalout] source-zone local

[Hub1-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Hub1-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.1

[Hub1-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Hub1-security-policy-ip-1-ipseclocalout] action pass

[Hub1-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name advpnlocalin

[Hub1-security-policy-ip-2-advpnlocalin] source-zone untrust

[Hub1-security-policy-ip-2-advpnlocalin] destination-zone local

[Hub1-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Hub1-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.1

[Hub1-security-policy-ip-2-advpnlocalin] action pass

[Hub1-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ipseclocalout

[Hub1-security-policy-ip-3-ipseclocalout] source-zone local

[Hub1-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Hub1-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.1

[Hub1-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.2 1.0.0.4

[Hub1-security-policy-ip-3-ipseclocalout] action pass

[Hub1-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ipseclocalin

[Hub1-security-policy-ip-4-ipseclocalin] source-zone untrust

[Hub1-security-policy-ip-4-ipseclocalin] destination-zone local

[Hub1-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.2 1.0.0.4

[Hub1-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.1

[Hub1-security-policy-ip-4-ipseclocalin] action pass

[Hub1-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ospflocalout

[Hub1-security-policy-ip-5-ospflocalout] source-zone local

[Hub1-security-policy-ip-5-ospflocalout] destination-zone untrust

[Hub1-security-policy-ip-5-ospflocalout] service ospf

[Hub1-security-policy-ip-5-ospflocalout] action pass

[Hub1-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ip] rule name ospflocalin

[Hub1-security-policy-ip-6-ospflocalin] source-zone untrust

[Hub1-security-policy-ip-6-ospflocalin] destination-zone local

[Hub1-security-policy-ip-6-ospflocalin] service ospf

[Hub1-security-policy-ip-6-ospflocalin] action pass

[Hub1-security-policy-ip-6-ospflocalin] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub1] vam client name Hub1

[Hub1-vam-client-Hub1] advpn-domain abc

[Hub1-vam-client-Hub1] pre-shared-key simple 123456

[Hub1-vam-client-Hub1] user hub1 password simple hub1

[Hub1-vam-client-Hub1] server primary ip-address 1.0.0.11

[Hub1-vam-client-Hub1] server secondary ip-address 1.0.0.12

[Hub1-vam-client-Hub1] client enable

[Hub1-vam-client-Hub1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub1] ike keychain abc

[Hub1-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Hub1-ike-keychain-abc] quit

[Hub1] ike profile abc

[Hub1-ike-profile-abc] keychain abc

[Hub1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub1] ipsec transform-set abc

[Hub1-ipsec-transform-set-abc] encapsulation-mode transport

[Hub1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub1-ipsec-transform-set-abc] quit

[Hub1] ipsec profile abc isakmp

[Hub1-ipsec-profile-isakmp-abc] transform-set abc

[Hub1-ipsec-profile-isakmp-abc] ike-profile abc

[Hub1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Hub1] ospf 1

[Hub1-ospf-1] area 0

[Hub1-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Hub1-ospf-1-area-0.0.0.0] quit

[Hub1-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Hub1] interface tunnel1

[Hub1-Tunnel1] vam client Hub1

[Hub1-Tunnel1] ospf network-type p2mp

[Hub1-Tunnel1] source gigabitethernet 1/0/1

[Hub1-Tunnel1] tunnel protection ipsec profile abc

[Hub1-Tunnel1] quit

6. 配置Hub2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub2> system-view

[Hub2] interface gigabitethernet 1/0/1

[Hub2-GigabitEthernet1/0/1] ip address 1.0.0.2 255.255.255.0

[Hub2-GigabitEthernet1/0/1] quit

[Hub2] interface tunnel1 mode advpn gre

[Hub2-Tunnel1] ip address 192.168.0.2 255.255.255.0

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub2] security-zone name untrust

[Hub2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub2-security-zone-Untrust] import interface tunnel1

[Hub2-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub2] security-policy ip

[Hub2-security-policy-ip] rule name advpnlocalout

[Hub2-security-policy-ip-1-advpnlocalout] source-zone local

[Hub2-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Hub2-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.2

[Hub2-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Hub2-security-policy-ip-1-ipseclocalout] action pass

[Hub2-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name advpnlocalin

[Hub2-security-policy-ip-2-advpnlocalin] source-zone untrust

[Hub2-security-policy-ip-2-advpnlocalin] destination-zone local

[Hub2-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Hub2-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.2

[Hub2-security-policy-ip-2-advpnlocalin] action pass

[Hub2-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ipseclocalout

[Hub2-security-policy-ip-3-ipseclocalout] source-zone local

[Hub2-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Hub2-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.2

[Hub2-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.4

[Hub2-security-policy-ip-3-ipseclocalout] action pass

[Hub2-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ipseclocalin

[Hub2-security-policy-ip-4-ipseclocalin] source-zone untrust

[Hub2-security-policy-ip-4-ipseclocalin] destination-zone local

[Hub2-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.4

[Hub2-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.2

[Hub2-security-policy-ip-4-ipseclocalin] action pass

[Hub2-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ospflocalout

[Hub2-security-policy-ip-5-ospflocalout] source-zone local

[Hub2-security-policy-ip-5-ospflocalout] destination-zone untrust

[Hub2-security-policy-ip-5-ospflocalout] service ospf

[Hub2-security-policy-ip-5-ospflocalout] action pass

[Hub2-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ip] rule name ospflocalin

[Hub2-security-policy-ip-6-ospflocalin] source-zone untrust

[Hub2-security-policy-ip-6-ospflocalin] destination-zone local

[Hub2-security-policy-ip-6-ospflocalin] service ospf

[Hub2-security-policy-ip-6-ospflocalin] action pass

[Hub2-security-policy-ip-6-ospflocalin] quit

[Hub2-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub2] vam client name Hub2

[Hub2-vam-client-Hub2] advpn-domain abc

[Hub2-vam-client-Hub2] pre-shared-key simple 123456

[Hub2-vam-client-Hub2] user hub2 password simple hub2

[Hub2-vam-client-Hub2] server primary ip-address 1.0.0.11

[Hub2-vam-client-Hub2] server secondary ip-address 1.0.0.12

[Hub2-vam-client-Hub2] client enable

[Hub2-vam-client-Hub2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub2] ike keychain abc

[Hub2-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Hub2-ike-keychain-abc] quit

[Hub2] ike profile abc

[Hub2-ike-profile-abc] keychain abc

[Hub2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub2] ipsec transform-set abc

[Hub2-ipsec-transform-set-abc] encapsulation-mode transport

[Hub2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub2-ipsec-transform-set-abc] quit

[Hub2] ipsec profile abc isakmp

[Hub2-ipsec-profile-isakmp-abc] transform-set abc

[Hub2-ipsec-profile-isakmp-abc] ike-profile abc

[Hub2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Hub2] ospf 1

[Hub2-ospf-1] area 0

[Hub2-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Hub2-ospf-1-area-0.0.0.0] quit

[Hub2-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Hub2] interface tunnel1

[Hub2-Tunnel1] vam client Hub2

[Hub2-Tunnel1] ospf network-type p2mp

[Hub2-Tunnel1] source gigabitethernet 1/0/1

[Hub2-Tunnel1] tunnel protection ipsec profile abc

[Hub2-Tunnel1] quit

7. 配置Spoke1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke1> system-view

[Spoke1] interface gigabitethernet 1/0/1

[Spoke1-GigabitEthernet1/0/1] ip address 1.0.0.3 255.255.255.0

[Spoke1-GigabitEthernet1/0/1] quit

[Spoke1] interface tunnel 1 mode advpn gre

[Spoke1-Tunnel1] ip address 192.168.0.3 255.255.255.0

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke1] security-zone name untrust

[Spoke1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke1-security-zone-Untrust] import interface tunnel1

[Spoke1-security-zone-Untrust] quit

[Spoke1] security-zone name trust

[Spoke1-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke1-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke1] security-policy ip

[Spoke1-security-policy-ip] rule name advpnlocalout

[Spoke1-security-policy-ip-1-advpnlocalout] source-zone local

[Spoke1-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Spoke1-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.3

[Spoke1-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Spoke1-security-policy-ip-1-ipseclocalout] action pass

[Spoke1-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name advpnlocalin

[Spoke1-security-policy-ip-2-advpnlocalin] source-zone untrust

[Spoke1-security-policy-ip-2-advpnlocalin] destination-zone local

[Spoke1-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Spoke1-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.3

[Spoke1-security-policy-ip-2-advpnlocalin] action pass

[Spoke1-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ipseclocalout

[Spoke1-security-policy-ip-3-ipseclocalout] source-zone local

[Spoke1-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Spoke1-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.3

[Spoke1-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.4

[Spoke1-security-policy-ip-3-ipseclocalout] action pass

[Spoke1-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ipseclocalin

[Spoke1-security-policy-ip-4-ipseclocalin] source-zone untrust

[Spoke1-security-policy-ip-4-ipseclocalin] destination-zone local

[Spoke1-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.4

[Spoke1-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.3

[Spoke1-security-policy-ip-4-ipseclocalin] action pass

[Spoke1-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ospflocalout

[Spoke1-security-policy-ip-5-ospflocalout] source-zone local

[Spoke1-security-policy-ip-5-ospflocalout] destination-zone untrust

[Spoke1-security-policy-ip-5-ospflocalout] service ospf

[Spoke1-security-policy-ip-5-ospflocalout] action pass

[Spoke1-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ip] rule name ospflocalin

[Spoke1-security-policy-ip-6-ospflocalin] source-zone untrust

[Spoke1-security-policy-ip-6-ospflocalin] destination-zone local

[Spoke1-security-policy-ip-6-ospflocalin] service ospf

[Spoke1-security-policy-ip-6-ospflocalin] action pass

[Spoke1-security-policy-ip-6-ospflocalin] quit

[Spoke1-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke1] vam client name Spoke1

[Spoke1-vam-client-Spoke1] advpn-domain abc

[Spoke1-vam-client-Spoke1] pre-shared-key simple 123456

[Spoke1-vam-client-Spoke1] user spoke1 password simple spoke1

[Spoke1-vam-client-Spoke1] server primary ip-address 1.0.0.11

[Spoke1-vam-client-Spoke1] server secondary ip-address 1.0.0.12

[Spoke1-vam-client-Spoke1] client enable

[Spoke1-vam-client-Spoke1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke1] ike keychain abc

[Spoke1-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Spoke1-ike-keychain-abc] quit

[Spoke1] ike profile abc

[Spoke1-ike-profile-abc] keychain abc

[Spoke1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke1] ipsec transform-set abc

[Spoke1-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke1-ipsec-transform-set-abc] quit

[Spoke1] ipsec profile abc isakmp

[Spoke1-ipsec-profile-isakmp-abc] transform-set abc

[Spoke1-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Spoke1] ospf 1

[Spoke1-ospf-1] area 0

[Spoke1-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Spoke1-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255

[Spoke1-ospf-1-area-0.0.0.0] quit

[Spoke1-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Spoke1] interface tunnel1

[Spoke1-Tunnel1] vam client Spoke1

[Spoke1-Tunnel1] ospf network-type p2mp

[Spoke1-Tunnel1] source gigabitethernet 1/0/1

[Spoke1-Tunnel1] tunnel protection ipsec profile abc

[Spoke1-Tunnel1] quit

8. 配置Spoke2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke2> system-view

[Spoke2] interface gigabitethernet 1/0/1

[Spoke2-GigabitEthernet1/0/1] ip address 1.0.0.4 255.255.255.0

[Spoke2-GigabitEthernet1/0/1] quit

[Spoke2] interface tunnel 1 mode advpn gre

[Spoke2-Tunnel1] ip address 192.168.0.4 255.255.255.0

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke2] security-zone name untrust

[Spoke2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke2-security-zone-Untrust] import interface tunnel1

[Spoke2-security-zone-Untrust] quit

[Spoke2] security-zone name trust

[Spoke2-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke2-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke2] security-policy ip

[Spoke2-security-policy-ip] rule name advpnlocalout

[Spoke2-security-policy-ip-1-advpnlocalout] source-zone local

[Spoke2-security-policy-ip-1-advpnlocalout] destination-zone untrust

[Spoke2-security-policy-ip-1-advpnlocalout] source-ip-host 1.0.0.4

[Spoke2-security-policy-ip-1-advpnlocalout] destination-ip-range 1.0.0.10 1.0.0.12

[Spoke2-security-policy-ip-1-ipseclocalout] action pass

[Spoke2-security-policy-ip-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name advpnlocalin

[Spoke2-security-policy-ip-2-advpnlocalin] source-zone untrust

[Spoke2-security-policy-ip-2-advpnlocalin] destination-zone local

[Spoke2-security-policy-ip-2-advpnlocalin] source-ip-range 1.0.0.10 1.0.0.12

[Spoke2-security-policy-ip-2-advpnlocalin] destination-ip-host 1.0.0.4

[Spoke2-security-policy-ip-2-advpnlocalin] action pass

[Spoke2-security-policy-ip-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ipseclocalout

[Spoke2-security-policy-ip-3-ipseclocalout] source-zone local

[Spoke2-security-policy-ip-3-ipseclocalout] destination-zone untrust

[Spoke2-security-policy-ip-3-ipseclocalout] source-ip-host 1.0.0.4

[Spoke2-security-policy-ip-3-ipseclocalout] destination-ip-range 1.0.0.1 1.0.0.3

[Spoke2-security-policy-ip-3-ipseclocalout] action pass

[Spoke2-security-policy-ip-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ipseclocalin

[Spoke2-security-policy-ip-4-ipseclocalin] source-zone untrust

[Spoke2-security-policy-ip-4-ipseclocalin] destination-zone local

[Spoke2-security-policy-ip-4-ipseclocalin] source-ip-range 1.0.0.1 1.0.0.3

[Spoke2-security-policy-ip-4-ipseclocalin] destination-ip-host 1.0.0.4

[Spoke2-security-policy-ip-4-ipseclocalin] action pass

[Spoke2-security-policy-ip-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ospflocalout

[Spoke2-security-policy-ip-5-ospflocalout] source-zone local

[Spoke2-security-policy-ip-5-ospflocalout] destination-zone untrust

[Spoke2-security-policy-ip-5-ospflocalout] service ospf

[Spoke2-security-policy-ip-5-ospflocalout] action pass

[Spoke2-security-policy-ip-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ip] rule name ospflocalin

[Spoke2-security-policy-ip-6-ospflocalin] source-zone untrust

[Spoke2-security-policy-ip-6-ospflocalin] destination-zone local

[Spoke2-security-policy-ip-6-ospflocalin] service ospf

[Spoke2-security-policy-ip-6-ospflocalin] action pass

[Spoke2-security-policy-ip-6-ospflocalin] quit

[Spoke2-security-policy-ip] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke2] vam client name Spoke2

[Spoke2-vam-client-Spoke2] advpn-domain abc

[Spoke2-vam-client-Spoke2] pre-shared-key simple 123456

[Spoke2-vam-client-Spoke2] user spoke2 password simple spoke2

[Spoke2-vam-client-Spoke2] server primary ip-address 1.0.0.11

[Spoke2-vam-client-Spoke2] server secondary ip-address 1.0.0.12

[Spoke2-vam-client-Spoke2] client enable

[Spoke2-vam-client-Spoke2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke2] ike keychain abc

[Spoke2-ike-keychain-abc] pre-shared-key address 0.0.0.0 0.0.0.0 key simple 123456

[Spoke2-ike-keychain-abc] quit

[Spoke2] ike profile abc

[Spoke2-ike-profile-abc] keychain abc

[Spoke2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke2] ipsec transform-set abc

[Spoke2-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke2-ipsec-transform-set-abc] quit

[Spoke2] ipsec profile abc isakmp

[Spoke2-ipsec-profile-isakmp-abc] transform-set abc

[Spoke2-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPF路由

# 配置私网的路由信息。

[Spoke2] ospf 1

[Spoke2-ospf-1] area 0

[Spoke2-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255

[Spoke2-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255

[Spoke2-ospf-1-area-0.0.0.0] quit

[Spoke2-ospf-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv4 ADVPN隧道接口Tunnel1。

[Spoke2] interface tunnel1

[Spoke2-Tunnel1] vam client Spoke2

[Spoke2-Tunnel1] ospf network-type p2mp

[Spoke2-Tunnel1] source gigabitethernet 1/0/1

[Spoke2-Tunnel1] tunnel protection ipsec profile abc

[Spoke2-Tunnel1] quit

9. 验证配置

# 显示注册到主VAM Server的所有VAM Client的IPv4私网地址映射信息。

[PrimaryServer] display vam server address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address  Public address              Type   NAT  Holding time

0          192.168.0.1      1.0.0.1                     Hub    No   0H 52M  7S

0          192.168.0.2      1.0.0.2                     Hub    No   0H 47M 31S

0          192.168.0.3      1.0.0.3                     Spoke  No   0H 28M 25S

0          192.168.0.4      1.0.0.4                     Spoke  No   0H 19M 15S

# 显示注册到备VAM Server的所有VAM Client的IPv4私网地址映射信息。

[SecondaryServer] display vam server address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address  Public address              Type   NAT  Holding time

0          192.168.0.1      1.0.0.1                     Hub    No   0H 52M  7S

0          192.168.0.2      1.0.0.2                     Hub    No   0H 47M 31S

0          192.168.0.3      1.0.0.3                     Spoke  No   0H 28M 25S

0          192.168.0.4      1.0.0.4                     Spoke  No   0H 19M 15S

以上显示信息表示Hub1、Hub2、Spoke1和Spoke2均已将地址映射信息注册到VAM Server。

# 显示Hub1上的IPv4 ADVPN隧道信息。

[Hub1] display advpn session

Interface         : Tunnel1

Number of sessions: 3

Private address  Public address              Port  Type  State      Holding time

192.168.0.2      1.0.0.2                     --    H-H   Success    0H 46M  8S

192.168.0.3      1.0.0.3                     --    H-S   Success    0H 27M 27S

192.168.0.4      1.0.0.4                     --    H-S   Success    0H 18M 18S

以上显示信息表示Hub1与Hub2、Spoke1、Spoke2建立了永久隧道。Hub2上的显示信息与Hub1类似。

# 显示Spoke1上的IPv4 ADVPN隧道信息。

[Spoke1] display advpn session

Interface         : Tunnel1

Number of sessions: 2

Private address  Public address              Port  Type  State      Holding time

192.168.0.1      1.0.0.1                     --    S-H   Success    0H 46M  8S

192.168.0.2      1.0.0.2                     --    S-H   Success    0H 46M  8S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke2上的显示信息与Spoke1类似。

# 在Spoke1上ping Spoke2的私网地址192.168.0.4。

[Spoke1] ping 192.168.0.4

Ping 192.168.0.4 (192.168.0.4): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.0.4: icmp_seq=0 ttl=255 time=4.000 ms

56 bytes from 192.168.0.4: icmp_seq=1 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=2 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=3 ttl=255 time=0.000 ms

56 bytes from 192.168.0.4: icmp_seq=4 ttl=255 time=1.000 ms

 

--- Ping statistics for 192.168.0.4 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.000/4.000/1.549 ms

1.11.4  IPv6 Hub-Spoke类型ADVPN典型配置举例

1. 组网需求

·     在IPv6 Hub-Spoke的组网方式下,数据通过Hub-Spoke隧道进行转发。主、备VAM Server负责管理、维护各个节点的信息;AAA服务器负责对VAM Client进行认证和计费管理;两个Hub互为备份,负责数据的转发和路由信息的交换。

·     Spoke与Hub之间建立永久的ADVPN隧道。

2. 组网图

图1-10 IPv6 Hub-Spoke类型ADVPN组网图

设备

接口

IP地址

设备

接口

IP地址

Hub 1

GE1/0/1

1::1/64

Spoke 1

GE1/0/1

1::3/64

 

Tunnel1

192:168::1/64

 

GE1/0/2

192:168:1::1/64

Hub 2

GE1/0/1

1::2/64

 

Tunnel1

192:168::3/64

 

Tunnel1

192:168::2/64

Spoke 2

GE1/0/1

1::4/64

AAA server

 

1::10/64

 

GE1/0/2

192:168:2::1/64

Primary server

GE1/0/1

1::11/64

 

Tunnel1

192:168::4/64

Secondary server

GE1/0/1

1::12/64

 

 

 

 

3. 配置主VAM Server

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<PrimaryServer> system-view

[PrimaryServer] interface gigabitethernet 1/0/1

[PrimaryServer-GigabitEthernet1/0/1] ipv6 address 1::11/64

[PrimaryServer-GigabitEthernet1/0/1] quit

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[PrimaryServer] security-zone name untrust

[PrimaryServer-security-zone-Untrust] import interface gigabitethernet 1/0/1

[PrimaryServer-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使VAM Server可以向VAM Clinet发送VAM协议报文,具体配置步骤如下。

[PrimaryServer] security-policy ipv6

[PrimaryServer-security-policy-ipv6] rule name advpnlocalout

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] source-zone local

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::11

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::1 1::12

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] action pass

[PrimaryServer-security-policy-ipv6-1-advpnlocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使VAM Server可以接收和处理来自VAM Clinet的VAM协议报文,具体配置步骤如下。

[PrimaryServer-security-policy-ipv6] rule name advpnlocalin

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] destination-zone local

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::1 1::12

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::11

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] action pass

[PrimaryServer-security-policy-ipv6-2-advpnlocalin] quit

[PrimaryServer-security-policy-ipv6] quit

(4)     配置AAA认证

# 配置RADIUS方案。

<PrimaryServer> system-view

[PrimaryServer] radius scheme abc

[PrimaryServer-radius-abc] primary authentication ipv6 1::10 1812

[PrimaryServer-radius-abc] primary accounting ipv6 1::10 1813

[PrimaryServer-radius-abc] key authentication simple 123

[PrimaryServer-radius-abc] key accounting simple 123

[PrimaryServer-radius-abc] user-name-format without-domain

[PrimaryServer-radius-abc] quit

[PrimaryServer] radius session-control enable

# 配置ISP域的AAA方案。

[PrimaryServer] domain abc

[PrimaryServer-isp-abc] authentication advpn radius-scheme abc

[PrimaryServer-isp-abc] accounting advpn radius-scheme abc

[PrimaryServer-isp-abc] quit

[PrimaryServer] domain default enable abc

(5)     配置VAM Server,用于管理和维护VAM Client地址信息

[PrimaryServer] vam server advpn-domain abc id 1

[PrimaryServer-vam-server-domain-abc] hub-group 0

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::1

[PrimaryServer-vam-server-domain-abc-hub-group-0] hub ipv6 private-address 192:168::2

[PrimaryServer-vam-server-domain-abc-hub-group-0] spoke ipv6 private-address network 192:168::0 64

[PrimaryServer-vam-server-domain-abc-hub-group-0] quit

[PrimaryServer-vam-server-domain-abc] pre-shared-key simple 123456

[PrimaryServer-vam-server-domain-abc] authentication-method chap

[PrimaryServer-vam-server-domain-abc] server enable

[PrimaryServer-vam-server-domain-abc] quit

4. 配置备VAM Server

除IP地址外,备VAM Server的ADVPN配置与主VAM Server相同,不再赘述。

5. 配置Hub1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub1> system-view

[Hub1] interface gigabitethernet 1/0/1

[Hub1-GigabitEthernet1/0/1] ipv6 address 1::1 64

[Hub1-GigabitEthernet1/0/1] quit

[Hub1] interface tunnel 1 mode advpn gre ipv6

[Hub1-Tunnel1] ipv6 address 192:168::1 64

[Hub1-Tunnel1] ipv6 address fe80::1 link-local

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub1] security-zone name untrust

[Hub1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub1-security-zone-Untrust] import interface tunnel1

[Hub1-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub1] security-policy ipv6

[Hub1-security-policy-ipv6] rule name advpnlocalout

[Hub1-security-policy-ipv6-1-advpnlocalout] source-zone local

[Hub1-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Hub1-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::1

[Hub1-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Hub1-security-policy-ipv6-1-ipseclocalout] action pass

[Hub1-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name advpnlocalin

[Hub1-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Hub1-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Hub1-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Hub1-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::1

[Hub1-security-policy-ipv6-2-advpnlocalin] action pass

[Hub1-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ipseclocalout

[Hub1-security-policy-ipv6-3-ipseclocalout] source-zone local

[Hub1-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Hub1-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::1

[Hub1-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::2 1::4

[Hub1-security-policy-ipv6-3-ipseclocalout] action pass

[Hub1-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ipseclocalin

[Hub1-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Hub1-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Hub1-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::2 1::4

[Hub1-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::1

[Hub1-security-policy-ipv6-4-ipseclocalin] action pass

[Hub1-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ospflocalout

[Hub1-security-policy-ipv6-5-ospflocalout] source-zone local

[Hub1-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Hub1-security-policy-ipv6-5-ospflocalout] service ospf

[Hub1-security-policy-ipv6-5-ospflocalout] action pass

[Hub1-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub1-security-policy-ipv6] rule name ospflocalin

[Hub1-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Hub1-security-policy-ipv6-6-ospflocalin] destination-zone local

[Hub1-security-policy-ipv6-6-ospflocalin] service ospf

[Hub1-security-policy-ipv6-6-ospflocalin] action pass

[Hub1-security-policy-ipv6-6-ospflocalin] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub1] vam client name Hub1

[Hub1-vam-client-Hub1] advpn-domain abc

[Hub1-vam-client-Hub1] pre-shared-key simple 123456

[Hub1-vam-client-Hub1] user hub1 password simple hub1

[Hub1-vam-client-Hub1] server primary ipv6-address 1::11

[Hub1-vam-client-Hub1] server secondary ipv6-address 1::12

[Hub1-vam-client-Hub1] client enable

[Hub1-vam-client-Hub1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub1] ike keychain abc

[Hub1-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Hub1-ike-keychain-abc] quit

[Hub1] ike profile abc

[Hub1-ike-profile-abc] keychain abc

[Hub1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub1] ipsec transform-set abc

[Hub1-ipsec-transform-set-abc] encapsulation-mode transport

[Hub1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub1-ipsec-transform-set-abc] quit

[Hub1] ipsec profile abc isakmp

[Hub1-ipsec-profile-isakmp-abc] transform-set abc

[Hub1-ipsec-profile-isakmp-abc] ike-profile abc

[Hub1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Hub1] ospfv3 1

[Hub1-ospfv3-1] router-id 0.0.0.1

[Hub1-ospfv3-1] area 0

[Hub1-ospfv3-1-area-0.0.0.0] quit

[Hub1-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。

[Hub1] interface tunnel1

[Hub1-Tunnel1] vam ipv6 client Hub1

[Hub1-Tunnel1] ospfv3 1 area 0

[Hub1-Tunnel1] ospfv3 network-type p2mp

[Hub1-Tunnel1] source gigabitethernet 1/0/1

[Hub1-Tunnel1] tunnel protection ipsec profile abc

[Hub1-Tunnel1] quit

6. 配置Hub2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Hub2> system-view

[Hub2] interface gigabitethernet 1/0/1

[Hub2-GigabitEthernet1/0/1] ipv6 address 1::2 64

[Hub2-GigabitEthernet1/0/1] quit

[Hub2] interface tunnel 1 mode advpn gre ipv6

[Hub2-Tunnel1] ipv6 address 192:168::2 64

[Hub2-Tunnel1] ipv6 address fe80::2 link-local

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Hub2] security-zone name untrust

[Hub2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Hub2-security-zone-Untrust] import interface tunnel1

[Hub2-security-zone-Untrust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Hub2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Hub2] security-policy ipv6

[Hub2-security-policy-ipv6] rule name advpnlocalout

[Hub2-security-policy-ipv6-1-advpnlocalout] source-zone local

[Hub2-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Hub2-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::2

[Hub2-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Hub2-security-policy-ipv6-1-ipseclocalout] action pass

[Hub2-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Hub2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name advpnlocalin

[Hub2-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Hub2-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Hub2-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Hub2-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::2

[Hub2-security-policy-ipv6-2-advpnlocalin] action pass

[Hub2-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Hub2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ipseclocalout

[Hub2-security-policy-ipv6-3-ipseclocalout] source-zone local

[Hub2-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Hub2-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::2

[Hub2-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::4

[Hub2-security-policy-ipv6-3-ipseclocalout] action pass

[Hub2-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ipseclocalin

[Hub2-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Hub2-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Hub2-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::4

[Hub2-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::2

[Hub2-security-policy-ipv6-4-ipseclocalin] action pass

[Hub2-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Hub2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ospflocalout

[Hub2-security-policy-ipv6-5-ospflocalout] source-zone local

[Hub2-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Hub2-security-policy-ipv6-5-ospflocalout] service ospf

[Hub2-security-policy-ipv6-5-ospflocalout] action pass

[Hub2-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Hub2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Hub2-security-policy-ipv6] rule name ospflocalin

[Hub2-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Hub2-security-policy-ipv6-6-ospflocalin] destination-zone local

[Hub2-security-policy-ipv6-6-ospflocalin] service ospf

[Hub2-security-policy-ipv6-6-ospflocalin] action pass

[Hub2-security-policy-ipv6-6-ospflocalin] quit

[Hub2-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Hub2] vam client name Hub2

[Hub2-vam-client-Hub2] advpn-domain abc

[Hub2-vam-client-Hub2] pre-shared-key simple 123456

[Hub2-vam-client-Hub2] user hub2 password simple hub2

[Hub2-vam-client-Hub2] server primary ipv6-address 1::11

[Hub2-vam-client-Hub2] server secondary ipv6-address 1::12

[Hub2-vam-client-Hub2] client enable

[Hub2-vam-client-Hub2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Hub2] ike keychain abc

[Hub2-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Hub2-ike-keychain-abc] quit

[Hub2] ike profile abc

[Hub2-ike-profile-abc] keychain abc

[Hub2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Hub2] ipsec transform-set abc

[Hub2-ipsec-transform-set-abc] encapsulation-mode transport

[Hub2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Hub2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Hub2-ipsec-transform-set-abc] quit

[Hub2] ipsec profile abc isakmp

[Hub2-ipsec-profile-isakmp-abc] transform-set abc

[Hub2-ipsec-profile-isakmp-abc] ike-profile abc

[Hub2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Hub2] ospfv3 1

[Hub2-ospfv3-1] router-id 0.0.0.2

[Hub2-ospfv3-1] area 0

[Hub2-ospfv3-1-area-0.0.0.0] quit

[Hub2-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。

[Hub2] interface tunnel1

[Hub2-Tunnel1] vam ipv6 client Hub2

[Hub2-Tunnel1] ospfv3 1 area 0

[Hub2-Tunnel1] ospfv3 network-type p2mp

[Hub2-Tunnel1] source gigabitethernet 1/0/1

[Hub2-Tunnel1] tunnel protection ipsec profile abc

[Hub2-Tunnel1] quit

7. 配置Spoke1

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke1> system-view

[Spoke1] interface gigabitethernet 1/0/1

[Spoke1-GigabitEthernet1/0/1] ipv6 address 1::3 64

[Spoke1-GigabitEthernet1/0/1] quit

[Spoke1] interface tunnel 1 mode advpn gre ipv6

[Spoke1-Tunnel1] ipv6 address 192:168::3 64

[Spoke1-Tunnel1] ipv6 address fe80::3 link-local

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke1] security-zone name untrust

[Spoke1-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke1-security-zone-Untrust] import interface tunnel1

[Spoke1-security-zone-Untrust] quit

[Spoke1] security-zone name trust

[Spoke1-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke1-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke1可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke1] security-policy ipv6

[Spoke1-security-policy-ipv6] rule name advpnlocalout

[Spoke1-security-policy-ipv6-1-advpnlocalout] source-zone local

[Spoke1-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::3

[Spoke1-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Spoke1-security-policy-ipv6-1-ipseclocalout] action pass

[Spoke1-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke1可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name advpnlocalin

[Spoke1-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Spoke1-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Spoke1-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Spoke1-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::3

[Spoke1-security-policy-ipv6-2-advpnlocalin] action pass

[Spoke1-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke1可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ipseclocalout

[Spoke1-security-policy-ipv6-3-ipseclocalout] source-zone local

[Spoke1-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::3

[Spoke1-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::4

[Spoke1-security-policy-ipv6-3-ipseclocalout] action pass

[Spoke1-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ipseclocalin

[Spoke1-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Spoke1-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Spoke1-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::4

[Spoke1-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::3

[Spoke1-security-policy-ipv6-4-ipseclocalin] action pass

[Spoke1-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke1可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ospflocalout

[Spoke1-security-policy-ipv6-5-ospflocalout] source-zone local

[Spoke1-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Spoke1-security-policy-ipv6-5-ospflocalout] service ospf

[Spoke1-security-policy-ipv6-5-ospflocalout] action pass

[Spoke1-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke1可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke1-security-policy-ipv6] rule name ospflocalin

[Spoke1-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Spoke1-security-policy-ipv6-6-ospflocalin] destination-zone local

[Spoke1-security-policy-ipv6-6-ospflocalin] service ospf

[Spoke1-security-policy-ipv6-6-ospflocalin] action pass

[Spoke1-security-policy-ipv6-6-ospflocalin] quit

[Spoke1-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke1] vam client name Spoke1

[Spoke1-vam-client-Spoke1] advpn-domain abc

[Spoke1-vam-client-Spoke1] pre-shared-key simple 123456

[Spoke1-vam-client-Spoke1] user spoke1 password simple spoke1

[Spoke1-vam-client-Spoke1] server primary ipv6-address 1::11

[Spoke1-vam-client-Spoke1] server secondary ipv6-address 1::12

[Spoke1-vam-client-Spoke1] client enable

[Spoke1-vam-client-Spoke1] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke1] ike keychain abc

[Spoke1-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Spoke1-ike-keychain-abc] quit

[Spoke1] ike profile abc

[Spoke1-ike-profile-abc] keychain abc

[Spoke1-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke1] ipsec transform-set abc

[Spoke1-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke1-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke1-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke1-ipsec-transform-set-abc] quit

[Spoke1] ipsec profile abc isakmp

[Spoke1-ipsec-profile-isakmp-abc] transform-set abc

[Spoke1-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke1-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Spoke1] ospfv3 1

[Spoke1-ospfv3-1] router-id 0.0.0.3

[Spoke1-ospfv3-1] area 0

[Spoke1-ospfv3-1-area-0.0.0.0] quit

[Spoke1-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。

[Spoke1] interface tunnel1

[Spoke1-Tunnel1] vam ipv6 client Spoke1

[Spoke1-Tunnel1] ospfv3 1 area 0

[Spoke1-Tunnel1] ospfv3 network-type p2mp

[Spoke1-Tunnel1] source gigabitethernet 1/0/1

[Spoke1-Tunnel1] tunnel protection ipsec profile abc

[Spoke1-Tunnel1] quit

8. 配置Spoke2

(1)     配置接口IP地址

# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。

<Spoke2> system-view

[Spoke2] interface gigabitethernet 1/0/1

[Spoke2-GigabitEthernet1/0/1] ipv6 address 1::4 64

[Spoke2-GigabitEthernet1/0/1] quit

[Spoke2] interface tunnel 1 mode advpn gre ipv6

[Spoke2-Tunnel1] ipv6 address 192:168::4 64

[Spoke2-Tunnel1] ipv6 address fe80::4 link-local

请参考以上步骤配置其他接口的IP地址,具体配置步骤略。

(2)     配置接口加入安全域。

# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。

[Spoke2] security-zone name untrust

[Spoke2-security-zone-Untrust] import interface gigabitethernet 1/0/1

[Spoke2-security-zone-Untrust] import interface tunnel1

[Spoke2-security-zone-Untrust] quit

[Spoke2] security-zone name trust

[Spoke2-security-zone-Trust] import interface gigabitethernet 1/0/2

[Spoke2-security-zone-Trust] quit

(3)     配置安全策略

# 配置名称为advpnlocalout的安全策规则,使Spoke2可以向VAM Server发送VAM协议报文,具体配置步骤如下。

[Spoke2] security-policy ipv6

[Spoke2-security-policy-ipv6] rule name advpnlocalout

[Spoke2-security-policy-ipv6-1-advpnlocalout] source-zone local

[Spoke2-security-policy-ipv6-1-advpnlocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-1-advpnlocalout] source-ip-host 1::4

[Spoke2-security-policy-ipv6-1-advpnlocalout] destination-ip-range 1::10 1::12

[Spoke2-security-policy-ipv6-1-ipseclocalout] action pass

[Spoke2-security-policy-ipv6-1-ipseclocalout] quit

# 配置名称为advpnlocalin的安全策略规则,使Spoke2可以接收和处理来自VAM Server的VAM协议报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name advpnlocalin

[Spoke2-security-policy-ipv6-2-advpnlocalin] source-zone untrust

[Spoke2-security-policy-ipv6-2-advpnlocalin] destination-zone local

[Spoke2-security-policy-ipv6-2-advpnlocalin] source-ip-range 1::10 1::12

[Spoke2-security-policy-ipv6-2-advpnlocalin] destination-ip-host 1::4

[Spoke2-security-policy-ipv6-2-advpnlocalin] action pass

[Spoke2-security-policy-ipv6-2-advpnlocalin] quit

# 配置名称为ipseclocalout的安全策规则,使Spoke2可以向其他VAM Client发送IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ipseclocalout

[Spoke2-security-policy-ipv6-3-ipseclocalout] source-zone local

[Spoke2-security-policy-ipv6-3-ipseclocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-3-ipseclocalout] source-ip-host 1::4

[Spoke2-security-policy-ipv6-3-ipseclocalout] destination-ip-range 1::1 1::3

[Spoke2-security-policy-ipv6-3-ipseclocalout] action pass

[Spoke2-security-policy-ipv6-3-ipseclocalout] quit

# 配置名称为ipseclocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的IPsec协商报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ipseclocalin

[Spoke2-security-policy-ipv6-4-ipseclocalin] source-zone untrust

[Spoke2-security-policy-ipv6-4-ipseclocalin] destination-zone local

[Spoke2-security-policy-ipv6-4-ipseclocalin] source-ip-range 1::1 1::3

[Spoke2-security-policy-ipv6-4-ipseclocalin] destination-ip-host 1::4

[Spoke2-security-policy-ipv6-4-ipseclocalin] action pass

[Spoke2-security-policy-ipv6-4-ipseclocalin] quit

# 配置名称为ospflocalout的安全策规则,使Spoke2可以向其他VAM Client发送OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ospflocalout

[Spoke2-security-policy-ipv6-5-ospflocalout] source-zone local

[Spoke2-security-policy-ipv6-5-ospflocalout] destination-zone untrust

[Spoke2-security-policy-ipv6-5-ospflocalout] service ospf

[Spoke2-security-policy-ipv6-5-ospflocalout] action pass

[Spoke2-security-policy-ipv6-5-ospflocalout] quit

# 配置名称为ospflocalin的安全策略规则,使Spoke2可以接收和处理来自其他VAM Clinet的OSPF报文,具体配置步骤如下。

[Spoke2-security-policy-ipv6] rule name ospflocalin

[Spoke2-security-policy-ipv6-6-ospflocalin] source-zone untrust

[Spoke2-security-policy-ipv6-6-ospflocalin] destination-zone local

[Spoke2-security-policy-ipv6-6-ospflocalin] service ospf

[Spoke2-security-policy-ipv6-6-ospflocalin] action pass

[Spoke2-security-policy-ipv6-6-ospflocalin] quit

[Spoke2-security-policy-ipv6] quit

(4)     配置VAM Client,用于建立ADVPN网络

[Spoke2] vam client name Spoke2

[Spoke2-vam-client-Spoke2] advpn-domain abc

[Spoke2-vam-client-Spoke2] pre-shared-key simple 123456

[Spoke2-vam-client-Spoke2] user spoke2 password simple spoke2

[Spoke2-vam-client-Spoke2] server primary ipv6-address 1::11

[Spoke2-vam-client-Spoke2] server secondary ipv6-address 1::12

[Spoke2-vam-client-Spoke2] client enable

[Spoke2-vam-client-Spoke2] quit

(5)     配置IPsec安全框架

# 配置IKE框架。

[Spoke2] ike keychain abc

[Spoke2-ike-keychain-abc] pre-shared-key address ipv6 :: 0 key simple 123456

[Spoke2-ike-keychain-abc] quit

[Spoke2] ike profile abc

[Spoke2-ike-profile-abc] keychain abc

[Spoke2-ike-profile-abc] quit

# 配置IPsec安全框架。

[Spoke2] ipsec transform-set abc

[Spoke2-ipsec-transform-set-abc] encapsulation-mode transport

[Spoke2-ipsec-transform-set-abc] esp encryption-algorithm des-cbc

[Spoke2-ipsec-transform-set-abc] esp authentication-algorithm sha1

[Spoke2-ipsec-transform-set-abc] quit

[Spoke2] ipsec profile abc isakmp

[Spoke2-ipsec-profile-isakmp-abc] transform-set abc

[Spoke2-ipsec-profile-isakmp-abc] ike-profile abc

[Spoke2-ipsec-profile-isakmp-abc] quit

(6)     配置OSPFv3路由

# 启动OSPFv3,以发布私网的路由信息。

[Spoke2] ospfv3 1

[Spoke2-ospfv3-1] router-id 0.0.0.4

[Spoke2-ospfv3-1] area 0

[Spoke2-ospfv3-1-area-0.0.0.0] quit

[Spoke2-ospfv3-1] quit

(7)     配置ADVPN隧道

# 配置GRE封装的IPv6 ADVPN隧道接口Tunnel1。

[Spoke2] interface tunnel1

[Spoke2-Tunnel1] vam ipv6 client Spoke2

[Spoke2-Tunnel1] ospfv3 1 area 0

[Spoke2-Tunnel1] ospfv3 network-type p2mp

[Spoke2-Tunnel1] source gigabitethernet 1/0/1

[Spoke2-Tunnel1] tunnel protection ipsec profile abc

[Spoke2-Tunnel1] quit

9. 验证配置

# 显示注册到主VAM Server的所有VAM Client的IPv6私网地址映射信息。

[PrimaryServer] display vam server ipv6 address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address       Public address         Type   NAT  Holding time

0          192:168::1            1::1                   Hub    No   0H 52M  7S

0          192:168::2            1::2                   Hub    No   0H 47M 31S

0          192:168::3            1::3                   Spoke  No   0H 28M 25S

0          192:168::4            1::4                   Spoke  No   0H 19M 15S

# 显示注册到备VAM Server的所有VAM Client的IPv6私网地址映射信息。

[SecondaryServer] display vam server ipv6 address-map

ADVPN domain name: abc

Total private address mappings: 4

Group      Private address       Public address         Type   NAT  Holding time

0          192:168::1            1::1                   Hub    No   0H 52M  7S

0          192:168::2            1::2                   Hub    No   0H 47M 31S

0          192:168::3            1::3                   Spoke  No   0H 28M 25S

0          192:168::4            1::4                   Spoke  No   0H 19M 15S

以上显示信息表示Hub1、Hub2、Spoke1和Spoke2均已将地址映射信息注册到VAM Server。

# 显示Hub1上的IPv6 ADVPN隧道信息。

[Hub1] display advpn ipv6 session

Interface         : Tunnel1

Number of sessions: 3

Private address       Public address        Port  Type  State      Holding time

192:168::2            1::2                  --    H-H   Success    0H 46M  8S

192:168::3            1::3                  --    H-S   Success    0H 27M 27S

192:168::4            1::4                  --    H-S   Success    0H 18M 18S

以上显示信息表示Hub1与Hub2、Spoke1、Spoke2建立了永久隧道。Hub2上的显示信息与Hub1类似。

# 显示Spoke1上的IPv6 ADVPN隧道信息。

[Spoke1] display advpn ipv6 session

Interface         : Tunnel1

Number of sessions: 2

Private address       Public address        Port  Type  State      Holding time

192:168::1            1::1                  --    S-H   Success    0H 46M  8S

192:168::2            1::2                  --    S-H   Success    0H 46M  8S

以上显示信息表示Spoke1与Hub1、Hub2建立了Hub-Spoke永久隧道。Spoke2上的显示信息与Spoke1类似。

# 在Spoke1上ping Spoke2的私网地址192:168::4。

[Spoke1] ping ipv6 192:168::4

Ping6(56 data bytes) 192:168::4 --> 192:168::4, press CTRL_C to break

56 bytes from 192:168::4, icmp_seq=0 hlim=64 time=3.000 ms

56 bytes from 192:168::4, icmp_seq=1 hlim=64 time=0.000 ms

56 bytes from 192:168::4, icmp_seq=2 hlim=64 time=1.000 ms

56 bytes from 192:168::4, icmp_seq=3 hlim=64 time=1.000 ms

56 bytes from 192:168::4, icmp_seq=4 hlim=64 time=1.000 ms

 

--- Ping6 statistics for 192:168::4 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.200/3.000/0.980 ms

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们