H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx

上传人:b****3 文档编号:17563976 上传时间:2022-12-07 格式:DOCX 页数:45 大小:329.17KB
下载 相关 举报
H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx_第1页
第1页 / 共45页
H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx_第2页
第2页 / 共45页
H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx_第3页
第3页 / 共45页
H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx_第4页
第4页 / 共45页
H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx_第5页
第5页 / 共45页
点击查看更多>>
下载资源
资源描述

H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx

《H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx》由会员分享,可在线阅读,更多相关《H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx(45页珍藏版)》请在冰豆网上搜索。

H3C MSR系列路由器IPsec典型配置举例V7参考优选Word文档格式.docx

5.6 

6IPsec同流双隧道的典型配置举例

6.1 

6.2 

6.3 

6.3.1DeviceA的配置

6.3.2DeviceB的配置

6.4 

6.5 

相关资料

 

本文档介绍IPsec的典型配置举例。

本文档适用于使用ComwareV7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。

如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解IPsec特性。

如图1所示,PPP用户Host与Device建立L2TP隧道,Windowsserver2003作为CA服务器,要求:

∙ 

通过L2TP隧道访问Corporatenetwork。

用IPsec对L2TP隧道进行数据加密。

采用RSA证书认证方式建立IPsec隧道。

图1 

基于证书认证的L2TPoverIPsec配置组网图

由于使用证书认证方式建立IPsec隧道,所以需要在ikeprofile中配置local-identity为dn,指定从本端证书中的主题字段取得本端身份。

本举例是在R0106版本上进行配置和验证的。

3.4.1 

Device的配置

(1) 

配置各接口IP地址

配置接口GigabitEthernet2/0/1的IP地址。

<

Device>

system-view

[Device]interfacegigabitethernet2/0/1

[Device-GigabitEthernet2/0/1]ipaddress192.168.100.5024

[Device-GigabitEthernet2/0/1]quit

配置接口GigabitEthernet2/0/2的IP地址。

[Device]interfacegigabitethernet2/0/2

[Device-GigabitEthernet2/0/2]ipaddress102.168.1.1124

[Device-GigabitEthernet2/0/2]quit

配置接口GigabitEthernet2/0/3的IP地址。

[Device]interfacegigabitethernet2/0/3

[Device-GigabitEthernet2/0/3]ipaddress192.168.1.124

[Device-GigabitEthernet2/0/3]quit

(2) 

配置L2TP

创建本地PPP用户l2tpuser,设置密码为hello。

[Device]local-userl2tpuserclassnetwork

[Device-luser-network-l2tpuser]passwordsimplehello

[Device-luser-network-l2tpuser]service-typeppp

[Device-luser-network-l2tpuser]quit

配置ISP域system对PPP用户采用本地验证。

[Device]domainsystem

[Device-isp-system]authenticationppplocal

[Device-isp-system]quit

启用L2TP服务。

[Device]l2tpenable

创建接口Virtual-Template0,配置接口的IP地址为172.16.0.1/24。

[Device]interfacevirtual-template0

[Device-Virtual-Template0]ipaddress172.16.0.1255.255.255.0

配置PPP认证方式为PAP。

[Device-Virtual-Template0]pppauthentication-modepap

配置为PPP用户分配的IP地址为172.16.0.2。

[Device-Virtual-Template0]remoteaddress172.16.0.2

[Device-Virtual-Template0]quit

创建LNS模式的L2TP组1。

[Device]l2tp-group1modelns

配置LNS侧本端名称为lns。

[Device-l2tp1]tunnelnamelns

关闭L2TP隧道验证功能。

[Device-l2tp1]undotunnelauthentication

指定接收呼叫的虚拟模板接口为VT0。

[Device-l2tp1]allowl2tpvirtual-template0

[Device-l2tp1]quit

(3) 

配置PKI证书

配置PKI实体 

security。

[Device]pkientitysecurity

[Device-pki-entity-security]common-namedevice

[Device-pki-entity-security]quit

新建PKI域。

[Device]pkidomainheadgate

[Device-pki-domain-headgate]caidentifierLYQ

[Device-pki-domain-headgate]certificaterequesturlhttp:

//192.168.1.51/certsrv/mscep/mscep.dll

[Device-pki-domain-headgate]certificaterequestfromra

[Device-pki-domain-headgate]certificaterequestentitysecurity

[Device-pki-domain-headgate]undocrlcheckenable

[Device-pki-domain-headgate] 

public-keyrsageneralnameabclength1024

[Device-pki-domain-headgate]quit

生成RSA算法的本地密钥对。

[Device]public-keylocalcreatersanameabc

Therangeofpublickeymodulusis(512~2048).

Ifthekeymodulusisgreaterthan512,itwilltakeafewminutes.

PressCTRL+Ctoabort.

Inputthemoduluslength[default=1024]:

GeneratingKeys...

..........................++++++

.++++++

Createthekeypairsuccessfully.

获取CA证书并下载至本地。

[Device]pkiretrieve-certificatedomainheadgateca

ThetrustedCA'

sfingerprintis:

MD5 

fingerprint:

86497A4BEAD542CF50314C99BFS32A99

SHA1fingerprint:

61A96034181E650212FA5A5FBA120EA05187031C

Isthefingerprintcorrect?

(Y/N):

y

Retrievedthecertificatessuccessfully.

手工申请本地证书。

[Device]pkirequest-certificatedomainheadgate

Starttorequestgeneralcertificate...

Certificaterequestedsuccessfully.

(4) 

配置IPsec隧道

创建IKE安全提议。

[Device]ikeproposal1

[Device-ike-proposal-1]authentication-methodrsa-signature

[Device-ike-proposal-1]encryption-algorithm3des-cbc

[Device-ike-proposal-1]dhgroup2

[Device-ike-proposal-1]quit

配置IPsec安全提议。

[Device]ipsectransform-settran1

[Device-ipsec-transform-set-tran1]espauthentication-algorithmsha1

[Device-ipsec-transform-set-tran1]espencryption-algorithm3des

[Device-ipsec-transform-set-tran1]quit

配置IKEprofile。

[Device]ikeprofileprofile1

[Device-ike-profile-profile1]local-identitydn

[Device-ike-profile-profile1]certificatedomainheadgate

[Device-ike-profile-profile1]proposal1

[Device-ike-profile-profile1]matchremotecertificatedevice

[Device-ike-profile-profile1]quit

在采用数字签名认证时,指定总从本端证书中的主题字段取得本端身份。

[Device]ikesignature-identityfrom-certificate

创建一条IPsec安全策略模板,名称为template1,序列号为1。

[Device] 

ipsecpolicy-templatetemplate11

[Device-ipsec-policy-template-template1-1]transform-settran1

[Device-ipsec-policy-template-template1-1]ike-profileprofile1

[Device-ipsec-policy-template-template1-1]quit

引用IPsec安全策略模板创建一条IPsec安全策略,名称为policy1,顺序号为1。

[Device]ipsecpolicypolicy11isakmptemplatetemplate1

在接口上应用IPsec安全策略。

[Device-GigabitEthernet2/0/2]ipsecapplypolicypolicy1

3.4.2 

Host的配置

从证书服务器上申请客户端证书

登录到证书服务器:

http:

//192.168.1.51/certsrv 

,点击“申请一个证书”。

进入申请证书页面

点击“高级证书申请”。

图2 

高级证书申请

选择第一项:

创建并向此CA提交一个申请。

图3 

创建并向CA提交一个申请

填写相关信息。

需要的证书类型,选择“客户端身份验证证书”;

密钥选项的配置,勾选“标记密钥为可导出”前的复选框。

点击<

提交>

,弹出一提示框 

在对话框中选择“是”。

点击安装此证书。

图4 

安装证书

iNode客户端的配置(使用iNode版本为:

iNodePC5.2(E0409))

打开L2TPVPN连接,并单击“属性…(Y)”。

图5 

打开L2TP连接

输入LNS服务器的地址,并启用IPsec安全协议,验证证方法选择证书认证。

图6 

基本配置

单击<

高级(C)>

按钮,进入“L2TP设置”页签,设置L2TP参数如下图所示。

图7 

L2TP设置

单击“IPsec设置”页签,配置IPsec参数。

图8 

IPsec参数设置

单击“IKE设置”页签,配置IKE参数。

图9 

IKE参数设置

单击“路由设置”页签,添加访问Corporatenetwork的路由。

图10 

路由设置

完成上述配置后,单击<

确定>

按钮,回到L2TP连接页面。

在L2TP连接对话框中,输入用户名“l2tpuser”和密码“hello”,单击<

连接>

按钮。

图11 

连接L2TP

在弹出的对话框中选择申请好的证书,单击<

图12 

证书选择

通过下图可以看到L2TP连接成功。

图13 

连接成功

图14 

在Device上使用displayikesa命令,可以看到IPsec隧道第一阶段的SA正常建立。

displayikesa

Connection-ID 

Remote 

Flag 

DOI

------------------------------------------------------------------

10 

102.168.1.1 

RD 

IPSEC

Flags:

RD--READYRL--REPLACEDFD-FADING

在Device上使用displayipsecsa命令可以看到IPsecSA的建立情况。

displayipsecsa

-------------------------------

Interface:

GigabitEthernet2/0/2

-----------------------------

IPsecpolicy:

policy1

Sequencenumber:

1

Mode:

template

Tunnelid:

0

Encapsulationmode:

tunnel

Perfectforwardsecrecy:

PathMTU:

1443

Tunnel:

local 

address:

102.168.1.11

remoteaddress:

102.168.1.1

Flow:

souraddr:

102.168.1.11/255.255.255.255 

port:

1701 

protocol:

udp

destaddr:

102.168.1.1/255.255.255.255 

[InboundESPSAs]

SPI:

2187699078(0x8265a386)

Transformset:

ESP-ENCRYPT-3DES-CBCESP-AUTH-SHA1

SAduration(kilobytes/sec):

1843200/3600

SAremainingduration(kilobytes/sec):

1843197/3294

Maxreceivedsequence-number:

51

Anti-replaycheckenable:

Y

Anti-replaywindowsize:

64

UDPencapsulationusedforNATtraversal:

N

Status:

Active

[OutboundESPSAs]

3433374591(0xcca5237f)

Maxsentsequence-number:

52

#

interfaceVirtual-Template0

pppauthentication-modepap

remoteaddress172.16.0.2

ipaddress172.16.0.1255.255.255.0

interfaceGigabitEthernet2/0/1

ipaddress192.168.100.50255.255.255.0

interfaceGigabitEthernet2/0/2

ipaddress102.168.1.11255.255.255.0

ipsecapplypolicypolicy1

interfaceGigabitEthernet2/0/3

ipaddress192.168.1.1255.255.255.0

domainsystem

authenticationppplocal

local-userl2tpuserclassnetwork

passwordcipher$c$3$nl46fURLtkCkcbdnB6irTXma+E6u0c+h

service-typeppp

authorization-attributeuser-rolenetwork-operator

pkidomainheadgate

caidentifierLYQ

certificaterequesturlhttp:

certificaterequestfromra

certificaterequestentitysecurity

public-keyrsageneralnameabc

undocrlcheckenable

pkientitysecurity

common-namehost

ipsectransform-settran1

espencryption-algorithm3des-cbc

espauthentication-algorithmsha1

transform-settran1

ike-profileprofile1

ipsecpolicypolicy11isakmptemplatetemplate1

l2tp-group1modelns

allowl2tpvirtual-template0

undotunnelauthentication

tunnelnamelns

l2tpenable

ikesignature-identityfrom-certificate

ikeprofileprofile1

certificatedomainheadgate

local-identitydn

matchremotecertificatedevice

proposal1

ikeproposal1

authentication-methodrsa-signature

encryption-algorithm3des-cbc

dhgroup2

IPsecoverGRE的典型配置举例

如图15所示,企业远程办公网络通过IPsecVPN接入企业总部,要求:

通过GRE隧道传输两网络之间的IPsec加密数据。

图15 

IPsecoverGRE组网图

为了对数据先进行IPsec处理,再进行GRE封装,访问控制列表需匹配数据的原始范围,并且要将IPsec应用到GRE隧道接口上。

为了对网络间传输的数据先进行IPsec封装,再进行GRE封装,需要配置IPsec隧道的对端IP地址为GRE隧道的接口地址。

4.4.1 

DeviceA的配置

配置各接口IP地

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 其它课程

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1